Rainer,

.Net has no problem dealing with explicit versus default namespace
declarations. My guess is that the problem is caused by the fact that
.NET doesn't support RPC/Literal.

Rather than using RPC style, you should use the wrapped
document/literal style. You just have to wrap your parameters with a
wrapper element. See my blog post on the topic:

http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html

Anne

On 1/18/07, Rainer Menzner <[EMAIL PROTECTED]> wrote:
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to