Question

I'm having some troubles with NuSOAP trying to send duplicate tags. This is the code i need to send :

  <PartNumbers>
    <string>string1</string>
    <string>string2</string>
  </PartNumbers>

I'm doing the call with this code:

$pn[] = 'APPSP2101V2';
$pn[] = 'ME665Y/A';
$PartNumbers = array( 'PartNumbers' => array('string'  => $pn));
$result = $client->call('GetDataSheetsLastUpdate', $PartNumbers );

I'm sending those two PartNumbers but instead of send the two codes it's sending the last one "ME665Y/A"

Also if i try

$PartNumbers = array( 'PartNumbers' => array('string'  => 'APPSP2101V2', 'string' => 'ME665Y/A'));
$result = $client->call('GetDataSheetsLastUpdate', $PartNumbers );

Only send the last string.

How can i make an array with the same keys but different value to make the XML look like in the beggining of the question.

Thank you in advance to all

Was it helpful?

Solution

With the following code:

$pn[] = 'APPSP2101V2';
$pn[] = 'ME665Y/A';
$PartNumbers = array( 'PartNumbers' => array('string'  => $pn));
$result = $client->call('GetDataSheetsLastUpdate', $PartNumbers );

Works perfect , the problema was in the webservice.. if the P/N isn't correct only return the P/N with information on it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top