Hi, 

 

Just wanted to say, that somehow it started working fine!.  I just regenerated 
the stubs with ant, using noWrapped="true" option in the <axis-wsdl2java> task, 
and the stubs were regenerated, with slightly different API, and the 
communication works just fine!  (the Read element is placed now in the soap 
request message).

 

I just found that :

 

noWrapped  turns on/off support for "wrapped" document/literal

 

 

Cheers

Wojtek

==============================
[EMAIL PROTECTED]
CERN TS-CSE-CO
Phone: +4122 7678099
Address:
CERN
CH-1211 Genève 23, Switzerland 

________________________________

From: Wojciech Buczak [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 27, 2007 11:03 AM
To: [email protected]
Subject: RE: problem: AXIS client <=> .NET service (wrong content of the SOAP 
messages)

 

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

 

Reply via email to