[ http://issues.apache.org/jira/browse/BEEHIVE-572?page=all ]
Jeremiah Johnson closed BEEHIVE-572:
------------------------------------
Assign To: daryoush mehrtash (was: Jeremiah Johnson)
This change to AxisHook was applied in revision 165070. The change was
contributed by Daryoush and applied by Michael.
> RPC literal generates invalid message with extra namsapces
> ----------------------------------------------------------
>
> Key: BEEHIVE-572
> URL: http://issues.apache.org/jira/browse/BEEHIVE-572
> Project: Beehive
> Type: Bug
> Reporter: daryoush mehrtash
> Assignee: daryoush mehrtash
>
> THe response message to
> http://localhost:8080/wsm-samplesWS/web/complex/RpcLiteralSample.jws?method=createAddressInBody
> generates:
> <soapenv:Envelope>
> -
> <soapenv:Body>
> -
> <createAddressInBodyResponse>
> <ns1:ReturnCreateAddressInBodyResult>0</ns1:ReturnCreateAddressInBodyResult>
> -
> <ns2:out_param_body>
> <ns2:city>Kirkland</ns2:city>
> -
> <ns2:phoneNumber>
> <ns2:areaCode>425</ns2:areaCode>
> <ns2:exchange>555</ns2:exchange>
> <ns2:number>1234</ns2:number>
> </ns2:phoneNumber>
> -
> <ns2:state>
> <ns2:state>WA</ns2:state>
> </ns2:state>
> <ns2:streetName>NE Points Drive</ns2:streetName>
> <ns2:streetNum>10230</ns2:streetNum>
> <ns2:zip>98008</ns2:zip>
> </ns2:out_param_body>
> </createAddressInBodyResponse>
> </soapenv:Body>
> </soapenv:Envelope>
> The message is wrong. Below is the text from email send to me by Anne Thomas
> Manes
> Daryoush,
> The <ReturnCreateAddressResult> and <out_param_body> elements should be
> unqualified (in no namespace). I can't tell you what namespaces the child
> elements of <out_param_body> are supposed to be in without seeing the schema.
> According to the WS-I Basic Profile (which is the only definitive source of
> information for RPC/Literal), namespaces follow the following rules:
> The child element of the SOAP body (the autogenerated wrapper element
> -- in this case <createAddressResponse>) is in the namespace specified in the
> <wsdlsoap:body> definition in the WSDL binding:
> <wsdl:output name="impl:createAddressResponse">
> <wsdlsoap:body use="literal" namespace="some-uri"/>
> </wsdl:output>
> Since this element is unqualified in both your examples, I assume that you
> neglected to specify a namespace in your WSDL binding. (You should, though.)
> The children of this wrapper element (the autogenerated parameter
> elements) are in *no* namespace. These elements aren't defined in the WSDL --
> only their types are defined:
> <wsdl:message name="createAddressResponse">
> <wsdl:part name="ReturnCreateAddressResult" type="xsd:int"/>
> <wsdl:part name="out_param_body" type="ns1:out_param_body"/>
> </wsdl:message>
> The children of <out_param_body> will be in the namespace(s) as defined by
> the schema that defines the out_param_body type (ns1). If you specified
> elementFormDefault="qualified", and you define all the children within that
> namespace, then the children of <out_param_body> will be in the ns1
> namespace. But, if the children are defined in separate schemas, then they
> will be in different namespaces.
> For example, if the schema looks something like this:
> <xsd:complexType name="out_param_body">
> <xsd:sequence>
> <xsd:element ref="ns1:city"/>
> <xsd:element ref="ns2:phoneNumber"/>
> <xsd:element ref="ns3:state"/>
> ...
> </xsd:sequence>
> </xsd:complexType>
> then each child element will be in the appropriately referenced namespace.
> Anne
--
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