Home Page › Forums › BizTalk 2004 – BizTalk 2010 › error in expression shape
- This topic has 1 reply, 1 voice, and was last updated 9 years, 3 months ago by
community-content.
-
AuthorPosts
-
-
March 14, 2009 at 3:44 AM #21917
I am debatching a message into xml documents and I am writing a code in the expression shape which is
Variable_line1 = System.Convert.ToInt64(xpath(SQLMessage, “Count(//TEMS_SQL/Record/SubRecord/LINE)”));
Variable_line2 = System.String.Format(“//TEMS_SQL/Record/SubRecord/LINE{0}”, Variable_line3);
and in msg assignment shape i have the code
Variable_4= xpath(SQLMessage, Variable_line2);
Message_2 = Variable_4;
when I am doing this its giving me an error
Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘TEMSInt.TemsOrchestration(10e74d9f-953f-b28d-425d-5fdbee10e5c7)’.
The service instance will remain suspended until administratively resumed or terminated.
If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: 9a75cb30-a8c6-4253-9be7-a81f3f32c0b1
Shape name: Expression_2
ShapeId: 476b225c-411b-48b8-91b7-23a24db0dc29
Exception thrown from: segment 1, progress 19
Inner exception: Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.
Exception type: XPathException
Source: System.Xml
Target Site: MS.Internal.Xml.XPath.Query get_QueryTree()
The following is a stack trace that identifies the location where the exception occuredat MS.Internal.Xml.XPath.CompiledXpathExpr.get_QueryTree()
at System.Xml.XPath.XPathNavigator.Evaluate(XPathExpression expr, XPathNodeIterator contextdoes anyone know how to solve this problem.
Thanks
-
March 16, 2009 at 1:57 PM #21923
First, you might move the Count to a different expression shape to isolate if it’s the statement bombing, or if it is the next xpath.
It might just be telling you that your Xpath was not found. You might need add namespaces, and use the long nasty form of the XPath, something like this:
/*[local-name()=’TEMS_SQL and namespace-uri()=’http://YourNamespace]/*%5Blocal-name()=’Record’ and namespace-uri()=’http://YourNamespace’%5D/*%5Blocal-name()=’SubRecord’ and namespace-uri()=’http://YourNamespace’%5D/*%5Blocal-name()=’SubReocrd’ and namespace-uri()=’http://YourNamespace’%5D
You can copy/paste the namespace from the properties in the schema. Did you build the schema, or was it auto-generated by SQL adapter or something like that?
See this blog: http://nealwalters.blogspot.com/2005_01_01_archive.html
Neal
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.