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 08:14:41 UTC
RE: [Axis2] Axis2 client message different to Axis1 client messag
e
Hi,
If the elementFormDefault is set to unqualified then the SOAP message does
not have the namespace prefixes.
But the getNumber element has a namespace prefix, but there is no default
namespace ?
<schema elementFormDefault="unqualified" targetNamespace="
http://soap.service.acme.com <http://soap.service.acme.com> " xmlns="
http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> ">
===============================================================
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/
<http://schemas.xmlsoap.org/soap/envelope/> ">
<soapenv:Body>
<ns1:getNumber xmlns:ns1=" <http://soap.service.acme.com>
http://soap.service.acme.com">
<param1>
<a_int>
<item>2</item>
<item>3</item>
<item>4</item>
</a_int>
<n_double>22.5</n_double>
<n_float>23.4</n_float>
<n_int>123</n_int>
<n_long>3456</n_long>
<o_bigdecimal>567.67</o_bigdecimal>
<o_biginteger>98765</o_biginteger>
<o_double>345.67</o_double>
<o_int>7585</o_int>
</param1>
</ns1:getNumber>
</soapenv:Body>
</soapenv:Envelope>
===============================================================
-----Original Message-----
From: Alick Buckley [mailto:Alick.Buckley@lansa.com.au]
Sent: Monday, 25 June 2007 3:50 PM
To: axis-user@ws.apache.org
Subject: [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/
<http://schemas.xmlsoap.org/soap/envelope/> ">
<soapenv:Body>
<ns1:getNumber xmlns:ns1=" http://soap.service.acme.com
<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/
<http://schemas.xmlsoap.org/soap/envelope/> "
xmlns:xsd=" http://www.w3.org/2001/XMLSchema
<http://www.w3.org/2001/XMLSchema> " xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance> ">
<soapenv:Body>
<getNumber xmlns=" http://soap.service.acme.com
<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 <http://www.lansa.com>
mailto:Alick.Buckley@ <mailto:Alick.Buckley@> lansa.com.au