Setting attributes in client request

Help
2011-11-29
2013-06-06
  • Ian Winstanley
    Ian Winstanley
    2011-11-29

    Hi

    I am trying to recreate the following SOAP request in nusoap

    <OTA_PingRQ EchoToken="Hello" TimeStamp="2011-11-10T10:53:38.6035703+10:00" xmlns="http://www.opentravel.org/OTA/2003/05"> <EchoData>Hello</EchoData> </OTA_PingRQ>

    Using this code
                    $client = new nusoap_client($wsdl, true);
    $pingRq = 'Hello';
    $pingRq = 'Hello';
    $pingRq = '2011-11-10T10:53:38.6035703+10:00';
    $param = array('OTA_PingRQ' => $pingRq);
    $response = $client->call('OTA_Ping', $param);

    I am uncertain of how to set the tag attributes EchoToken and TimeStamp and hence the request is missing these attributes. I have tried attributes and attrs as you can see but to no avaial. I think that prepending the key name with ! is only for processing attributes in the response?

    At this point in time I am completely stuck as the rest of the OTA specification includes values specified in various attributes.

    Thanks

    Ian

     
  • Ian Winstanley
    Ian Winstanley
    2011-12-01

    Hi

    Has anybody come across this problem before or managed to solve it?

    Thanks

    Ian