You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by "Alex Boisvert (JIRA)" <ji...@apache.org> on 2007/01/05 21:15:28 UTC
[jira] Created: (ODE-87) Fault handling in JBI
Fault handling in JBI
---------------------
Key: ODE-87
URL: https://issues.apache.org/jira/browse/ODE-87
Project: Apache Ode
Issue Type: Bug
Components: JBI Integration
Affects Versions: Incubator
Reporter: Alex Boisvert
Assigned To: Maciej Szefler
Fix For: Incubator
Alexander Logvinov <al...@softech.ru> reported on ode-user@ the following bug on 12/22/06:
Hi,
I've got a problem with handling SOAP fault in my BPEL process.
I run ODE as a service engine in Servicemix.
My BPEL process calls the web service that runs in Tomcat. The service is implemented using XFire.
It has the following operation (this WSDL is generated by XFire):
<wsdl:portType name="WarehousePortType">
<wsdl:operation name="OrderBook">
<wsdl:input name="OrderBookRequest" message="tns:OrderBookRequest"/>
<wsdl:output name="OrderBookResponse" message="tns:OrderBookResponse"/>
<wsdl:fault name="OrderException" message="tns:OrderException"/>
</wsdl:operation>
</wsdl:portType>
that can throw the following fault:
<wsdl:message name="OrderException">
<wsdl:part name="OrderException" element="tns:OrderException"/>
</wsdl:message>
... of the following type:
<xsd:complexType name="OrderException">
<xsd:sequence>
<xsd:element minOccurs="0" name="orderMessage" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="OrderException" type="tns:OrderException"/>
My BPEL invokes this operation with the following code:
<scope name="Scope1">
<faultHandlers>
<catchAll>
<empty/>
</catchAll>
</faultHandlers>
<invoke name="callWarehouse"
partnerLink="warehousePartnerLink"
operation="OrderBook"
portType="warehouse:WarehousePortType"
inputVariable="orderBookIn"
outputVariable="orderBookOut"/>
</scope>
The service replies with the following fault:
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>unknown book: Design Patterns</faultstring>
<detail>
<OrderException xmlns="http://Warehouse.HelloBook.softech.com">
<orderMessage>There was an error processing the order.</orderMessage>
</OrderException>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
The log contains the following:
It receives the full SOAP message from the server:
21:44:44,508 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "HTTP/1.1 500 Internal Server Error[\r][\n]"
21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Content-Type: text/xml;charset=UTF-8[\r][\n]"
21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Transfer-Encoding: chunked[\r][\n]"
21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Date: Fri, 22 Dec 2006 18:44:44 GMT[\r][\n]"
21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Server: Apache-Coyote/1.1[\r][\n]"
21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Connection: close[\r][\n]"
21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "1"
21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "e"
21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "9"
21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "[\r]"
21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 69 | << "[\n]"
21:44:44,539 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>unknown book: Design Patterns</faultstring><detail><OrderException xmlns="http://Warehouse.HelloBook.softech.com"><orderMessage>There was an error processing the order.</orderMessage></OrderException></detail></soap:Fault>&
lt;/soap:Body></soap:Envelope>"
Then the fault message is truncated and the JBI message will not contain faultstring and faultcode:
21:44:44,555 | DEBUG | Thread-12 | DeliveryChannelImpl | .messaging.DeliveryChannelImpl 300 | Accepted: InOut[
id: ID:alogvinov-3320-1166813006883-6:0
status: Active
role: consumer
service: {http://Warehouse.HelloBook.softech.com}Warehouse
endpoint: WarehouseHttpPort
operation: {http://Warehouse.HelloBook.softech.com}OrderBook
in: <?xml version="1.0" encoding="UTF-8"?><OrderBook xmlns="http://Warehouse.HelloBook.softech.com" xmlns:warehouse="http://Warehouse.HelloBook.softech.com">
<customerID>123</customerID>
<bookName>Design Patterns</bookName>
</OrderBook>
fault: <?xml version="1.0" encoding="UTF-8"?><OrderException xmlns="http://Warehouse.HelloBook.softech.com"><orderMessage>There was an error processing the order.</orderMessage></OrderException>
]
After a while I've got an error:
21:44:44,899 | ERROR | pool-3-thread-2 | Receiver | org.apache.ode.jbi.Receiver$1 192 | Error processing JBI message.
java.lang.AssertionError: todo
at org.apache.ode.jbi.OdeConsumer$2.call(OdeConsumer.java:199)
at org.apache.ode.jbi.OdeConsumer$2.call(OdeConsumer.java:183)
at org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.execTransaction(QuartzSchedulerImpl.java:212)
at org.apache.ode.jbi.OdeConsumer.outResponse(OdeConsumer.java:182)
at org.apache.ode.jbi.OdeConsumer.onJbiMessageExchange(OdeConsumer.java:134)
at org.apache.ode.jbi.JbiMessageExchangeEventRouter.onJbiMessageExchange(JbiMessageExchangeEventRouter.java:40)
at org.apache.ode.jbi.Receiver$1.run(Receiver.java:190)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
It seems that it is raised by the following code in OdeConsumer.java
Fault jbiFlt = jbiMex.getFault();
if (jbiFlt != null) {
// TODO: How are we supposed to figure out the fault type exactly?
throw new AssertionError("todo");
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Work started: (ODE-87) Fault handling in JBI
Posted by "Maciej Szefler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ODE-87?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on ODE-87 started by Maciej Szefler.
> Fault handling in JBI
> ---------------------
>
> Key: ODE-87
> URL: https://issues.apache.org/jira/browse/ODE-87
> Project: Apache Ode
> Issue Type: Bug
> Components: JBI Integration
> Affects Versions: Incubator
> Reporter: Alex Boisvert
> Assigned To: Maciej Szefler
> Fix For: Incubator
>
>
> Alexander Logvinov <al...@softech.ru> reported on ode-user@ the following bug on 12/22/06:
> Hi,
> I've got a problem with handling SOAP fault in my BPEL process.
> I run ODE as a service engine in Servicemix.
> My BPEL process calls the web service that runs in Tomcat. The service is implemented using XFire.
> It has the following operation (this WSDL is generated by XFire):
> <wsdl:portType name="WarehousePortType">
> <wsdl:operation name="OrderBook">
> <wsdl:input name="OrderBookRequest" message="tns:OrderBookRequest"/>
> <wsdl:output name="OrderBookResponse" message="tns:OrderBookResponse"/>
> <wsdl:fault name="OrderException" message="tns:OrderException"/>
> </wsdl:operation>
> </wsdl:portType>
> that can throw the following fault:
> <wsdl:message name="OrderException">
> <wsdl:part name="OrderException" element="tns:OrderException"/>
> </wsdl:message>
> ... of the following type:
> <xsd:complexType name="OrderException">
> <xsd:sequence>
> <xsd:element minOccurs="0" name="orderMessage" nillable="true" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> <xsd:element name="OrderException" type="tns:OrderException"/>
> My BPEL invokes this operation with the following code:
> <scope name="Scope1">
> <faultHandlers>
> <catchAll>
> <empty/>
> </catchAll>
> </faultHandlers>
> <invoke name="callWarehouse"
> partnerLink="warehousePartnerLink"
> operation="OrderBook"
> portType="warehouse:WarehousePortType"
> inputVariable="orderBookIn"
> outputVariable="orderBookOut"/>
> </scope>
> The service replies with the following fault:
> <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soap:Body>
> <soap:Fault>
> <faultcode>soap:Server</faultcode>
> <faultstring>unknown book: Design Patterns</faultstring>
> <detail>
> <OrderException xmlns="http://Warehouse.HelloBook.softech.com">
> <orderMessage>There was an error processing the order.</orderMessage>
> </OrderException>
> </detail>
> </soap:Fault>
> </soap:Body>
> </soap:Envelope>
> The log contains the following:
> It receives the full SOAP message from the server:
> 21:44:44,508 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "HTTP/1.1 500 Internal Server Error[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Content-Type: text/xml;charset=UTF-8[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Transfer-Encoding: chunked[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Date: Fri, 22 Dec 2006 18:44:44 GMT[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Server: Apache-Coyote/1.1[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Connection: close[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "1"
> 21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "e"
> 21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "9"
> 21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "[\r]"
> 21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 69 | << "[\n]"
> 21:44:44,539 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>unknown book: Design Patterns</faultstring><detail><OrderException xmlns="http://Warehouse.HelloBook.softech.com"><orderMessage>There was an error processing the order.</orderMessage></OrderException></detail></soap:Fault>&
> lt;/soap:Body></soap:Envelope>"
> Then the fault message is truncated and the JBI message will not contain faultstring and faultcode:
> 21:44:44,555 | DEBUG | Thread-12 | DeliveryChannelImpl | .messaging.DeliveryChannelImpl 300 | Accepted: InOut[
> id: ID:alogvinov-3320-1166813006883-6:0
> status: Active
> role: consumer
> service: {http://Warehouse.HelloBook.softech.com}Warehouse
> endpoint: WarehouseHttpPort
> operation: {http://Warehouse.HelloBook.softech.com}OrderBook
> in: <?xml version="1.0" encoding="UTF-8"?><OrderBook xmlns="http://Warehouse.HelloBook.softech.com" xmlns:warehouse="http://Warehouse.HelloBook.softech.com">
> <customerID>123</customerID>
> <bookName>Design Patterns</bookName>
> </OrderBook>
> fault: <?xml version="1.0" encoding="UTF-8"?><OrderException xmlns="http://Warehouse.HelloBook.softech.com"><orderMessage>There was an error processing the order.</orderMessage></OrderException>
> ]
> After a while I've got an error:
> 21:44:44,899 | ERROR | pool-3-thread-2 | Receiver | org.apache.ode.jbi.Receiver$1 192 | Error processing JBI message.
> java.lang.AssertionError: todo
> at org.apache.ode.jbi.OdeConsumer$2.call(OdeConsumer.java:199)
> at org.apache.ode.jbi.OdeConsumer$2.call(OdeConsumer.java:183)
> at org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.execTransaction(QuartzSchedulerImpl.java:212)
> at org.apache.ode.jbi.OdeConsumer.outResponse(OdeConsumer.java:182)
> at org.apache.ode.jbi.OdeConsumer.onJbiMessageExchange(OdeConsumer.java:134)
> at org.apache.ode.jbi.JbiMessageExchangeEventRouter.onJbiMessageExchange(JbiMessageExchangeEventRouter.java:40)
> at org.apache.ode.jbi.Receiver$1.run(Receiver.java:190)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> at java.util.concurrent.FutureTask.run(FutureTask.java:123)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> It seems that it is raised by the following code in OdeConsumer.java
> Fault jbiFlt = jbiMex.getFault();
> if (jbiFlt != null) {
> // TODO: How are we supposed to figure out the fault type exactly?
> throw new AssertionError("todo");
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (ODE-87) Fault handling in JBI
Posted by "Matthieu Riou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ODE-87?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthieu Riou closed ODE-87.
----------------------------
> Fault handling in JBI
> ---------------------
>
> Key: ODE-87
> URL: https://issues.apache.org/jira/browse/ODE-87
> Project: Ode
> Issue Type: Bug
> Components: JBI Integration
> Affects Versions: Incubator
> Reporter: Alex Boisvert
> Assignee: Maciej Szefler
> Fix For: Incubator
>
>
> Alexander Logvinov <al...@softech.ru> reported on ode-user@ the following bug on 12/22/06:
> Hi,
> I've got a problem with handling SOAP fault in my BPEL process.
> I run ODE as a service engine in Servicemix.
> My BPEL process calls the web service that runs in Tomcat. The service is implemented using XFire.
> It has the following operation (this WSDL is generated by XFire):
> <wsdl:portType name="WarehousePortType">
> <wsdl:operation name="OrderBook">
> <wsdl:input name="OrderBookRequest" message="tns:OrderBookRequest"/>
> <wsdl:output name="OrderBookResponse" message="tns:OrderBookResponse"/>
> <wsdl:fault name="OrderException" message="tns:OrderException"/>
> </wsdl:operation>
> </wsdl:portType>
> that can throw the following fault:
> <wsdl:message name="OrderException">
> <wsdl:part name="OrderException" element="tns:OrderException"/>
> </wsdl:message>
> ... of the following type:
> <xsd:complexType name="OrderException">
> <xsd:sequence>
> <xsd:element minOccurs="0" name="orderMessage" nillable="true" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> <xsd:element name="OrderException" type="tns:OrderException"/>
> My BPEL invokes this operation with the following code:
> <scope name="Scope1">
> <faultHandlers>
> <catchAll>
> <empty/>
> </catchAll>
> </faultHandlers>
> <invoke name="callWarehouse"
> partnerLink="warehousePartnerLink"
> operation="OrderBook"
> portType="warehouse:WarehousePortType"
> inputVariable="orderBookIn"
> outputVariable="orderBookOut"/>
> </scope>
> The service replies with the following fault:
> <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soap:Body>
> <soap:Fault>
> <faultcode>soap:Server</faultcode>
> <faultstring>unknown book: Design Patterns</faultstring>
> <detail>
> <OrderException xmlns="http://Warehouse.HelloBook.softech.com">
> <orderMessage>There was an error processing the order.</orderMessage>
> </OrderException>
> </detail>
> </soap:Fault>
> </soap:Body>
> </soap:Envelope>
> The log contains the following:
> It receives the full SOAP message from the server:
> 21:44:44,508 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "HTTP/1.1 500 Internal Server Error[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Content-Type: text/xml;charset=UTF-8[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Transfer-Encoding: chunked[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Date: Fri, 22 Dec 2006 18:44:44 GMT[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Server: Apache-Coyote/1.1[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Connection: close[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "1"
> 21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "e"
> 21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "9"
> 21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "[\r]"
> 21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 69 | << "[\n]"
> 21:44:44,539 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>unknown book: Design Patterns</faultstring><detail><OrderException xmlns="http://Warehouse.HelloBook.softech.com"><orderMessage>There was an error processing the order.</orderMessage></OrderException></detail></soap:Fault>&
> lt;/soap:Body></soap:Envelope>"
> Then the fault message is truncated and the JBI message will not contain faultstring and faultcode:
> 21:44:44,555 | DEBUG | Thread-12 | DeliveryChannelImpl | .messaging.DeliveryChannelImpl 300 | Accepted: InOut[
> id: ID:alogvinov-3320-1166813006883-6:0
> status: Active
> role: consumer
> service: {http://Warehouse.HelloBook.softech.com}Warehouse
> endpoint: WarehouseHttpPort
> operation: {http://Warehouse.HelloBook.softech.com}OrderBook
> in: <?xml version="1.0" encoding="UTF-8"?><OrderBook xmlns="http://Warehouse.HelloBook.softech.com" xmlns:warehouse="http://Warehouse.HelloBook.softech.com">
> <customerID>123</customerID>
> <bookName>Design Patterns</bookName>
> </OrderBook>
> fault: <?xml version="1.0" encoding="UTF-8"?><OrderException xmlns="http://Warehouse.HelloBook.softech.com"><orderMessage>There was an error processing the order.</orderMessage></OrderException>
> ]
> After a while I've got an error:
> 21:44:44,899 | ERROR | pool-3-thread-2 | Receiver | org.apache.ode.jbi.Receiver$1 192 | Error processing JBI message.
> java.lang.AssertionError: todo
> at org.apache.ode.jbi.OdeConsumer$2.call(OdeConsumer.java:199)
> at org.apache.ode.jbi.OdeConsumer$2.call(OdeConsumer.java:183)
> at org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.execTransaction(QuartzSchedulerImpl.java:212)
> at org.apache.ode.jbi.OdeConsumer.outResponse(OdeConsumer.java:182)
> at org.apache.ode.jbi.OdeConsumer.onJbiMessageExchange(OdeConsumer.java:134)
> at org.apache.ode.jbi.JbiMessageExchangeEventRouter.onJbiMessageExchange(JbiMessageExchangeEventRouter.java:40)
> at org.apache.ode.jbi.Receiver$1.run(Receiver.java:190)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> at java.util.concurrent.FutureTask.run(FutureTask.java:123)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> It seems that it is raised by the following code in OdeConsumer.java
> Fault jbiFlt = jbiMex.getFault();
> if (jbiFlt != null) {
> // TODO: How are we supposed to figure out the fault type exactly?
> throw new AssertionError("todo");
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (ODE-87) Fault handling in JBI
Posted by "Maciej Szefler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ODE-87?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maciej Szefler resolved ODE-87.
-------------------------------
Resolution: Fixed
Added handling/detection of fault messages.
> Fault handling in JBI
> ---------------------
>
> Key: ODE-87
> URL: https://issues.apache.org/jira/browse/ODE-87
> Project: Apache Ode
> Issue Type: Bug
> Components: JBI Integration
> Affects Versions: Incubator
> Reporter: Alex Boisvert
> Assigned To: Maciej Szefler
> Fix For: Incubator
>
>
> Alexander Logvinov <al...@softech.ru> reported on ode-user@ the following bug on 12/22/06:
> Hi,
> I've got a problem with handling SOAP fault in my BPEL process.
> I run ODE as a service engine in Servicemix.
> My BPEL process calls the web service that runs in Tomcat. The service is implemented using XFire.
> It has the following operation (this WSDL is generated by XFire):
> <wsdl:portType name="WarehousePortType">
> <wsdl:operation name="OrderBook">
> <wsdl:input name="OrderBookRequest" message="tns:OrderBookRequest"/>
> <wsdl:output name="OrderBookResponse" message="tns:OrderBookResponse"/>
> <wsdl:fault name="OrderException" message="tns:OrderException"/>
> </wsdl:operation>
> </wsdl:portType>
> that can throw the following fault:
> <wsdl:message name="OrderException">
> <wsdl:part name="OrderException" element="tns:OrderException"/>
> </wsdl:message>
> ... of the following type:
> <xsd:complexType name="OrderException">
> <xsd:sequence>
> <xsd:element minOccurs="0" name="orderMessage" nillable="true" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> <xsd:element name="OrderException" type="tns:OrderException"/>
> My BPEL invokes this operation with the following code:
> <scope name="Scope1">
> <faultHandlers>
> <catchAll>
> <empty/>
> </catchAll>
> </faultHandlers>
> <invoke name="callWarehouse"
> partnerLink="warehousePartnerLink"
> operation="OrderBook"
> portType="warehouse:WarehousePortType"
> inputVariable="orderBookIn"
> outputVariable="orderBookOut"/>
> </scope>
> The service replies with the following fault:
> <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soap:Body>
> <soap:Fault>
> <faultcode>soap:Server</faultcode>
> <faultstring>unknown book: Design Patterns</faultstring>
> <detail>
> <OrderException xmlns="http://Warehouse.HelloBook.softech.com">
> <orderMessage>There was an error processing the order.</orderMessage>
> </OrderException>
> </detail>
> </soap:Fault>
> </soap:Body>
> </soap:Envelope>
> The log contains the following:
> It receives the full SOAP message from the server:
> 21:44:44,508 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "HTTP/1.1 500 Internal Server Error[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Content-Type: text/xml;charset=UTF-8[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Transfer-Encoding: chunked[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Date: Fri, 22 Dec 2006 18:44:44 GMT[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Server: Apache-Coyote/1.1[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | header | apache.commons.httpclient.Wire 69 | << "Connection: close[\r][\n]"
> 21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "1"
> 21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "e"
> 21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "9"
> 21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "[\r]"
> 21:44:44,524 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 69 | << "[\n]"
> 21:44:44,539 | DEBUG | Thread-13 | content | apache.commons.httpclient.Wire 83 | << "<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>unknown book: Design Patterns</faultstring><detail><OrderException xmlns="http://Warehouse.HelloBook.softech.com"><orderMessage>There was an error processing the order.</orderMessage></OrderException></detail></soap:Fault>&
> lt;/soap:Body></soap:Envelope>"
> Then the fault message is truncated and the JBI message will not contain faultstring and faultcode:
> 21:44:44,555 | DEBUG | Thread-12 | DeliveryChannelImpl | .messaging.DeliveryChannelImpl 300 | Accepted: InOut[
> id: ID:alogvinov-3320-1166813006883-6:0
> status: Active
> role: consumer
> service: {http://Warehouse.HelloBook.softech.com}Warehouse
> endpoint: WarehouseHttpPort
> operation: {http://Warehouse.HelloBook.softech.com}OrderBook
> in: <?xml version="1.0" encoding="UTF-8"?><OrderBook xmlns="http://Warehouse.HelloBook.softech.com" xmlns:warehouse="http://Warehouse.HelloBook.softech.com">
> <customerID>123</customerID>
> <bookName>Design Patterns</bookName>
> </OrderBook>
> fault: <?xml version="1.0" encoding="UTF-8"?><OrderException xmlns="http://Warehouse.HelloBook.softech.com"><orderMessage>There was an error processing the order.</orderMessage></OrderException>
> ]
> After a while I've got an error:
> 21:44:44,899 | ERROR | pool-3-thread-2 | Receiver | org.apache.ode.jbi.Receiver$1 192 | Error processing JBI message.
> java.lang.AssertionError: todo
> at org.apache.ode.jbi.OdeConsumer$2.call(OdeConsumer.java:199)
> at org.apache.ode.jbi.OdeConsumer$2.call(OdeConsumer.java:183)
> at org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.execTransaction(QuartzSchedulerImpl.java:212)
> at org.apache.ode.jbi.OdeConsumer.outResponse(OdeConsumer.java:182)
> at org.apache.ode.jbi.OdeConsumer.onJbiMessageExchange(OdeConsumer.java:134)
> at org.apache.ode.jbi.JbiMessageExchangeEventRouter.onJbiMessageExchange(JbiMessageExchangeEventRouter.java:40)
> at org.apache.ode.jbi.Receiver$1.run(Receiver.java:190)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> at java.util.concurrent.FutureTask.run(FutureTask.java:123)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> It seems that it is raised by the following code in OdeConsumer.java
> Fault jbiFlt = jbiMex.getFault();
> if (jbiFlt != null) {
> // TODO: How are we supposed to figure out the fault type exactly?
> throw new AssertionError("todo");
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira