Help forming a client side SOAP request
Posted: Wed Mar 18, 2009 7:57 am
Hello all. Admittedly I am quite new to the world of SOAP. I've got the basics covered and am able to communicate with the Soap Server that my client has provided. But I'm having some trouble forming data into the required arrays so that the request shows up in proper format at the server. This is a portion of a good call being passed to the server:
The following snippet shows what I have so far...
When checking the __getLastRequest(), everything looks good up to that point. I just can't get the value "9876" assigned to <IdValue name="company">. Everything I've tried gets a response from the server like this:
<IdValue name="Company"/>
instead of this:
<IdValue name="Company">9876</IdValue>
If anyone can help point me in the right direction, I would greatly appreciate it.
Thanks in advance.
Code: Select all
<PostAssessment xmlns="http://www.server.com">
<ProjectKey>ABCDE</ProjectKey>
<UserName>JohnDoe</UserName>
<Password>JDPassword</Password>
<AssessmentOrderRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ClientId idOwner="DDI" xmlns="http://ns.hr-xml.org/2006-02-28">
<IdValue name="Company">9876</IdValue>
<IdValue name="Location">54321</IdValue>
<IdValue name="Client Key">A-Client-Key</IdValue>
</ClientId>
<ClientOrderId idOwner="DDI" xmlns="http://ns.hr-xml.org/2006-02-28">
<IdValue name="Client Order Number">Name-of-the-order</IdValue>
</ClientOrderId>
</AssessmentOrderRequest>
</PostAssessment>The following snippet shows what I have so far...
Code: Select all
<?php
//....... snip
$ClientId['IdValue'] = array( 'name' => 'Company' );
$Request['ClientId'] = $ClientId;
$param=array(
'ProjectKey' => 'ABCDE',
'UserName' => 'JohnDoe',
'Password' => 'JDPassword',
'AssessmentOrderRequest' => $Request );
$result = $client->PostAssessment( $param );
//....... snip
When checking the __getLastRequest(), everything looks good up to that point. I just can't get the value "9876" assigned to <IdValue name="company">. Everything I've tried gets a response from the server like this:
<IdValue name="Company"/>
instead of this:
<IdValue name="Company">9876</IdValue>
If anyone can help point me in the right direction, I would greatly appreciate it.
Thanks in advance.