BizTalk Server Orchestration - My orchestration fails with an XPathUpdateException, please help!

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > November 2005 > My orchestration fails with an XPathUpdateException, please help!





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author My orchestration fails with an XPathUpdateException, please help!
ellcon

2005-11-08, 6:20 pm

Hi everyone,
Within my orchestration I have assign shape - it is using xpath to assign
values to a schema called 'orderItem'. Here is the code:
----------------------------------------------------
xmlDoc = new System.Xml.XmlDocument();
xmlDoc.LoadXml("<ns0:OrderItem
xmlns:ns0=\"http://Avanade.CSS.BizTalk.Schema.OrderItem\"><OrderID></OrderID><ProductID></ProductID><Price></Price><Quantity></Quantity></ns0:OrderItem>");
orderItem = xmlDoc;

orderItem(Avanade.BizTalk.CSS.Schema.PropertySchema.OrderID)=
System.Convert.ToInt32(orderId);
orderItem(Avanade.BizTalk.CSS.Schema.PropertySchema.Price)=
System.Convert.ToDecimal(tools.GetXPathValue(singleOrder,"*/OrderItem[" +
System.Convert.ToString(orderItemIndex) + "]/Price"));
orderItem(Avanade.BizTalk.CSS.Schema.PropertySchema.ProductID)=
System.Convert.ToInt32(tools.GetXPathValue(singleOrder,"*/OrderItem[" +
System.Convert.ToString(orderItemIndex) + "]/ProductID"));
orderItem(Avanade.BizTalk.CSS.Schema.PropertySchema.Quantity)=
System.Convert.ToInt32(tools.GetXPathValue(singleOrder,"*/OrderItem[" +
System.Convert.ToString(orderItemIndex) + "]/Quantity"));
----------------------------------------------------------------

I've narrowed down to this expession as being the one that throws the
exception:
orderItem(Avanade.BizTalk.CSS.Schema.PropertySchema.OrderID) =
In fact, any of the PropertySchema calls fails (this is just the first of
them). I've checked and rechecked my OrderItem Schema, and will post it
below. The quick promotion of all the fields are named correctly and look
fine.
Here are some things I have done:
-Re-versioned my schema assembly and given it a new strong name key.
-Restarted IIS and Biztalk server services (multiple times)
-demoted all promoted elements, deleted the propertyschema.xsd, then
re-promoted the elements
- undeployed and redeployed numerous times.

Here is the code to my OrderItem schema, and thank you in advance:
---------------------------------------------------
<?xml version="1.0" encoding="utf-16"?>
<xs:schema
xmlns:ns0="http://Avanade.BizTalk.CSS.Schema.PropertySchema.PropertySchema"
xmlns="http://Avanade.BizTalk.CSS.Schema.OrderItem"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://Avanade.BizTalk.CSS.Schema.OrderItem"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<b:imports>
<b:namespace prefix="ns0"
uri="http://Avanade.BizTalk.CSS.Schema.PropertySchema.PropertySchema"
location=".\propertyschema.xsd" />
</b:imports>
</xs:appinfo>
</xs:annotation>
<xs:element name="OrderItem">
<xs:annotation>
<xs:appinfo>
<b:properties>
<b:property name="ns0:OrderID" xpath="/*[local-name()='OrderItem'
and
namespace-uri()='http://Avanade.BizTalk.CSS.Schema.OrderItem']/*[local-name()='OrderID' and namespace-uri()='']" />
<b:property name="ns0:ProductID"
xpath="/*[local-name()='OrderItem' and
namespace-uri()='http://Avanade.BizTalk.CSS.Schema.OrderItem']/*[local-name()='ProductID' and namespace-uri()='']" />
<b:property name="ns0:Price" xpath="/*[local-name()='OrderItem'
and
namespace-uri()='http://Avanade.BizTalk.CSS.Schema.OrderItem']/*[local-name()='Price' and namespace-uri()='']" />
<b:property name="ns0:Quantity" xpath="/*[local-name()='OrderItem'
and
namespace-uri()='http://Avanade.BizTalk.CSS.Schema.OrderItem']/*[local-name()='Quantity' and namespace-uri()='']" />
</b:properties>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="OrderID" type="xs:positiveInteger" />
<xs:element name="ProductID" type="xs:positiveInteger" />
<xs:element name="Price" type="xs:decimal" />
<xs:element name="Quantity" type="xs:integer" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

ellcon

2005-11-08, 6:20 pm

I found the issue - the intialization of the orderItem message used the wrong
schema
Thanks!

"ellcon" wrote:

> Hi everyone,
> Within my orchestration I have assign shape - it is using xpath to assign
> values to a schema called 'orderItem'. Here is the code:
> ----------------------------------------------------
> xmlDoc = new System.Xml.XmlDocument();
> xmlDoc.LoadXml("<ns0:OrderItem
> xmlns:ns0=\"http://Avanade.CSS.BizTalk.Schema.OrderItem\"><OrderID></OrderID><ProductID></ProductID><Price></Price><Quantity></Quantity></ns0:OrderItem>");
> orderItem = xmlDoc;
>
> orderItem(Avanade.BizTalk.CSS.Schema.PropertySchema.OrderID)=
> System.Convert.ToInt32(orderId);
> orderItem(Avanade.BizTalk.CSS.Schema.PropertySchema.Price)=
> System.Convert.ToDecimal(tools.GetXPathValue(singleOrder,"*/OrderItem[" +
> System.Convert.ToString(orderItemIndex) + "]/Price"));
> orderItem(Avanade.BizTalk.CSS.Schema.PropertySchema.ProductID)=
> System.Convert.ToInt32(tools.GetXPathValue(singleOrder,"*/OrderItem[" +
> System.Convert.ToString(orderItemIndex) + "]/ProductID"));
> orderItem(Avanade.BizTalk.CSS.Schema.PropertySchema.Quantity)=
> System.Convert.ToInt32(tools.GetXPathValue(singleOrder,"*/OrderItem[" +
> System.Convert.ToString(orderItemIndex) + "]/Quantity"));
> ----------------------------------------------------------------
>
> I've narrowed down to this expession as being the one that throws the
> exception:
> orderItem(Avanade.BizTalk.CSS.Schema.PropertySchema.OrderID) =
> In fact, any of the PropertySchema calls fails (this is just the first of
> them). I've checked and rechecked my OrderItem Schema, and will post it
> below. The quick promotion of all the fields are named correctly and look
> fine.
> Here are some things I have done:
> -Re-versioned my schema assembly and given it a new strong name key.
> -Restarted IIS and Biztalk server services (multiple times)
> -demoted all promoted elements, deleted the propertyschema.xsd, then
> re-promoted the elements
> - undeployed and redeployed numerous times.
>
> Here is the code to my OrderItem schema, and thank you in advance:
> ---------------------------------------------------
> <?xml version="1.0" encoding="utf-16"?>
> <xs:schema
> xmlns:ns0="http://Avanade.BizTalk.CSS.Schema.PropertySchema.PropertySchema"
> xmlns="http://Avanade.BizTalk.CSS.Schema.OrderItem"
> xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
> targetNamespace="http://Avanade.BizTalk.CSS.Schema.OrderItem"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:annotation>
> <xs:appinfo>
> <b:imports>
> <b:namespace prefix="ns0"
> uri="http://Avanade.BizTalk.CSS.Schema.PropertySchema.PropertySchema"
> location=".\propertyschema.xsd" />
> </b:imports>
> </xs:appinfo>
> </xs:annotation>
> <xs:element name="OrderItem">
> <xs:annotation>
> <xs:appinfo>
> <b:properties>
> <b:property name="ns0:OrderID" xpath="/*[local-name()='OrderItem'
> and
> namespace-uri()='http://Avanade.BizTalk.CSS.Schema.OrderItem']/*[local-name()='OrderID' and namespace-uri()='']" />
> <b:property name="ns0:ProductID"
> xpath="/*[local-name()='OrderItem' and
> namespace-uri()='http://Avanade.BizTalk.CSS.Schema.OrderItem']/*[local-name()='ProductID' and namespace-uri()='']" />
> <b:property name="ns0:Price" xpath="/*[local-name()='OrderItem'
> and
> namespace-uri()='http://Avanade.BizTalk.CSS.Schema.OrderItem']/*[local-name()='Price' and namespace-uri()='']" />
> <b:property name="ns0:Quantity" xpath="/*[local-name()='OrderItem'
> and
> namespace-uri()='http://Avanade.BizTalk.CSS.Schema.OrderItem']/*[local-name()='Quantity' and namespace-uri()='']" />
> </b:properties>
> </xs:appinfo>
> </xs:annotation>
> <xs:complexType>
> <xs:sequence>
> <xs:element name="OrderID" type="xs:positiveInteger" />
> <xs:element name="ProductID" type="xs:positiveInteger" />
> <xs:element name="Price" type="xs:decimal" />
> <xs:element name="Quantity" type="xs:integer" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com