Announcement

Collapse
No announcement yet.

Need help parsing a API SOAP response

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need help parsing a API SOAP response

    Hello forum:
    I am way over my head on this and hope someone cam help me parse a SOAP response.
    I need to retrieve the quoteNumber, totalPrice, and stdClass Object ( [date].
    This is the pertinent part of the response:
    stdClass Object ( [requestID] => 20131724 [quoteInfo] => stdClass Object ( [quote] => Array ( [0] => stdClass Object ( [quoteNumber] => LD22DV5 [account] => xxxxxxx [originPoint] => stdClass Object ( [countryCode] => US [postalCode] => 63106 [city] => SAINT LOUIS [stateProvince] => MO ) [destinationPoint] => stdClass Object ( [countryCode] => US [postalCode] => 98661 [city] => VANCOUVER [stateProvince] => WA ) [payor] => T [shipmentTerms] => P [stackable] => N [delivery] => stdClass Object ( [date] => 2021-08-09 [time] => 17:00:00.000 ) [serviceLevel] => stdClass Object ( [lane] => 9 [id] => 99 [text] => LTL Standard Transit ) [pricing] => stdClass Object ( [discount] => 0.81 [totalDiscount] => 950.65 [totalPrice] => 280.52 ) [commodityInfo

    Thanks for any assistance with this,
    Larry
    Larry
    Luce Kanun Web Design
    www.facebook.com/wajake41
    www.plus.google.com/116415026668025242914/posts?hl=en



    #2
    Hi Larry, I can help you with this. I think you have my email address? If not, you can PM me.
    Kent Multer
    Magic Metal Productions
    http://TheMagicM.com
    * Web developer/designer
    * E-commerce and Miva
    * Author, The Official Miva Web Scripting Book -- available on-line:
    http://www.amazon.com/exec/obidos/IS...icmetalproducA

    Comment


      #3
      Kent, thanks for your reply but after working on this a bit I have solved the issue.
      The following retrieves the data I need from SOAP response" $reply
      $request_id = $reply->requestID;
      $quote_no = $reply->quoteInfo->quote[0]->quoteNumber;
      $amt = $reply->quoteInfo->quote[0]->pricing->totalPrice;
      $delivery_date = $reply->quoteInfo->quote[0]->delivery->date;

      Cheers,
      Larry
      Larry
      Luce Kanun Web Design
      www.facebook.com/wajake41
      www.plus.google.com/116415026668025242914/posts?hl=en


      Comment

      Working...
      X