Anne, thanks for your help!

 

The service I generated indeed had a method:

 

service.read(opt,items,bholder,rslt,err);

 

but - when I called it - id din't work correctly, as the "read" element was for 
some reason skipped in the soap request message.

 

When I set the "noWrapped" flag to true, the "read" method signature changed, 
and now it has a following format:

 

service.read(Reader r);

 

 

When I call that method now - everything's working just fine!

 

I don't really "feel it", but it works and I'm happy :-)

 

Cheers

Wojtek

 

 

-----Original Message-----
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 27, 2007 1:43 PM
To: [email protected]
Subject: Re: problem: AXIS client <=> .NET service (wrong content of the SOAP 
messages)

 

You generated stubs using wsdl2java, right? The tool will generate

code according to the binding specified in the WSDL, which is wrapped

doc/literal.

 

This method should work:

 

       service.read(opt,items,bholder,rslt,err);

 

Anne

 

On 9/27/07, Wojciech Buczak <[EMAIL PROTECTED]> wrote:

> 

> 

> 

> 

> Hi,

> 

> 

> 

> I have a suspicion that my problem is based on the wsdl encoding:

> document/literal or rpc.

> 

> 

> 

> Do you think it is possible somehow to ''force'' axis to use different

> encoding while generating the java classes?

> 

> 

> 

> Cheers

> 

> Wojtek

> 

> 

> 

> 

>  ________________________________

> 

> 

> From: Wojciech Buczak [mailto:[EMAIL PROTECTED]

>  Sent: Wednesday, September 26, 2007 8:55 PM

>  To: [email protected]

>  Subject: problem: AXIS client <=> .NET service (wrong content of the SOAP

> messages)

> 

> 

> 

> 

> Hi,

> 

> 

> 

> I've encountered a problem while using AXIS-generated java client that tries

> to call a .NET web service.  Using AXIS 1.4 I've generated the client's stub

> from WSDL of the OPC DA XML web service and tried to call some of it's

> interfaces. While some of them work fine, calling some others end up with

> exceptions, like:

> 

> 

> 

> xisFault

> 

>  faultCode:

> {http://opcfoundation.org/webservices/XMLDA/1.0/}E_FAIL

> 

>  faultSubcode:

> 

>  faultString: Object reference not set to an instance of an object. --&gt;

> Object reference not set to an instance of an object.

> 

>  faultActor:

> 

>  faultNode:

> 

>  faultDetail:

> 

>             {http://xml.apache.org/axis/}stackTrace:Object

> reference not set to an instance of an object. à Object reference not set to

> an instance of an object.

> 

>             at

> org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)

> 

> 

> 

> 

> 

> At the same time, there's no problem at all accessing the service with a

> .NET client!  Trying to debug the problem, I've "sniffered" the SOAP request

> messages that are sent to the web service from both - the .NET client and my

> AXIS java client, and was a bit surprised to se a tag missing in the message

> request constructed by the AXIS client:

> 

> 

> 

> The .NET request (calling "Read") interface:

> 

> 

> 

> <s:Envelope

> xmlns:s="http://schemas.xmlsoap.org/soap/envelope/";>

> 

>    <s:Body

> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

> 

>       <Read

> xmlns="http://opcfoundation.org/webservices/XMLDA/1.0/";>

> 

>  <Options ReturnItemTime="true" ReturnItemName="true" ClientRequestHandle=""

> LocaleID="en-us" />

> 

>  <ItemList MaxAge="1000">

> 

>    <Items ItemPath="DA20" ItemName="Dynamic/Analog Types/Int"

> ClientItemHandle="" />

> 

>  </ItemList>

> 

>     </Read>

> 

>   </s:Body>

> 

> </s:Envelope>

> 

> 

> 

> 

> 

> And the one coming from the AXIS client:

> 

> 

> 

> 

> 

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

> 

>   <Options ReturnDiagnosticInfo="false" ReturnErrorText="false"

> ReturnItemName="false" ReturnItemPath="false" ReturnItemTime="false"

> 

>   xmlns="http://opcfoundation.org/webservices/XMLDA/1.0/";

> />

> 

>   <ItemList

> xmlns="http://opcfoundation.org/webservices/XMLDA/1.0/";>

> 

>       <Items ItemName="Dynamic/Analog Types/Int" MaxAge="0" />

> 

>   </ItemList>

> 

>    </soapenv:Body>

> 

>   </soapenv:Envelope>

> 

> 

> 

> 

> 

> Comparing the two above messages, one can see, that the "<Read>" does not

> exist in the "body" section of the request created by my Axis client. I

> guess that might be the reason why the SOAP server responds for that request

> with:

> 

> 

> 

> <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><soap:Fault>

> 

>       <faultcode

> xmlns:q0="http://opcfoundation.org/webservices/XMLDA/1.0/";>q0:E_FAIL</faultcode>

> 

>       <faultstring>Object reference not set to an instance of an object.

> --&gt; Object reference not set to an instance of an object.</faultstring>

> 

>       <detail/>

> 

>     </soap:Fault></soap:Body>

> 

> </soap:Envelope>

> 

> 

> 

> As it cannot parse properly the message.  In effect, axis raises an

> exception, and my request fails.

> 

> 

> 

> 

> 

> 

> 

> Has anyone ever had similar problem? If so, what's the best solution for it?

> 

> 

> 

> 

> PS. the WSDL I'm using:

> http://opcxml.dnsalias.org:8080/XmlDaSampleServer/Service.asmx?WSDL

> 

> 

> 

> And the service:

> http://opcxml.dnsalias.org:8080/XmlDaSampleServer/Service.asmx

> 

> 

> 

> 

> 

> Thanks a lot in advance for any help!

> 

> 

> 

> Cheers

> 

> Wojtek

> 

> 

 

---------------------------------------------------------------------

To unsubscribe, e-mail: [EMAIL PROTECTED]

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

 

Reply via email to