axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Perry (JIRA)" <>
Subject [jira] Created: (AXISCPP-550) WSDL2Ws does not always use the element names from WSDL
Date Tue, 15 Mar 2005 14:50:35 GMT
WSDL2Ws does not always use the element names from WSDL

         Key: AXISCPP-550
     Project: Axis-C++
        Type: Bug
  Components: WSDL processing  
    Reporter: Andrew Perry

I have created a WSDL to test nested complex types with arrays of complex
types which also contain simple arrays as well as other data elements.

The WSDL definition of one of the complex types is

   <complexType name="ComplexType1">
     <element name="simpleArrays" nillable="true"
     <element name="string" nillable="true" type="xsd:string"/>
     <element name="int" type="xsd:int"/>

The generated stubs for one of the nested complex types has named the
elements as follows:

    SimpleArrays* simpleArrays;
    xsd__string _string;
    xsd__int _int;

In the WSDL the element names are reserved words in the 'C/C++' language so
the '_' is put in the element name. Unfortunately it was also using this
name in the Axis_Serialize_xxx method for serializing the elements,
pSZ->serializeAsElement("_string", Axis_URI_ComplexType1,
(void*)(param->str_string), XSD_STRING); rather than the name of the
element from the WSDL which is just "string" and "int" without the '_'.
This causes an Internal Server Error as the element names do not match the
name in the WSDL so the server doesn't know what to do.

---------- formatted for clarity ----------

HTTP/1.1 500 Internal Server Error
Server: WebSphere Application Server/5.1
Content-Type: text/xml; charset=utf-8
Content-Language: en-US
Transfer-Encoding: chunked

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv=""
      <faultcode xmlns="">Server.generalException</faultcode>
      <faultstring xmlns="">
       <![CDATA[org.xml.sax.SAXException: WSWS3047E: Error: Cannot
deserialize element _string of bean
org.apache.test.nestedcomplex.ComplexType1. To see the message containing
the parsing error in the log, either enable web service engine tracing or
set MessageContext.setHighFidelity(true).]]>
      <detail xmlns=""/>

By manually editing the generated stubs to use the correct element name
from the WSDL the test works.

Attached WSDL. (See attached file: NestedComplex.wsdl)

Also changing the names in the WSDL will solve it, but that's not the

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

View raw message