Axis
  1. Axis
  2. AXIS-2095

Items in an array seems to have the wrong name compared to what the WSDL says.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      My WSDL describes an array (this is only a small fragment of the complete WSDL):

      <complexType name="PropertyValueDTO">
      <sequence>
      <element name="URI" type="xsd:boolean"/>
      <element name="dateTime" type="xsd:boolean"/>
      <element name="hasHistory" type="xsd:boolean"/>
      <element name="id" nillable="true" type="xsd:string"/>
      <element name="label" nillable="true" type="xsd:string"/>
      <element name="source" nillable="true" type="xsd:string"/>
      <element name="timestamp" nillable="true" type="xsd:dateTime"/>
      <element name="unit" nillable="true" type="xsd:string"/>
      <element name="updated" nillable="true" type="xsd:dateTime"/>
      <element name="value" nillable="true" type="xsd:string"/>
      </sequence>
      </complexType>

      <complexType name="ArrayOfPropertyValueDTO">
      <sequence>
      <element maxOccurs="unbounded" minOccurs="0" name="item" type="impl:PropertyValueDTO"/>
      </sequence>
      </complexType>

      <complexType abstract="true" name="TraceableDetailsDTO">
      <sequence>
      <element name="hasExternalLinks" type="xsd:boolean"/>
      <element name="label" nillable="true" type="xsd:string"/>
      <element name="properties" nillable="true" type="impl:ArrayOfPropertyValueDTO"/>
      </sequence>
      </complexType>

      When calling the webservice the return looks like this:
      <properties>
      <properties>
      ...
      </properties>
      <properties>

      and the client throws the following:
      org.xml.sax.SAXException: Invalid element in com.tracetracker.enterprise.twa.ArrayOfPropertyValueDTO - properties
      at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
      at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
      ...

      It seems the client expects a structure like this:
      <properties>
      <item>
      ...
      </item>
      <properties>

      Having a go at debugging the ArraySerializer I can see in my debugger that both itemQName and componentQName is null, so elementName is never changed from "properties" to "item":

      // For the maxOccurs case, each item is named with the QName

      // we got in the arguments. For normal array case, we write an element with

      // that QName, and then serialize each item as <item>

      QName elementName = name;

      Attributes serializeAttr = attributes;

      if (!maxOccursUsage)

      { serializeAttr = null; // since we are putting them here context.startElement(name, attributes); if (itemQName != null) elementName = itemQName; else if(componentQName != null) elementName = componentQName; }

      Can anyone tell me what has gone wrong here?

        Activity

        Hide
        Davanum Srinivas added a comment -

        did you generate the server impl using wsdl2java? (or did u use hand written wsdd's)

        – dims

        Show
        Davanum Srinivas added a comment - did you generate the server impl using wsdl2java? (or did u use hand written wsdd's) – dims
        Hide
        Lari Hotari added a comment -

        I'm having a similar problem with Axis 1.2.1 and Axis 1.2 . The problem doesn't occur in 1.2RC3.

        Show
        Lari Hotari added a comment - I'm having a similar problem with Axis 1.2.1 and Axis 1.2 . The problem doesn't occur in 1.2RC3.
        Hide
        Davanum Srinivas added a comment -

        Lari,

        can you confirm that "you generate the server impl using wsdl2java"?

        – dims

        Show
        Davanum Srinivas added a comment - Lari, can you confirm that "you generate the server impl using wsdl2java"? – dims
        Hide
        Lari Hotari added a comment -

        No, I'm using plain Java service defined in server-config.wsdd.
        I'm using the "wrapped" style. Axis generates a WSDL (returned by ?wsdl url) where it tells that the XML should be something like:
        <someobject>
        <arrayproperty>
        <item>....</item>
        <item>....</item>
        </arrayproperty>
        </someobject>
        Actually the service returns xml like:
        <someobject>
        <arrayproperty>
        <arrayproperty>...</arrayproperty>
        <arrayproperty>...</arrayproperty>
        </arrayproperty>
        </someobject>
        Which is not what the WSDL describes.
        I switched to 1.2RC3 and there it works at it should.

        I quickly looked at the source code of ArraySerializer and it looks like the problem is that itemQName is not set to the correct value. (the reporter of this bug made a similar conclusion). ArraySerializer has changed a lot since 1.2RC3 and therefore it's hard to quickly find out the difference between 1.2RC3 and 1.2/1.2.1.
        Isn't there test cases which cover ArraySerializer? (this is just a basic use case, bean containing an array)

        Show
        Lari Hotari added a comment - No, I'm using plain Java service defined in server-config.wsdd. I'm using the "wrapped" style. Axis generates a WSDL (returned by ?wsdl url) where it tells that the XML should be something like: <someobject> <arrayproperty> <item>....</item> <item>....</item> </arrayproperty> </someobject> Actually the service returns xml like: <someobject> <arrayproperty> <arrayproperty>...</arrayproperty> <arrayproperty>...</arrayproperty> </arrayproperty> </someobject> Which is not what the WSDL describes. I switched to 1.2RC3 and there it works at it should. I quickly looked at the source code of ArraySerializer and it looks like the problem is that itemQName is not set to the correct value. (the reporter of this bug made a similar conclusion). ArraySerializer has changed a lot since 1.2RC3 and therefore it's hard to quickly find out the difference between 1.2RC3 and 1.2/1.2.1. Isn't there test cases which cover ArraySerializer? (this is just a basic use case, bean containing an array)
        Hide
        Ted Sanne added a comment -

        Sorry for the late reply, but i've been on a 4 week long vacation.

        Yes, I'm using the skeleton generated by wsdl2java. This in turn calls my own class which implements the generated interface.

        Show
        Ted Sanne added a comment - Sorry for the late reply, but i've been on a 4 week long vacation. Yes, I'm using the skeleton generated by wsdl2java. This in turn calls my own class which implements the generated interface.
        Hide
        Ted Sanne added a comment -

        I had another go at finding the problem and came up with the following:

        Between revision 1.63 and 1.64 of org.apache.axis.message.RPCParam the following code has appeared in the serialize method:

        QName itemQName = paramDesc.getItemQName();

        if (itemQName == null) {

        MessageContext mc = context.getMessageContext();

        if (mc != null && mc.getOperation() != null && mc.getOperation().getStyle() == Style.DOCUMENT)

        { itemQName = Constants.QNAME_LITERAL_ITEM; }

        }

        context.setItemQName(itemQName);

        QName itemType = paramDesc.getItemType();

        context.setItemType(itemType);

        I'm currently using LITERAL and RPC when generating the skeletons, wsdd's, etc.
        I fired up the debugger and noticed that when "context.setItemQName(itemQName)" is called, "itemQName" is null. So on the next call, before the setItemQName was called, i changed the value of "itemQName" to "Constants.QNAME_LITERAL_ITEM", and the response came back correctly.

        So, either the generation of the wsdl is incorrect or itemQName can also be "item" even if the style is not DOCUMENT.

        Show
        Ted Sanne added a comment - I had another go at finding the problem and came up with the following: Between revision 1.63 and 1.64 of org.apache.axis.message.RPCParam the following code has appeared in the serialize method: QName itemQName = paramDesc.getItemQName(); if (itemQName == null) { MessageContext mc = context.getMessageContext(); if (mc != null && mc.getOperation() != null && mc.getOperation().getStyle() == Style.DOCUMENT) { itemQName = Constants.QNAME_LITERAL_ITEM; } } context.setItemQName(itemQName); QName itemType = paramDesc.getItemType(); context.setItemType(itemType); I'm currently using LITERAL and RPC when generating the skeletons, wsdd's, etc. I fired up the debugger and noticed that when "context.setItemQName(itemQName)" is called, "itemQName" is null. So on the next call, before the setItemQName was called, i changed the value of "itemQName" to "Constants.QNAME_LITERAL_ITEM", and the response came back correctly. So, either the generation of the wsdl is incorrect or itemQName can also be "item" even if the style is not DOCUMENT.
        Hide
        Ted Sanne added a comment -

        I have removed "&& mc.getOperation().getStyle() == Style.DOCUMENT)" from the if test and it seems to work correctly when I run it, so I will be using this temporary fix for now

        Show
        Ted Sanne added a comment - I have removed "&& mc.getOperation().getStyle() == Style.DOCUMENT)" from the if test and it seems to work correctly when I run it, so I will be using this temporary fix for now
        Hide
        Anil Jose added a comment -

        I am using style WRAPPED, so I did this:

        /* COMMENTED THE FOLLOWING
        if (mc != null && mc.getOperation() != null && mc.getOperation().getStyle() == Style.DOCUMENT)

        { itemQName = Constants.QNAME_LITERAL_ITEM; }

        */

        //ADDED THIS CODE INSTEAD, because it was putting xmlns="" in the item tag

        if (mc != null && mc.getOperation() != null) {
        if (mc.getOperation().getStyle() == Style.DOCUMENT)

        { itemQName = Constants.QNAME_LITERAL_ITEM; }

        else if (mc.getOperation().getStyle() == Style.WRAPPED)

        { itemQName = new QName(xmlType.getNamespaceURI(),Constants.QNAME_LITERAL_ITEM.getLocalPart()); }

        }

        Show
        Anil Jose added a comment - I am using style WRAPPED, so I did this: /* COMMENTED THE FOLLOWING if (mc != null && mc.getOperation() != null && mc.getOperation().getStyle() == Style.DOCUMENT) { itemQName = Constants.QNAME_LITERAL_ITEM; } */ //ADDED THIS CODE INSTEAD, because it was putting xmlns="" in the item tag if (mc != null && mc.getOperation() != null) { if (mc.getOperation().getStyle() == Style.DOCUMENT) { itemQName = Constants.QNAME_LITERAL_ITEM; } else if (mc.getOperation().getStyle() == Style.WRAPPED) { itemQName = new QName(xmlType.getNamespaceURI(),Constants.QNAME_LITERAL_ITEM.getLocalPart()); } }
        Hide
        Chad Wilson added a comment -

        I can confirm that Anil's fix resolves this issue in Axis 1.3 for Document/Wrapped. This issue has caused a number of other currently open bugs in Axis which I will link back to this (e.g. AXIS-2250)

        Show
        Chad Wilson added a comment - I can confirm that Anil's fix resolves this issue in Axis 1.3 for Document/Wrapped. This issue has caused a number of other currently open bugs in Axis which I will link back to this (e.g. AXIS-2250 )
        Hide
        Serguey Mironov added a comment -

        Anil's fix doesn't resolve the problem. After these modification i receive the next error message:
        Invalid element in com.xxx.xxx.XXX - item

        If my method returns JavaBean object with array than Anil's fix works fine
        If my other method returns array of JavaBean objects than i receive the error message.

        Before Anil's fix:
        <soapenv:Body>
        <getAdStatesResponse xmlns="Search">
        <getAdStatesReturn>
        ....
        </getAdStatesReturn>
        <getAdStatesReturn>
        ....
        </getAdStatesReturn>
        </getAdStatesResponse>
        </soapenv:Body>

        After Anil's fix:
        <soapenv:Body>
        <getAdStatesResponse xmlns="Search">
        <getAdStatesReturn>
        <ns1:item xmlns:ns1="http:/www.XXX.xxx">
        .....
        </ns1:item>
        <ns2:item xmlns:ns2="http:/www.XXX.xxx">
        ....
        </ns2:item>
        </getAdStatesReturn>
        </getAdStatesResponse>
        </soapenv:Body>

        Show
        Serguey Mironov added a comment - Anil's fix doesn't resolve the problem. After these modification i receive the next error message: Invalid element in com.xxx.xxx.XXX - item If my method returns JavaBean object with array than Anil's fix works fine If my other method returns array of JavaBean objects than i receive the error message. Before Anil's fix: <soapenv:Body> <getAdStatesResponse xmlns="Search"> <getAdStatesReturn> .... </getAdStatesReturn> <getAdStatesReturn> .... </getAdStatesReturn> </getAdStatesResponse> </soapenv:Body> After Anil's fix: <soapenv:Body> <getAdStatesResponse xmlns="Search"> <getAdStatesReturn> <ns1:item xmlns:ns1="http:/www.XXX.xxx"> ..... </ns1:item> <ns2:item xmlns:ns2="http:/www.XXX.xxx"> .... </ns2:item> </getAdStatesReturn> </getAdStatesResponse> </soapenv:Body>
        Hide
        René Zanner added a comment -

        It seems this bug exists also in version 1.3, so please change the "Affects version" field to "1.3"!

        We use Axis 1.3 with a hand written WSDD as well as a manually modified WSDL. Our Axis client stubs are generated using this manually modified WSDL file. The stubs expect an "item" element inside the Array wrapper element but deserialize the wrong response without an error. How does that work???

        So the Axis client stubs (using the ArrayDeserializer) ignore the wrong response from the server and simply deserialize despite the wrong xml structure.

        Maybe that's the reason why nobody stumbled over it any more? Since we have a .NET client at the other side, we found this bug very quickly and need a fix as soon as possible!

        Thanks a lot!

        Show
        René Zanner added a comment - It seems this bug exists also in version 1.3, so please change the "Affects version" field to "1.3"! We use Axis 1.3 with a hand written WSDD as well as a manually modified WSDL. Our Axis client stubs are generated using this manually modified WSDL file. The stubs expect an "item" element inside the Array wrapper element but deserialize the wrong response without an error. How does that work??? So the Axis client stubs (using the ArrayDeserializer) ignore the wrong response from the server and simply deserialize despite the wrong xml structure. Maybe that's the reason why nobody stumbled over it any more? Since we have a .NET client at the other side, we found this bug very quickly and need a fix as soon as possible! Thanks a lot!
        Hide
        Sascha-Matthias Kulawik added a comment -

        BUG exists in 1.4 as well!

        Show
        Sascha-Matthias Kulawik added a comment - BUG exists in 1.4 as well!
        Hide
        Zach Bailey added a comment -

        This is a rather critical issue for us as a response sent by AXIS cannot then be re-accepted by AXIS because it does not match the WSDL. For example, I have in my hand-written WSDL (in part):

        <element name="structuredDataNodes" minOccurs="0" maxOccurs="unbounded" type="impl:structured-data-nodes"/>
        
        <complexType name="structured-data-nodes">
        			<sequence>
        				<element name="structuredDataNode" maxOccurs="unbounded" type="impl:structured-data-node"/>
        			</sequence>
        		</complexType>	
        

        The proposed fix does not work because it simply gives every array item the element name "item", while the element name should be dependent on the element name as defined in the WSDL.

        The provided fix will have the server generate a response that looks like:

        <structuredDataNodes>
           <item>
             ...
           </item>
           <item>
             ...
           </item>
           <item>
             ...
           </item>
        </structuredDataNodes>
        

        The response should look like:

        <structuredDataNodes>
           <structuredDataNode>
             ...
           </structuredDataNode>
           <structuredDataNode>
             ...
           </structuredDataNode>
           <structuredDataNode>
             ...
           </structuredDataNode>
        </structuredDataNodes>
        

        This is what the WSDL expects for an incoming request, however it does not produce the same XML in an outgoing response. This is very troublesome as the web services client should not need to know about this translation that has to take place.

        Show
        Zach Bailey added a comment - This is a rather critical issue for us as a response sent by AXIS cannot then be re-accepted by AXIS because it does not match the WSDL. For example, I have in my hand-written WSDL (in part): <element name= "structuredDataNodes" minOccurs= "0" maxOccurs= "unbounded" type= "impl:structured-data-nodes" /> <complexType name= "structured-data-nodes" > <sequence> <element name= "structuredDataNode" maxOccurs= "unbounded" type= "impl:structured-data-node" /> </sequence> </complexType> The proposed fix does not work because it simply gives every array item the element name "item", while the element name should be dependent on the element name as defined in the WSDL. The provided fix will have the server generate a response that looks like: <structuredDataNodes> <item> ... </item> <item> ... </item> <item> ... </item> </structuredDataNodes> The response should look like: <structuredDataNodes> <structuredDataNode> ... </structuredDataNode> <structuredDataNode> ... </structuredDataNode> <structuredDataNode> ... </structuredDataNode> </structuredDataNodes> This is what the WSDL expects for an incoming request, however it does not produce the same XML in an outgoing response. This is very troublesome as the web services client should not need to know about this translation that has to take place.
        Hide
        Michael Hu added a comment -

        Can the priority of this bug be updated to blocker? Serialization of sequences is basic functionality and has been broken since 1.3.

        With an XSD definition like this:

        <xs:complexType name="widgetRequestEntity">
        <xs:element name="widgetList" minOccurs="0">
        </xs:complexType>

        <xs:element name="widgetList" minOccurs="0">
        <xs:complexType>
        <xs:sequence>
        <xs:element ref="widget" maxOccurs="unbounded"/>
        </xs:sequence>
        </xs:complexType>
        </xs:element>

        <xs:element name="widget">
        <xs:complexType>
        <xs:sequence>
        <xs:element name="widgetName" type="xs:string"/>
        ...
        </xs:sequence>
        </xs:complexType>
        </xs:element>

        Axis 1.3/1.4 converts this:

        Widget widget1 = new Widget();
        widget1.setWidgetName("AAA");
        Widget widget2 = new Widget();
        widget2.setWidgetName("BBB");
        Widget[] widgetList = new Widget[2];
        widgetArray[0] = widget1;
        widgetArray[1] = widget2;
        widgetRequestEntity.setWidgetList(widgetList);

        to this (which is wrong):

        <ns:widgetList>
        <ns:widgetName>AAA</ns:widgetName>
        </ns:widgetList>
        <ns:widgetList>
        <ns:widgetName>BBB</ns:widgetName>
        </ns:widgetList>

        when it should be converting it to this:

        <ns:widgetList>
        <ns:widget>
        <ns:widgetName>AAA</ns:widgetName>
        </ns:widget>
        <ns:widget>
        <ns:widgetName>BBB</ns:widgetName>
        </ns:widget>
        </ns:widgetList>

        Show
        Michael Hu added a comment - Can the priority of this bug be updated to blocker? Serialization of sequences is basic functionality and has been broken since 1.3. With an XSD definition like this: <xs:complexType name="widgetRequestEntity"> <xs:element name="widgetList" minOccurs="0"> </xs:complexType> <xs:element name="widgetList" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element ref="widget" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="widget"> <xs:complexType> <xs:sequence> <xs:element name="widgetName" type="xs:string"/> ... </xs:sequence> </xs:complexType> </xs:element> Axis 1.3/1.4 converts this: Widget widget1 = new Widget(); widget1.setWidgetName("AAA"); Widget widget2 = new Widget(); widget2.setWidgetName("BBB"); Widget[] widgetList = new Widget [2] ; widgetArray [0] = widget1; widgetArray [1] = widget2; widgetRequestEntity.setWidgetList(widgetList); to this (which is wrong): <ns:widgetList> <ns:widgetName>AAA</ns:widgetName> </ns:widgetList> <ns:widgetList> <ns:widgetName>BBB</ns:widgetName> </ns:widgetList> when it should be converting it to this: <ns:widgetList> <ns:widget> <ns:widgetName>AAA</ns:widgetName> </ns:widget> <ns:widget> <ns:widgetName>BBB</ns:widgetName> </ns:widget> </ns:widgetList>
        Hide
        Simon Gibbs added a comment -

        The following code change worked for my service, also an RPC wrapped style interface.

        Package: org.apache.axis.encoding.ser
        Class: ArraySerializer
        Source Line: 404

        Add two lines as follows:

        else
        elementName = new QName(name.getNamespaceURI(),Constants.QNAME_LITERAL_ITEM.getLocalPart());

        This causes output to validate as expected against the generated schema in the WSDL.
        I will point this out on axis-users.

        Show
        Simon Gibbs added a comment - The following code change worked for my service, also an RPC wrapped style interface. Package: org.apache.axis.encoding.ser Class: ArraySerializer Source Line: 404 Add two lines as follows: else elementName = new QName(name.getNamespaceURI(),Constants.QNAME_LITERAL_ITEM.getLocalPart()); This causes output to validate as expected against the generated schema in the WSDL. I will point this out on axis-users.
        Hide
        wang added a comment -

        Now I have the same issue in Axis 1.2.
        My exception is here:
        AxisFault
        faultCode:

        {http://schemas.xmlsoap.org/soap/envelope/}

        Server.userException
        faultSubcode:
        faultString: Invalid element in SybaseBugs.course_uac - item
        faultActor:
        faultNode:
        faultDetail:

        {http://xml.apache.org/axis/}

        hostname:JZWANG-DESKTOP

        Invalid element in SybaseBugs.course_uac - item
        at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
        at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
        at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
        at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:714)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
        at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2771)
        at org.apache.axis.client.Call.invoke(Call.java:2754)
        at org.apache.axis.client.Call.invoke(Call.java:2430)
        at org.apache.axis.client.Call.invoke(Call.java:2353)
        at org.apache.axis.client.Call.invoke(Call.java:1810)
        at client.CourseDataService_BindingStub.test(CourseDataService_BindingStub.java:217)
        at client.CourseDataServiceServiceTestClient.main(CourseDataServiceServiceTestClient.java:24)

        And surprising me is that when I debug in axis I found typeDesc and propDesc were both null. Why?
        My wsdl is here.
        -------------------------
        <?xml version="1.0" encoding="UTF-8"?>
        <wsdl:definitions targetNamespace="http://SybaseBugs" xmlns:tns3="http://CORBA.omg.org" xmlns:impl="http://SybaseBugs" xmlns:intf="http://SybaseBugs" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns2="http://CTS" xmlns:tns1="http://MJD" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
        <!--WSDL created by Apache Axis version: 1.2
        Built on Nov 30, 2006 (01:32:55 CST)-->
        <wsdl:types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://SybaseBugs" elementFormDefault="qualified">
        <import namespace="http://MJD"/>
        <import namespace="http://CTS"/>
        <import namespace="http://CORBA.omg.org"/>
        <element name="test">
        <complexType>
        <sequence>
        <element name="in0" type="impl:course"/>
        </sequence>
        </complexType>
        </element>
        <complexType name="course_uac">
        <sequence>
        <element name="s_value" nillable="true" type="xsd:string"/>
        <element name="d_value" nillable="true" type="tns1:Date"/>
        </sequence>
        </complexType>
        <complexType name="ArrayOfcourse_uac">
        <sequence>
        <element name="item" type="impl:course_uac" minOccurs="0" maxOccurs="unbounded"/>
        </sequence>
        </complexType>
        <complexType name="course">
        <sequence>
        <element name="lstr_uac_course" nillable="true" type="impl:ArrayOfcourse_uac"/>
        </sequence>
        </complexType>
        <element name="testResponse">
        <complexType>
        <sequence>
        <element name="testReturn" type="impl:course"/>
        </sequence>
        </complexType>
        </element>
        <element name="fault" type="tns2:PBUserException"/>
        <element name="test1">
        <complexType>
        <sequence>
        <element name="in0" type="impl:course_uac"/>
        </sequence>
        </complexType>
        </element>
        <element name="test1Response">
        <complexType>
        <sequence>
        <element name="test1Return" type="impl:course_uac"/>
        </sequence>
        </complexType>
        </element>
        </schema>
        <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://MJD" elementFormDefault="qualified">
        <import namespace="http://SybaseBugs"/>
        <import namespace="http://CTS"/>
        <import namespace="http://CORBA.omg.org"/>
        <complexType name="Date">
        <sequence>
        <element name="dateValue" type="xsd:double"/>
        </sequence>
        </complexType>
        </schema>
        <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://CORBA.omg.org" elementFormDefault="qualified">
        <import namespace="http://SybaseBugs"/>
        <import namespace="http://MJD"/>
        <import namespace="http://CTS"/>
        <complexType abstract="true" name="UserException">
        <sequence/>
        </complexType>
        </schema>
        <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://CTS" elementFormDefault="qualified">
        <import namespace="http://SybaseBugs"/>
        <import namespace="http://MJD"/>
        <import namespace="http://CORBA.omg.org"/>
        <complexType name="PBUserException">
        <complexContent>
        <extension base="tns3:UserException">
        <sequence>
        <element name="message" nillable="true" type="xsd:string"/>
        </sequence>
        </extension>
        </complexContent>
        </complexType>
        </schema>
        </wsdl:types>

        <wsdl:message name="test1Request">

        <wsdl:part name="parameters" element="impl:test1"/>

        </wsdl:message>

        <wsdl:message name="testRequest">

        <wsdl:part name="parameters" element="impl:test"/>

        </wsdl:message>

        <wsdl:message name="PBUserException">

        <wsdl:part name="fault" element="impl:fault"/>

        </wsdl:message>

        <wsdl:message name="testResponse">

        <wsdl:part name="parameters" element="impl:testResponse"/>

        </wsdl:message>

        <wsdl:message name="test1Response">

        <wsdl:part name="parameters" element="impl:test1Response"/>

        </wsdl:message>

        <wsdl:portType name="CourseDataService">

        <wsdl:operation name="test">

        <wsdl:input name="testRequest" message="impl:testRequest"/>

        <wsdl:output name="testResponse" message="impl:testResponse"/>

        <wsdl:fault name="PBUserException" message="impl:PBUserException"/>

        </wsdl:operation>

        <wsdl:operation name="test1">

        <wsdl:input name="test1Request" message="impl:test1Request"/>

        <wsdl:output name="test1Response" message="impl:test1Response"/>

        <wsdl:fault name="PBUserException" message="impl:PBUserException"/>

        </wsdl:operation>

        </wsdl:portType>

        <wsdl:binding name="CourseDataService" type="impl:CourseDataService">

        <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

        <wsdl:operation name="test">

        <wsdlsoap:operation soapAction=""/>

        <wsdl:input name="testRequest">

        <wsdlsoap:body use="literal"/>

        </wsdl:input>

        <wsdl:output name="testResponse">

        <wsdlsoap:body use="literal"/>

        </wsdl:output>

        <wsdl:fault name="PBUserException">

        <wsdlsoap:fault name="PBUserException" use="literal"/>

        </wsdl:fault>

        </wsdl:operation>

        <wsdl:operation name="test1">

        <wsdlsoap:operation soapAction=""/>

        <wsdl:input name="test1Request">

        <wsdlsoap:body use="literal"/>

        </wsdl:input>

        <wsdl:output name="test1Response">

        <wsdlsoap:body use="literal"/>

        </wsdl:output>

        <wsdl:fault name="PBUserException">

        <wsdlsoap:fault name="PBUserException" use="literal"/>

        </wsdl:fault>

        </wsdl:operation>

        </wsdl:binding>

        <wsdl:service name="CourseDataServiceService">

        <wsdl:port name="SybaseBugs_CourseDataService" binding="impl:CourseDataService">

        <wsdlsoap:address location="http://JZWANG-DESKTOP:8080/ws/services/SybaseBugs_CourseDataService"/>

        </wsdl:port>

        </wsdl:service>

        </wsdl:definitions>
        -------------------------

        Show
        wang added a comment - Now I have the same issue in Axis 1.2. My exception is here: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/} Server.userException faultSubcode: faultString: Invalid element in SybaseBugs.course_uac - item faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/} hostname:JZWANG-DESKTOP Invalid element in SybaseBugs.course_uac - item at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:714) at org.apache.axis.Message.getSOAPEnvelope(Message.java:424) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2771) at org.apache.axis.client.Call.invoke(Call.java:2754) at org.apache.axis.client.Call.invoke(Call.java:2430) at org.apache.axis.client.Call.invoke(Call.java:2353) at org.apache.axis.client.Call.invoke(Call.java:1810) at client.CourseDataService_BindingStub.test(CourseDataService_BindingStub.java:217) at client.CourseDataServiceServiceTestClient.main(CourseDataServiceServiceTestClient.java:24) And surprising me is that when I debug in axis I found typeDesc and propDesc were both null. Why? My wsdl is here. ------------------------- <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://SybaseBugs" xmlns:tns3="http://CORBA.omg.org" xmlns:impl="http://SybaseBugs" xmlns:intf="http://SybaseBugs" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns2="http://CTS" xmlns:tns1="http://MJD" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <!--WSDL created by Apache Axis version: 1.2 Built on Nov 30, 2006 (01:32:55 CST)--> <wsdl:types> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://SybaseBugs" elementFormDefault="qualified"> <import namespace="http://MJD"/> <import namespace="http://CTS"/> <import namespace="http://CORBA.omg.org"/> <element name="test"> <complexType> <sequence> <element name="in0" type="impl:course"/> </sequence> </complexType> </element> <complexType name="course_uac"> <sequence> <element name="s_value" nillable="true" type="xsd:string"/> <element name="d_value" nillable="true" type="tns1:Date"/> </sequence> </complexType> <complexType name="ArrayOfcourse_uac"> <sequence> <element name="item" type="impl:course_uac" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> <complexType name="course"> <sequence> <element name="lstr_uac_course" nillable="true" type="impl:ArrayOfcourse_uac"/> </sequence> </complexType> <element name="testResponse"> <complexType> <sequence> <element name="testReturn" type="impl:course"/> </sequence> </complexType> </element> <element name="fault" type="tns2:PBUserException"/> <element name="test1"> <complexType> <sequence> <element name="in0" type="impl:course_uac"/> </sequence> </complexType> </element> <element name="test1Response"> <complexType> <sequence> <element name="test1Return" type="impl:course_uac"/> </sequence> </complexType> </element> </schema> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://MJD" elementFormDefault="qualified"> <import namespace="http://SybaseBugs"/> <import namespace="http://CTS"/> <import namespace="http://CORBA.omg.org"/> <complexType name="Date"> <sequence> <element name="dateValue" type="xsd:double"/> </sequence> </complexType> </schema> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://CORBA.omg.org" elementFormDefault="qualified"> <import namespace="http://SybaseBugs"/> <import namespace="http://MJD"/> <import namespace="http://CTS"/> <complexType abstract="true" name="UserException"> <sequence/> </complexType> </schema> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://CTS" elementFormDefault="qualified"> <import namespace="http://SybaseBugs"/> <import namespace="http://MJD"/> <import namespace="http://CORBA.omg.org"/> <complexType name="PBUserException"> <complexContent> <extension base="tns3:UserException"> <sequence> <element name="message" nillable="true" type="xsd:string"/> </sequence> </extension> </complexContent> </complexType> </schema> </wsdl:types> <wsdl:message name="test1Request"> <wsdl:part name="parameters" element="impl:test1"/> </wsdl:message> <wsdl:message name="testRequest"> <wsdl:part name="parameters" element="impl:test"/> </wsdl:message> <wsdl:message name="PBUserException"> <wsdl:part name="fault" element="impl:fault"/> </wsdl:message> <wsdl:message name="testResponse"> <wsdl:part name="parameters" element="impl:testResponse"/> </wsdl:message> <wsdl:message name="test1Response"> <wsdl:part name="parameters" element="impl:test1Response"/> </wsdl:message> <wsdl:portType name="CourseDataService"> <wsdl:operation name="test"> <wsdl:input name="testRequest" message="impl:testRequest"/> <wsdl:output name="testResponse" message="impl:testResponse"/> <wsdl:fault name="PBUserException" message="impl:PBUserException"/> </wsdl:operation> <wsdl:operation name="test1"> <wsdl:input name="test1Request" message="impl:test1Request"/> <wsdl:output name="test1Response" message="impl:test1Response"/> <wsdl:fault name="PBUserException" message="impl:PBUserException"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="CourseDataService" type="impl:CourseDataService"> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="test"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="testRequest"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="testResponse"> <wsdlsoap:body use="literal"/> </wsdl:output> <wsdl:fault name="PBUserException"> <wsdlsoap:fault name="PBUserException" use="literal"/> </wsdl:fault> </wsdl:operation> <wsdl:operation name="test1"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="test1Request"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="test1Response"> <wsdlsoap:body use="literal"/> </wsdl:output> <wsdl:fault name="PBUserException"> <wsdlsoap:fault name="PBUserException" use="literal"/> </wsdl:fault> </wsdl:operation> </wsdl:binding> <wsdl:service name="CourseDataServiceService"> <wsdl:port name="SybaseBugs_CourseDataService" binding="impl:CourseDataService"> <wsdlsoap:address location="http://JZWANG-DESKTOP:8080/ws/services/SybaseBugs_CourseDataService"/> </wsdl:port> </wsdl:service> </wsdl:definitions> -------------------------

          People

          • Assignee:
            Unassigned
            Reporter:
            Ted Sanne
          • Votes:
            21 Vote for this issue
            Watchers:
            18 Start watching this issue

            Dates

            • Created:
              Updated:

              Development