Anne, Thanks. It was the wrapped document/literal style we used in Axis 1, so I suppose we will need to wait for this for Axis2. Any idea when this support might be added ?
Thanks, Brian -----Original Message----- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: 01 September 2006 22:56 To: [email protected]; Ali Sadik Kumlali Subject: Re: [axis 2] multiple parameters in a request We need to see the rest of your WSDL to diagnose the problem. When using document style, the message may contain at most one body part, and the part must reference an element. When using RPC style, the message may contain any number of body parts, and the parts must reference types. Axis2 supports document/literal and (I believe) RPC/literal. It does not support RPC/encoded. If you want to use document literal, then you must define a wrapper element that contains your parameters. There is a convention called "wrapped" document/literal supported in Axis 1, which can automatically wrap and unwrap your parameters from this wrapper element. The wrapped convention is not yet supported in Axis2 (although it's coming soon). See http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html for more information on the wrapped style and an example of a WSDL. Anne On 9/1/06, Ali Sadik Kumlali <[EMAIL PROTECTED]> wrote: > > > 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: [email protected] > 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(CodeGenera > tionEngin > 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(CodeGenera > tionEngi > 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 > > __________________________________________________________ > > > > --------------------------------------------------------------------- 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]
