Problem with request generated by php-soap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Good afternoon,

I am currently working on a PHP page to run a series of tests using SOAP. I don't know where to begin, so here's my problem: the endpoint returns a problem with the 'parameters' aspect of my request, the returned message being "Invalid input value for message part parameters".



The Code:

$client = new SoapClient("http://<ipaddress>:9033/VolumeChargingService/bc7db4a81629dc4d24f7e8788a915fd8?wsdl", $options);

$param = array(
        'endUserIdentifier' => "tel:+11234567890",
        'volume' => 100,
        'billingText' => "t",
        'referenceCode' => "r",
        'parameters' => array(
                array('name' => 'source','value' => '12345'),
                array('name' => 'cspId', 'value' => 't'),
                array('name' => 'cspPassword', 'value' => 'XXXXXXXXXX'),
                array('name' => 'category', 'value' => '01')
        )
);
try {
        $result = $client->chargeVolume($param);
} catch (SoapFault $fault) {
        print "SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})";
        print_r($fault);
}



My Request:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ns1="http://www.csapi.org/schema/parlayx/bpxg/payment/volume_charging/v3_1/local"; xmlns:ns2="http://www.csapi.org/schema/parlayx/payment/v3_0";>
<SOAP-ENV:Body>
<ns1:chargeVolume>
        <ns1:endUserIdentifier>tel:+11234567890</ns1:endUserIdentifier>
        <ns1:volume>100</ns1:volume>
        <ns1:billingText>t</ns1:billingText>
        <ns1:referenceCode>r</ns1:referenceCode>
        <ns1:parameters>
                <ns2:name>source</ns2:name>
                <ns2:value>12345</ns2:value>
        </ns1:parameters>
        <ns1:parameters>
                <ns2:name>cspId</ns2:name>
                <ns2:value>t</ns2:value>
        </ns1:parameters>
        <ns1:parameters>
                <ns2:name>cspPassword</ns2:name>
                <ns2:value>XXXXXXXXXX</ns2:value>
        </ns1:parameters>
        <ns1:parameters>
                <ns2:name>category</ns2:name>
                <ns2:value>1</ns2:value>
        </ns1:parameters>
</ns1:chargeVolume>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The reply I received from the company is that, if I can remove the 'ns2' from the <name> and <value> tags, it should fix my problem... But honestly, I have no idea how to do that. The request is generated with the code you see above, nothing more, nothing less..

Can anyone lend a hand here?

Thanks

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux