[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Ftpapi Digest, Vol 78, Issue 22



Mike,
Thanks for your explanation and the example. I've got it working now.

 
Debra Abelow
Systems Analyst/Developer III
Anda Inc.
2915 Weston Road
Weston, FL 33331
1-800-331-ANDA (4784) Ext. 74784
Fax 954-217-4377
Debra.Abelow@xxxxxxxxxxx 
 


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
Sent: Saturday, April 13, 2013 1:00 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Ftpapi Digest, Vol 78, Issue 22

Send Ftpapi mailing list submissions to
	ftpapi@xxxxxxxxxxxxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
	http://scottklement.com/mailman/listinfo/ftpapi
or, via email, send a message with subject or body 'help' to
	ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx

You can reach the person managing the list at
	ftpapi-owner@xxxxxxxxxxxxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Ftpapi digest..."


Today's Topics:

   1. RE: Parsing a soap response (Mike Krebs)


----------------------------------------------------------------------

Message: 1
Date: Fri, 12 Apr 2013 13:37:02 -0500
From: Mike Krebs <mkrebs@xxxxxxxxxxxxxxxxxx>
To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: Parsing a soap response
Message-ID: <3DF08BA25872B644A1421B9F085B18299F48A88D37@xxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"

EXAMPLE17 probably isn't the easiest to work with in this case. It appears you have a rather simple web service and could simply "read" the elements in a procedure and get the data.

So rather than give you some code, let's explain what is happening.

EXAMPLE17 works with a webservice that returns XML inside of XML. So the program is attempting to pull out the inner XML so that it can parsed easier. The SaveEmbed procedure is doing that. It is pulling out the inner XML and writing it to another place. If you keep debugging the SaveEmbed procedure in YOUR program you will see that Name and Value  will increment through your XML. At some point, you will have to decide what data you are interested in and save it someplace you can access it in your program. In EXAMPLE17 that is happening in procedure embedded.

If you look at EXAMPLE16, it is probably a little more clear. In that program, the parser procedure is called Incoming and it gets control for each element of the XML. When it finds the element it is interested in, it saves the data.

Since this appears to relatively easy Fedex related question, this forum post will probably get you a long way towards your goal and is pretty straight forward:
http://www.scottklement.com/archives/ftpapi/201303/msg00023.html

One thing that appears to be missing here is the declaration for Severity and Delivery. They are probably global variables (top of program) inside a data structure called RESP.

 D RESP            DS                                           
 D   Severity                    25A                   
 D   Delivery                   128A

I had no idea how big the variables needed to be so I just made up the length, but they should be adequate to get the results.



-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Debra Abelow
Sent: Friday, April 12, 2013 10:50 AM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Parsing a soap response

Good afternoon,
I am receiving the soapfile back from the URL using Httpapi and I don't know how to parse it. (I'm a beginner.)

I'm using example 17 (which returns the bank routing data) as a starting point to parse the data. (see attached).
The soapfile displays correctly.
The SaveEmbed procedure is called. The value in the name field at the beginning of the SaveEmbed procedure is env:Header.

I need to get to the elements beyond that.
I greatly appreciate your help,

Debra Abelow
Systems Analyst/Developer III
Anda Inc.
2915 Weston Road
Weston, FL 33331
1-800-331-ANDA (4784) Ext. 74784
Fax 954-217-4377
Debra.Abelow@xxxxxxxxxxx





------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list digest.  To unsubscribe, go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------


End of Ftpapi Digest, Vol 78, Issue 22
**************************************
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------