So I have a PHP Soap service that is running nusoap and I am writing custom responses.
The php client works perfectly but C# client keeps returning this:
Object reference not set to an instance of an object.
Any ideas on how to troubleshoot this problem?
I've tried initializing every variable with with test data, but I keep getting the same error.
Thanks for your input.
I am using this method.
http://my.execpc.com/~gopalan/dotnet/webservices/webservice_csharp_client.html
This is the error I receive ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object at gt.MainClass.Main (System.String[] args) [0x0005a] in //Projects/gt/Main.cs:27
line 27 (gt is the wsdl object)
gt.Transact(trans) which I am passing a transaction object and it should return a transaction response,but it appears to not be parsing the response.
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://CANNOT TELL YOUt", RequestNamespace="CANNOT TELL YOU", ResponseNamespace="CANNOT TELL YOU",
This is the method being called and this is a piece of code from the partial class.
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, Use=System.Web.Services.Description.SoapBindingUse.Literal)] [return: System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] public TransactResponse Transact([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] TransactRequest request) { object[] results = this.Invoke("Transact", new object[] { request}); return ((TransactResponse)(results[0])); }