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 bu...@apache.org on 2003/04/28 23:55:21 UTC

DO NOT REPLY [Bug 19404] New: - Wrong serialization of an element referred as "ref" in schema for style=rpc, use=encoded

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19404>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19404

Wrong serialization of an element referred as "ref" in schema for style=rpc, use=encoded

           Summary: Wrong serialization of an element referred as "ref" in
                    schema for style=rpc, use=encoded
           Product: Axis
           Version: 1.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Serialization/Deserialization
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: pradeepbollineni@hotmail.com


1. I took the WSDL (shown below) and generated java proxies using wsdl2java.
2. Ran the proxy using test driver and then received the SOAP message shown 
below
3. Found the following error in the SOAP message:
For the element ProductID (declared in namespace new_ns) that is reffered 
using "ref" in the definition of type OrderStatusLine in namespace 
http://www.mycompany.com/samples/orderstatus in the SOAP message the ProductID 
element is not namespace qualified (as necessary according to XML Schema, as 
being a global element declaration).

WSDL File:
  <?xml version="1.0" ?> 
- <wsdl:definitions name="SERVICE_SYNCH_OrderStatus_CollabService-interface" 
targetNamespace="orderstatus_tns" xmlns="http://schemas.xmlsoap.org/wsdl/" 
xmlns:jms="http://schemas.xmlsoap.org/wsdl/jms/" 
xmlns:mns="orderstatus_tns/SERVICE_SYNCH_OrderStatus_Collab" 
xmlns:ns1="http://www.mycompany.com/samples/orderstatus" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="orderstatus_tns" 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <xsd:schema targetNamespace="new_ns" xmlns="http://www.w3.org/2001/XMLSchema" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="new_ns" 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:annotation>
  <xsd:documentation>Apr 25, 2003 4:11:42 PM Pacific Standard Time; English 
(United States)</xsd:documentation> 
  </xsd:annotation>
- <xsd:complexType name="TradingPartnerChild">
- <xsd:sequence>
  <xsd:element name="partnerId" type="xsd:string" /> 
  <xsd:element name="routingNumber" type="xsd:string" /> 
  </xsd:sequence>
  </xsd:complexType>
  <xsd:element name="ProductID" type="tns:TradingPartnerChild" /> 
  </xsd:schema>
- <xsd:schema targetNamespace="http://www.mycompany.com/samples/orderstatus" 
xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ns1="new_ns" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tns="http://www.mycompany.com/samples/orderstatus" 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:import namespace="new_ns" /> 
- <xsd:annotation>
  <xsd:documentation>Apr 25, 2003 4:11:42 PM Pacific Standard Time; English 
(United States)</xsd:documentation> 
  </xsd:annotation>
- <xsd:complexType name="OrderStatusLine">
- <xsd:sequence>
  <xsd:element ref="ns1:ProductID" /> 
  <xsd:element name="ProductQuantity" type="xsd:string" /> 
  <xsd:element name="OrderStatus" type="xsd:string" /> 
  </xsd:sequence>
  </xsd:complexType>
- <xsd:complexType name="ArrayOfOrderStatusLine">
- <xsd:complexContent>
- <xsd:restriction base="soapenc:Array">
  <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="tns:OrderStatusLine
[]" /> 
  </xsd:restriction>
  </xsd:complexContent>
  </xsd:complexType>
- <xsd:complexType name="OrderStatus_ErrorInfo">
- <xsd:sequence>
  <xsd:element name="CustomerId" type="xsd:string" /> 
  <xsd:element name="OrderNumber" type="xsd:string" /> 
  <xsd:element name="errorMessage" type="xsd:string" /> 
  <xsd:element name="errorId" type="xsd:string" /> 
  </xsd:sequence>
  </xsd:complexType>
  <xsd:element name="ErrorInfo" type="tns:OrderStatus_ErrorInfo" /> 
  </xsd:schema>
  </wsdl:types>
- <wsdl:message name="SERVICE_SYNCH_OrderStatus_FaultFaultMsg">
  <wsdl:part element="ns1:ErrorInfo" name="ErrorInfoPart" /> 
  </wsdl:message>
- <wsdl:message name="SERVICE_SYNCH_TLO_OrderStatusResponseMsg">
  <wsdl:part name="OrderId" type="xsd:string" /> 
  <wsdl:part name="ComplexType" type="ns1:OrderStatusLine" /> 
  <wsdl:part name="OrderLineItems" type="ns1:ArrayOfOrderStatusLine" /> 
  </wsdl:message>
- <wsdl:message name="SERVICE_SYNCH_TLO_OrderStatusRequestMsg">
  <wsdl:part name="OrderId" type="xsd:string" /> 
  <wsdl:part name="ComplexType" type="ns1:OrderStatusLine" /> 
  <wsdl:part name="OrderLineItems" type="ns1:ArrayOfOrderStatusLine" /> 
  </wsdl:message>
