Friday, May 15, 2009

ActiveBPEL Exceptions Tricky

Platform: ActiveBPEL 3.1 + Tomcat 5.5.27 + Java2 SDK 1.4.2_18
The message part 'response' produced the following error during validation: cvc-complex-type.2.4.a: Invalid content was found starting with element 'vehicle'. One of '{company}' is expected.) :...

This happens when the given message is different from defined message in WSDL. Note that the order of the elements is very important: it has to be the exact same order as defined in WSDL. In BPEL, the order of Copy/To decides the order of elements appear in the message. Thus make sure the copy order is exactly the same as the element order defined in WSDL.

Error executing SOAP-RPC request. Operation not found for: bookRequest

Check if the process has been triggered and become active. If not, it's possibly caused by SOAP style type mismatch. When generating the BPP file, last step is select Binding style: mostly either Document Literal or RPC Encoding. Must select the one which is the same as defined in WSDL

Reason: WSDLException (at /schema): faultCode=INVALID_WSDL: Expected element '{http://schemas.xmlsoap.org/wsdl/}definitions'.:

The incorrect referencing the location of those XSD, WSDL documents. BPP finds the documents by referring to catalog.xml which is generated when making BPR file. So MUST generate the BPR file by using Designer to ensure consistency.

org.xml.sax.SAXException: Deserializing parameter 'clientRequest': could not find deserializer for type {http://www.travelAgent.com/book/schema}requestOrderType

XML parser could not deserialize the message. It maybe caused by given message is different from what the parser expects. For example, the client may calls WS_1 by using WS_2's endpoint address. So message types mismatch and thus could not be deserialized.

Completed with fault: missingRequest (No matching receive for reply) :  [/process/flow/reply[@name='ReplyConfirmToCustomer']] [f]

Or

org.activebpel.rt.bpel.impl.AeBpelException: No matching receive for reply

In general however you can only reply to a Receive activity once and then that thread is closed so there is no longer anything to reply to. For example start the process with an onMessage and then in the onMessage container you reply to the receive. Once you have done that then all the replies in the Fault handlers become invalid.

http://localhost/active-bpel/SOAPMonitor --> not running or capturing anything!

Enabled the Soap Monitor in ActiveBPEL by editing $CATALINA_HOME/shared/classes/ae-server-config.wsdd