Hi Brian,
 
AFAIK, Multiple parts in your WSDL violates WS-I Basic Profile [1].
 
Axis2 *might* support only WS-I conformant WSDLs.
 
Regards,
 
Ali Sadik Kumlali
[1] http://www.ws-i.org/Profiles/BasicProfile-1.1.html
 
----- Original Message ----
From: Brian Dillon (ext. 944) <[EMAIL PROTECTED]>
To: axis-user@ws.apache.org
Sent: Friday, September 1, 2006 5:03:06 PM
Subject: [axis 2] multiple parameters in a request

Hi,

I am  using the axis 2 wsdl2java generator and have run into a problem. If I have request (e.g. findPerson) which takes multuple parameters (FirstName and LastName) how can this be represented in WSDL.

 

Previoulsy in Axis 1.3 we used;

 <wsdl:message name="findPersonRequest"> 

<wsdl:part name="lastName" type="xsd:string"/> 

 <wsdl:part name="firstName" type="xsd:string"/> 

</wsdl:message> 

<wsdl:message name="findPersonResponse">

<wsdl:part name="people" type="xsd:string"/>

</wsdl:message>

 But with Axis 2 I get the following exception

: FINEST, generate, , ->, {http://fineos.com}findPersonResponse
: FINEST, getXMLInterface, , ->, {http://fineos.com}findPersonResponse
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lan
g.RuntimeException: java.lang.IllegalStateException: The class com.fineos.FindPersonRespon
se has already been created.
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngin
e.java:185)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)

If I instead use

<wsdl:message name="findPersonRequest">

<wsdl:part element="impl:inputElement" name="lastName"/>

<wsdl:part element="impl:inputElement" name="firstName"/>

</wsdl:message>

<wsdl:message name="findPersonResponse">

<wsdl:part element="impl:outputElement" name="people"/>

</wsdl:message> 

 

Where inputElement is a string element I get the following;

 

 : FINEST, getSGFactory, , Created instance of org.apache.ws.jaxme.generator.sg.impl.JAXBS
Factory
: FINEST, getSGFactory, , <-,
[EMAIL PROTECTED]
: FINEST, parse, , Parser = [EMAIL PROTECTED], validatin
 = false
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.la
g.RuntimeException: org.apache.ws.jaxme.xs.parser.impl.LocSAXException: At line 5: The re
erenced element {http://fineos.com}inputElement is undefined.
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngi
e.java:185)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)

 

So my question is, is there a way of defining an operation in Axis 2 which takes multiple parameters ?

 

Thanks,

Brian

__________________________________________________________

The information contained in this e-mail is confidential, may be privileged and is intended

only for the user of the recipient named above. If you are not the intended recipient or a

representative of the intended recipient, you have received this e-mail in error and must

not copy, use or disclose the contents of this e-mail to anybody else.

 

If you have received this e-mail in error, please notify the sender immediately by return

e-mail and permanently delete the copy you received. This e-mail has been swept for

computer viruses. However, you should carry out your own virus checks.

Registered in Ireland, No. 205721. http://www.FINEOS.com

__________________________________________________________

 


Reply via email to