× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I also agree that if you are doing this project you need to get some resources
under your belt, such as the e-rpg thing I hear so much about, and the other
one, if it's not the same one, Who knew you could do this in RPG?  Those, I
would think, are essentials.

Now, sending an XML file in HTTP to the carrier is a pretty simple matter,
really.  HTTP is just telnet port 80 with a bunch of headers.  You basically
want to open up the URL you are sending it to and transmit the file.  In HTTP
protocol, you request a socket to open, it opens, you send the file (data) you
receive a file (data) and the socket closes.  Pretty straight forward.

I have done this on PCs but not yet on an AS/400 (I have written a PC client
to talk to an AS/400 HTTP server though).  Again, get the books to learn how
to program sockets in RPG.  This is essential.

So, in conclusion:
Build your file you want to transmit with all the HTTP headers, the body of your
XML document, and the footer.  Open the connection to the insurance company,
send the file.  Receive some type of acknoledgement.

As for receiving the XML back from the insurance company, perhaps they will
give you another URL you need to connect to and receive the file.  This can get
a little tricky if they require you to sign in to their HTTP server.  I was 
never able
to write a client to sign into a web site.  Perhaps one of the RPG books could 
tell
you that.

You have some research ahead of you.

Regards,

Jim Langston

jpcarr@TREDEGAR.COM wrote:

> Got a question asked of me and I thought I would pass it to the group for
> more input.
>
>  I have a question concerning
> generating an XML document from an RPG program.  I am trying to accomplish
> a task of generating XML data from an AS/400 UDB database file to send  to
> insurance carriers and receive back XML data and populate the AS/400 UDB
> database file with the results.  Here are some additional facts concerning
> this issue:  We are going to be requesting real time insurance quotes from
> our insurance carrier partners.  One of our insurance carriers has a
> framework in place that accepts and sends quote requests via XML.  My
> question is how can we take an AS/400 file that has been created by a RPG
> ILE program and send it to the insurance carrier via HTTP in XML format??
> The insurance carrier said we can send the data as one large text field and
> they would take care of parsing it out on their end.  Also, how would we
> receive the XML data back into the AS/400 and put it back into the AS/400
> file??  I know there are some programs out on the IBM Alphaworks site to
> deal with this, but very unclear.  The ideal solution would be to
> accomplish this directly from our RPG ILE program that creates the file
> that is in the format that the insurance carriers need.
>
> John Carr

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.