Author Message
DanielaBanin
Joined: Nov 6, 2013
Messages: 86
Offline
I am using a webservice call in a data node, surrounded by try and catch. However I do not know how to catch this fault and avoid getting the long error message.



9/05/2017 09:12:57:720 INFO - 2881210AAC7D1939C3085FA3CCC0E3D7:/testDispatcher : Calling method [{http://services.pim.avaya.com/AgentAPI/}GetContactDataFromList] on web service [isPOM] at [https://10.10.170.23/axis2/services/VP_POMAgentAPIService]
29/05/2017 09:12:57:729 INFO - 2881210AAC7D1939C3085FA3CCC0E3D7:/testDispatcher : Using Basic/Digest authentication for web service call
29/05/2017 09:12:57:730 DEBUG - 2881210AAC7D1939C3085FA3CCC0E3D7:/testDispatcher : Web Service Request -> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns1:GetContactDataFromList xmlns:ns1="http://services.pim.avaya.com/AgentAPI/"><ns1:UserContactID>0502023833</ns1:UserContactID><ns1:ContactListName>mishtaken_heb_list</ns1:ContactListName></ns1:GetContactDataFromList></soapenv:Body></soapenv:Envelope>
29/05/2017 09:12:57:806 DEBUG - 2881210AAC7D1939C3085FA3CCC0E3D7:/testDispatcher : Axis Fault message <- <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>GetContactDataFromListFault</faultstring><detail><ns1:GetContactDataFromListFaultInfo xmlns:ns1="http://services.pim.avaya.com/AgentAPI/"><ns1:FaultMsg>Contact record not found.
</ns1:FaultMsg><ns1:RetCode>-2</ns1:RetCode></ns1:GetContactDataFromListFaultInfo></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
29/05/2017 09:12:57:806 ERROR - 2881210AAC7D1939C3085FA3CCC0E3D7:/testDispatcher : Got AxisFault during web service call: GetContactDataFromListFault
29/05/2017 09:12:57:806 DEBUG - 2881210AAC7D1939C3085FA3CCC0E3D7:/testDispatcher : Fault action <- null
29/05/2017 09:12:57:806 DEBUG - 2881210AAC7D1939C3085FA3CCC0E3D7:/testDispatcher : Fault node <- null
29/05/2017 09:12:57:806 DEBUG - 2881210AAC7D1939C3085FA3CCC0E3D7:/testDispatcher : Fault role <- null
29/05/2017 09:12:57:806 DEBUG - 2881210AAC7D1939C3085FA3CCC0E3D7:/testDispatcher : Fault type <- 0
29/05/2017 09:12:57:806 DEBUG - 2881210AAC7D1939C3085FA3CCC0E3D7:/testDispatcher : Fault message <- GetContactDataFromListFault
29/05/2017 09:12:57:807 ERROR - 2881210AAC7D1939C3085FA3CCC0E3D7:/testDispatcher : session id:teleall-mpp-02-2017149061254-13 |
EXCEPTION>
org.apache.axis2.AxisFault: GetContactDataFromListFault
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
With the try and catch, can you post a screen shot of that from OD? I would just catch *, is that not working?
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
You may be having issues as this is likely coming out of the POM PDC. I suggest you contact POM to have them resolve this.
DanielaBanin
Joined: Nov 6, 2013
Messages: 86
Offline
I am not using the POM PDC, I am addressing the webservice directly.
The Exception is caught by the catch * , and this is what I am getting.
I was looking for a way to catch the specific exception , since I expect that most of the calls will raise that exception -" Contact record not found" is what I expect to find in most calls.
  • [Thumb - Capture.JPG]
[Disk] Download
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
Okay sorry the stack track was cut off. Can you also provide more of the stack trace or attach the trace.log. The * should catch all exceptions.
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
Also see this post https://www.devconnectprogram.com/forums/posts/list/0/21066.page#p149536
Go to:   
Mobile view