on 2016 Dec 21 12:30 PM
Hello all.
I have a new SFDC project, where I must make the Webservice call via Java Class using SystemAccessor.
When trying to make the call via "postman" I get HTTP 500 result along with XML payload explaining the fault:
However when running the interface via the Java Class, the SystemAccessor throws an exception and I cannot seem to be able to access the payload.
This is the code that I use to make the Webservice call:
Channel channel = LookupService.getChannel("Service_Name","Channel_Name");
SystemAccessor accessor = null;
accessor = LookupService.getSystemAccessor(channel);
InputStream in = new ByteArrayInputStream(PayloadXml.getBytes("UTF-8"));
Payload payload = LookupService.getXmlPayload(in);
Payload SOAPOutPayload = null;
SOAPOutPayload = accessor.call(payload);
Is there any way to extract the actuall SFDC faultstring as I need to use it for logging purposes?
Regards,
Imanuel Rahamim.
Resolved!
As I use the "Do not use SOAP Envelope" for the SFDC SOAP receiver channel, it did not keep the SOAP FAULT payload.
Needed to add:
XMBWS.NoSOAPIgnoreStatusCode = true as instructed in:
https://archive.sap.com/discussions/thread/1675917
And now I get the fault message.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Imanuel,
I guess, you are using this JAVA mapping for SOAP Look up to get the session ID before final call to the SFDC WS.
Looks like, the problem is in the SOAP response message. Can you check once separately calling the WS from SOAPUI whether you are getting proper session ID or not.
Thanks,
Apu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello.
the problem is not with the error itself (I invoked it by intention by changing "Product2" which is a valid SFDC object to "Product111" which is not.
This is because I am checking error handling and logging of SFDC responses.
The problem is that I cannot see the XML of the fault response getting to me (it is coming back, as I can see it with postman / SOAP UI)
Please look in more detail into my original message to see what I ment.
User | Count |
---|---|
66 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.