11-08-05 11:20 PM
I found the issue - the intialization of the orderItem message used the wron
g
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></Order
ID><ProductID></ProductID><Price></Price><Quantity></Quantity></ns0:OrderIte
m>");
> 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()='Order
Item'
> 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()='OrderIt
em'
> and
> namespace-uri()='http://Avanade.BizTalk.CSS.Schema.OrderItem']/*[local
-name()='Price' and namespace-uri()='']" />
> <b:property name="ns0:Quantity" xpath="/*[local-name()='Orde
rItem'
> 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>
>
[ Post a follow-up to this message ]
|