0

I have been trying to set up a PHP based SOAP client to connect with another .NET SOAP server, but without any luck. :/ I've tried just about anything I could think of and what uncle Google could find - NuSOAP, Zend Framework SOAP and PHP's internal SOAP. All 3 gave me errors, but PHP's internal SOAP seemed most simple and promising. Well, so I invested another 2 days into PHP's internal SOAP client and at the end I landed with this error:

SoapFault exception: [soap:Server] System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at p_client.p_data.read(PgSqlDataReader e) in c:\inetpub\wwwroot\p_client\p_client.asmx.cs:line 642
at p_client.p_client.p_login(Int32 pid, String username, String password) in c:\inetpub\wwwroot\p_client\p_client.asmx.cs:line 172
--- End of inner exception stack trace --- in /home/techouse/public_html/beta/test/new2_soap_client.php:76
Stack trace:
#0 /home/techouse/public_html/beta/test/new2_soap_client.php(76): SoapClient->__soapCall('p_login', Array)
#1 {main}

My request XML looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.dhimahi.com/">
    <SOAP-ENV:Body>
        <ns1:p_login>
            <ns1:pid>1234</ns1:pid>
            <ns1:username>username1234</ns1:username>
            <ns1:password>password1234</ns1:password>
        </ns1:p_login>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Any ideas how to fix this?

1

1 Answer 1

2

The error is from the .NET side. The error is thrown when trying to use an object that is null.

Sign up to request clarification or add additional context in comments.

1 Comment

Aha, ok. So what you're saying is I need to tell the guys that own the server to fix their C# code? Sadly there is no way for me to do it since I don't have access to the server neither have any knowledge of C#.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.