WebServiceClient exception handling

Hi! Guys,
Is there any way CloevrETL Designer WebServiceClient component could handle a error “logged”? and continue to next service request in stead failing the whole operation?
since our web server did not provide the Fault response to a non exist record request.

Thanks!

Samuel

Dear Samuel,

Have you tried to use Fault mapping? If you do not want to process the errors, it should be enough to connect Error port to Trash.

Kind regards,

How are you? Lubos,

That is the precise my problem, our web service operation does not have a Fault Response specified, and further there not even a status filed in the normal response regarding a request.
I am still not fully grasp the whole process, how could i dump a error when i even could not have a Fault response.

if I made soap call through HttpConnection, easily I cloud get a error message in the return contents, and status code like 500 , so I know the request did not go any where, and I need to check out those record get them fixed and updated accordingly, but, the tread off on that approach is the soap message is kind messy, one request under one envelope,. web service client on other hand is really good for packaging all the request together, load directly from database or a file, and send the request on the fly on a scheduled time.
Now what troubles me is when a record is not in the system (since this operation is checking a status of a record), and my web service client call failed right away.
like you said, if in some way i just let this error go don’t need to care right away and let the whole request process completed. and i am trapped in here now, I could not figure it out how to do this. There is no error redirect in this component and Fault Mapping is not a available.
Is there some trick i could play to setup fault Mapping on my own get the whole process going?

I appreciate your help.

Samuel

below is the error message i run into.
*************************************

ERROR [WatchDog_0] - Error details:
org.jetel.exception.JetelRuntimeException: Component [WebServiceClient:WEB_SERVICE_CLIENT] finished with status ERROR.
at org.jetel.graph.Node.createNodeException(Node.java:543)
at org.jetel.graph.Node.run(Node.java:522)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.axis2.AxisFault: An error occured in getPurchaseRequisitionStatus,
at org.apache.axis2.description.OutInAxisOperationClient$NonBlockingInvocationWorker.run(OutInAxisOperation.java:451)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
… 1 more

Hi! Lubos,

After I replied to you last time, I try the Fault mapping, since it is the same response format from the same server but no contents, so I use the normal output mapping, just switched to the output to another port.
Yes, it is worked.
Now if the web service client component could have a feature that show more detail about the web service call response , then i could very easily visually see what the bad request are, that could be some new feature for later update you guys could think of. But for now my immediate problem was solved.

Thank you!
posting.php?mode=reply&f=4&t=6646#
Samuel

Hi! Guys,

I got another problem with WEbServiceClient error handling, below is the error message,
problem associated with error is the response get from our server is not a XML formatted message for a entry at the whole list, the response is a html DOCTYPE, and also server had not provided a Fault mapping. after this incident the whole process stopped.
I was wondering, is there some way inside the cloverETL could handle it differently, instead of waiting on Fault mapping, could cloverETL redirect the error out through different port? and dump the error message and moving on, not like currently like what I have had, the whole process stopped.
Since I am new to cloverETL, I am not really know much about the feature and tricks. Would you guys help me out here? please!

Thanks!

Samuel

-----------------Error Messages
ERROR [WatchDog_0] - Component [WebServiceClient:WEB_SERVICE_CLIENT] finished with status ERROR.
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[31,3]
Message: The declaration for the entity “HTML.Version” must end with ‘>’.
ERROR [WatchDog_0] - Error details:
org.jetel.exception.JetelRuntimeException: Component [WebServiceClient:WEB_SERVICE_CLIENT] finished with status ERROR.
at org.jetel.graph.Node.createNodeException(Node.java:543)
at org.jetel.graph.Node.run(Node.java:522)
at java.lang.Thread.run(Thread.java:722)
Caused by: com.opensys.cloveretl.component.ws.exception.SendingMessageException: org.apache.axis2.AxisFault: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[31,3]
Message: The declaration for the entity “HTML.Version” must end with ‘>’.
at com.opensys.cloveretl.component.ws.proxy.a.b(Unknown Source)
at com.opensys.cloveretl.component.ws.proxy.a.a(Unknown Source)
at com.opensys.cloveretl.component.WebServiceClient.a(Unknown Source)
at com.opensys.cloveretl.component.WebServiceClient.execute(Unknown Source)
at org.jetel.graph.Node.run(Node.java:493)
… 1 more
Caused by: org.apache.axis2.AxisFault: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[31,3]
Message: The declaration for the entity “HTML.Version” must end with ‘>’.
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:123)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:354)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
at org.apache.axis2.description.OutInAxisOperationClient$NonBlockingInvocationWorker.run(OutInAxisOperation.java:442)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
… 1 more
Caused by: org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[31,3]
Message: The declaration for the entity “HTML.Version” must end with ‘>’.
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:297)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:199)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.(StAXSOAPModelBuilder.java:155)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.(StAXSOAPModelBuilder.java:141)
at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:686)
at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:215)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:145)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:108)
… 7 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[31,3]
Message: The declaration for the entity “HTML.Version” must end with ‘>’.
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:598)
at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
at org.apache.axiom.util.stax.dialect.SJSXPStreamReaderWrapper.next(SJSXPStreamReaderWrapper.java:138)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:682)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:215)
… 14 more

Hi Samuel,

WebServiceClient component expects valid response (according to WSDL) - so either operation result or WSDL defined error (in this case fault mapping is used). In case response is invalid, component fails causing fail of whole graph.

I see 3 options:

  1. Use HttpConnector istead of WebServiceClient - but in this case you need to prepare request and handle response on your own.

  2. Wrap graph which uses WebServiceClient by parent one - when exception appears in children graph, parent can handle it. This is easy to be done using JobFlows (http://doc.cloveretl.com/documentation/ … graph.html) - available only on CloverETL Server Corporate +. In Designer it is possible via http://doc.cloveretl.com/documentation/ … graph.html (property “Stop processing on fail” and connected second - error - port) but it will be harder to pass required parameters.

  3. Modify service to return valid response - so simply wrap HTML data by simple WSDL response. E.g. having one element containing HTML data.

I hope this helps.