BPEL activity Validate does not give validation error message to fault - oracle11g

we use Validate activity in our BPEL processes to validate input and output messages like this:
<validate name="validateInput" variables="inputVariable"/>
It works fine, but when an validation error occurs, the consumer gets only this kind of fault:
<env:Fault xmlns:ns0="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
<faultcode>ns0:invalidVariables</faultcode>
<faultstring>faultName: {{http://docs.oasis-open.org/wsbpel/2.0/process/executable}invalidVariables}
messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}</faultstring>
<faultactor/>
<detail>
<exception/>
</detail>
</env:Fault>
So my consumer knows that he sent invalid message but he gets no information at all about what exactly went wrong.
In Enterprise manager I can see the validation error message with the reason why the message failed the validation:
Invalid data: The value for variable "inputVariable", part "payload"
does not match the schema definition for this part Element 'ptSrcIdx'
not expected.
I need to return this validation error message to my consumer so he can see what was wrong with his message.
I will appreciate any help. Thanks!

It seems Oracle has some patch for this issue, also it should be ok in 11.1.1.7.
In the meantime we use our own validator written in java and called from Embed Java BPEL activity. It is little slower (cca +20%) but works fine.

Related

Promoting fields in HL7v2 Schemas for use in Correlation Sets

Say I were to create a promoted property on an HL7 v2 schema. I want to use this promoted property in order to correlate two messages in a parallel convoy. I did a dummy application without using HL7 schemas and all worked just as expected. To sum up what I did, see this tutorial.
It's actually quite simple, which is why I'm wondering there is a catch when it comes to the HL7 schemas.
I created the PropertySchema, Promoted the field I'm after in the HL7 body schema, everything compiled and deployed fine, I ran a query for the subscriptions on my receive ports and they look OK
http://schemas.microsoft.com/BizTalk/2003/system-properties.ReceivePortID == {D2F99A76-E28A-4B3E-AC52-F4E2F92453C3}
And
http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType == http://microsoft.com/HealthCare/HL7/2X#ORU_ALL_25_GLO_DEF
And
https://myNS.ECGCorrelationPropertySchema.CommonAccessionID Exists
However, I get a
The published message could not be routed because no subscribers were found. This error occurs if the subscribing orchestration or send port has not been enlisted, or if some of the message properties necessary for subscription evaluation have not been promoted.
and looking in the Biztalk Group admin console, when I view the suspended messages, I don't see that the property has been promoted
Edit to add message context
Error Report Context
I have checked and double-checked, the schemas are there, there are duplicate schemas the Event log even shows A message was received of type http://microsoft.com/HealthCare/HL7/2X#ORU_ALL_25_GLO_DEF when I receive a message.
So now, I guess I have 2 questions:
If the promotions were happening successfully, would they show in the Message --> Context dialog (they did in my non-HL7 dummy app)
If they aren't supposed to show, is there a setting/property/anything somewhere I missed that is unique to using HL7v2 schemas?
Short answers:
1. Yes, provided this message came directly from the Receive Pipeline
2. No, once emitted from the disassembler, there is nothing special about an HL7 Message.
Make sure you're looking at the actual Suspended Message and not the Error Report. The best way to check this is to Stop, don't Unenlist, the Orchestration. The Message will then suspend Resumable.

Using Standard WF activities to access a web service - how to set 'expected namespace'?

I am attempting to connect to a .Net 1.0 web service using standard activities in WF 4.0.
I am using the SendandReceiveReplyFactory - the send portion seems to be working - however the ReceiveReplyForSend is for some reason expecting a tempuri.org namespace response rather than the www.thermo.com/informatics/xmlns/limswebservice namespace.
Could anyone instruct me on how I can cause the activity to expect the correct NS.
Thanks in advance for your help.
All the best,
DJ
Error Message:
Workflow Console: Starting Workflow... Send Done Workflow
3fdc4d67-dcac-4092-b34b-9c347acdfe22 Terminated. Exception:
System.ServiceModel.CommunicationException Error in deserializing body
of reply message for operation 'Process'. OperationFormatter
encountered an invalid Message body. Expected to find node type
'Element' with name 'ProcessResponse' and namespace
'http://tempuri.org/'. Found node type 'Element' with name
'ProcessResponse' and namespace
'http://www.thermo.com/informatics/xmlns/limswebservice' Workflow
Console: Workflow Completed
The answer is to specify the namespace in the ServiceContractName Property of the 'Send' Activity using the following syntax '{http://someserver.org/test/}FileService ' in my case '{http://www.thermo.com/informatics/xmlns/limswebservice}LIMSSoap' . The syntax was sensitive to the trailing slash so a little trial and error was needed.
Many thanks to the contributors to WF4 - How to consume external web service? for the answer.

Procedure or function 'Itinerary_getitinerary' expects parameter '#name', which was not supplied

I am using your BRI extension and got the following error. How can I debug this? Thanks!
Procedure or function 'Itinerary_getitinerary' expects parameter '#name', which was not supplied.
For debugging, your best bet is to enable ESB Toolkit tracing: http://midheach.wordpress.com/2011/02/28/tracing-with-esb-toolkit-2-1/
This will cause ESB Toolkit to output debugging messages to the event log as it processes a message.
As for your specific error message, either the resolver connection string is wrong or the BRE policy rule has an error that is causing itinerary resolution to fail.

'Error #2006: Supplied index out of bounds' when invoking RPC service

I've got to invoke a RPC service, and all the parameters sent are String. It works quite well when the data is relatively small, but when one of the string grows to the size about 10 or over hundred KB, immediately after the service is invoked, it goes to the error handler:
[FaultEvent fault=[RPC Fault faultString="Error #2006: The supplied index is out of bounds." faultCode="InvokeFailed" faultDetail="null"] messageId="85CF2FB3-E79D-779F-87F9-B04520318D3A" type="fault" bubbles=false cancelable=true eventPhase=2]
And the server side still got invoked, and when it returns the result, error raised:
Error: Command already finished executing: [object AsyncTokenCommand]
Google says error #2006 may because of too many hierarchy levels, which seems impossible to me because all my parameters are string. And I also don't have the chance to mistake on index.
I first thought it was because the string sent is too long, I segmented it and sent in a list, but didn't work.
Thanks in advance if you guys can give any help.
Finally got it right.
It was because I turned on the Network Monitor in Flash Builder.
Everything OK after it's off.

Error on deserialization of Array Collection in Flex: RangeError: Error #2006

I am getting this error during serialization:
RangeError: Error #2006: The supplied
index is out of bounds.
The error occurs in AbstractMessage.as when it attempts to read input of timestamp.
After that my fault handler gets this error:
faultCode:Server.Acknowledge.Failed
faultString:'Didn't receive an
acknowledge message' faultDetail:'Was
expecting
mx.messaging.messages.AcknowledgeMessage,
but received null'
It appears to be happening as a result of an ArrayCollection coming back from the server.
Is it necessary to create custom classes to handle serialization of ArrayCollections with custom objects as shown here?
I've also followed the serialization recommendations here with no luck.
Thanks for your help!
The solution was correcting a mistake in writeExternal on the Java side. I was being very careful about the order of serialization but was writing an int as an object using writeObject. This will cause errors in completely unrelated code on the client side after it tries to readInt.
I just experienced this error myself, and it turns out it is caused by the Flash Builder Network monitor being enabled!! FB 4.0.1 this is.
I was going nuts for not finding the reason, so sharing it here for your peace of mind.

Resources