RE: problem: AXIS client <=> .NET service (wrong content of the SOAP messages)
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: axis-user@ws.apache.org 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: 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.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: > > > > xmlns:s="http://schemas.xmlsoap.org/soap/envelope/";> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xmlns:xsd="http://www.w3.org/2001/XMLSchema";> > >xmlns="http://opcfoundation.org/webservices/XMLDA/1.0/";> > > LocaleID="en-us" /> > > > > ClientItemHandle="" /> > > > > > > > > > > > > > > And the one coming from the AXIS client: > > > > > > > > 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";> > > > >ReturnItemName="false" ReturnItemPath="false" ReturnItemTime="false" > > xmlns="http://opcfoundation.org/webservices/XMLDA/1.0/"; > /> > >xmlns="http://opcfoundation.org/webservices/XMLDA/1.0/";> > > > > > > > > > > > > > > Comparing the two above messages, one can see, that the "" does not > exist in the "body" section of the request created by my Axis client. I > guess that might be the reason why the SO
AXIS client <=> .NET service (wrong content of the SOAP messages) - problem solved!!!!
Hi, Just wanted to say, that somehow it started working fine!. I just regenerated the stubs with ant, using noWrapped="true" option in the 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: axis-user@ws.apache.org 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: 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.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: http://schemas.xmlsoap.org/soap/envelope/";> http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";> http://opcfoundation.org/webservices/XMLDA/1.0/";> And the one coming from the AXIS client: http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> http://opcfoundation.org/webservices/XMLDA/1.0/"; /> http://opcfoundation.org/webservices/XMLDA/1.0/";> Comparing the two above messages, one can see, that the "" 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: http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";> http://opcfoundation.org/webservices/XMLDA/1.0/";>q0:E_FAIL Object reference not set to an instance of an object. --> Object reference not set to an instance of an object. 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
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: 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: http://schemas.xmlsoap.org/soap/envelope/";> http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";> http://opcfoundation.org/webservices/XMLDA/1.0/";> And the one coming from the AXIS client: http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> http://opcfoundation.org/webservices/XMLDA/1.0/"; /> http://opcfoundation.org/webservices/XMLDA/1.0/";> Comparing the two above messages, one can see, that the "" 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: http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";> http://opcfoundation.org/webservices/XMLDA/1.0/";>q0:E_FAIL Object reference not set to an instance of an object. --> Object reference not set to an instance of an object. 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
RE: problem: AXIS client <=> .NET service (wrong content of the SOAP messages)
Sure, Please find the WSDL attached Cheers Wojtek -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 26, 2007 11:51 PM To: axis-user@ws.apache.org Subject: Re: problem: AXIS client <=> .NET service (wrong content of the SOAP messages) Gmail cut off most of the WSDL. Could you send it as an attachment please? Thanks, Anne On 9/26/07, Wojciech Buczak <[EMAIL PROTECTED]> wrote: > > > Sure! > > Thanks for your help! > > PS. This is a standard OPC-XML da WSDL, which specifies basic operations for > accessing OPC servers from SOAP. > > Cheers > Wojtek > > > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; > xmlns:s="http://www.w3.org/2001/XMLSchema"; > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; > xmlns:tns="http://opcfoundation.org/webservices/XMLDA/1.0/"; > xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"; > xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; > targetNamespace="http://opcfoundation.org/webservices/XMLDA/1.0/"; > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";> > > targetNamespace="http://opcfoundation.org/webservices/XMLDA/1.0/";> > > > > type="tns:ItemIdentifier" /> > name="PropertyNames" type="s:QName" /> > > > > >type="s:boolean" /> >type="s:boolean" /> >type="s:boolean" /> > > > > > > > > > > name="GetPropertiesResult" type="tns:ReplyBase" /> > name="PropertyLists" type="tns:PropertyReplyList" /> > type="tns:OPCError" /> > > > > > > > > > use="required" /> > > > > > > > > > > > > > >type="tns:ItemProperty" /> > > > > > > > > > > > > > > > > > >/> > > > > > >nillable="true" /> > > > > >type="s:boolean" /> > > > > >nillable="true" type="s:string" /> > > > > >type="s:dateTime" /> > > > > >type="s:byte" /> > > > > >type="s:double" /> > > > > >type="s:short" /> > > > > >name="unsignedShort" type="s:unsignedShort" /> > > > > >type="s:int" /> > > > > >type="s:decimal" /> > > > > >type="s:unsignedInt" /> > > > > >type="s:long" /> > > > > >type="s:unsignedLong" /> > > > > >type="s:float" /> > > > > > > > > > > >type="s:string" /> >type="s:string" /> >name="SupportedLocaleIDs" type="s:string" /> >name="SupportedInterfaceVersions" type="tns:i
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: http://schemas.xmlsoap.org/soap/envelope/";> http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";> http://opcfoundation.org/webservices/XMLDA/1.0/";> And the one coming from the AXIS client: http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> http://opcfoundation.org/webservices/XMLDA/1.0/"; /> http://opcfoundation.org/webservices/XMLDA/1.0/";> Comparing the two above messages, one can see, that the "" 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: http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";> http://opcfoundation.org/webservices/XMLDA/1.0/";>q0:E_FAIL Object reference not set to an instance of an object. --> Object reference not set to an instance of an object. 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