axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Menzner <rmenz...@L1id.com>
Subject [Axis2] wsdl2java / Axis2 : Is namespace / prefix handling in SOAP messages configurable?
Date Thu, 18 Jan 2007 12:36:36 GMT
Hi,

up to now I had a web-service implemented in Axis2 along with
a client written in .Net 2 C# up and running successfully. I use
wsdl2java and wsdl.exe in order to create the server and client
stubs. The WSDL used Document/literal SOAP.

Now I had to extend some messages to multiple parts, which enforced
using RPC/literal SOAP. And now, I run into a problem:

Axis2 generates SOAP-messages that use a namespace prefix e.g.,

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header />
   <soapenv:Body>
     <ns1:ReRegisterResponse
	xmlns:ns1="http://www.company.com/Communication/1/0/">
     	<ReRegisterResult>
		<ns1:ClientGuid>12EA746B95AE57CEFFB11D6FA22D9400</ns1:ClientGuid>
       	</ReRegisterResult>
     </ns1:ReRegisterResponse>
   </soapenv:Body>
</soapenv:Envelope>


By contrast, WSDL.exe-stub generates messages that define the namespace 
within an attribute, e.g.

<?xml version='1.0' encoding='utf-8'?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
     <ReRegister xmlns="http://www.company.com/Communication/1/0/api/">
       <ReRegisterParam xmlns="">
         <ClientIdentifier 
xmlns="http://www.identix.com/Communication/1/0/">testclient</ClientIdentifier>
         <ClientSign xmlns="http://www.company.com/Communication/1/0/" />
         <RetainClaimedData 
xmlns="http://www.company.com/Communication/1/0/">true</RetainClaimedData>
       </ReRegisterParam>
     </ReRegister>
   </soap:Body>
</soap:Envelope>


Now, Axis2 obviously can handle both formats correctly, messages arrive 
and are processed properly. But the .Net stub is not able to decode the 
message that uses the namespace-prefix format. As a result I receive a 
null pointer message.

Hence my question, can Axis2 be configured how to layout the newly 
created messages? I don't know which format is the best or if one is not 
allowed at all. Axis2 format using namespace-prefix is more compact.

Thanks and best regards,
-Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message