on 05-22-2015 5:38 AM
Hi all;
what is PI http url for checking connection(http 200 O.K) ?
when i execute client program, i got the response message as blow;
Status: 405 - Message: Method Not Allowed
private static final String uri = "http://xxx.pi.com:50800/XISOAPAdapter/MessageServlet?ximessage=true";
final HttpPut httpput = new HttpPut(uri) ;
System.out.println(httpput);
final HttpResponse response = httpclient.execute(httpput);
System.out.println("Status: "+response.getStatusLine().getStatusCode() + " - Message: "
+ response.getStatusLine().getReasonPhrase());
Thank You.
Hi David,
HTTP PUT is a method for REST. SOAP Adapter only supports POST, that is why you are getting a method not allowed exception. Also
private static final String uri = "http://xxx.pi.com:50800/XISOAPAdapter/MessageServlet?ximessage=true";
Is reserved for ECC systems sending an ABAP proxy message to PI using AAE. The correct URL should be
http(s)://host:port/XISOAPAdapter/MessageServlet?channel=p:s:c where p = party, s = service (business component/business system), c = comm channel respectively.
Here's a code snippet of what I use to POST to the XI using SOAP Adapter
private static final String urlPath = "http://host:50000/XISOAPAdapter/MessageServlet?channel=:service:channel";
URL url = new URL(urlPath);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setDoOutput(true);
conn.setDoInput(true);
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "text/xml; charset=utf-8");
conn.setRequestProperty("Content-Length", Integer.toString(httpBody.length())); //an HTTP Body is needed
DataOutputStream dos = new DataOutputStream(conn.getOutputStream());
dos.writeBytes(httpBody);
dos.flush();
dos.close();
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.