cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Post not working

Former Member
0 Kudos

Hi,

We are tried to call one jsp page thru HTTP Post. This JSP page will return output as XML.

URL:

http://<IP>:<Port>/com/genrad/app/xml/client/DataExchangeInterface.jsp?message=<REQUEST><IMPORT><SIT...;

If i give this URL in HTTP Post URL and execute it is showing error as Action Failed.

But if i call this URL from any page which is inside workbench, it is returning the result XML.

I tried by splitting it also like http://<IP>:<Port>/com/genrad/app/xml/client/DataExchangeInterface.jsp?message= in URL and <REQUEST><IMPORT><SITE>TEST1</SITE></IMPORT></REQUEST> in document to post. but it is not working.

Content-type and encoding are same as default (application/x-www-form-urlencoded, UTF-8). But still it is showing same Action failed message.

How to call this?

Regards,

Senthil

Accepted Solutions (0)

Answers (3)

Answers (3)

jcgood25
Active Contributor
0 Kudos

What do you get from the action block at runtime in the ReturnAsXML (or more likely) the ReturnAsString in a tracer?

When you have a browser open it uses IE's proxy server settings to get to the fully qualified http request. MII will use the proxy information shown on the System Admin settings page from the Menu.

Using http://www.google.com in an HTML loader action block is a simple test to know if you can get to an external location from inside a TRX.

If you can get to your desired HTTP post URL, then credentials might be another issue to investigate.

former_member202228
Active Participant
0 Kudos

If you use the "?message=" part in the URL, try to URLENCODE the whole string .. something like ?message=%3CREQUEST%3E%3CIMPORT%3E%3CSITE%3ETEST1%3C%2FSITE%3E%3C%2FIMPORT%3E%3C%2FREQUEST%3E

URL Encoding is used when placing text in a query string to avoid it being confused with the URL itself. It is normally used when the browser sends form data to a web server. URL Encoding replaces u201Cunsafeu201D characters with u2018%u2019 followed by their hex equivalent. Characters which need not be escaped are defined in RFC3986 (which replaced RFC2396). They are the 7-bit ASCII alphanumerics and the characters u201C-._~u201D. Unicode characters and 8-bit ASCII characters are normally first encoded using UTF-8, as defined in RFC2279.

Former Member
0 Kudos

Hi Senthil,

please try to set content type to text/xml as your message is type xml.

I am also unsure about the "?message=" in the URL. You may also try to omit it and fill the xml payload into the Postdata property.

Are you calling the URL from outside your server? Maybe you have to add credentials when calling it from the browser (IllumLoginUser and IllumLoginPassword) ?

Michael