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: axis-user@ws.apache.org 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. --> 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.ja va: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</fa ultcode> <faultstring>Object reference not set to an instance of an object. --> 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