Need SOAP/Client help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rossz

    Need SOAP/Client help

    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:

    <PurchaseOrderC onfirmation>
    <MerchantPurcha seOrderId>123</MerchantPurchas eOrderId>
    <PurchaseOrderR esponseId>0</PurchaseOrderRe sponseId>
    <OrderTotal>667 .95</OrderTotal>
    <Products>
    <Product>
    <Quantity>1</Quantity>
    <ProductId>BEHV TGP</ProductId>
    <AvailabilitySt atusId>0</AvailabilitySta tusId>
    </Product>
    <Product>
    <Quantity>1</Quantity>
    <ProductId>FEN0 958801006</ProductId>
    <AvailabilitySt atusId>0</AvailabilitySta tusId>
    </Product>
    </Products>
    </PurchaseOrderCo nfirmation>

    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->PurchaseOrderC onfirmation->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
Working...