Posted by Rossz on 06/28/05 01:11
I'm trying to integrate with a product procurement system that is set up
for SOAP w/WSDL. I have the portion that grabs new purchase orders
working, but I am failing when it comes to the PO confirmation.
Here's a simplified XML example of the data requirements:
<PurchaseOrderConfirmation>
<MerchantPurchaseOrderId>123</MerchantPurchaseOrderId>
<PurchaseOrderResponseId>0</PurchaseOrderResponseId>
<OrderTotal>667.95</OrderTotal>
<Products>
<Product>
<Quantity>1</Quantity>
<ProductId>BEHVTGP</ProductId>
<AvailabilityStatusId>0</AvailabilityStatusId>
</Product>
<Product>
<Quantity>1</Quantity>
<ProductId>FEN0958801006</ProductId>
<AvailabilityStatusId>0</AvailabilityStatusId>
</Product>
</Products>
</PurchaseOrderConfirmation>
The problem is how SOAP/Client is converting arrays. Instead of
... Products[0]->Product-> ....
... Products[1]->Product-> ...
I'm getting
... Products->item[0]->Product-> ...
... Products->item[1]->Product-> ...
And for the life of me I can't figure out how to get the library to
supress 'item'. I assign the data with something like this:
$data->PurchaseOrderConfirmation->Products[0]->Product->ProductId =
"BEHVTGP";
The docs for this module is rather limited. If this can't do the job,
is there some other PHP 4.x SOAP package (with WSDL support) that could
easily be dropped in without spending a huge amount of time writing
handlers?
--
Rossz
[Back to original message]
|