Bad SOAP response when complexTypes are involved
------------------------------------------------

         Key: GERONIMO-678
         URL: http://issues.apache.org/jira/browse/GERONIMO-678
     Project: Geronimo
        Type: Bug
    Reporter: Stefan Schmidt


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

-- 
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

Reply via email to