You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ax...@ws.apache.org on 2004/09/07 15:43:39 UTC
[jira] Created: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXIS-1547
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-1547
Summary: Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Type: Bug
Status: Unassigned
Priority: Major
Project: Axis
Components:
Serialization/Deserialization
WSDL processing
Versions:
beta-2
Assignee:
Reporter: Eric Chijioke
Created: Tue, 7 Sep 2004 6:43 AM
Updated: Tue, 7 Sep 2004 6:43 AM
Environment: WSDL, Windows XP, J2EE 1.3
Description:
I sent this (accidentally) to axis-user list.
I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
I am currently using Axis 1.2 beta to expose my web service.
I am using the document/literal (wrapped) configuration.
The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
Given this operation (defined in my WSDL):
<operation name="getFactor">
<input name="getFactorRequest" message="impl:getFactorIn"/>
<output name="getFactorResponse" message="impl:getFactorOut"/>
</operation>
---------------------------------------------------------------------------------
The corresponding input and output messages are defined a follows:
<message name="getFactorIn">
<part name="parameters" element="intf:getFactor"/>
</message>
<message name="getFactorOut">
<part name="parameters" element="intf:getFactorResponse"/>
</message>
---------------------------------------------------------------------------------
The corresponding elements are defined as follows:
<element name="getFactor">
<complexType>
<sequence>
<element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="getFactorResponse">
<complexType>
<sequence>
<element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
</sequence>
</complexType>
</element>
---------------------------------------------------------------------------------
I won't bother providing the schema for the intf:Factor type.
Here's the question:
When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
<getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
<getFactorReturn>
<name>My Test Factor</name>
<id>1</id>
</getFactorReturn>
</getFactorResponse>
</soapenv:Body>
</soapenv:Envelope>
I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
<getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
<factor>
<name>My Test Factor</name>
<id>1</id>
</factor>
</getFactorResponse>
</soapenv:Body>
</soapenv:Envelope>
The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
Thank You,
Eric Chijioke
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by "Bill Keese (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1547?page=comments#action_59552 ]
Bill Keese commented on AXIS-1547:
----------------------------------
Jongjin,
Wow, thanks for such a detailed response. When I talked about wrapped/bare arrays, I was just talking about the XML. I didn't think about actually having a wrapper java class to hold an array. (Note that since I wrote the WSDL first, I didn't bother running WSDL2Java or Java2WSDL)
The function below returns a structure, not an array, and I'm sure that works fine:
ArrayOfString getEmployeeNames() { ... }
However, I think the problem everyone was having was with a function like this:
String[] getEmployeeNames() { ... }
which returns something like this:
<getEmployeeNamesResponse>
<item>...</item>
<item>...</item>
</getEmloyeeNamesResponse>
rather than this:
<getEmployeeNamesResponse>
<getEmployeeNamesReturn>
<item>...</item>
<item>...</item>
</getEmployeeNamesReturn>
</getEmloyeeNamesResponse>
Maybe that's just not supported?
To put things another way:
Axis determines "wrapped" or "bare" based on the java class structure / method signature, rather than what is specified in the WSDL file... even when I write my own WSDL file. Because of this, users are forced to compromise on either their class structure or on the XML sent over the wire.
On the other hand, .NET never generates wrapper classes, but uses wrapped or bare arrays in the XML depending on what the WSDL says.
So, what do you think?
> Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
> -----------------------------------------------------------------------------------------------
>
> Key: AXIS-1547
> URL: http://issues.apache.org/jira/browse/AXIS-1547
> Project: Axis
> Type: Bug
> Components: WSDL processing, Serialization/Deserialization
> Versions: beta-2
> Environment: WSDL, Windows XP, J2EE 1.3
> Reporter: Eric Chijioke
> Assignee: Glen Daniels
> Attachments: array.zip
>
> I sent this (accidentally) to axis-user list.
> I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
> I am currently using Axis 1.2 beta to expose my web service.
> I am using the document/literal (wrapped) configuration.
>
> The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
>
>
> Given this operation (defined in my WSDL):
> <operation name="getFactor">
> <input name="getFactorRequest" message="impl:getFactorIn"/>
> <output name="getFactorResponse" message="impl:getFactorOut"/>
> </operation>
> ---------------------------------------------------------------------------------
> The corresponding input and output messages are defined a follows:
> <message name="getFactorIn">
> <part name="parameters" element="intf:getFactor"/>
> </message>
> <message name="getFactorOut">
> <part name="parameters" element="intf:getFactorResponse"/>
> </message>
> ---------------------------------------------------------------------------------
>
> The corresponding elements are defined as follows:
> <element name="getFactor">
> <complexType>
> <sequence>
> <element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
> <element name="getFactorResponse">
> <complexType>
> <sequence>
> <element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
> </sequence>
> </complexType>
> </element>
> ---------------------------------------------------------------------------------
> I won't bother providing the schema for the intf:Factor type.
>
> Here's the question:
> When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
>
> So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <getFactorReturn>
> <name>My Test Factor</name>
> <id>1</id>
> </getFactorReturn>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <factor>
> <name>My Test Factor</name>
> <id>1</id>
> </factor>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
>
> Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
> Thank You,
> Eric Chijioke
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by "Bill Keese (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1547?page=comments#action_62619 ]
Bill Keese commented on AXIS-1547:
----------------------------------
I don't think this is a bug after all. Just a misunderstanding of how Axis works. (The documentation should be expanded though.) As long as you use the the java classes AND the deploy.wsdd generated by WSDL2JAVA, everything seems to work.
Since deploy.wsdd just repeats all the information from the WSDL file, I thought it was unnecessary. But due to Axis' design, it is.
Also, like printed above, there's an annoying ArrayOfXXX.java class, but that's not a bug; it's just the design of how Axis works.
> Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
> -----------------------------------------------------------------------------------------------
>
> Key: AXIS-1547
> URL: http://issues.apache.org/jira/browse/AXIS-1547
> Project: Axis
> Type: Bug
> Components: WSDL processing, Serialization/Deserialization
> Versions: beta-2
> Environment: WSDL, Windows XP, J2EE 1.3
> Reporter: Eric Chijioke
> Assignee: Glen Daniels
> Priority: Blocker
> Attachments: array.zip
>
> I sent this (accidentally) to axis-user list.
> I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
> I am currently using Axis 1.2 beta to expose my web service.
> I am using the document/literal (wrapped) configuration.
>
> The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
>
>
> Given this operation (defined in my WSDL):
> <operation name="getFactor">
> <input name="getFactorRequest" message="impl:getFactorIn"/>
> <output name="getFactorResponse" message="impl:getFactorOut"/>
> </operation>
> ---------------------------------------------------------------------------------
> The corresponding input and output messages are defined a follows:
> <message name="getFactorIn">
> <part name="parameters" element="intf:getFactor"/>
> </message>
> <message name="getFactorOut">
> <part name="parameters" element="intf:getFactorResponse"/>
> </message>
> ---------------------------------------------------------------------------------
>
> The corresponding elements are defined as follows:
> <element name="getFactor">
> <complexType>
> <sequence>
> <element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
> <element name="getFactorResponse">
> <complexType>
> <sequence>
> <element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
> </sequence>
> </complexType>
> </element>
> ---------------------------------------------------------------------------------
> I won't bother providing the schema for the intf:Factor type.
>
> Here's the question:
> When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
>
> So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <getFactorReturn>
> <name>My Test Factor</name>
> <id>1</id>
> </getFactorReturn>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <factor>
> <name>My Test Factor</name>
> <id>1</id>
> </factor>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
>
> Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
> Thank You,
> Eric Chijioke
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
Re: [jira] Commented: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by Davanum Srinivas <da...@gmail.com>.
Jongjin,
+1 to go ahead and make the change. Please make it such that it
affects only typemapping version 1.3 for now.
thanks,
dims
On Tue, 22 Feb 2005 11:13:02 +0900, Jongjin Choi <gu...@hotmail.com> wrote:
> Dims, Glen, Tom and all,
>
> There are serveral postings in axis-user list about wrapped-literal array usages.
> Currently we generate bare array schema for the bean which has indexed getter/setter methods. (#4 below)
> The problem comes from the wrapped array schema generated from the beans which hasn't
> indexed getter/setter methods. (#3 below)
>
> I think we should generate bare array schema for #3 also.
> Why should we generate the wrapped array schema for this case? Any special reason?
>
> This change will break the generated WSDL's backward compatibility.
> (ie. WSDL generated from same java interface/bean is not same after this changes - NO ArrayOfXXX complextype)
> We can switch this by appropriate flag. (TypeMappingVersion or something else)
>
> Thought?
>
> /Jongjin
>
> ----- Original Message -----
> From: "Jongjin Choi (JIRA)" <ax...@ws.apache.org>
> To: <ax...@ws.apache.org>
> Sent: Monday, February 21, 2005 8:11 PM
> Subject: [jira] Commented: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
>
> > [ http://issues.apache.org/jira/browse/AXIS-1547?page=comments#action_59497 ]
> >
> > Jongjin Choi commented on AXIS-1547:
> > ------------------------------------
> >
> > Hi, Bill.
> >
> > I think this issue is somewhat related to your recent email.
> > (http://www.archivum.info/axis-user@ws.apache.org/2005-02/msg00443.html)
> >
> > AFAIK, Axis can handle two cases - wrapped array and bare array - in wrapped literal mode.
> >
> > At the server side, appropriate information should be provided by
> > WSDD and/or _Helper classes (_Helper's method can be embeded into ValueType calsses).
> > At the client side, all the information is generated into stub impl classes.
> >
> > Let's concentrate on the server side....
> >
> > If the wrapped array is used in WSDL(#1 below), we need to run WSDL2Java with --server-side and --helpGen option and the generated _Helper classes and deploy.wsdd should be used in deployment along with the web service impl classes.
> >
> > #1 : wrapped array
> > <s:complexType name="Container">
> > <s:sequence>
> > <s:element minOccurs="1" maxOccurs="1" name="param1" nillable="true" type="s:string" />
> > <s:element minOccurs="1" maxOccurs="1" name="wrapper" nillable="true" type="tns:ArrayOfString" />
> > </s:sequence>
> > </s:complexType>
> > <s:complexType name="ArrayOfString">
> > <s:sequence>
> > <s:element minOccurs="0" maxOccurs="unbounded" name="param2" type="s:string" />
> > </s:sequence>
> > </s:complexType>
> >
> > If you look at the deploy.wsdd generated by wsdl2java, we'll find that 'ArrayOfString' should be (de)serialized with Bean(De)Serializer not Array(De)Serializer. (.i.e. ArrayOfString and/or ArrayOfString_Helper is needed)
> >
> >
> > If the bare array is used in WSDL(#2 below), we need to specify approprite information in <operation> and <typeMapping> in *ONLY* WSDD file.
> >
> > #2 : bare array
> > <s:complexType name="Container">
> > <s:sequence>
> > <s:element minOccurs="1" maxOccurs="1" name="param1" nillable="true" type="s:string" />
> > <s:element minOccurs="0" maxOccurs="unbounded" name="param2" type="s:string" />
> > </s:sequence>
> > </s:complexType>
> >
> > * #1, #2 is an excerpt from Dino Chiesa's mail.
> >
> > I think the problems are :
> > (1) The use of wrapped-literal array is not documented well.
> > (If I missed some documents, pls, let me know)
> > But we can do it without interop problem (also with .NET).
> >
> > (2) Axis generates wrapped array wsdl on the fly which it cannot support without _Helper classes.
> >
> > When the class is somewhat like:
> > #3:
> > class A {
> > String[] arr;
> > int b;
> >
> > public String[] getArr() { return arr; }
> > public void setArr(String[] arr) { this.arr = arr; }
> > // getB/setB is omitted for brevity
> > }
> >
> > The "ArrayOfString" complex type is generated in the WSDL but when starting from Java,
> > the axis users will not provide the ArrayOfString.java classes usually.
> > The class should be generated from WSDL file.
> > (Two step is required. java2wsdl first, wsdl2java second).
> >
> > But if we modify the class like this :
> > #4:
> > class A {
> > String[] arr;
> > int b;
> >
> > public String[] getArr() { return arr; }
> > public void setArr(String[] arr) { this.arr = arr; }
> >
> > public String getArr(int i) { return arr[i]; } // ADDED
> > public void setArr(int i, String s) { arr[i] = s; } // ADDED
> > // getB/setB is omitted for brevity
> > }
> >
> > The wsdl generated will not contain wapped array complex type (ArrayOfString).
> > Instead, we will get a wsdl using bare array.
> >
> > The JAX-RPC spec is not clear about this. But I think the axis should generate
> > bare array WSDL not only #4 but also #3. If so, the axis users can deploy web service
> > using wrapped-literal array by only providing WSDD. (without running wsdl2java for ArrayWrapper and _Helper classes.)
> >
> > In both case, I think, some tool supports(Java2WSDD or something?) may make the axis-user's life simpler.
> >
> > Thanks.
> >
> > /Jongjin
> >
> >
> >
> >
> >
> >> Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
> >> -----------------------------------------------------------------------------------------------
> >>
> >> Key: AXIS-1547
> >> URL: http://issues.apache.org/jira/browse/AXIS-1547
> >> Project: Axis
> >> Type: Bug
> >> Components: WSDL processing, Serialization/Deserialization
> >> Versions: beta-2
> >> Environment: WSDL, Windows XP, J2EE 1.3
> >> Reporter: Eric Chijioke
> >> Assignee: Glen Daniels
> >> Attachments: array.zip
> >>
> >> I sent this (accidentally) to axis-user list.
> >> I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
> >> I am currently using Axis 1.2 beta to expose my web service.
> >> I am using the document/literal (wrapped) configuration.
> >>
> >> The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
> >>
> >>
> >> Given this operation (defined in my WSDL):
> >> <operation name="getFactor">
> >> <input name="getFactorRequest" message="impl:getFactorIn"/>
> >> <output name="getFactorResponse" message="impl:getFactorOut"/>
> >> </operation>
> >> ---------------------------------------------------------------------------------
> >> The corresponding input and output messages are defined a follows:
> >> <message name="getFactorIn">
> >> <part name="parameters" element="intf:getFactor"/>
> >> </message>
> >> <message name="getFactorOut">
> >> <part name="parameters" element="intf:getFactorResponse"/>
> >> </message>
> >> ---------------------------------------------------------------------------------
> >>
> >> The corresponding elements are defined as follows:
> >> <element name="getFactor">
> >> <complexType>
> >> <sequence>
> >> <element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
> >> </sequence>
> >> </complexType>
> >> </element>
> >> <element name="getFactorResponse">
> >> <complexType>
> >> <sequence>
> >> <element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
> >> </sequence>
> >> </complexType>
> >> </element>
> >> ---------------------------------------------------------------------------------
> >> I won't bother providing the schema for the intf:Factor type.
> >>
> >> Here's the question:
> >> When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
> >>
> >> So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
> >>
> >> <?xml version="1.0" encoding="utf-8"?>
> >> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> >> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> >> <getFactorReturn>
> >> <name>My Test Factor</name>
> >> <id>1</id>
> >> </getFactorReturn>
> >> </getFactorResponse>
> >> </soapenv:Body>
> >> </soapenv:Envelope>
> >>
> >> I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
> >>
> >> <?xml version="1.0" encoding="utf-8"?>
> >> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> >> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> >> <factor>
> >> <name>My Test Factor</name>
> >> <id>1</id>
> >> </factor>
> >> </getFactorResponse>
> >> </soapenv:Body>
> >> </soapenv:Envelope>
> >>
> >> The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
> >>
> >> Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
> >> Thank You,
> >> Eric Chijioke
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > If you think it was sent incorrectly contact one of the administrators:
> > http://issues.apache.org/jira/secure/Administrators.jspa
> > -
> > If you want more information on JIRA, or have a bug to report see:
> > http://www.atlassian.com/software/jira
> >
> >
--
Davanum Srinivas - http://webservices.apache.org/~dims/
Re: [jira] Commented: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by Jongjin Choi <gu...@hotmail.com>.
Dims, Glen, Tom and all,
There are serveral postings in axis-user list about wrapped-literal array usages.
Currently we generate bare array schema for the bean which has indexed getter/setter methods. (#4 below)
The problem comes from the wrapped array schema generated from the beans which hasn't
indexed getter/setter methods. (#3 below)
I think we should generate bare array schema for #3 also.
Why should we generate the wrapped array schema for this case? Any special reason?
This change will break the generated WSDL's backward compatibility.
(ie. WSDL generated from same java interface/bean is not same after this changes - NO ArrayOfXXX complextype)
We can switch this by appropriate flag. (TypeMappingVersion or something else)
Thought?
/Jongjin
----- Original Message -----
From: "Jongjin Choi (JIRA)" <ax...@ws.apache.org>
To: <ax...@ws.apache.org>
Sent: Monday, February 21, 2005 8:11 PM
Subject: [jira] Commented: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
> [ http://issues.apache.org/jira/browse/AXIS-1547?page=comments#action_59497 ]
>
> Jongjin Choi commented on AXIS-1547:
> ------------------------------------
>
> Hi, Bill.
>
> I think this issue is somewhat related to your recent email.
> (http://www.archivum.info/axis-user@ws.apache.org/2005-02/msg00443.html)
>
> AFAIK, Axis can handle two cases - wrapped array and bare array - in wrapped literal mode.
>
> At the server side, appropriate information should be provided by
> WSDD and/or _Helper classes (_Helper's method can be embeded into ValueType calsses).
> At the client side, all the information is generated into stub impl classes.
>
> Let's concentrate on the server side....
>
> If the wrapped array is used in WSDL(#1 below), we need to run WSDL2Java with --server-side and --helpGen option and the generated _Helper classes and deploy.wsdd should be used in deployment along with the web service impl classes.
>
> #1 : wrapped array
> <s:complexType name="Container">
> <s:sequence>
> <s:element minOccurs="1" maxOccurs="1" name="param1" nillable="true" type="s:string" />
> <s:element minOccurs="1" maxOccurs="1" name="wrapper" nillable="true" type="tns:ArrayOfString" />
> </s:sequence>
> </s:complexType>
> <s:complexType name="ArrayOfString">
> <s:sequence>
> <s:element minOccurs="0" maxOccurs="unbounded" name="param2" type="s:string" />
> </s:sequence>
> </s:complexType>
>
> If you look at the deploy.wsdd generated by wsdl2java, we'll find that 'ArrayOfString' should be (de)serialized with Bean(De)Serializer not Array(De)Serializer. (.i.e. ArrayOfString and/or ArrayOfString_Helper is needed)
>
>
> If the bare array is used in WSDL(#2 below), we need to specify approprite information in <operation> and <typeMapping> in *ONLY* WSDD file.
>
> #2 : bare array
> <s:complexType name="Container">
> <s:sequence>
> <s:element minOccurs="1" maxOccurs="1" name="param1" nillable="true" type="s:string" />
> <s:element minOccurs="0" maxOccurs="unbounded" name="param2" type="s:string" />
> </s:sequence>
> </s:complexType>
>
> * #1, #2 is an excerpt from Dino Chiesa's mail.
>
> I think the problems are :
> (1) The use of wrapped-literal array is not documented well.
> (If I missed some documents, pls, let me know)
> But we can do it without interop problem (also with .NET).
>
> (2) Axis generates wrapped array wsdl on the fly which it cannot support without _Helper classes.
>
> When the class is somewhat like:
> #3:
> class A {
> String[] arr;
> int b;
>
> public String[] getArr() { return arr; }
> public void setArr(String[] arr) { this.arr = arr; }
> // getB/setB is omitted for brevity
> }
>
> The "ArrayOfString" complex type is generated in the WSDL but when starting from Java,
> the axis users will not provide the ArrayOfString.java classes usually.
> The class should be generated from WSDL file.
> (Two step is required. java2wsdl first, wsdl2java second).
>
> But if we modify the class like this :
> #4:
> class A {
> String[] arr;
> int b;
>
> public String[] getArr() { return arr; }
> public void setArr(String[] arr) { this.arr = arr; }
>
> public String getArr(int i) { return arr[i]; } // ADDED
> public void setArr(int i, String s) { arr[i] = s; } // ADDED
> // getB/setB is omitted for brevity
> }
>
> The wsdl generated will not contain wapped array complex type (ArrayOfString).
> Instead, we will get a wsdl using bare array.
>
> The JAX-RPC spec is not clear about this. But I think the axis should generate
> bare array WSDL not only #4 but also #3. If so, the axis users can deploy web service
> using wrapped-literal array by only providing WSDD. (without running wsdl2java for ArrayWrapper and _Helper classes.)
>
> In both case, I think, some tool supports(Java2WSDD or something?) may make the axis-user's life simpler.
>
> Thanks.
>
> /Jongjin
>
>
>
>
>
>> Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
>> -----------------------------------------------------------------------------------------------
>>
>> Key: AXIS-1547
>> URL: http://issues.apache.org/jira/browse/AXIS-1547
>> Project: Axis
>> Type: Bug
>> Components: WSDL processing, Serialization/Deserialization
>> Versions: beta-2
>> Environment: WSDL, Windows XP, J2EE 1.3
>> Reporter: Eric Chijioke
>> Assignee: Glen Daniels
>> Attachments: array.zip
>>
>> I sent this (accidentally) to axis-user list.
>> I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
>> I am currently using Axis 1.2 beta to expose my web service.
>> I am using the document/literal (wrapped) configuration.
>>
>> The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
>>
>>
>> Given this operation (defined in my WSDL):
>> <operation name="getFactor">
>> <input name="getFactorRequest" message="impl:getFactorIn"/>
>> <output name="getFactorResponse" message="impl:getFactorOut"/>
>> </operation>
>> ---------------------------------------------------------------------------------
>> The corresponding input and output messages are defined a follows:
>> <message name="getFactorIn">
>> <part name="parameters" element="intf:getFactor"/>
>> </message>
>> <message name="getFactorOut">
>> <part name="parameters" element="intf:getFactorResponse"/>
>> </message>
>> ---------------------------------------------------------------------------------
>>
>> The corresponding elements are defined as follows:
>> <element name="getFactor">
>> <complexType>
>> <sequence>
>> <element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
>> </sequence>
>> </complexType>
>> </element>
>> <element name="getFactorResponse">
>> <complexType>
>> <sequence>
>> <element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
>> </sequence>
>> </complexType>
>> </element>
>> ---------------------------------------------------------------------------------
>> I won't bother providing the schema for the intf:Factor type.
>>
>> Here's the question:
>> When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
>>
>> So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
>> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
>> <getFactorReturn>
>> <name>My Test Factor</name>
>> <id>1</id>
>> </getFactorReturn>
>> </getFactorResponse>
>> </soapenv:Body>
>> </soapenv:Envelope>
>>
>> I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
>> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
>> <factor>
>> <name>My Test Factor</name>
>> <id>1</id>
>> </factor>
>> </getFactorResponse>
>> </soapenv:Body>
>> </soapenv:Envelope>
>>
>> The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
>>
>> Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
>> Thank You,
>> Eric Chijioke
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> If you want more information on JIRA, or have a bug to report see:
> http://www.atlassian.com/software/jira
>
>
[jira] Commented: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by "Jongjin Choi (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1547?page=comments#action_59497 ]
Jongjin Choi commented on AXIS-1547:
------------------------------------
Hi, Bill.
I think this issue is somewhat related to your recent email.
(http://www.archivum.info/axis-user@ws.apache.org/2005-02/msg00443.html)
AFAIK, Axis can handle two cases - wrapped array and bare array - in wrapped literal mode.
At the server side, appropriate information should be provided by
WSDD and/or _Helper classes (_Helper's method can be embeded into ValueType calsses).
At the client side, all the information is generated into stub impl classes.
Let's concentrate on the server side....
If the wrapped array is used in WSDL(#1 below), we need to run WSDL2Java with --server-side and --helpGen option and the generated _Helper classes and deploy.wsdd should be used in deployment along with the web service impl classes.
#1 : wrapped array
<s:complexType name="Container">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="param1" nillable="true" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="wrapper" nillable="true" type="tns:ArrayOfString" />
</s:sequence>
</s:complexType>
<s:complexType name="ArrayOfString">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="param2" type="s:string" />
</s:sequence>
</s:complexType>
If you look at the deploy.wsdd generated by wsdl2java, we'll find that 'ArrayOfString' should be (de)serialized with Bean(De)Serializer not Array(De)Serializer. (.i.e. ArrayOfString and/or ArrayOfString_Helper is needed)
If the bare array is used in WSDL(#2 below), we need to specify approprite information in <operation> and <typeMapping> in *ONLY* WSDD file.
#2 : bare array
<s:complexType name="Container">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="param1" nillable="true" type="s:string" />
<s:element minOccurs="0" maxOccurs="unbounded" name="param2" type="s:string" />
</s:sequence>
</s:complexType>
* #1, #2 is an excerpt from Dino Chiesa's mail.
I think the problems are :
(1) The use of wrapped-literal array is not documented well.
(If I missed some documents, pls, let me know)
But we can do it without interop problem (also with .NET).
(2) Axis generates wrapped array wsdl on the fly which it cannot support without _Helper classes.
When the class is somewhat like:
#3:
class A {
String[] arr;
int b;
public String[] getArr() { return arr; }
public void setArr(String[] arr) { this.arr = arr; }
// getB/setB is omitted for brevity
}
The "ArrayOfString" complex type is generated in the WSDL but when starting from Java,
the axis users will not provide the ArrayOfString.java classes usually.
The class should be generated from WSDL file.
(Two step is required. java2wsdl first, wsdl2java second).
But if we modify the class like this :
#4:
class A {
String[] arr;
int b;
public String[] getArr() { return arr; }
public void setArr(String[] arr) { this.arr = arr; }
public String getArr(int i) { return arr[i]; } // ADDED
public void setArr(int i, String s) { arr[i] = s; } // ADDED
// getB/setB is omitted for brevity
}
The wsdl generated will not contain wapped array complex type (ArrayOfString).
Instead, we will get a wsdl using bare array.
The JAX-RPC spec is not clear about this. But I think the axis should generate
bare array WSDL not only #4 but also #3. If so, the axis users can deploy web service
using wrapped-literal array by only providing WSDD. (without running wsdl2java for ArrayWrapper and _Helper classes.)
In both case, I think, some tool supports(Java2WSDD or something?) may make the axis-user's life simpler.
Thanks.
/Jongjin
> Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
> -----------------------------------------------------------------------------------------------
>
> Key: AXIS-1547
> URL: http://issues.apache.org/jira/browse/AXIS-1547
> Project: Axis
> Type: Bug
> Components: WSDL processing, Serialization/Deserialization
> Versions: beta-2
> Environment: WSDL, Windows XP, J2EE 1.3
> Reporter: Eric Chijioke
> Assignee: Glen Daniels
> Attachments: array.zip
>
> I sent this (accidentally) to axis-user list.
> I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
> I am currently using Axis 1.2 beta to expose my web service.
> I am using the document/literal (wrapped) configuration.
>
> The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
>
>
> Given this operation (defined in my WSDL):
> <operation name="getFactor">
> <input name="getFactorRequest" message="impl:getFactorIn"/>
> <output name="getFactorResponse" message="impl:getFactorOut"/>
> </operation>
> ---------------------------------------------------------------------------------
> The corresponding input and output messages are defined a follows:
> <message name="getFactorIn">
> <part name="parameters" element="intf:getFactor"/>
> </message>
> <message name="getFactorOut">
> <part name="parameters" element="intf:getFactorResponse"/>
> </message>
> ---------------------------------------------------------------------------------
>
> The corresponding elements are defined as follows:
> <element name="getFactor">
> <complexType>
> <sequence>
> <element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
> <element name="getFactorResponse">
> <complexType>
> <sequence>
> <element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
> </sequence>
> </complexType>
> </element>
> ---------------------------------------------------------------------------------
> I won't bother providing the schema for the intf:Factor type.
>
> Here's the question:
> When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
>
> So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <getFactorReturn>
> <name>My Test Factor</name>
> <id>1</id>
> </getFactorReturn>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <factor>
> <name>My Test Factor</name>
> <id>1</id>
> </factor>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
>
> Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
> Thank You,
> Eric Chijioke
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Assigned: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1547?page=history ]
Davanum Srinivas reassigned AXIS-1547:
--------------------------------------
Assign To: Glen Daniels
Glen,
Can you please take a look at this one? (for RC3)
Thanks,
dims
> Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
> -----------------------------------------------------------------------------------------------
>
> Key: AXIS-1547
> URL: http://issues.apache.org/jira/browse/AXIS-1547
> Project: Axis
> Type: Bug
> Components: WSDL processing, Serialization/Deserialization
> Versions: beta-2
> Environment: WSDL, Windows XP, J2EE 1.3
> Reporter: Eric Chijioke
> Assignee: Glen Daniels
> Attachments: array.zip
>
> I sent this (accidentally) to axis-user list.
> I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
> I am currently using Axis 1.2 beta to expose my web service.
> I am using the document/literal (wrapped) configuration.
>
> The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
>
>
> Given this operation (defined in my WSDL):
> <operation name="getFactor">
> <input name="getFactorRequest" message="impl:getFactorIn"/>
> <output name="getFactorResponse" message="impl:getFactorOut"/>
> </operation>
> ---------------------------------------------------------------------------------
> The corresponding input and output messages are defined a follows:
> <message name="getFactorIn">
> <part name="parameters" element="intf:getFactor"/>
> </message>
> <message name="getFactorOut">
> <part name="parameters" element="intf:getFactorResponse"/>
> </message>
> ---------------------------------------------------------------------------------
>
> The corresponding elements are defined as follows:
> <element name="getFactor">
> <complexType>
> <sequence>
> <element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
> <element name="getFactorResponse">
> <complexType>
> <sequence>
> <element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
> </sequence>
> </complexType>
> </element>
> ---------------------------------------------------------------------------------
> I won't bother providing the schema for the intf:Factor type.
>
> Here's the question:
> When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
>
> So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <getFactorReturn>
> <name>My Test Factor</name>
> <id>1</id>
> </getFactorReturn>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <factor>
> <name>My Test Factor</name>
> <id>1</id>
> </factor>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
>
> Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
> Thank You,
> Eric Chijioke
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by ax...@ws.apache.org.
The following comment has been added to this issue:
Author: Eric Chijioke
Created: Fri, 24 Sep 2004 8:22 AM
Body:
To update this issue:
1) Axis defaults to using the <XXXReturn> tag as the name for array elements if an operation description for the method being called is NOT provided in the WSDD. If the WSDD has an operation description with a returnQName attribute, the value of this attribute is then used for the array element names.
2) Axis does not wrapper the array elements in a 'wrapper' element only when the array is described using the <element minOccurs="0" maxOccurs="unbounded"...> WSDL syntax, which is the syntax allowed by WS-I. For arrays specified using the SOAP encoded syntax, axis provides the wrapper element.
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/AXIS-1547?page=comments#action_53390
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXIS-1547
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-1547
Summary: Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Type: Bug
Status: Unassigned
Priority: Major
Project: Axis
Components:
Serialization/Deserialization
WSDL processing
Versions:
beta-2
Assignee:
Reporter: Eric Chijioke
Created: Tue, 7 Sep 2004 6:43 AM
Updated: Fri, 24 Sep 2004 8:22 AM
Environment: WSDL, Windows XP, J2EE 1.3
Description:
I sent this (accidentally) to axis-user list.
I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
I am currently using Axis 1.2 beta to expose my web service.
I am using the document/literal (wrapped) configuration.
The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
Given this operation (defined in my WSDL):
<operation name="getFactor">
<input name="getFactorRequest" message="impl:getFactorIn"/>
<output name="getFactorResponse" message="impl:getFactorOut"/>
</operation>
---------------------------------------------------------------------------------
The corresponding input and output messages are defined a follows:
<message name="getFactorIn">
<part name="parameters" element="intf:getFactor"/>
</message>
<message name="getFactorOut">
<part name="parameters" element="intf:getFactorResponse"/>
</message>
---------------------------------------------------------------------------------
The corresponding elements are defined as follows:
<element name="getFactor">
<complexType>
<sequence>
<element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="getFactorResponse">
<complexType>
<sequence>
<element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
</sequence>
</complexType>
</element>
---------------------------------------------------------------------------------
I won't bother providing the schema for the intf:Factor type.
Here's the question:
When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
<getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
<getFactorReturn>
<name>My Test Factor</name>
<id>1</id>
</getFactorReturn>
</getFactorResponse>
</soapenv:Body>
</soapenv:Envelope>
I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
<getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
<factor>
<name>My Test Factor</name>
<id>1</id>
</factor>
</getFactorResponse>
</soapenv:Body>
</soapenv:Envelope>
The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
Thank You,
Eric Chijioke
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by "Bill Keese (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1547?page=comments#action_59365 ]
Bill Keese commented on AXIS-1547:
----------------------------------
FYI, I think there are 2 or 3 problems that this bug addresses. (This list below is partly quoted from axis-user messages)
1) array wrapping
ArraySerializer.java version 1.5 was changed to always output arrays without a wrapper.
But, that code was corrected in version 1.31, by "scheu with advice from
Glen", to output wrapped/bare arrays, according to the WSDL:
// Need to distinguish if this is array processing for an
// actual schema array or for a maxOccurs usage.
// For the maxOccurs case, the currentXMLType of the context is
// the same as the componentQName.
boolean maxOccursUsage = (msgContext != null && !msgContext.isEncoded()) &&
componentQName.equals(context.getCurrentXMLType());
maxOccursUsage is true for bare arrays, and false for wrapped arrays.
(It's also false for SOAP encoded arrays but that isn't relevant here.)
The problem is that a bug has surfaced when a method returns an array
directly, rather than a structure containing an array (ie, an operation
like "Employee[] getEmployees()"). The code above set maxOccurs to true
regardless of the WSDL file.
2) empty namespace bug on item tag
- There's one more change I made to my Axis code which I realize I left
out. It fixed some namespace issues wherein under certain circumstances,
Axis would asign an empty namespace attribute (xmlns="") to the elements
of the serialized array, if they were in the default namespace.
The change is made to the
org.apache.axis.encoding.SerializationContextImpl.serializeActual()
method.
I added these lines:
------------ begin snippet ------------------------------------
if (elemQName.getNamespaceURI() == ""){
elemQName = new QName(this.nsStack.getNamespaceURI(""),
elemQName.getLocalPart());
}
------------ end snippet --------------------------------------
Before this line:
------------ begin snippet (Line# 1231) ------------------------
ser.serialize(elemQName, attributes, value, this);
return;
------------ end snippet --------------------------------------
3) array type (???)
In order to set the appropriate type of array elements, I also changed
the following code (a bit of a blind hack, but it works) in the same
method FROM:
------------ begin snippet (Line# 336)--------------------------
context.serialize(elementName, serializeAttr, aValue,
componentQName, // prefered type
QName
true, // Send null values
null); // Respect default type
config
------------ end snippet ---------------------------------------
TO:
------------ begin snippet -------------------------------------
context.serialize(elementName, serializeAttr, aValue,
msgContext.getTypeMapping().getXMLType(aValue.getClass(),null,encoded),
// prefered type QName
true, // Send null values
null); // Respect default type config
------------ end snippet ---------------------------------------
> Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
> -----------------------------------------------------------------------------------------------
>
> Key: AXIS-1547
> URL: http://issues.apache.org/jira/browse/AXIS-1547
> Project: Axis
> Type: Bug
> Components: WSDL processing, Serialization/Deserialization
> Versions: beta-2
> Environment: WSDL, Windows XP, J2EE 1.3
> Reporter: Eric Chijioke
> Assignee: Glen Daniels
> Attachments: array.zip
>
> I sent this (accidentally) to axis-user list.
> I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
> I am currently using Axis 1.2 beta to expose my web service.
> I am using the document/literal (wrapped) configuration.
>
> The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
>
>
> Given this operation (defined in my WSDL):
> <operation name="getFactor">
> <input name="getFactorRequest" message="impl:getFactorIn"/>
> <output name="getFactorResponse" message="impl:getFactorOut"/>
> </operation>
> ---------------------------------------------------------------------------------
> The corresponding input and output messages are defined a follows:
> <message name="getFactorIn">
> <part name="parameters" element="intf:getFactor"/>
> </message>
> <message name="getFactorOut">
> <part name="parameters" element="intf:getFactorResponse"/>
> </message>
> ---------------------------------------------------------------------------------
>
> The corresponding elements are defined as follows:
> <element name="getFactor">
> <complexType>
> <sequence>
> <element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
> <element name="getFactorResponse">
> <complexType>
> <sequence>
> <element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
> </sequence>
> </complexType>
> </element>
> ---------------------------------------------------------------------------------
> I won't bother providing the schema for the intf:Factor type.
>
> Here's the question:
> When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
>
> So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <getFactorReturn>
> <name>My Test Factor</name>
> <id>1</id>
> </getFactorReturn>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <factor>
> <name>My Test Factor</name>
> <id>1</id>
> </factor>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
>
> Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
> Thank You,
> Eric Chijioke
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by "Tim Kagle (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1547?page=comments#action_62620 ]
Tim Kagle commented on AXIS-1547:
---------------------------------
It's not a bug per se, but it would be nice to generate beans that look the same on the client side as the server side. It makes for easy documentation (at least for Java consumers of the WS client API) as anyone can look at the javadoc for the server and see the method names and return types on the client side. it's hard to provide any javadoc for the client API because it's automatically generated. It would be really nice to be able to copy the javadoc from the server classes, but I guess that's a different topic.
>From the devel mailing list it looks like Glen already has a working patch for it in his sandbox. Can't wait for a nightly build where I can try it.
> Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
> -----------------------------------------------------------------------------------------------
>
> Key: AXIS-1547
> URL: http://issues.apache.org/jira/browse/AXIS-1547
> Project: Axis
> Type: Bug
> Components: WSDL processing, Serialization/Deserialization
> Versions: beta-2
> Environment: WSDL, Windows XP, J2EE 1.3
> Reporter: Eric Chijioke
> Assignee: Glen Daniels
> Priority: Blocker
> Attachments: array.zip
>
> I sent this (accidentally) to axis-user list.
> I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
> I am currently using Axis 1.2 beta to expose my web service.
> I am using the document/literal (wrapped) configuration.
>
> The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
>
>
> Given this operation (defined in my WSDL):
> <operation name="getFactor">
> <input name="getFactorRequest" message="impl:getFactorIn"/>
> <output name="getFactorResponse" message="impl:getFactorOut"/>
> </operation>
> ---------------------------------------------------------------------------------
> The corresponding input and output messages are defined a follows:
> <message name="getFactorIn">
> <part name="parameters" element="intf:getFactor"/>
> </message>
> <message name="getFactorOut">
> <part name="parameters" element="intf:getFactorResponse"/>
> </message>
> ---------------------------------------------------------------------------------
>
> The corresponding elements are defined as follows:
> <element name="getFactor">
> <complexType>
> <sequence>
> <element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
> <element name="getFactorResponse">
> <complexType>
> <sequence>
> <element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
> </sequence>
> </complexType>
> </element>
> ---------------------------------------------------------------------------------
> I won't bother providing the schema for the intf:Factor type.
>
> Here's the question:
> When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
>
> So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <getFactorReturn>
> <name>My Test Factor</name>
> <id>1</id>
> </getFactorReturn>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <factor>
> <name>My Test Factor</name>
> <id>1</id>
> </factor>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
>
> Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
> Thank You,
> Eric Chijioke
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by ax...@ws.apache.org.
The following comment has been added to this issue:
Author: Ias
Created: Fri, 24 Sep 2004 2:37 PM
Body:
I'd like to recommend specifying your operation's description with WSDD because Axis uses the information to make a response message as you desire.
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/AXIS-1547?page=comments#action_53399
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXIS-1547
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-1547
Summary: Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Type: Bug
Status: Unassigned
Priority: Major
Project: Axis
Components:
WSDL processing
Serialization/Deserialization
Versions:
beta-2
Assignee:
Reporter: Eric Chijioke
Created: Tue, 7 Sep 2004 6:43 AM
Updated: Fri, 24 Sep 2004 2:37 PM
Environment: WSDL, Windows XP, J2EE 1.3
Description:
I sent this (accidentally) to axis-user list.
I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
I am currently using Axis 1.2 beta to expose my web service.
I am using the document/literal (wrapped) configuration.
The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
Given this operation (defined in my WSDL):
<operation name="getFactor">
<input name="getFactorRequest" message="impl:getFactorIn"/>
<output name="getFactorResponse" message="impl:getFactorOut"/>
</operation>
---------------------------------------------------------------------------------
The corresponding input and output messages are defined a follows:
<message name="getFactorIn">
<part name="parameters" element="intf:getFactor"/>
</message>
<message name="getFactorOut">
<part name="parameters" element="intf:getFactorResponse"/>
</message>
---------------------------------------------------------------------------------
The corresponding elements are defined as follows:
<element name="getFactor">
<complexType>
<sequence>
<element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="getFactorResponse">
<complexType>
<sequence>
<element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
</sequence>
</complexType>
</element>
---------------------------------------------------------------------------------
I won't bother providing the schema for the intf:Factor type.
Here's the question:
When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
<getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
<getFactorReturn>
<name>My Test Factor</name>
<id>1</id>
</getFactorReturn>
</getFactorResponse>
</soapenv:Body>
</soapenv:Envelope>
I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
<getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
<factor>
<name>My Test Factor</name>
<id>1</id>
</factor>
</getFactorResponse>
</soapenv:Body>
</soapenv:Envelope>
The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
Thank You,
Eric Chijioke
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by "Bill Keese (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1547?page=comments#action_58130 ]
Bill Keese commented on AXIS-1547:
----------------------------------
By the way, this report concerns the problems/patch discussed on the axis-user mailing list in threads
"Axis and .NET interoperability - Arrays"
(http://marc.theaimsgroup.com/?t=109474598700001&r=1&w=2)
"Array of Objects in Axis and .NET interop"
(http://marc.theaimsgroup.com/?t=109630248800001&r=1&w=2).
This is indeed a bug; see
http://marc.theaimsgroup.com/?l=axis-user&m=109587276631028&w=2
Eric's patch to this issue is listed in:
http://marc.theaimsgroup.com/?l=axis-user&m=109587880222477&w=2
http://marc.theaimsgroup.com/?l=axis-user&m=109631383200039&w=2
http://marc.theaimsgroup.com/?l=axis-user&m=109646648222389&w=2
Also note that since AXIS doesn't parse the WSDL file at all, there is no way to specify the name of the element inside the array to be something other than <item>. But that problem has an easy workaround: just specify in the WSDL file that the name is <item>.
> Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
> -----------------------------------------------------------------------------------------------
>
> Key: AXIS-1547
> URL: http://issues.apache.org/jira/browse/AXIS-1547
> Project: Axis
> Type: Bug
> Components: WSDL processing, Serialization/Deserialization
> Versions: beta-2
> Environment: WSDL, Windows XP, J2EE 1.3
> Reporter: Eric Chijioke
>
> I sent this (accidentally) to axis-user list.
> I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
> I am currently using Axis 1.2 beta to expose my web service.
> I am using the document/literal (wrapped) configuration.
>
> The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
>
>
> Given this operation (defined in my WSDL):
> <operation name="getFactor">
> <input name="getFactorRequest" message="impl:getFactorIn"/>
> <output name="getFactorResponse" message="impl:getFactorOut"/>
> </operation>
> ---------------------------------------------------------------------------------
> The corresponding input and output messages are defined a follows:
> <message name="getFactorIn">
> <part name="parameters" element="intf:getFactor"/>
> </message>
> <message name="getFactorOut">
> <part name="parameters" element="intf:getFactorResponse"/>
> </message>
> ---------------------------------------------------------------------------------
>
> The corresponding elements are defined as follows:
> <element name="getFactor">
> <complexType>
> <sequence>
> <element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
> <element name="getFactorResponse">
> <complexType>
> <sequence>
> <element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
> </sequence>
> </complexType>
> </element>
> ---------------------------------------------------------------------------------
> I won't bother providing the schema for the intf:Factor type.
>
> Here's the question:
> When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
>
> So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <getFactorReturn>
> <name>My Test Factor</name>
> <id>1</id>
> </getFactorReturn>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <factor>
> <name>My Test Factor</name>
> <id>1</id>
> </factor>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
>
> Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
> Thank You,
> Eric Chijioke
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1547?page=comments#action_63932 ]
Davanum Srinivas commented on AXIS-1547:
----------------------------------------
Glen,
what do we have to do for this bug?
thanks,
dims
> Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
> -----------------------------------------------------------------------------------------------
>
> Key: AXIS-1547
> URL: http://issues.apache.org/jira/browse/AXIS-1547
> Project: Axis
> Type: Bug
> Components: WSDL processing, Serialization/Deserialization
> Versions: beta-2
> Environment: WSDL, Windows XP, J2EE 1.3
> Reporter: Eric Chijioke
> Assignee: Glen Daniels
> Priority: Blocker
> Attachments: array.zip
>
> I sent this (accidentally) to axis-user list.
> I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
> I am currently using Axis 1.2 beta to expose my web service.
> I am using the document/literal (wrapped) configuration.
>
> The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
>
>
> Given this operation (defined in my WSDL):
> <operation name="getFactor">
> <input name="getFactorRequest" message="impl:getFactorIn"/>
> <output name="getFactorResponse" message="impl:getFactorOut"/>
> </operation>
> ---------------------------------------------------------------------------------
> The corresponding input and output messages are defined a follows:
> <message name="getFactorIn">
> <part name="parameters" element="intf:getFactor"/>
> </message>
> <message name="getFactorOut">
> <part name="parameters" element="intf:getFactorResponse"/>
> </message>
> ---------------------------------------------------------------------------------
>
> The corresponding elements are defined as follows:
> <element name="getFactor">
> <complexType>
> <sequence>
> <element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
> <element name="getFactorResponse">
> <complexType>
> <sequence>
> <element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
> </sequence>
> </complexType>
> </element>
> ---------------------------------------------------------------------------------
> I won't bother providing the schema for the intf:Factor type.
>
> Here's the question:
> When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
>
> So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <getFactorReturn>
> <name>My Test Factor</name>
> <id>1</id>
> </getFactorReturn>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <factor>
> <name>My Test Factor</name>
> <id>1</id>
> </factor>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
>
> Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
> Thank You,
> Eric Chijioke
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1547?page=history ]
Davanum Srinivas updated AXIS-1547:
-----------------------------------
Priority: Blocker (was: Major)
Blocker??
> Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
> -----------------------------------------------------------------------------------------------
>
> Key: AXIS-1547
> URL: http://issues.apache.org/jira/browse/AXIS-1547
> Project: Axis
> Type: Bug
> Components: WSDL processing, Serialization/Deserialization
> Versions: beta-2
> Environment: WSDL, Windows XP, J2EE 1.3
> Reporter: Eric Chijioke
> Assignee: Glen Daniels
> Priority: Blocker
> Attachments: array.zip
>
> I sent this (accidentally) to axis-user list.
> I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
> I am currently using Axis 1.2 beta to expose my web service.
> I am using the document/literal (wrapped) configuration.
>
> The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
>
>
> Given this operation (defined in my WSDL):
> <operation name="getFactor">
> <input name="getFactorRequest" message="impl:getFactorIn"/>
> <output name="getFactorResponse" message="impl:getFactorOut"/>
> </operation>
> ---------------------------------------------------------------------------------
> The corresponding input and output messages are defined a follows:
> <message name="getFactorIn">
> <part name="parameters" element="intf:getFactor"/>
> </message>
> <message name="getFactorOut">
> <part name="parameters" element="intf:getFactorResponse"/>
> </message>
> ---------------------------------------------------------------------------------
>
> The corresponding elements are defined as follows:
> <element name="getFactor">
> <complexType>
> <sequence>
> <element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
> <element name="getFactorResponse">
> <complexType>
> <sequence>
> <element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
> </sequence>
> </complexType>
> </element>
> ---------------------------------------------------------------------------------
> I won't bother providing the schema for the intf:Factor type.
>
> Here's the question:
> When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
>
> So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <getFactorReturn>
> <name>My Test Factor</name>
> <id>1</id>
> </getFactorReturn>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <factor>
> <name>My Test Factor</name>
> <id>1</id>
> </factor>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
>
> Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
> Thank You,
> Eric Chijioke
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Resolved: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1547?page=all ]
Davanum Srinivas resolved AXIS-1547:
------------------------------------
Resolution: Fixed
Closing bug to get everyone's attention...last sentence from Bill was " I don't think this is a bug after all. Just a misunderstanding of how Axis works."...After reading all comments, I don't see what else i need to fix. If someone can point me to to what needs to be fixed and provide a test case AGAINST latest CVS, then we will fix it :)
> Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
> -----------------------------------------------------------------------------------------------
>
> Key: AXIS-1547
> URL: http://issues.apache.org/jira/browse/AXIS-1547
> Project: Axis
> Type: Bug
> Components: WSDL processing, Serialization/Deserialization
> Versions: beta-2
> Environment: WSDL, Windows XP, J2EE 1.3
> Reporter: Eric Chijioke
> Assignee: Glen Daniels
> Priority: Blocker
> Attachments: array.zip
>
> I sent this (accidentally) to axis-user list.
> I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
> I am currently using Axis 1.2 beta to expose my web service.
> I am using the document/literal (wrapped) configuration.
>
> The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
>
>
> Given this operation (defined in my WSDL):
> <operation name="getFactor">
> <input name="getFactorRequest" message="impl:getFactorIn"/>
> <output name="getFactorResponse" message="impl:getFactorOut"/>
> </operation>
> ---------------------------------------------------------------------------------
> The corresponding input and output messages are defined a follows:
> <message name="getFactorIn">
> <part name="parameters" element="intf:getFactor"/>
> </message>
> <message name="getFactorOut">
> <part name="parameters" element="intf:getFactorResponse"/>
> </message>
> ---------------------------------------------------------------------------------
>
> The corresponding elements are defined as follows:
> <element name="getFactor">
> <complexType>
> <sequence>
> <element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
> <element name="getFactorResponse">
> <complexType>
> <sequence>
> <element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
> </sequence>
> </complexType>
> </element>
> ---------------------------------------------------------------------------------
> I won't bother providing the schema for the intf:Factor type.
>
> Here's the question:
> When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
>
> So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <getFactorReturn>
> <name>My Test Factor</name>
> <id>1</id>
> </getFactorReturn>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <factor>
> <name>My Test Factor</name>
> <id>1</id>
> </factor>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
>
> Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
> Thank You,
> Eric Chijioke
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by "Bill Keese (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1547?page=comments#action_59566 ]
Bill Keese commented on AXIS-1547:
----------------------------------
I guess that the wrapped/bare array portion of this bug report is just a misunderstanding of how Axis works.
Basically, people expected wrappers in their xml:
<foo>
<b>123</b>
<myArray>
<item>...</item>
<item>...</item>
</myArray>
</foo>
BUT they _didn't_ expect wrappers in their java code:
class foo {
int b;
String[] myArray;
};
People were hand-writing both the WSDL and the Java classes, rather than running WSDL2Java . If you read http://marc.theaimsgroup.com/?l=axis-user&m=109587276631028&w=2 that must be the cause of the misunderstanding, right?
So, the conclusion is that you need to use the ArrayOfString java class. But, that seems like unnecessary overhead. The behavior above is more convenient. And also, I expected
the WSDL below:
<element name="GetEmployeeNames">
<complexType/>
</element>
<element name="GetEmployeeNamesResponse">
<complexType>
<sequence>
<element name="GetEmployeeNamesReturn" type="tns:ArrayOfString"/>
</sequence>
</complexType>
</element>
... to simply map to
String[] GetEmployeeNames()
... rather than the more complicated
ArrayOfString GetEmployeeNames()
Is that possible?
PS: Note also that this bug addresses two other issues (besides wrapped/bare arrays)
> Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
> -----------------------------------------------------------------------------------------------
>
> Key: AXIS-1547
> URL: http://issues.apache.org/jira/browse/AXIS-1547
> Project: Axis
> Type: Bug
> Components: WSDL processing, Serialization/Deserialization
> Versions: beta-2
> Environment: WSDL, Windows XP, J2EE 1.3
> Reporter: Eric Chijioke
> Assignee: Glen Daniels
> Attachments: array.zip
>
> I sent this (accidentally) to axis-user list.
> I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
> I am currently using Axis 1.2 beta to expose my web service.
> I am using the document/literal (wrapped) configuration.
>
> The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
>
>
> Given this operation (defined in my WSDL):
> <operation name="getFactor">
> <input name="getFactorRequest" message="impl:getFactorIn"/>
> <output name="getFactorResponse" message="impl:getFactorOut"/>
> </operation>
> ---------------------------------------------------------------------------------
> The corresponding input and output messages are defined a follows:
> <message name="getFactorIn">
> <part name="parameters" element="intf:getFactor"/>
> </message>
> <message name="getFactorOut">
> <part name="parameters" element="intf:getFactorResponse"/>
> </message>
> ---------------------------------------------------------------------------------
>
> The corresponding elements are defined as follows:
> <element name="getFactor">
> <complexType>
> <sequence>
> <element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
> <element name="getFactorResponse">
> <complexType>
> <sequence>
> <element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
> </sequence>
> </complexType>
> </element>
> ---------------------------------------------------------------------------------
> I won't bother providing the schema for the intf:Factor type.
>
> Here's the question:
> When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
>
> So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <getFactorReturn>
> <name>My Test Factor</name>
> <id>1</id>
> </getFactorReturn>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <factor>
> <name>My Test Factor</name>
> <id>1</id>
> </factor>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
>
> Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
> Thank You,
> Eric Chijioke
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by "Jongjin Choi (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1547?page=comments#action_59560 ]
Jongjin Choi commented on AXIS-1547:
------------------------------------
Bill,
If you start from the WSDL to write a web service, you *DO* bother running WSDL2Java to get the artifacts which sync the Axis's serialization behavior to the WSDL. (with option --server-Side with optionally --helperGen)
The needed artifacts are:
* server-config.wsdd
* _Helper Classes (if --helperGen is specified, otherwise the needed methods are embedded with the generated Javabeans)
* The service impl template (XXXXX_Impl.java)
Then after filling the code of the XXXXX_Impl.java,
deploying your web services with these artifacts generated from WSDL2Java, we can get a web service which matches to the WSDL.
In this way, you can get a wrapped / bare XML message which is specified in WSDL.
The only difference with .NET is that Axis requires the explicit ArrayOfXXX.java (and/or ArrayOfXXX_Helper.java) which is generated automatically by WSDL2Java and server-config.wsdd's <operation> information
(which is annotated in C# source file in .NET case).
Running WSDL2Java from WSDL will solve the problem.
Am I missing some points in your comment?
> Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
> -----------------------------------------------------------------------------------------------
>
> Key: AXIS-1547
> URL: http://issues.apache.org/jira/browse/AXIS-1547
> Project: Axis
> Type: Bug
> Components: WSDL processing, Serialization/Deserialization
> Versions: beta-2
> Environment: WSDL, Windows XP, J2EE 1.3
> Reporter: Eric Chijioke
> Assignee: Glen Daniels
> Attachments: array.zip
>
> I sent this (accidentally) to axis-user list.
> I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
> I am currently using Axis 1.2 beta to expose my web service.
> I am using the document/literal (wrapped) configuration.
>
> The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
>
>
> Given this operation (defined in my WSDL):
> <operation name="getFactor">
> <input name="getFactorRequest" message="impl:getFactorIn"/>
> <output name="getFactorResponse" message="impl:getFactorOut"/>
> </operation>
> ---------------------------------------------------------------------------------
> The corresponding input and output messages are defined a follows:
> <message name="getFactorIn">
> <part name="parameters" element="intf:getFactor"/>
> </message>
> <message name="getFactorOut">
> <part name="parameters" element="intf:getFactorResponse"/>
> </message>
> ---------------------------------------------------------------------------------
>
> The corresponding elements are defined as follows:
> <element name="getFactor">
> <complexType>
> <sequence>
> <element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
> <element name="getFactorResponse">
> <complexType>
> <sequence>
> <element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
> </sequence>
> </complexType>
> </element>
> ---------------------------------------------------------------------------------
> I won't bother providing the schema for the intf:Factor type.
>
> Here's the question:
> When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
>
> So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <getFactorReturn>
> <name>My Test Factor</name>
> <id>1</id>
> </getFactorReturn>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <factor>
> <name>My Test Factor</name>
> <id>1</id>
> </factor>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
>
> Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
> Thank You,
> Eric Chijioke
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Updated: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by "Bill Keese (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1547?page=history ]
Bill Keese updated AXIS-1547:
-----------------------------
Attachment: array.zip
Here's a testcase for returning arrays from Axis to .NET. (It also tests sending arrays from Axis client) See the readme file for details.
> Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
> -----------------------------------------------------------------------------------------------
>
> Key: AXIS-1547
> URL: http://issues.apache.org/jira/browse/AXIS-1547
> Project: Axis
> Type: Bug
> Components: WSDL processing, Serialization/Deserialization
> Versions: beta-2
> Environment: WSDL, Windows XP, J2EE 1.3
> Reporter: Eric Chijioke
> Attachments: array.zip
>
> I sent this (accidentally) to axis-user list.
> I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
> I am currently using Axis 1.2 beta to expose my web service.
> I am using the document/literal (wrapped) configuration.
>
> The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
>
>
> Given this operation (defined in my WSDL):
> <operation name="getFactor">
> <input name="getFactorRequest" message="impl:getFactorIn"/>
> <output name="getFactorResponse" message="impl:getFactorOut"/>
> </operation>
> ---------------------------------------------------------------------------------
> The corresponding input and output messages are defined a follows:
> <message name="getFactorIn">
> <part name="parameters" element="intf:getFactor"/>
> </message>
> <message name="getFactorOut">
> <part name="parameters" element="intf:getFactorResponse"/>
> </message>
> ---------------------------------------------------------------------------------
>
> The corresponding elements are defined as follows:
> <element name="getFactor">
> <complexType>
> <sequence>
> <element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
> <element name="getFactorResponse">
> <complexType>
> <sequence>
> <element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
> </sequence>
> </complexType>
> </element>
> ---------------------------------------------------------------------------------
> I won't bother providing the schema for the intf:Factor type.
>
> Here's the question:
> When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
>
> So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <getFactorReturn>
> <name>My Test Factor</name>
> <id>1</id>
> </getFactorReturn>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <factor>
> <name>My Test Factor</name>
> <id>1</id>
> </factor>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
>
> Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
> Thank You,
> Eric Chijioke
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-1547) Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
Posted by "Tim Kagle (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1547?page=comments#action_62601 ]
Tim Kagle commented on AXIS-1547:
---------------------------------
Any word on this blocker for 1.2 final or even a nightly build please? Thanks.
> Document/Literal wrapped response creates wrong SOAP envelope root element in response message.
> -----------------------------------------------------------------------------------------------
>
> Key: AXIS-1547
> URL: http://issues.apache.org/jira/browse/AXIS-1547
> Project: Axis
> Type: Bug
> Components: WSDL processing, Serialization/Deserialization
> Versions: beta-2
> Environment: WSDL, Windows XP, J2EE 1.3
> Reporter: Eric Chijioke
> Assignee: Glen Daniels
> Priority: Blocker
> Attachments: array.zip
>
> I sent this (accidentally) to axis-user list.
> I received a response from Ane Thomas Manes indicating tht I should file this as a bug:
> I am currently using Axis 1.2 beta to expose my web service.
> I am using the document/literal (wrapped) configuration.
>
> The axis server does something that seems strange, and I'm not sure if it's intentional or not. This email is not as long as it seems.
>
>
> Given this operation (defined in my WSDL):
> <operation name="getFactor">
> <input name="getFactorRequest" message="impl:getFactorIn"/>
> <output name="getFactorResponse" message="impl:getFactorOut"/>
> </operation>
> ---------------------------------------------------------------------------------
> The corresponding input and output messages are defined a follows:
> <message name="getFactorIn">
> <part name="parameters" element="intf:getFactor"/>
> </message>
> <message name="getFactorOut">
> <part name="parameters" element="intf:getFactorResponse"/>
> </message>
> ---------------------------------------------------------------------------------
>
> The corresponding elements are defined as follows:
> <element name="getFactor">
> <complexType>
> <sequence>
> <element minOccurs="1" maxOccurs="1" name="id" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
> <element name="getFactorResponse">
> <complexType>
> <sequence>
> <element name="factor" minOccurs="1" maxOccurs="1" type="intf:Factor"/>
> </sequence>
> </complexType>
> </element>
> ---------------------------------------------------------------------------------
> I won't bother providing the schema for the intf:Factor type.
>
> Here's the question:
> When a client calls the getFactor() method, why does the response always contain a top level element in the soap body call getFactorReturn instead of using the name provided in the getFactorResponse element schema: in this case "factor"?
>
> So the response to this method looks like this (the top level element of the body tag is <getFactorReturn>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <getFactorReturn>
> <name>My Test Factor</name>
> <id>1</id>
> </getFactorReturn>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I would have expected the response to this method to look like this (the top level element of the body tag is <factor>):
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> "> <soapenv:Body>
> <getFactorResponse xmlns="http://object.hydra.erisk.com <http://object.hydra.erisk.com/> ">
> <factor>
> <name>My Test Factor</name>
> <id>1</id>
> </factor>
> </getFactorResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The reason this is an issue is that when you auto generate code (at least in .NET) using the WSDL I described above, it assumes (rightly so?) that the top level element of the response SOAP body will be named as you name it in your WSDL.
>
> Please let me know if this is an issue with Axis or if there is a spec somewhere that requires the top level element to be named getFactorReturn (in this case).
> Thank You,
> Eric Chijioke
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira