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

RE: http post xml question



Have you tried using GET instead of POST?

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Dusty Edenfield
Sent: Wednesday, February 25, 2009 3:54 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: http post xml question

I need to use HTTPAPI to interact with a web service.  I've got a url that I
need to hit with some xml behind it.  I'm having to do this in order to
interact with 3rd party software from our ERP applications.  They've given
me a url that they said would work if I click on it and it does.  Once I
launched the URL I had to view source to see the actual response, but
regardless, I've verified that it works.

The format of the url is something like this
http://ip:port/Action.do?<?xml%20version='1.0'%20encoding='UTF-8'?>&input=<mainElement><stuff1>ABC</stuff1><stuff2>123</stuff2></mainElement>


What I need to do is do a post of that url and xml and then receive the
response back, which will be in xml, and parse it in to fields in the RPG
program.  What is the best way to do it? Should I use http_url_post_xml or
http_url_post_stmf_xml or http_url_post_stmf?  It's all kinda confusing.
Especially when I have a pretty good idea of what I want to do.  I just
don't know which tools to use to do it.  I just want to mimic the action of
the example url that was given to me.

I'm attaching the code I've been using so far without any luck.  I can hit
the 3rd party server, but they just see an empty string where my xml is
supposed to be.

Thanks for any help.  Example code would be awesome if anyone knows how to
fix this.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------