cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP adapter error

Former Member
0 Kudos

Hi,

I am trying to connect to one of the url in internet using http destination to external server(SM59). I have tested this destination and it works fine in SM59 but when I used this destination in XI adapter and tried to trigger it, it throws an exception as "Method POST not allowed in the given url".

Please let me know what will be the reason for this.

I am passing a dummy field to trigger this url and retreiving response in one of the message interfaces.

Waiting for the solution.

Thanks in Advance,

P.Shridhar

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi sridhar ,

You must be having a proxy server to access the internet ,so you have to set system properties in the javaproxy .

<b>Properties properties = System.getProperties();

properties.put("http.proxyHost", "my.proxyhost.com");

properties.put("http.proxyPort", "1234");</b>

check the following link :

http://www.jguru.com/faq/view.jsp?EID=13186

<a href="http://www.jguru.com/faq/view.jsp?EID=13186">accessing URL through Proxy server</a>

Thanks & Regards,

Srikanth Lanka.

Former Member
0 Kudos

"Method POST not allowed in the given url".

The error message is self explanatory. The URL you are trying to reach using XI HTTP adapter does not support HTTP POST method. XI HTTP adapter always sends data to a HTTP destination using HTTP POST method , in other words , POSTS the data.

--Amol

Former Member
0 Kudos

Hi Amol,

If the given site doesn't allow POST method then what is the solution for this situation.

Can I use get method in HTTP Adapter if yes then how?

Thanks,

P.Shridhar.

Former Member
0 Kudos

If your target site does not support POST method then you can not make use of XI HTTP adapter at the reciever end as it supports only HTTP POST. In case you must connect to the target site change your scenario from

<SRC> - XI - HTTP

to

<SRC> - XI - Java Proxy

In the java proxy you can make use of third party open source java libraries like Jakarta HTTP Client and do a HTTP GET programatically.

Former Member
0 Kudos

Hi Amol,

Thanks a lot for your earlies reply. I have done everything as suggested by you (writing java proxies to access url) now I have one new problem. I am not able to connect to the internet using this url.

Can you suggest me how to enable internet port in J2EE engine and how to connect to that site?

We have configured that url in SM59 and it is able to access that site but when I tried with Java proxies using ulr.openconnection .... I got message expired exception.

Thanks in Advance,

P.Shridhar.