You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Fred Preston (JIRA)" <ax...@ws.apache.org> on 2005/09/29 15:35:47 UTC

[jira] Created: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Serialiser is using namespaces without first assigning them in the XML
----------------------------------------------------------------------

         Key: AXISCPP-843
         URL: http://issues.apache.org/jira/browse/AXISCPP-843
     Project: Axis-C++
        Type: Bug
 Environment: n/a
    Reporter: Fred Preston
    Priority: Blocker


I have the following xsd and wsdl files:-

SimpleType.xml
----------------------
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
 
 <xsd:complexType name="SampleBean">
  <xsd:sequence>
   <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
   <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
   <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
   <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
   <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
   <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
   <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
   <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
   <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
   <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
  </xsd:sequence>
 </xsd:complexType>
 
 <xsd:complexType name="SampleBeanArray">
  <xsd:sequence>
   <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
  </xsd:sequence>
 </xsd:complexType>
</xsd:schema>

SimpleNonBaseType.xml
-----------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <xsd:complexType name="Time">
  <xsd:sequence>
   <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
   <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
   <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
  </xsd:sequence>
 </xsd:complexType>
 
 <xsd:complexType name="TimeArray">
  <xsd:sequence>
   <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
  </xsd:sequence>
 </xsd:complexType>
</xsd:schema>

SimpleService.wsdl
---------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">

 <types>
  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
  	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>

   <xsd:element name="aBeanElement">
    <xsd:complexType>
     <xsd:sequence>
      <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
     </xsd:sequence>
    </xsd:complexType>
   </xsd:element>
  </xsd:schema>
    </types>

 <message name="aBeanInput">
  <part name="parameters" type="ns2:SampleBeanArray"/>
 </message>

 <message name="bBeanInput">
 	<part name="bBeanInput" element="tns:aBeanElement"/>
 </message>
 <portType name="TestServicePortType">
  <operation name="aBeanPortType">
   <input message="tns:bBeanInput"/>
  </operation>
 </portType>

 <binding name="ServiceBinding" type="tns:TestServicePortType">
  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  <operation name="aBeanPortType">
   <soap:operation soapAction="" style="document"/>
   <input>
    <soap:body use="literal"/>
   </input>
  </operation>
 </binding>

  <service name="SimpleService">
    <port binding="tns:ServiceBinding" name="ServiceBinding">
      <soap:address location="http://tempuri.org" /> 
    </port>
  </service>
</definitions>

-----------------------------------------------------------------------------------------------------------------------
When I build a stub using WSDL2Ws and then create a client as follows:-

#include "TestServicePortType.hpp"

void main()
{
	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
	SampleBean	sSB;

	pWS->aBeanPortType( &sSB);

	delete pWS;
}

-----------------------------------------------------------------------------------------------------------------------
The request message produced by the stub is as follows:-

POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
Host: <localhost>:<port>
Content-Type: text/xml; charset=UTF-8
SOAPAction: ""
Content-Length: 679

<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
<aBean>
<ns2:Time xsi:nil="true"></ns2:Time>
<ns2:Boolean>false</ns2:Boolean>
<ns2:Byte>0</ns2:Byte>
<ns2:Calendar xsi:nil="true"></ns2:Calendar>
<ns2:Double>0.000000</ns2:Double>
<ns2:Float>0.000000</ns2:Float>
<ns2:Int>0</ns2:Int>
<ns2:Long>0</ns2:Long>
<ns2:Short>0</ns2:Short>
<ns2:String xsi:nil="true"></ns2:String>
</aBean>
</ns1:aBeanElement>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

-----------------------------------------------------------------------------------------------------------------------
Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12358508 ] 

John Hawkins commented on AXISCPP-843:
--------------------------------------

hi,

we think this works now - have you taken the latest code in the past day or so to check that it' still broken? Adrian made some changes and it look sgood for us. Do you have any testscases that are failing ?

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12358222 ] 

John Hawkins commented on AXISCPP-843:
--------------------------------------

Oh and here's a useful uri for elementFormDefault -> http://www.xfront.com/HideVersusExpose.html

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Adrian Dick (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12358386 ] 

Adrian Dick commented on AXISCPP-843:
-------------------------------------

I have made a small change to CSchemaUtils, as the recent changes didn't always correctly propogate the namespace through WSDL2Ws, resulting in the wrong code being generated.

Amonst a few others, this affected the "SimpleArrays" testcase.
I have tested this on Windows, and is now working nicely.

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Assigned: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-843?page=all ]

Dushshantha Chandradasa reassigned AXISCPP-843:
-----------------------------------------------

    Assign To: Dushshantha Chandradasa

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12356383 ] 

Dushshantha Chandradasa commented on AXISCPP-843:
-------------------------------------------------

Hi All,

Above solution seems to be working fine. Here, the namespace will be declared only if it is not declared before. 

I'll commit the changes i have done to BeanParmWriter.java. But do not close the issue. If somebody can test this on different platforms, it would be helpful to close the issue. For Windows, Fix is working. 

We still have the problem of setting the prefix for the Namespace. :-(

Dushshantha.

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12358591 ] 

Dushshantha Chandradasa commented on AXISCPP-843:
-------------------------------------------------

oopse, i didnt notice this and made some modifications :-( If this if fixed, can you please roll back the changes i have made ?? 

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12358494 ] 

Dushshantha Chandradasa commented on AXISCPP-843:
-------------------------------------------------

hi,

i have made some changes to handle elementFormDefault and commited part of the fix to the svn. This will not be effective untill i do another few changes to BeamParamWriter.

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12358219 ] 

Dushshantha Chandradasa commented on AXISCPP-843:
-------------------------------------------------

made a fix for this. Now the request message for the test NamespaceTest1 looks like the following.

POST /axis/NamespaceTest HTTP/1.1
Host: localhost:8080
Content-Type: text/xml; charset=UTF-8
SOAPAction: ""
Content-Length: 729

<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:anElement xmlns:ns1="SimpleNonBaseType">
<Element xmlns:ns2="SimpleType"><ns2:Time xsi:nil="true"></ns2:Time><ns2:Boolean>true</ns2:Boolean>
<ns2:Byte>8</ns2:Byte>
<ns2:Calendar xsi:nil="true"></ns2:Calendar>
<ns2:Double>0.000000</ns2:Double>
<ns2:Float>19803104346112.000000</ns2:Float>
<ns2:Int>1245104</ns2:Int>
<ns2:Long>8629222618370883248</ns2:Long>
<ns2:Short>-1</ns2:Short>
<ns2:String xsi:nil="true"></ns2:String>
</Element>
</ns1:anElement>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I tested this on Windows and is working fine. It would be very helpful if somebody can test this on other platforms and confirm the correctness. 

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Updated: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-843?page=all ]

John Hawkins updated AXISCPP-843:
---------------------------------

    Fix Version: 1.6 Alpha

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>  Environment: n/a
>     Reporter: Fred Preston
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12358221 ] 

John Hawkins commented on AXISCPP-843:
--------------------------------------

This solution does not take into account the atttribute elementFormDefault. Indeed this solution is incorrect if we take into account elementFormDefault as the WSDL does not define this attribute (we have very few tests that do!) then it defaults to "unqualified". So the solution should be (I think) ->


<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<anElement xmlns:ns1="SimpleNonBaseType">
<Element xmlns:ns2="SimpleType"><Time xsi:nil="true"></Time><Boolean>true</Boolean>
<Byte>8</Byte>
<Calendar xsi:nil="true"></Calendar>
<Double>0.000000</ns2:Double>
<Float>19803104346112.000000</Float>
<Int>1245104</ns2:Int>
<Long>8629222618370883248</Long>
<Short>-1</ns2:Short>
<String xsi:nil="true"></String>
</Element>
</anElement>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> 


Now, we can choose to say that we have fixed this defect and create a new one to cater for elementFormDefault (of which we have had several issues already raised) or fix this defect so it takes into account elementFormDefault. My take is to put this fix in and then fix elementFormDefault seperately (but soon).

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12356055 ] 

Dushshantha Chandradasa commented on AXISCPP-843:
-------------------------------------------------

when serializing a complex parameter, the namespace is not set in the SoapSerializer::addOutputCmplxParam method. And also Param::serialize method doent use this namespace value to set to assing the namespace. We can can fix this by making the following changes to above mensioned methods.

int SoapSerializer::addOutputCmplxParam( void * pObject,
										 void * pSZFunct, 
                                         void * pDelFunct,
										 const AxisChar * pName,
                                         const AxisChar * pNamespace)
{ 
	int	iSuccess = AXIS_SUCCESS;

    Param * pParam = new Param();

    pParam->m_Value.pCplxObj = new ComplexObjectHandler;
    pParam->m_Value.pCplxObj->pObject = pObject;
    pParam->m_Value.pCplxObj->pSZFunct = (AXIS_SERIALIZE_FUNCT) pSZFunct;
    pParam->m_Value.pCplxObj->pDelFunct = (AXIS_OBJECT_DELETE_FUNCT) pDelFunct;
    pParam->m_Value.pCplxObj->m_URI = pNamespace; <--------------------------------------------------setting the namespace
	
    if( m_pSoapEnvelope &&
		(m_pSoapEnvelope->m_pSoapBody) &&
		(m_pSoapEnvelope->m_pSoapBody->m_pSoapMethod)) 
    {
        m_pSoapEnvelope->m_pSoapBody->m_pSoapMethod->addOutputParam( pParam);
    }

    pParam->setURI(pNamespace);
    pParam->setName( pName);

    return iSuccess;  // Can it only be successful?
}




int Param::serialize (SoapSerializer &pSZ)
{
.......


case USER_TYPE:
	
			
            if (RPC_ENCODED == pSZ.getStyle ())
            {
				TRACE_SERIALIZE_FUNCT_ENTRY(m_Value.pCplxObj->pSZFunct, m_Value.pCplxObj->pObject, &pSZ, false);
                int stat = AXIS_FAIL;
                stat = m_Value.pCplxObj->pSZFunct (m_Value.pCplxObj->pObject, &pSZ, false);
				TRACE_SERIALIZE_FUNCT_EXIT(m_Value.pCplxObj->pSZFunct, stat);
            }
            else
            {
                                
                ATprefix =
                    pSZ.getNamespacePrefix (m_Value.pArray->m_URI.c_str ());
                pSZ.serialize ("<", m_sName.c_str ()," xmlns:", ATprefix.c_str (), "=\"",
                        m_Value.pCplxObj->m_URI.c_str (), "\" ", NULL);                             <-------------------------------------- namespace is defined 


.....

}



This changes lead us to get the following request message.


POST /axis/NamespaceTest HTTP/1.1
Host: localhost:8080
Content-Type: text/xml; charset=UTF-8
SOAPAction: ""
Content-Length: 693

<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:anElement xmlns:ns1="SimpleNonBaseType">
<Element xmlns:ns2="SimpleType" ><ns3:Time xsi:nil="true"></ns3:Time><ns3:Boolean>false</ns3:Boolean>
<ns3:Byte>0</ns3:Byte>
<ns3:Calendar xsi:nil="true"></ns3:Calendar>
<ns3:Double>0.000000</ns3:Double>
<ns3:Float>0.000000</ns3:Float>
<ns3:Int>0</ns3:Int>
<ns3:Long>0</ns3:Long>
<ns3:Short>0</ns3:Short>
<ns3:String xsi:nil="true"></ns3:String>
</Element>
</ns1:anElement>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Now, the namespace for Elemint is defined as ns2. But when we serialize the complex element with same namespace, SoapSerializer::getNamespacePrefix gives the prefix for the namespace as ns3. That means SoapSerializer::getNamespacePrefix doest identify "SimpleType" as a predefined namespace.

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12356196 ] 

John Hawkins commented on AXISCPP-843:
--------------------------------------

We need to reduce the number of times ns's are declared and this solution apears to increase it :-( can we put more checks into the serialisers to work out whether the namespace has already been declared in a particular block and if so don't declare it again - this may make for a nasty object model ! It makes more sense to be able to declare the ns once and once only above the type level and then the types don't need to think about their ns at all?

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12358346 ] 

John Hawkins commented on AXISCPP-843:
--------------------------------------

That sounds good. Can you ensure that when you add in the boolean that you add it into the superclass as much as possible e.g. in the case of arrays add it into Axis_Array and not the generated array types. You might be able just put it on the param object and not require it anywhere else?

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12358592 ] 

Dushshantha Chandradasa commented on AXISCPP-843:
-------------------------------------------------

oopse, i didnt notice this and made some modifications :-( If this is fixed, can you please roll back the changes i have made ??

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12358344 ] 

Dushshantha Chandradasa commented on AXISCPP-843:
-------------------------------------------------

john,
Many thanks for the referance.

I found a way to fix this problem. i modified following files in wsdl2ws tool for this. 

symbolTable/CElementDecl.java
symbolTable/CSchemaUtils.java
wsdl2ws/info/ElementInfo.java
wsdl2ws/info/AttributeInfo.java
wsdl2ws/ParamWriter.java
wsdl2ws/WSDL2Ws.java

the plan is simple:
i have added a new boolean field called 'nsQualified'. This will be set to true if the element is elementFormDefault qualified. Then I plan to change BeanParmWriter to generate codes accordingly. 

thoughts please...

Dushshantha


> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Fred Preston (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12330808 ] 

Fred Preston commented on AXISCPP-843:
--------------------------------------

Q: Because the targetNamespace in the WSDL is set to SimpleNonBaseType, is everything assumed to be from that namespace?

The SampleBean type has a different namespace, 'SimpleType'.  But, also has some components that belong to SimpleNonBaseType.  Thus it is a hybrid of the two namespaces.  I assume that there could be any number of different namespaces used to make up a compound/complex type so these should be declared in the element that names the type in the XML (in this case '<Element>'?).  If this is so, then the Axis_Serialize_<type> stub method needs to include processing for any other namespace references that will be used within that type and add them as attribute declarations.  This is fine, as on entry, the method has an opportunity to add attributes before the closing element brace ('>').  Thus, <Element> would become <Element  xmlns:ns2="SimpleType">.

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>  Environment: n/a
>     Reporter: Fred Preston
>     Priority: Blocker

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12356171 ] 

Dushshantha Chandradasa commented on AXISCPP-843:
-------------------------------------------------

Hi All,

Above problem can be avoided by including the namespace definition in serialization code of  the particular type. The following change will be doing this.

int Axis_Serialize_SampleBean(SampleBean* param, IWrapperSoapSerializer* pSZ, bool bArray = false)
{
	if ( param == NULL )
	{
	 /* TODO : may need to check nillable value - Now done*/
		pSZ->serializeAsAttribute( "xsi:nil", 0, (void*)&(xsd_boolean_true), XSD_BOOLEAN);
		pSZ->serialize( ">", NULL);
		return AXIS_SUCCESS;
	}

	/* first serialize attributes if any*/
	pSZ->serialize( " xmlns:", pSZ->getNamespacePrefix("SimpleType"), "=\"",
                       "SimpleType\" ",
                               " >", 0);   <------------------------------------------------------------------------Namespace of the type is defined here. 

	/* then serialize elements if any*/
...
}

This change will define the namespace of a complex type in every time it serializes. The good thing of this is that, we can have different elements which are using different namespaces in a single type. The bad thing is that, when we use the same namespace for different types, it will define the namespace over and over again using different prefixes. 

Please provide some ideas...

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12358767 ] 

Dushshantha Chandradasa commented on AXISCPP-843:
-------------------------------------------------

This is working fine for us too. I think we can close this issue. 

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12356372 ] 

Dushshantha Chandradasa commented on AXISCPP-843:
-------------------------------------------------

Yes We can do that,  John. We can use const AxisChar * SoapSerializer::getNamespacePrefix( const AxisChar * pNamespace, bool & blnIsNewPrefix) methon in serializer to get the prefix at the same time we check whether it is a new Prefix. Then we can generate the code as follows.

int Axis_Serialize_BenchDataType(BenchDataType* param, IWrapperSoapSerializer* pSZ, bool bArray = false)
{
...

bool blnIsNewPrefix = false;
	const AxisChar* sPrefix = pSZ->getNamespacePrefix(Axis_URI_BenchDataType, blnIsNewPrefix);
	
	if(blnIsNewPrefix)					
		pSZ->serialize( " xmlns:", sPrefix , "=\"" , " http://axisbench.test.apache.org\"" , 0);

	/* first serialize attributes if any*/

	pSZ->serialize("> ",0);


...
}

I'm testing on this solution now. 

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Fred Preston (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12330809 ] 

Fred Preston commented on AXISCPP-843:
--------------------------------------

NB: Although I've defined 'xmlns:ns2="SimpleType"', it could equally have been defined as 'xmlns:ns99="SimpleType"' and referenced as 'type="ns99:SampleBean"' and in the XML, it still would have been defined as ns2.  This is because it is the second namespace found and has nothing to do with its definition in the WSDL and XSD files.

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>  Environment: n/a
>     Reporter: Fred Preston
>     Priority: Blocker

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Resolved: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-843?page=all ]
     
Dushshantha Chandradasa resolved AXISCPP-843:
---------------------------------------------

    Resolution: Fixed

tests are working fine. 

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Fred Preston (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12331988 ] 

Fred Preston commented on AXISCPP-843:
--------------------------------------

I have created a unit test for this JIRA.  It is called NamespaceTest1.

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>  Environment: n/a
>     Reporter: Fred Preston
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Updated: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-843?page=all ]

Dushshantha Chandradasa updated AXISCPP-843:
--------------------------------------------

    Comment: was deleted

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12358347 ] 

Dushshantha Chandradasa commented on AXISCPP-843:
-------------------------------------------------

HI John,

I added the variable to CElementDecl where the element is first declared. Then the value will appear in every element. 

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Closed: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Fred Preston (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-843?page=all ]
     
Fred Preston closed AXISCPP-843:
--------------------------------


> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug

>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12358633 ] 

John Hawkins commented on AXISCPP-843:
--------------------------------------

i don't know what changes you made ;-)

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Assignee: Dushshantha Chandradasa
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Commented: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-843?page=comments#action_12331122 ] 

Samisa Abeysinghe commented on AXISCPP-843:
-------------------------------------------

As far as my understanding goes, this problem comes from the serializer. It is the serializer that constructs the namespace prefixes starting with 'ns1' in sequence (ns1, ns2, ...., nsn)
For e.g see code below:

const AxisChar * SoapSerializer::getNamespacePrefix( const AxisChar * pNamespace)
{
    if( m_NsStack.find( pNamespace) == m_NsStack.end())
    {
        m_nCounter++;

        AxisSprintf(m_Buf, 8, "ns%d", m_nCounter);

        m_NsStack[pNamespace] = m_Buf;
    }

    return m_NsStack[pNamespace].c_str();
}

Hence if the namespace is defined as 'xmlns:ns99="SimpleType"' and referenced as 'type="ns99:SampleBean"' it still would have been defined as ns2.

Hence, we would have to revisit the namespace handling mechanism here. See how the serializer handles the namespaces and prefixes and how it maps this with the generated code as it is the generated code that has knowlege on what namespaces have been defined in the WSDL and XSDs imported.

To myknowlege there is no validation of the mapping between namespaces and prefixes in the serializer.  Also we cannot set a prefix to a namespace in serializer. We do not have a SoapSerializer::setNamespacePrefix



> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>  Environment: n/a
>     Reporter: Fred Preston
>     Priority: Blocker

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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


[jira] Updated: (AXISCPP-843) Serialiser is using namespaces without first assigning them in the XML

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-843?page=all ]

John Hawkins updated AXISCPP-843:
---------------------------------

    Component: WSDL processing - Doc
      Version: 1.5 Final

> Serialiser is using namespaces without first assigning them in the XML
> ----------------------------------------------------------------------
>
>          Key: AXISCPP-843
>          URL: http://issues.apache.org/jira/browse/AXISCPP-843
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Final
>  Environment: n/a
>     Reporter: Fred Preston
>     Priority: Blocker
>      Fix For: 1.6 Alpha

>
> I have the following xsd and wsdl files:-
> SimpleType.xml
> ----------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleType" xmlns:ns1="SimpleNonBaseType" xmlns:tns="SimpleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>  
>  <xsd:complexType name="SampleBean">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Time" nillable="true" type="ns1:TimeArray"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Boolean" nillable="false" type="xsd:boolean"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Byte" nillable="false" type="xsd:byte"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Calendar" nillable="true" type="xsd:dateTime"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Double" nillable="false" type="xsd:double"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Float" nillable="false" type="xsd:float"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Int" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Long" nillable="false" type="xsd:long"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Short" nillable="false" type="xsd:short"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="String" nillable="true" type="xsd:string"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="SampleBeanArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Array" nillable="true" type="tns:SampleBean"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleNonBaseType.xml
> -----------------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema targetNamespace="SimpleNonBaseType" xmlns:tns="SimpleNonBaseType"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="Time">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Hours"   nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Minutes" nillable="false" type="xsd:int"/>
>    <xsd:element form="qualified" maxOccurs="1" minOccurs="1" name="Seconds" nillable="false" type="xsd:int"/>
>   </xsd:sequence>
>  </xsd:complexType>
>  
>  <xsd:complexType name="TimeArray">
>   <xsd:sequence>
>    <xsd:element form="qualified" maxOccurs="unbounded" name="Time" nillable="true" type="tns:Time"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> SimpleService.wsdl
> ---------------------------
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions targetNamespace="SimpleNonBaseType" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="SimpleNonBaseType" xmlns:ns2="SimpleType" xmlns:ns3="Type2"                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="SimpleNonBaseType" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="XMLSchema">
>  <types>
>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   	<xsd:import namespace="SimpleType" schemaLocation="SimpleType.xsd"/>
>   	<xsd:import namespace="SimpleNonBaseType" schemaLocation="SimpleNonBaseType.xsd"/>
>    <xsd:element name="aBeanElement">
>     <xsd:complexType>
>      <xsd:sequence>
>       <xsd:element maxOccurs="1" minOccurs="1" name="aBean" nillable="true" type="ns2:SampleBean"/>
>      </xsd:sequence>
>     </xsd:complexType>
>    </xsd:element>
>   </xsd:schema>
>     </types>
>  <message name="aBeanInput">
>   <part name="parameters" type="ns2:SampleBeanArray"/>
>  </message>
>  <message name="bBeanInput">
>  	<part name="bBeanInput" element="tns:aBeanElement"/>
>  </message>
>  <portType name="TestServicePortType">
>   <operation name="aBeanPortType">
>    <input message="tns:bBeanInput"/>
>   </operation>
>  </portType>
>  <binding name="ServiceBinding" type="tns:TestServicePortType">
>   <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>   <operation name="aBeanPortType">
>    <soap:operation soapAction="" style="document"/>
>    <input>
>     <soap:body use="literal"/>
>    </input>
>   </operation>
>  </binding>
>   <service name="SimpleService">
>     <port binding="tns:ServiceBinding" name="ServiceBinding">
>       <soap:address location="http://tempuri.org" /> 
>     </port>
>   </service>
> </definitions>
> -----------------------------------------------------------------------------------------------------------------------
> When I build a stub using WSDL2Ws and then create a client as follows:-
> #include "TestServicePortType.hpp"
> void main()
> {
> 	TestServicePortType *	pWS = new TestServicePortType( "http://localhost:port/WebService", APTHTTP1_1);
> 	SampleBean	sSB;
> 	pWS->aBeanPortType( &sSB);
> 	delete pWS;
> }
> -----------------------------------------------------------------------------------------------------------------------
> The request message produced by the stub is as follows:-
> POST /AxisBench/services/AxisBenchSoapImpl HTTP/1.1
> Host: <localhost>:<port>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 679
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:aBeanElement xmlns:ns1="SimpleNonBaseType">
> <aBean>
> <ns2:Time xsi:nil="true"></ns2:Time>
> <ns2:Boolean>false</ns2:Boolean>
> <ns2:Byte>0</ns2:Byte>
> <ns2:Calendar xsi:nil="true"></ns2:Calendar>
> <ns2:Double>0.000000</ns2:Double>
> <ns2:Float>0.000000</ns2:Float>
> <ns2:Int>0</ns2:Int>
> <ns2:Long>0</ns2:Long>
> <ns2:Short>0</ns2:Short>
> <ns2:String xsi:nil="true"></ns2:String>
> </aBean>
> </ns1:aBeanElement>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------------------------------------------------------------------------------
> Notice how namespace, 'ns2' has been used without being defined!  There is obviously something wrong with either the generated stub code or the serialisation of the message...

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