- <wsdl:portType 
name="SERVICE_SYNCH_OrderStatus_Collab_WebServicesConnector_SERVICE_SYNCH_TLO_Or
derStatus_PortType">
- <wsdl:operation name="getOrderStatus">
  <wsdl:input message="tns:SERVICE_SYNCH_TLO_OrderStatusRequestMsg" 
name="SERVICE_SYNCH_TLO_OrderStatusInput" /> 
  <wsdl:output message="tns:SERVICE_SYNCH_TLO_OrderStatusResponseMsg" 
name="SERVICE_SYNCH_TLO_OrderStatusOutput" /> 
  <wsdl:fault message="tns:SERVICE_SYNCH_OrderStatus_FaultFaultMsg" 
name="SERVICE_SYNCH_OrderStatus_FaultFault" /> 
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding 
name="SERVICE_SYNCH_OrderStatus_Collab_WebServicesConnector_SOAPHTTPListener1_SE
RVICE_SYNCH_TLO_OrderStatus_Binding" 
type="tns:SERVICE_SYNCH_OrderStatus_Collab_WebServicesConnector_SERVICE_SYNCH_TL
O_OrderStatus_PortType">
  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> 
- <wsdl:operation name="getOrderStatus">
  <soap:operation soapAction="" /> 
- <wsdl:input name="SERVICE_SYNCH_TLO_OrderStatusInput">
  <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://www.mycompany.com/samples/orderstatus" parts="OrderId 
ComplexType OrderLineItems" use="encoded" /> 
  </wsdl:input>
- <wsdl:output name="SERVICE_SYNCH_TLO_OrderStatusOutput">
  <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://www.mycompany.com/samples/orderstatus" parts="OrderId 
ComplexType OrderLineItems" use="encoded" /> 
  </wsdl:output>
- <wsdl:fault name="SERVICE_SYNCH_OrderStatus_FaultFault">
  <soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
name="SERVICE_SYNCH_OrderStatus_FaultFault" use="encoded" /> 
  </wsdl:fault>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:binding 
name="SERVICE_SYNCH_OrderStatus_Collab_WebServicesConnector_SOAPHTTPSListener1_S
ERVICE_SYNCH_TLO_OrderStatus_Binding" 
type="tns:SERVICE_SYNCH_OrderStatus_Collab_WebServicesConnector_SERVICE_SYNCH_TL
O_OrderStatus_PortType">
  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> 
- <wsdl:operation name="getOrderStatus">
  <soap:operation soapAction="" /> 
- <wsdl:input name="SERVICE_SYNCH_TLO_OrderStatusInput">
  <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://www.mycompany.com/samples/orderstatus" parts="OrderId 
ComplexType OrderLineItems" use="encoded" /> 
  </wsdl:input>
- <wsdl:output name="SERVICE_SYNCH_TLO_OrderStatusOutput">
  <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://www.mycompany.com/samples/orderstatus" parts="OrderId 
ComplexType OrderLineItems" use="encoded" /> 
  </wsdl:output>
- <wsdl:fault name="SERVICE_SYNCH_OrderStatus_FaultFault">
  <soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
name="SERVICE_SYNCH_OrderStatus_FaultFault" use="encoded" /> 
  </wsdl:fault>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="OrderStatusService">
- <wsdl:port 
binding="tns:SERVICE_SYNCH_OrderStatus_Collab_WebServicesConnector_SOAPHTTPListe
ner1_SERVICE_SYNCH_TLO_OrderStatus_Binding" 
name="SERVICE_SYNCH_OrderStatus_Collab_WebServicesConnector_SOAPHTTPListener1_SE
RVICE_SYNCH_TLO_OrderStatus_BindingPort">
  <soap:address location="http://localhost:8080/wbia/webservices/samples" /> 
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

SOAP message received:
--------------------------
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmln
s:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSc
hema-instance">
 <soapenv:Body>
  <ns1:getOrderStatus soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/enc
oding/" xmlns:ns1="http://www.mycompany.com/samples/orderstatus">
   <OrderId xsi:type="xsd:string">100</OrderId>
   <ComplexType href="#id0"/>
   <OrderLineItems xsi:type="soapenc:Array" soapenc:arrayType="ns1:OrderStatusLi
ne[2]" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <item href="#id0"/>
    <item href="#id0"/>
   </OrderLineItems>
  </ns1:getOrderStatus>
  <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmls
oap.org/soap/encoding/" xsi:type="ns2:OrderStatusLine" xmlns:soapenc="http://sch
emas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://www.mycompany.com/samples/ord
erstatus">
   <ProductID href="#id1"/>
   <ProductQuantity xsi:type="xsd:string">000</ProductQuantity>
   <OrderStatus xsi:type="xsd:string">000</OrderStatus>
  </multiRef>
  <multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmls
oap.org/soap/encoding/" xsi:type="ns3:TradingPartnerChild" xmlns:ns3="new_ns" xm
lns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
   <partnerId xsi:type="xsd:string">000</partnerId>
   <routingNumber xsi:type="xsd:string">000</routingNumber>
  </multiRef>
 </soapenv:Body>
</soapenv:Envelope>