You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Alick Buckley <Al...@lansa.com.au> on 2007/06/25 07:49:32 UTC
[Axis2] Axis2 client message different to Axis1 client message
Hi,
I am using the same test WSDL for an Axis 1.4 generated client and an Axis2
1.2 generated client.
The Axis2 1.2 is qualifying the elements with a namespace prefix ?
============================================================================
=========
Axis2 1.2
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns1:getNumber xmlns:ns1="http://soap.service.acme.com">
<ns1:param1>
<ns1:a_int>
<ns1:item>2</ns1:item>
<ns1:item>3</ns1:item>
<ns1:item>4</ns1:item>
</ns1:a_int>
<ns1:n_double>22.5</ns1:n_double>
<ns1:n_float>23.4</ns1:n_float>
<ns1:n_int>123</ns1:n_int>
<ns1:n_long>3456</ns1:n_long>
<ns1:o_bigdecimal>567.67</ns1:o_bigdecimal>
<ns1:o_biginteger>98765</ns1:o_biginteger>
<ns1:o_double>345.67</ns1:o_double>
<ns1:o_int>7585</ns1:o_int>
</ns1:param1>
</ns1:getNumber>
</soapenv:Body>
</soapenv:Envelope>
============================================================================
=========
Axis 1.4
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<getNumber xmlns="http://soap.service.acme.com">
<param1>
<a_int>
<item>123</item>
<item>456</item>
</a_int>
<n_double>20.1</n_double>
<n_float>21.11</n_float>
<n_int>22</n_int>
<n_long>22345678</n_long>
<o_bigdecimal>223.546</o_bigdecimal>
<o_biginteger>22385943</o_biginteger>
<o_double>2435.456</o_double>
<o_int>23245</o_int>
</param1>
</getNumber>
</soapenv:Body>
</soapenv:Envelope>
============================================================================
=========
EveryNumberServiceServiceStub stub = new
EveryNumberServiceServiceStub () ;
EveryNumberServiceServiceStub.EveryNumber param1 = new
EveryNumberServiceServiceStub.EveryNumber ()
int[] intArray = new int[]{ 2, 3, 4 } ;
EveryNumberServiceServiceStub.ArrayOf_xsd_int valueArray = new
EveryNumberServiceServiceStub.ArrayOf_xsd_int () ;
valueArray.setItem ( intArray ) ;
param1.setA_int ( valueArray ) ;
param1.setN_double ( 22.5 ) ;
param1.setN_float ( 23.4f ) ;
param1.setN_int ( 123 ) ;
param1.setN_long ( 3456 ) ;
param1.setO_bigdecimal ( new BigDecimal ( "567.67" ) ) ;
param1.setO_biginteger ( new BigInteger ( "98765" ) ) ;
param1.setO_double ( 345.67 ) ;
param1.setO_int ( 7585 ) ;
EveryNumberServiceServiceStub.GetNumber request = new
EveryNumberServiceServiceStub.GetNumber () ;
request.setParam1 ( param1 ) ;
EveryNumberServiceServiceStub.GetNumberResponse response =
stub.getNumber ( request ) ;
============================================================================
=========
<<EveryNumberService.wsdl>> <<Test.java>>
<<EveryNumberServiceServiceStub.java>> <<SoapAgent.gif>>
regards
> Alick Buckley
>
> LANSA Research and Development
> LANSA Pty Ltd
>
> Phone: +61289070243
>
> http://www.lansa.com
> mailto:Alick.Buckley@lansa.com.au
>
>
>
>