Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-678

Bad SOAP response when complexTypes are involved

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: 1.0-M4, 1.0-M5
    • Component/s: webservices
    • Labels:
      None

      Description

      I am getting a bad SOAP response when complexTypes are involved:

      WSDL (extract)
      ---------------------------------------------------------------------------
      <import namespace="urn:http://arrays/com/ibm/dw/reallybigpet/ejb" />
      <complexType name="Category">
      <sequence>
      <element name="id" type="xsd:string" nillable="true" />
      <element name="name" type="xsd:string" nillable="true" />
      </sequence>
      </complexType>
      ---------------------------------------------------------------------------

      mapping.xml (extract)
      ----------------------------------------------------------------------------
      <java-xml-type-mapping>
      <java-type>com.ibm.dw.reallybigpet.ejb.Category</java-type>
      <root-type-qname>tns:Category</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>id</java-variable-name>
      <xml-element-name>id</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>name</java-variable-name>
      <xml-element-name>name</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>

      <java-xml-type-mapping>
      <java-type>com.ibm.dw.reallybigpet.ejb.Category[]</java-type>
      <root-type-qname>ns2:CategoryArray</root-type-qname>
      <qname-scope>complexType</qname-scope>
      </java-xml-type-mapping>
      -----------------------------------------------------------------------------------------------------------------

      SOAP Response:
      ----------------------------------------------------------------------------
      HTTP/1.1 200 OK
      Date: Wed, 15 Jun 2005 23:12:47 GMT
      Server: Jetty/5.1.4rc0 (Windows XP/5.1 x86 java/1.4.2_08
      Content-Type: text/xml; charset=utf-8
      Connection: close

      <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
      <getCategoriesResponse xmlns="urn:http://ejb.reallybigpet.dw.ibm.com">
      <result xmlns="">
      <result>
      <id>1</id>
      <name>Pets</name>
      </result>
      <result>
      <id>2</id>
      <name>Books</name>
      </result>
      <result>
      <id>3</id>
      <name>Promotion</name>
      </result>
      </result>
      </getCategoriesResponse>
      </soapenv:Body>
      </soapenv:Envelope>
      -------------------------------------------------------------------------------------

      Generated Client Stubs (Axis WSDL2Java & jDeveloper Web Services Proxy Generator) crash because they cannot remap the array:

      The problem is here (in the SOAP response):
      <result xmlns="">
      <result>

      : Stefan Schmidt

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              stsmedia Stefan Schmidt
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: