Sending schema with nusoap in PHP to .NET web

  • Gavin Logan

    Gavin Logan - 2011-03-02

    Not sure what my question is here but I need some pointers.

    This is part of a guide for sending Insurance policy information to a webservice to get a quote in return. Where 'schema' and 'xml' need to be replaced.

            <Quote xmlns="http:///">

    I am using nusoap (PHP soap extensions aren't on the server and I can't install them) and I would normally send something like:

        $client->call('Quote', 'PolicyDetails' => $xml);

    But this doesn't work. I get the error:

        Error: soap:Server: Server was unable to process request. --> Object reference not set to an instance of an object.

    I assume because I'm missing out the 'schema' part. I know what the XML should look like but not what I have to add to 'schema' or how I should do it. Can anyone point me in the right direction?

  • Scott Nichol

    Scott Nichol - 2011-03-02

    Without the WSDL, I have to guess the structure.  You may need parameters like

    $schema = array('any' => $schema);
    $details = array('schema' => $schema, 'any' => $xml);
    $client->call('Quote', 'PolicyDetails' => $details);

    For the particular method you are calling, you will be assembling your own XML for 'schema' and 'xml'.  As such, you might want to consider creating the whole SOAP payload as a string and passing that as the "parameters" in call().


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks