Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

soapclient->send() yields undefined property

Help
2005-04-24
2013-06-06
  • Hi,

    When I call send() after serializing and envelope as below I get the following error:

    Notice: Undefined property: operation in c:\inetpub\wwwroot\nusoap\lib\nusoap.php on line 6145

    ////////////////////////////////////////////
    HERE IS MY CODE
    ///////////////////////////////////////////
        /* create client */
        $client = new soapclient("http://localhost/myecho/Service1.asmx");
        $client->soap_defencoding ='UTF-8';
         // you will find the serializeEnvelope() prototype by making a search in nusoap.php
        $mysoapmsg = $client->serializeEnvelope('<Echo xmlns="http://localhost/MyEcho/Service1"><MyMessage>Stewart</MyMessage></Echo>');

        // Send the SOAP message and specify the soapaction  */
        $response = $client->send($mysoapmsg, "http://localhost/MyEcho/Service1/Echo");

    ///////////////////////////////////////////
    HERE IS THE OUTPUT
    //////////////////////////////////////////

    Request
    POST /myecho/Service1.asmx HTTP/1.0
    Host: localhost
    User-Agent: NuSOAP/0.6.9 (1.86)
    Content-Type: text/xml; charset=UTF-8
    SOAPAction: "http://localhost/MyEcho/Service1/Echo"
    Content-Length: 514

    <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:si="http://soapinterop.org/xsd"><SOAP-ENV:Body><Echo xmlns="http://localhost/MyEcho/Service1"><MyMessage>Stewart</MyMessage></Echo></SOAP-ENV:Body></SOAP-ENV:Envelope>
    Response
    HTTP/1.1 200 OK
    Server: Microsoft-IIS/5.1
    Date: Sun, 24 Apr 2005 10:28:54 GMT
    X-Powered-By: ASP.NET
    X-AspNet-Version: 1.1.4322
    Cache-Control: private, max-age=0
    Content-Type: text/xml; charset=utf-8
    Content-Length: 354

    <?xml version="1.0" encoding="utf-8"?><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><EchoResponse xmlns="http://localhost/MyEcho/Service1"><EchoResult>Hello Stewart</EchoResult></EchoResponse></soap:Body></soap:Envelope>

     
    • I'm receiving the same error message and it's driving me nuts. I can't figure it out for the life of me. If anyone else can help us, that would be awesome!