on 10-09-2014 3:51 PM
Hi Experts,
I am doing proxy to soap scenario, some times web service is returning html payload to PI and failing in PI, so i want to check the response payload whether it is html or xml, if it is html i want to map it to fault message and send it to proxy, please tell me how to check the content type of input payload in java mapping.
Regards,
Rachana.
Hi Rachana,
I guess you can do this using Runtime Constants to read the message header.
Regards
Prem A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rachana,
Once you convert the payload inputstream into string, you can do a simple indexOf check to see if it contains html, since an html starts with <html></html> e.g
if(payloadString.indexOf("<html>")>-1){
your logic here
}
Hope this helps,
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 |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.