Hi,

The input parameter declaration you have needs a bit of a modification. It 
should be:

<xsd:element name="FirstOperation">
    <xsd:complexType>
        <xsd:sequence>
            <xsd:element name="Param1" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>
</xsd:element>

The reason for this is that we expect operations to take zero or more 
parameters so there needs to be a complexType/sequence element. We don't 
handle the special case of one parameter, but if you think this is 
important please open a JIRA item and we will add this support in the next 
version.

Thanks,
Andrew

Andrew Eberbach
Autonomic Computing
(919) 254-2645
T/L: 444-2645
[EMAIL PROTECTED]



"Rachana Ananthakrishnan" <[EMAIL PROTECTED]> 
03/08/2007 10:43 AM
Please respond to
[email protected]


To
<[email protected]>
cc

Subject
RE: Incorrect code generated with  wsdl2java tool






I used the WSDL as is from the binary installation. The WSDL file is
attached.

Thanks,
Rachana 

> -----Original Message-----
> From: Daniel Jemiolo [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, March 08, 2007 12:21 PM
> To: [email protected]
> Subject: Re: Incorrect code generated with wsdl2java tool
> 
> I just tried 2.1's wsdl2java on SimpleResource.wsdl and got 
> the following code generated:
> 
> 
> public interface IMyCapability
> {
>     String PREFIX = "tns";
> 
>     String NAMESPACE_URI = 
> "http://ws.apache.org/muse/test/simple/first";;
> 
>     public String firstOperation(String Param1) throws Exception;
> 
> }
> 
> 
> What does your WSDL look like? How does it differ from the content in 
> SimpleResource.wsdl? It may just break one of the conventions 
> listed here:
> 
> 
> http://ws.apache.org/muse/docs/2.1.0/manual/tools/wsdl-convent
> ions.html
> 
> Dan
> 
> 
> 
> "Rachana Ananthakrishnan" <[EMAIL PROTECTED]> wrote on 03/08/2007 
> 01:03:24 PM:
> 
> > Hi,
> > 
> > I am trying to use the wsdl2java tool to generate source to 
> use in a 
> Muse
> > 2.1.0 deployment. I used the template WSDL and added some custom 
> operations
> > (int add(int), int getValue()), but it seems like my input 
> parameters in 
> the
> > methods that are generated are always void. 
> > 
> > For example:
> > 
> >  public int add() throws Exception    {
> >         //TODO implement addInput
> >         throw new RuntimeException("Unimplemented Method: 
> addInput");
> >     }
> > 
> >     public Element setValue() throws Exception    {
> >         //TODO implement setValue
> >         throw new RuntimeException("Unimplemented Method: 
> setValue");
> >     }
> > 
> > To test things, I used the wsdl from the samples/simple
> > (SimpleResource.wsdl). The command I ran was:
> > 
> > C:\cygwin\home\ranantha\muse\simpleWsdl>M:\bin\wsdl2java.bat -axis2 
> -wsdl
> > 
> C:\cygwin\home\ranantha\muse\muse-2.1.0-bin\samples\j2ee\simpl
> e\wsdl\SimpleR
> > esource.wsdl
> > 
> > WARNING: [ID = 'NoWSRPSchema'] No WS-RP schema found.
> > 
> > Looking at the generated capability file, the input 
> parameter is void:
> > 
> > public String firstOperation() throws Exception    {
> >         //TODO implement firstOperation
> >         throw new RuntimeException("Unimplemented Method: 
> firstOperation");
> >     }
> > 
> > The input parameter should have been an int, like the provided 
> capability
> > file in samples:
> > 
> >  public String firstOperation(String param1)
> >     {
> >         return "[RESPONSE] " + param1;
> >     }
> > }
> > 
> > Is there any other input required for the generated code to 
> reflect the 
> WSDL
> > correctly ?
> > 
> > Thanks,
> > Rachana
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to