Jump to content

Nusoap WebService help URGENT


munnikd

Recommended Posts

Hi,

I trying to call a .Net webservice but get the following error:

 

Array ( [faultcode] => soap:Client [faultstring] => Object reference not set to an instance of an object. [detail] => ) Array

 

here is the wsdl file of the webservice I'm trying to call:

POST /WebSetup1/CAIRegister.asmx HTTP/1.1
Host: 172.18.22.181
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/Execute"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Execute xmlns="http://tempuri.org/">
      <userContext>
        <Username>string</Username>
        <UserPassword>string</UserPassword>
        <ApplicationMnemonic>string</ApplicationMnemonic>
        <ApplicationPassword>string</ApplicationPassword>
      </userContext>
      <registrationRequest>
        <Identifiers xmlns="http://www.ampath.co.za/SOAPheaders">
          <IdentifiersItem>string</IdentifiersItem>
          <IdentifiersItem>string</IdentifiersItem>
        </Identifiers>
        <Type xmlns="http://www.ampath.co.za/SOAPheaders">string</Type>
        <FirstName xmlns="http://www.ampath.co.za/SOAPheaders">string</FirstName>
        <LastName xmlns="http://www.ampath.co.za/SOAPheaders">string</LastName>
        <EmailAddress xmlns="http://www.ampath.co.za/SOAPheaders">string</EmailAddress>
        <ContactNumber xmlns="http://www.ampath.co.za/SOAPheaders">string</ContactNumber>
        <Status xmlns="http://www.ampath.co.za/SOAPheaders">string</Status>
      </registrationRequest>
    </Execute>
  </soap:Body>

 

Here is my code to call the webservice:

 
$c = new soapclient("http://172.18.22.181/WebSetup1/CAIRegister.asmx?wsdl",true);
$err = $c->getError(); 
if ($err) { 
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>'; 
} 

$rt =  $c->call('Execute',$userContext,$registrationRequest);
print_r($rt);

 

ANY IDEAS ???

Link to comment
https://forums.phpfreaks.com/topic/200281-nusoap-webservice-help-urgent/
Share on other sites

Straight from the Forum Guidelines & Rules located here: http://www.phpfreaks.com/page/rules-and-terms-of-service

 

2. Users will not mark their post as being "URGENT" by either making the post ALL CAPS or adding any hint that they need it done Quick or ASAP. All posts are treated equal, your post is no more important than any other user's post on this forum. If it is "URGENT" pay someone to do it

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.