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

Re: HTTP POST help (Kalyan Tirumamidi)



   Hi Kalyan,
   Even though I am budding in this area, I would like to comment on your
   questions.
   All the methods available in the httpapi service programs have its on
   area of usage depending upon many factors like
   1)If you need to have the input XML dynamic or static.
   2)If you want to have input XML sent from a doc which you might get
   from somewhere.
   3)If you want the XML response back from the webservice in a variable!
   For processing right away
   4)If you want to have the response XML stored somewhere permanently.
             and many
   You could achieve a thing in many ways, but you the one who should
   decide which one is best for you. I use it in batch mode, interactive
   very frequently. It will good performance for sure. I am sure Skott &
   others wont reply to any questions below a par :) as i havent got
   anything for many of my questions :)
   You are on the right path, just read all the documentation, it will be
   tough at the beginning then you will see you are doing things your
   own.
   Thanks,
   Musthafa

   On Wed, Sep 2, 2009 at 11:23 AM, Kalyan Tirumamidi
   <[1]KTirumamidi@xxxxxxxxxxxxxxx> wrote:

     Thanks Scott. Can you tell (suggest) me a specific method out of
     the 3
     methods http_post_xml(), http_post() and http_post_stmf() in terms
     of
     performance?
     My scenarios is like there will be multiple people making the web
     service request from different locations and in some cases I am
     looking
     for a faster response like less than a second. I understand it may
     depend on the network speeds and the web service response time etc
     but
     will there be any time consumed if we use IFS which may have more
     retrieval times compared to memory?
     Suggest me please.
     Regards
     Kalyan
     -----Original Message-----
     From: [2]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
     [mailto:[3]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
     [4]ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
     Sent: Wednesday, September 02, 2009 11:17 AM
     To: [5]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
     Subject: Ftpapi Digest, Vol 39, Issue 2
     Send Ftpapi mailing list submissions to
            [6]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
     To subscribe or unsubscribe via the World Wide Web, visit
            [7]http://www.scottklement.com/mailman/listinfo/ftpapi
     or, via email, send a message with subject or body 'help' to
            [8]ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
     You can reach the person managing the list at
            [9]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: Consuming Web Services (Scott Klement)
       2. Re: http_url_post_xml (Scott Klement)
       3. Re: Consuming Web Services (Jon Paris)
       4. HTTP POST help (Kalyan Tirumamidi)
       5. Re: HTTP POST help (Scott Klement)
       6. HTTP/1.1 500 Internal Server Error ([10]Tony.Davis2@xxxxxxx)
     -------------------------------------------------------------------
     ---
     Message: 1
     Date: Tue, 01 Sep 2009 12:46:36 -0500
     From: Scott Klement <[11]sk@xxxxxxxxxxxxxxxx>
     Subject: Re: Consuming Web Services
     To: HTTPAPI and FTPAPI Projects <[12]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
     Message-ID: <[13]4A9D5DFC.7070006@xxxxxxxxxxxxxxxx>
     Content-Type: text/plain; charset=ISO-8859-1; format=flowed
     Selders, Vince E wrote:
     > I've downloaded the tool and have imported the wsdl, however it
     tells
     me
     > the XML declaration is not well formed.
     For your WSDL?  That's not a good sign.  I would try re-downloading
     the
     WSDL.  Be very careful to make sure it's not being mistranslated or
     extra characters are added.
     If you still get an error that your WSDL is not well-formed,
     contact
     whomever is in charge of that web service.  A WSDL that's not
     well-formed is a rather severe error in creating a web service.
     > I have decided to read through the docs to see what I might be
     doing
     > wrong.  Like a true developer I simply loaded the app and started
     > forcing things into place, guess I'll need to figure out how it
     works
     > first :-)
     ??? Are we still talking about SoapUI and the WSDL being wrong?
     > I wanted to use one of the examples you sent out, but our iSeries
     is
     > tied down pretty tight and I can't get to the website.  So now I
     am
     > trying to hit what is supposed to be a simple web service via our
     > intranet.
     Again, start with SoapUI.  Run the WSDL through it and try it out
     that
     way.  When you get that working, then try to automate the process
     with
     HTTPAPI.
     > This is a very critical piece in that, like many companies,
     > we have a directive to get away from emulators and begin using
     browsers.
     I don't understand what web services have to do with using browsers
     instead of 5250?!
     Web services have little do to with user interfacing.  I wonder if
     you
     aren't confusing web services with standard web programming.
     ------------------------------
     Message: 2
     Date: Tue, 01 Sep 2009 12:47:21 -0500
     From: Scott Klement <[14]sk@xxxxxxxxxxxxxxxx>
     Subject: Re: http_url_post_xml
     To: HTTPAPI and FTPAPI Projects <[15]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
     Message-ID: <[16]4A9D5E29.6040306@xxxxxxxxxxxxxxxx>
     Content-Type: text/plain; charset=ISO-8859-1; format=flowed
     The parameters to http_url_post_xml() should be documented in the
     comments of the HTTPAPI_H source member.
     Selders, Vince E wrote:
     > Hello again.
     >
     > Can anyone explain the http_url_post_xml method?  I think I have
     almost
     > everything set up but seem to be failing here.
     > rc = http_url_post_xml(
     >                   '[17]http://somewhere.com'
     >                    : %addr(SOAP) + 2
     >                    : %len(SOAP)
     >                    : *NULL
     >                    : %paddr(Incoming)
     >                    : %addr(searchString)
     >                    : HTTP_TIMEOUT
     >                    : HTTP_USERAGENT
     >                    : 'text/xml'
     >                    : '[18]http://somewhere.com');
     >
     > I simply don't understand what all of this is.
     >
     -------------------------------------------------------------------
     ----
     > This is the FTPAPI mailing list.  To unsubscribe, please go to:
     > [19]http://www.scottklement.com/mailman/listinfo/ftpapi
     >
     -------------------------------------------------------------------
     ----
     >
     ------------------------------
     Message: 3
     Date: Tue, 1 Sep 2009 15:03:24 -0400
     From: Jon Paris <[20]jon.paris@xxxxxxxxxxxxxx>
     Subject: Re: Consuming Web Services
     To: HTTPAPI and FTPAPI Projects <[21]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
     Message-ID:
     <[22]7CCC20AB-BF5B-48A5-80A7-CEFBAFFE853F@xxxxxxxxxxxxxx>
     Content-Type: text/plain; charset=US-ASCII; format=flowed;
     delsp=yes
     On 1-Sep-09, at 1:46 PM, Scott Klement wrote:
     > Selders, Vince E wrote:
     >> I've downloaded the tool and have imported the wsdl, however it
     >> tells me
     >> the XML declaration is not well formed.
     >
     > For your WSDL?  That's not a good sign.  I would try
     re-downloading
     > the
     > WSDL.  Be very careful to make sure it's not being mistranslated
     or
     > extra characters are added.
     I have had this problem with SoapUI twice. It appears to be very
     very
     fussy about any characters between the tags in the wdsl.  The error
     message it gives is very misleading because the XML is in fact well
     formed - I confirmed this with two different XML validators.
     Some sites when you download the wsdl include hyphens ("-") between
     the tags - which is how it appears in a browser.
     The wsdl I had trouble with looked like this:
     <tag ..... >
        <andothertag ... >
         -
     Manually removing the hyphens cleared the problem.
     Jon Paris
     [23]www.Partner400.com
     [24]www.SystemiDeveloper.com
     ------------------------------
     Message: 4
     Date: Tue, 1 Sep 2009 18:15:17 -0400
     From: "Kalyan Tirumamidi" <[25]KTirumamidi@xxxxxxxxxxxxxxx>
     Subject: HTTP POST help
     To: <[26]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
     Message-ID:
     <[27]8F12C14A3855134D967D6D79DFDDEB830692FBF9@xxxxxxxxxxxxxxxxxxxxx
     s.int>
     Content-Type: text/plain;       charset="us-ascii"
     Hi - After lots of deliberations we are now back to HTTP Post using
     Scott's tool. As Thomas explained earlier I am now using the
     http_post_xml() call to post the XML file to a message broker.
     Since I
     do not completely understand all the parameters passed to it I am
     using
     the sample program EXAMPLE16 as an example for this.
     What I do not understand is where is the XML I received back from
     the
     web service. Is there a way I can capture that file?
     Later I will use EXPAT (not sure how to invoke EXPAT yet though) to
     parse the file. But for the initial test purposes can some one tell
     me
     how to capture the file I received? Will it be on IFS? If yes how
     do I
     know the path?
     Please help.
     Regards
     Kalyan
     -----Original Message-----
     From: Kalyan Tirumamidi
     Sent: Monday, August 31, 2009 12:38 PM
     To: [28]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
     Subject: Re: Missing tags in the web service XML creation
     Scott - Thanks for your reply. Your inputs have helped me a lot to
     understand the pros and cons of the different ways of doing the web
     service calls.
     I have dropped the plan of using Thomas's WSDL2RPG as his tool will
     take
     some time to complete the <extension> in conjunction with
     <sequence> in
     order to make the correct web service call. Hence we are for now
     manually preparing the XML file and using IBM MQ Client to post the
     message. We are then writing the XML parsing using the XML SAX.
     Wish me good luck.
     Regards
     Kalyan
     -------------------------------------------------------------------
     -----
     --
     Message: 3
     Date: Thu, 27 Aug 2009 17:48:17 -0500
     From: Scott Klement <[29]sk@xxxxxxxxxxxxxxxx>
     Subject: Re: Missing tags in the web service XML creation
     To: HTTPAPI and FTPAPI Projects <[30]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
     Message-ID: <[31]4A970D31.4030002@xxxxxxxxxxxxxxxx>
     Content-Type: text/plain; charset=ISO-8859-1; format=flowed
     hello Kalyan,
     > - If it is worth a question can you please tell me how different
     is
     > EXPAT compared to IBM supplied XML-SAX parser? I just started
     reading
     > documentation on IBM for XML parsing.
     The general concept of XML-SAX and Expat are about the same.  The
     overall paradigm is the same.
     With regards to how they read the XML data.  XML-SAX is simpler,
     but
     Expat is more flexible.  With Expat, you have to write your own
     routine
     to read the data -- which means you have to do more work.  That
     gives
     you added flexibilty (for example, you can get the data from a
     network
     instead of a disk file) but you need to know/understand the
     programming
     to do so.  XML-SAX reads the file for you, which means you don't
     have to
     do it -- but is only capable of reading a variable or stream file.
      It
     can't read from a pointer or network socket.
     With regards to how the handlers work...   XML-SAX calls only one
     handler routine, and passes an integer that identifies which event
     has
     occurred. The parameter list is therefore the same for every event
     (which it has to be, since there's only one routine to call)
     By contrast, Expat requires a separate event handler for each
     event, and
     has parameter lists taylored for that event.
     Those are the main differences -- and about as much as I can
     explain
     without turning it into a very long complicated e-mail message.
     > - I am trying to understand your sample programs in LIBHTTP and
     find
     > which is going to be the version I should use as there seems to
     be
     > different methods of XML parsing in there.
     Hmmm... not sure that I follow that?  Maybe I'm interpreting the
     word
     "method" differently than you mean it, but...   there's only one
     method
     of parsing included with HTTPAPI, and that's Expat.
     You can, of course, get the document itself and parse it with a
     different parser that's not included with HTTPAPI.
     > - Also I do not know if I can use SOAPUI since our company has
     already
     > developed a generic RPG application to generate a XML file to
     POST to
     > the web service. Would that cause any issues in using your EXPAT
     utility
     > to parse the response file?
     Weren't you planning to use Thomas Raddatz's WSDL2RPG?? I'm
     confused.
     SoapUI would calculate the SOAP message, just as Thomas's tool
     would do
     it.  The only difference is that SoapUI won't generate RPG code for
     you,
     you'll have to generate it yourself.
     If your company is already generatign the SOAP message, then you'd
     want
     to use HTTPAPI directly, and not go through SoapUI *or* WSDL2RPG.
     Unless you mean that your company's data is actually an XML payload
     of a
     SOAP message, as opposed to the SOAP message itself.  If that's the
     case, then you should be able to use it with either approach.
     > - Lastly, your example in HTTPXMLR4 seems to contain both HTTP
     POST as
     > well as EXPAT parsing. Is that correct?
     HTTPXMLR4 is *not* an example.  It's one of the modules of HTTPAPI.
      The
     examples are named EXAMPLE1, EXAMPLE2, EXAMPLE3, and so forth.
     HTTPXMLR4 is part of the code of the HTTPAPIR4 service program, and
     is
     definitely not something I'd start learning from, as it's rather
     advanced coding.
     ------------------------------
     Message: 4
     Date: Fri, 28 Aug 2009 08:46:55 +0200
     From: [32]thomas.raddatz@xxxxxx
     Subject: Antwort: Re: Missing tags in the web service XML creation
     To: [33]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
     Message-ID:
     <[34]OFD8BCA23F.DA3A829B-ONC1257620.00223E99-C1257620.00254762@obi.
     de>
     Content-Type: text/plain; charset=US-ASCII
     Kalyan,
     > - I am trying to understand your sample programs in LIBHTTP and
     find
     > which is going to be the version I should use as there seems to
     be
     > different methods of XML parsing in there.
     Usually you will use http_post_xml() to send your SOAP request to
     the
     server and automatically invoke the eXpat parser on the response
     received
     from the server. I assume that this approach is common sense for
     calling
     a
     web service. http_post_xml() is the very same procedure as
     http_url_post_xml(). It is mapped to http_url_post_xml() in member
     HTTPAPI_H. I do not know why both procedure names exist.
     Some times, but I cannot explain why, you will use http_url_get()
     or
     http_url_post() to send a request to the server but put the
     response
     into
     an IFS stream file. Then you can decide whether to start a parser
     for
     the
     data in the stream file or not. Procedure http_parse_xml_stmf() is
     used
     for
     that purpose. It takes the name of an existing stream file and the
     address
     of the callback procedure to use. Then it starts the eXpat parser
     and
     the
     parser will call the callback procedure for each element it reads
     from
     the
     stream file.
     > - Lastly, your example in HTTPXMLR4 seems to contain both HTTP
     POST as
     > well as EXPAT parsing. Is that correct?
     As Scott already mentioned, HTTPXMLR4 is part of the HTTP API
     service
     program. It is not an example program. The following sample
     programs
     demonstrate how to use http_url_post_xml()/http_post_xml():
       EXAMPLE16 - UPS package tracking
       EXAMPLE18 - Currency converter
       EXAMPLE19 - Language translation
       EXAMPLE20 - Currency converter (long SOAP action)
     Thomas.
     [35]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 28.08.2009
     00:18:13:
     > Von:
     >
     > [36]KTirumamidi@xxxxxxxxxxxxxxx
     >
     > An:
     >
     > [37]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
     >
     > Datum:
     >
     > 28.08.2009 00:22
     >
     > Betreff:
     >
     > Re: Missing tags in the web service XML creation
     >
     > Gesendet von:
     >
     > [38]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
     >
     > Scott - Upon reading the articles I am leaning towards your idea.
     >
     > - If it is worth a question can you please tell me how different
     is
     > EXPAT compared to IBM supplied XML-SAX parser? I just started
     reading
     > documentation on IBM for XML parsing.
     >
     > - I am trying to understand your sample programs in LIBHTTP and
     find
     > which is going to be the version I should use as there seems to
     be
     > different methods of XML parsing in there.
     >
     > - Also I do not know if I can use SOAPUI since our company has
     already
     > developed a generic RPG application to generate a XML file to
     POST to
     > the web service. Would that cause any issues in using your EXPAT
     utility
     > to parse the response file?
     >
     > - Lastly, your example in HTTPXMLR4 seems to contain both HTTP
     POST as
     > well as EXPAT parsing. Is that correct?
     >
     > Thanks advance,
     >
     > Regards
     > Kalyan
     >
     >
     >
     > Message: 1
     > Date: Thu, 27 Aug 2009 12:46:34 -0500
     > From: Scott Klement <[39]sk@xxxxxxxxxxxxxxxx>
     > Subject: Re: Missing tags in the web service XML creation
     > To: HTTPAPI and FTPAPI Projects
     <[40]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
     > Message-ID: <[41]4A96C67A.4010103@xxxxxxxxxxxxxxxx>
     > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
     >
     > Hello,
     >
     > > Here is what is happening. The tags between <q0:paymentRequest>
     and
     > > </q0:paymentRequest> are not being generated.
     >
     > I just want to point out that you can use HTTPAPI with SoapUI. To
     get
     > this service working.  It's a little more effort than using
     WSDL2RPG,
     > but if you have a looming deadline, this might get you going
     quicker
     > than waiting for Thomas to update WSDL2RPG.
     >
     > Surely doing that is 100 times simpler than switching to another
     > technology like MQ!
     >
     >
     > -----------------------------------------
     > This e-mail, including attachments, may include confidential
     and/or
     > proprietary information, and may be used only by the person or
     > entity to which it is addressed. If the reader of this e-mail is
     > not the intended recipient or his or her authorized agent, the
     > reader is hereby notified that any dissemination, distribution or
     > copying of this e-mail is prohibited. If you have received this
     > e-mail in error, please notify the sender by replying to this
     > message and delete this e-mail immediately.
     >
     -------------------------------------------------------------------
     ----
     > This is the FTPAPI mailing list.  To unsubscribe, please go to:
     > [42]http://www.scottklement.com/mailman/listinfo/ftpapi
     >
     -------------------------------------------------------------------
     ----
     --
     IMPORTANT NOTICE:
     This email is confidential, may be legally privileged, and is for
     the
     intended recipient only. Access, disclosure, copying, distribution,
     or
     reliance on any of it by anyone else is prohibited and may be a
     criminal
     offence. Please delete if obtained in error and email confirmation
     to
     the sender.
     ------------------------------
     Message: 5
     Date: Fri, 28 Aug 2009 11:41:54 -0500
     From: Mohamed Musthafa Safarulla
     <[43]mohamedmusthafa.safarulla@xxxxxxxxx>
     Subject: Re: No SOAP input for WS!
     To: HTTPAPI and FTPAPI Projects <[44]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
     Message-ID:

     <[45]ffab07660908280941x3d11bfe8k98aeb9872f9db789@xxxxxxxxxxxxxx>
     Content-Type: text/plain; charset="iso-8859-1"
     Sorry. The code i posted i was trying all combination to see if it
     works.
     Actually the program had serviceXML elements wraps everything.
     Sorry for
     the
     confusion.
     Thanks,
     Musthafa
     On Thu, Aug 27, 2009 at 4:07 PM, Scott Klement
     <[46]klemscot@xxxxxxxxxxxx>wrote:
     >
     >   Hello,
     >    > WS works fine when we call it from the WS testing utility
     but the
     WS
     >   > expert removed the header and methode name element from the
     SOAP
     to
     >   > make it work in that utility. Just used the basic XML data
     input
     >   > element to test it. WSDL is attached.
     >    The XML document from your debug log and RPG code is not the
     same
     as
     >   the one in this WSDL.  The WSDL wants it to look like this:
     >   <SOAP:Envelope
     >   xmlns:SOAP=[1]"[47]http://schemas.xmlsoap.org/soap/envelope/";
     >                  xmlns:tns=[2]"[48]http://tempuri.org/";>
     >      <SOAP:Header/>
     >      <SOAP:Body>
     >         <tns:CalculateTransitDates>
     >            <tns:serviceXML> your-value here </tns:serviceXML>
     >          </tns:CalculateTransitDates>
     >      </SOAP:Body>
     >   </SOAP:Envelope>
     >    Your code doesn't have <tns:serviceXML> -- instead it has
     >   tns:ServiceDS and tns:ServiceParam.  These aren't defined
     anywhere
     in
     >   the WSDL.  One wonders where you got the SOAP that you are
     passing
     to
     >   the web service?  Because it sure doesn't look like the SOAP
     that
     the
     >   WSDL expects.
     >
     > References
     >
     >   1. [49]http://schemas.xmlsoap.org/soap/envelope/
     >   2. [50]http://tempuri.org/
     >
     -------------------------------------------------------------------
     ----
     > This is the FTPAPI mailing list.  To unsubscribe, please go to:
     > [51]http://www.scottklement.com/mailman/listinfo/ftpapi
     >
     -------------------------------------------------------------------
     ----
     >
     --
     Thanks,
     Musthafa
     -------------- next part --------------
       Sorry. The code i posted i was trying all combination to see if
     it
       works. Actually the program had serviceXML elements wraps
     everything.
       Sorry for the confusion.
       Thanks,
       Musthafa
       On Thu, Aug 27, 2009 at 4:07 PM, Scott Klement
       <[1][52]klemscot@xxxxxxxxxxxx> wrote:
           Hello,
         > WS works fine when we call it from the WS testing utility but
     the
       WS
         > expert removed the header and methode name element from the
     SOAP
       to
         > make it work in that utility. Just used the basic XML data
     input
         > element to test it. WSDL is attached.
           The XML document from your debug log and RPG code is not the
     same
         as
           the one in this WSDL.  The WSDL wants it to look like this:
           <SOAP:Envelope

     xmlns:SOAP=[1]"[2][53]http://schemas.xmlsoap.org/soap/envelope/";
                          xmlns:tns=[2]"[3][54]http://tempuri.org/";>
              <SOAP:Header/>
              <SOAP:Body>
                 <tns:CalculateTransitDates>
                    <tns:serviceXML> your-value here </tns:serviceXML>
               </tns:CalculateTransitDates>
            </SOAP:Body>
         </SOAP:Envelope>
           Your code doesn't have <tns:serviceXML> -- instead it has
           tns:ServiceDS and tns:ServiceParam.  These aren't defined
         anywhere in
           the WSDL.  One wonders where you got the SOAP that you are
         passing to
           the web service?  Because it sure doesn't look like the SOAP
     that
         the
           WSDL expects.
         References
           1. [4][55]http://schemas.xmlsoap.org/soap/envelope/
           2. [5][56]http://tempuri.org/
     -------------------------------------------------------------------
     ---
       -
       This is the FTPAPI mailing list.  To unsubscribe, please go to:
       [6][57]http://www.scottklement.com/mailman/listinfo/ftpapi
     -------------------------------------------------------------------
     ---
       -
       --
       Thanks,
       Musthafa
     References
       1. mailto:[58]klemscot@xxxxxxxxxxxx
       2. [59]http://schemas.xmlsoap.org/soap/envelope/
       3. [60]http://tempuri.org/
       4. [61]http://schemas.xmlsoap.org/soap/envelope/
       5. [62]http://tempuri.org/
       6. [63]http://www.scottklement.com/mailman/listinfo/ftpapi
     ------------------------------
     -------------------------------------------------------------------
     ----
     This is the FTPAPI mailing list digest.  To unsubscribe, go to:
     [64]http://www.scottklement.com/mailman/listinfo/ftpapi
     -------------------------------------------------------------------
     ----
     End of Ftpapi Digest, Vol 38, Issue 27
     **************************************
     ------------------------------
     Message: 5
     Date: Tue, 01 Sep 2009 17:36:23 -0500
     From: Scott Klement <[65]sk@xxxxxxxxxxxxxxxx>
     Subject: Re: HTTP POST help
     To: HTTPAPI and FTPAPI Projects <[66]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
     Message-ID: <[67]4A9DA1E7.5030004@xxxxxxxxxxxxxxxx>
     Content-Type: text/plain; charset=ISO-8859-1; format=flowed
     Kalyan,
     http_post_xml() is intended to send data, and receive an XML file
     and
     parse it in memory as it's received.  If that's not what you want,
     then
     don't use http_post_xml().
     http_post() will send data and receive the response to the IFS.
     http_post_stmf() will send data from the IFS and receive the
     response to
     the IFS.
     All of this is documented in the comments in the HTTPAPI_H source
     member.
     Kalyan Tirumamidi wrote:
     > Hi - After lots of deliberations we are now back to HTTP Post
     using
     > Scott's tool. As Thomas explained earlier I am now using the
     > http_post_xml() call to post the XML file to a message broker.
     Since I
     > do not completely understand all the parameters passed to it I am
     using
     > the sample program EXAMPLE16 as an example for this.
     >
     > What I do not understand is where is the XML I received back from
     the
     > web service. Is there a way I can capture that file?
     >
     > Later I will use EXPAT (not sure how to invoke EXPAT yet though)
     to
     > parse the file. But for the initial test purposes can some one
     tell me
     > how to capture the file I received? Will it be on IFS? If yes how
     do I
     > know the path?
     ------------------------------
     Message: 6
     Date: Wed, 2 Sep 2009 11:16:40 -0400
     From: <[68]Tony.Davis2@xxxxxxx>
     Subject: HTTP/1.1 500 Internal Server Error
     To: <[69]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
     Message-ID:
     <[70]5AB5F1D08CDE3645A203889B1DBD223743B7D9969A@xxxxxxxxxxxxxxxxxxx
     .com>
     Content-Type: text/plain; charset="us-ascii"
     I have written a program (program-A) that uses http_post_xml() and
     returns results as expected. I wrote two others that call this
     program,
     one RPGLE program (program-B) that displays the data on my green
     screen,
     and another SQLRPGLE program (program-C) that returns the data via
     a
     results set.
     The RPGLE process works perfectly (program-B calls program-A and
     displays the data in a subfile).
     The SQLRPGLE process does not work (program-C calls program-A). I
     am
     testing this process using iSeries Navigator. From iSeries
     Navigator, I
     call a stored procedure, whose associated external program is the
     SQLRPGLE program (program-C).
     The process is not bombing, it simply returns an error after
     executing
     the http_post_xml() statement (I execute http_crash() as in the
     example
     that I cloned). The value of rc is 500. I do have debug turned on;
     that
     is, creating a log on the IFS. The message in the IFS log is
     "SetError()
     #13: HTTP/1.1 500 Internal Server Error".
     The entire log is attached.
     Any advice is appreciated.
     Thank you,
     Tony Davis
     -------------- next part --------------
     An embedded and charset-unspecified text was scrubbed...
     Name: httpapi_debug.txt
     Url:
     [71]http://www.scottklement.com/pipermail/ftpapi/attachments/200909
     02/4f7643
     66/attachment.txt
     ------------------------------
     -------------------------------------------------------------------
     ----
     This is the FTPAPI mailing list digest.  To unsubscribe, go to:
     [72]http://www.scottklement.com/mailman/listinfo/ftpapi
     -------------------------------------------------------------------
     ----
     End of Ftpapi Digest, Vol 39, Issue 2
     *************************************
     -----------------------------------------
     This e-mail, including attachments, may include confidential and/or
     proprietary information, and may be used only by the person or
     entity to which it is addressed. If the reader of this e-mail is
     not the intended recipient or his or her authorized agent, the
     reader is hereby notified that any dissemination, distribution or
     copying of this e-mail is prohibited. If you have received this
     e-mail in error, please notify the sender by replying to this
     message and delete this e-mail immediately.
     -------------------------------------------------------------------
     ----
     This is the FTPAPI mailing list.  To unsubscribe, please go to:
     [73]http://www.scottklement.com/mailman/listinfo/ftpapi
     -------------------------------------------------------------------
     ----

   --
   Thanks,
   Musthafa

References

   1. mailto:KTirumamidi@xxxxxxxxxxxxxxx
   2. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   3. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   4. mailto:ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
   5. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   6. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   7. http://www.scottklement.com/mailman/listinfo/ftpapi
   8. mailto:ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
   9. mailto:ftpapi-owner@xxxxxxxxxxxxxxxxxxxxxx
  10. mailto:Tony.Davis2@xxxxxxx
  11. mailto:sk@xxxxxxxxxxxxxxxx
  12. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  13. mailto:4A9D5DFC.7070006@xxxxxxxxxxxxxxxx
  14. mailto:sk@xxxxxxxxxxxxxxxx
  15. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  16. mailto:4A9D5E29.6040306@xxxxxxxxxxxxxxxx
  17. http://somewhere.com/
  18. http://somewhere.com/
  19. http://www.scottklement.com/mailman/listinfo/ftpapi
  20. mailto:jon.paris@xxxxxxxxxxxxxx
  21. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  22. mailto:7CCC20AB-BF5B-48A5-80A7-CEFBAFFE853F@xxxxxxxxxxxxxx
  23. http://www.Partner400.com/
  24. http://www.SystemiDeveloper.com/
  25. mailto:KTirumamidi@xxxxxxxxxxxxxxx
  26. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  27. mailto:8F12C14A3855134D967D6D79DFDDEB830692FBF9@xxxxxxxxxxxxxxxxxxxxxxxxxx
  28. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  29. mailto:sk@xxxxxxxxxxxxxxxx
  30. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  31. mailto:4A970D31.4030002@xxxxxxxxxxxxxxxx
  32. mailto:thomas.raddatz@xxxxxx
  33. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  34. mailto:OFD8BCA23F.DA3A829B-ONC1257620.00223E99-C1257620.00254762@xxxxxx
  35. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
  36. mailto:KTirumamidi@xxxxxxxxxxxxxxx
  37. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  38. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
  39. mailto:sk@xxxxxxxxxxxxxxxx
  40. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  41. mailto:4A96C67A.4010103@xxxxxxxxxxxxxxxx
  42. http://www.scottklement.com/mailman/listinfo/ftpapi
  43. mailto:mohamedmusthafa.safarulla@xxxxxxxxx
  44. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  45. mailto:ffab07660908280941x3d11bfe8k98aeb9872f9db789@xxxxxxxxxxxxxx
  46. mailto:klemscot@xxxxxxxxxxxx
  47. http://schemas.xmlsoap.org/soap/envelope/
  48. http://tempuri.org/
  49. http://schemas.xmlsoap.org/soap/envelope/
  50. http://tempuri.org/
  51. http://www.scottklement.com/mailman/listinfo/ftpapi
  52. mailto:klemscot@xxxxxxxxxxxx
  53. http://schemas.xmlsoap.org/soap/envelope/
  54. http://tempuri.org/
  55. http://schemas.xmlsoap.org/soap/envelope/
  56. http://tempuri.org/
  57. http://www.scottklement.com/mailman/listinfo/ftpapi
  58. mailto:klemscot@xxxxxxxxxxxx
  59. http://schemas.xmlsoap.org/soap/envelope/
  60. http://tempuri.org/
  61. http://schemas.xmlsoap.org/soap/envelope/
  62. http://tempuri.org/
  63. http://www.scottklement.com/mailman/listinfo/ftpapi
  64. http://www.scottklement.com/mailman/listinfo/ftpapi
  65. mailto:sk@xxxxxxxxxxxxxxxx
  66. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  67. mailto:4A9DA1E7.5030004@xxxxxxxxxxxxxxxx
  68. mailto:Tony.Davis2@xxxxxxx
  69. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  70. mailto:5AB5F1D08CDE3645A203889B1DBD223743B7D9969A@xxxxxxxxxxxxxxxxxxxxxxx
  71. http://www.scottklement.com/pipermail/ftpapi/attachments/20090902/4f7643%0A66/attachment.txt
  72. http://www.scottklement.com/mailman/listinfo/ftpapi
  73. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------