April 6, 2006 at 5:23 PM #14460
I am trying to add correlation to my orch. Following the steps of Biztalk tutorial I get
Exception thrown from: segment 6, progress 10
Inner exception: Failed to initialize the correlation property name: BuyerRef namespace: http://Telenor_B2B_Integration.NebiCorrelationProperty from message: NewOrderNEBIPayload.
Exception type: CorrelationViolationException
Target Site: Void InitializeFromMsg(Microsoft.XLANGs.BaseTypes.XLANGMessage, Microsoft.XLANGs.Core.XlangStore)
Whereas, following the article on http://geekswithblogs.net/cyoung/articles/17364.aspx
Exception thrown from: segment 6, progress 10
Inner exception: A failure occurred while evaluating the property Telenor_B2B_Integration.BuyerRef against the message part data. The message part data does not contain at least one of the nodes specified by the XPath expression (listed below) that corresponds to the property. The cause for this error may be that the message part data has not been initialized or that the message part data does not conform to the message part schema. Ensure that the message part data is initialized correctly. XPath expression: /*[local-name()=’Order’ and namespace-uri()=’urn:telenor:tbl:netbusiness:1.0′]/*[local-name()=’OrderBody’ and namespace-uri()=’urn:telenor:tbl:netbusiness:1.0′]/*[local-name()=’BusinessObjectRef’ and namespace-uri()=’urn:telenor:tbl:netbusiness:1.0′]/*[local-name()=’BuyerRef’ and namespace-uri()=’urn:telenor:tbl:netbusiness:1.0′]
Exception type: XPathUpdateException
Target Site: Void SetPayloadProperty(Microsoft.XLANGs.RuntimeTypes.PropertyDefinition, System.Object)
There should be some reasonable explanation why searching the web I see just blogs where people ask the same question, but it seems like the answer – is a VERY BIG SECRET. 😕
Please, any help to a desparate girl will be very much appreciated!
April 6, 2006 at 5:25 PM #14461
To a *desperate* girl, of course. 😳
April 7, 2006 at 11:10 AM #14462
Kindly thank you!
>> The problem appears to be, there is no BuyerRef data in the message.
Do you make such a conclusion based on the first exception, or on the second one?
>> Are you able to view the suspended message with the Biztalk Administrator?
The message itself is fine, it contains <BuyerRef>1</BuyerRef> as expected.
>> How was the Order message created?
That is the tricky part. I construct an intermidiate message -NewOrderPayload- with a map, then I call C# class in a MessageAssign shape where the final order message -NewOrderNEBIPayload- is constructed. NewOrderNEBIPayload is just a wrapper for NewOrderPayload.
According to the protocol, this message contains no prefixes (meaning no \”ns0:\”). Therefore I have to use NewOrderNEBIPayload(XMLNORM.AllowUnrecognizedMessage) = true;
in order to be able to send it via XMLTransmit pipeline.
In the same MessageAssign shape (following Flexible Correlation approach) I set
when the NewOrderNEBIPayload is constructed just being paranoid.
What I’d really like to understand is why can’t I simply use basic Correlation set in the first place (only Flexible seems to be working) and why do I have to initialize the BuyerRef property directly.
April 7, 2006 at 3:28 PM #14463
>> My guess would be by changing the message to NewOrderNEBIPayload in the C# class, this message no longer matches the schema.
You were very much right about it. Fixed this one with a proper map as you suggested. /*It is my honor to pass along to you a virtual handshake from our team*/
>> Can you explain what your C# class does to the message.
Another durty trick from us.
We have ebXML communication with the service provider. ebXML is basically XML with attachments. Each ebXML messages in the attachment contains a NEBI payload where one of the fields contains the actual XML payload as a string. Why make the life simple, right?
We couldn’t find the way to construct and send those messages from BizTalk directly. So what we do: we use C# \”servlet\” to create ebXML out of NEBI payload. This ebXML should be re-send if we do not get ACK whithin 5 minutes. So we need to use the correlation. This approach has a number of issues yet to be resolved.
The most critical one: how to pass a parameter to a servlet via http send port together with the xml itself. /*Hope I’m not too greedy here asking too many questions. This is the last one!*/
>> If you wish to create an output message with no namespaces then you can just clear the target namespace property on the <schema> node of your schema.
Worked for NEBI payload. Thanks! Will not work for the inner payload because we cannot alter the schema from the Webservice provider, I’m afraid. So the cleaning is left to the servlet.
April 10, 2006 at 10:34 AM #14464
>> If you want to embed a message as an Xml string into a Xml node of another message you can use this trick in a message assignment shape:
Oh! Will keep this one in mind for the future.
>> How are you passing the parameter to the servlet. Is it in the QueryString
Yes, we would pursue this approach if we can. Can we? How can we pass from our orch an xml payload message *and* some conversationID which is of string type?
April 12, 2006 at 12:18 PM #14465
Just to let you know:
It’s an ideal solution for us. Simple and elegant. Everybody is happy 😀 Thank you once again for your time and kind attitude to beginners!
As a reminder to ourselves (or anyone who will follow up): the orch should contain a configuraqtion for dynamic port
DynamicSendPort(Microsoft.XLANGs.BaseTypes.Address) = \”http://server/ebXml/servlet.jsp?\” + strParameter;
April 6, 2006 at 9:27 PM #14466
When you send a message and initialize a correlation, the data that you are correlating on, in this case the BuyerRef field, is extracted from the message and stored by the orchestration.
The problem appears to be, there is no BuyerRef data in the message.
Are you able to view the suspended message with the Biztalk Administrator?
How was the Order message created?
April 7, 2006 at 11:38 AM #14467
My guess would be by changing the message to NewOrderNEBIPayload in the C# class, this message no longer matches the schema.
The property definition for BuyerRef uses an Xpath string which is specific to the schema and will only work if the message matches the schema.
If the xpath reference is invalid then you do not have access to the property field within the message – hence the errors
Can you explain what your C# class does to the message.
You say the message has no prefixes – does this mean you have removed the namespaces altogether or used removed the prefixes i.e using the default namespace.
It should be possible to create a schema for NewOrderNEBIPayload and map directly to this schema, eliminating the intermediate message and C# class. If you wish to create an output message with no namespaces then you can just clear the target namespace property on the <schema> node of your schema.
April 8, 2006 at 1:05 AM #14468
If you want to embed a message as an Xml string into a Xml node of another message you can use this trick in a message assignment shape:
[code:1:e6d251cdc5]xmlDocVariable = innerMessage;
xpath(outerMessage, \"xpath to node\") = xmlDocVariable.DocumentElement.OuterXml[/code:1:e6d251cdc5]
How are you passing the parameter to the servlet
Is it in the QueryString
Or is it in the Http header
April 10, 2006 at 7:48 PM #14469
Sending the parameter should be fairly easy.
You can use a dynamic send port and set the Url in your orchestartion
[code:1:89f7ef210e]message(BTS.OutboundTransportType) = \"HTTP\"
message(BTS.OutboundTransportLocation) = \"http://server/ebXml/servlet.jsp?\" + strParameter[/code:1:89f7ef210e]
You might have a problem receiving a querystring parameter. Because the querystring is part of the Url, you need to configure an Http receive location for each possible querystring – this would be impossible using a dynamic querystring like ConversationId
You could create your own custom HTTP adapter, to handle this situation
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.