Question

garo-2 on Fri, 28 Mar 2014 17:40:51


Hi all,

I have a custom schema that i have added to the resource section in the BizTalk Services portal.  When I use it in a property promotion (xPath), and I deploy the agreement, the deployment fails with the message:

Error: An error occurred while deploying the agreement. Details: Service was invoked with wrong arguments.

If I change my custom schema in the property promotion schema drop down and use a Microsoft schema like "X12_00501_855.xsd" the deployment succeeds (even if the xPath is not correct). I created my schema using Visual Studio 2012 BS schema editor and I get the xPath from the Instance xPath field in the properties.  I have narrow it down to my schema. My schema is a very basic schema created with VS Tools used in all the demos and examples:

  <?xml version="1.0" encoding="utf-16" ?>
- <xs:schema xmlns="http://EDI.Maps.Schema1" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://EDI.Maps.Schema1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:element name="Aaaaa">
- <xs:complexType>
- <xs:sequence>
  <xs:element name="Bbbbb" type="xs:string" />
  </xs:sequence>
  </xs:complexType>
  </xs:element>

 </xs:schema>

I notice that on the resources page, my custom schema does not has a XML DOCTYPE:



Thanks in advance


garo



Sponsored



Replies

Mohit Kumar Gupta on Mon, 31 Mar 2014 10:32:25


Hi

are you doing property promotion by creating property schema ?

if yes , then as per my knowledge it is not right way to do .

There is Enrich Stage in the bridge that you can use to promote a field by using Xpath .

Refer Article

Regards

Mohit Gupta

garo-2 on Mon, 31 Mar 2014 14:10:40


Hi Mohit,

I am using Azure BizTalk Services.  I am using the property promotion that is part of an X12 agreement UI/screen.  In the X12 agreement I go to > Send Setting > Transform > in the transform screen Promotion properties.  That is where I am doing the promotion from in the UI/screen of the X12 agreement: 

I am not using a Bridge that I added through Visual Studio.  I am using the default Send Bridge created by the X12 agreement.  I am not sure if this bridge is accessible in Visual studio, and it may only be accessible from the agreement screen. Every time I try to deploy the agreement it fails with the message describe above.  If I remove the property promotion, and deploy it, it works.  In fiddler, I can see the posted message sent to the server and I see that the message type of my schema is blank:

<d4p1:ExtractorSettings>
       <d4p1:Id>1159</d4p1:Id>
       <d4p1:LookupPropertyCollection />
       <d4p1:ProtocolPropertyCollection />
       <d4p1:XmlPropertyCollection>
        <d4p1:XmlPropertyDefinition>
         <d4p1:Id>0</d4p1:Id>
         <d4p1:PropertyName>EntityId</d4p1:PropertyName>
         <d4p1:SchemaInfo>
          <d4p1:MessageType/>
          <d4p1:SchemaPath>/SCHEMAS/HCB/855.XSD</d4p1:SchemaPath>
         </d4p1:SchemaInfo>
         <d4p1:Xpath>/*[local-name()='Edi' and namespace-uri()='http://EDI.Schemas.HCB/855']/*[local-name()='Header' and namespace-uri()='']/*[local-name()='EntityId' and namespace-uri()='']</d4p1:Xpath>
        </d4p1:XmlPropertyDefinition>
       </d4p1:XmlPropertyCollection>
      </d4p1:ExtractorSettings>

if I modify the XML post message (in fiddler composer) by adding the schema message type to my schema (see below), and execute the request, the request succeeds and the agreement deployment succeeds from fiddler not the X12 agreement screen.  Can you please help.

<d4p1:ExtractorSettings>
       <d4p1:Id>1159</d4p1:Id>
       <d4p1:LookupPropertyCollection />
       <d4p1:ProtocolPropertyCollection />
       <d4p1:XmlPropertyCollection>
        <d4p1:XmlPropertyDefinition>
         <d4p1:Id>0</d4p1:Id>
         <d4p1:PropertyName>EntityId</d4p1:PropertyName>
         <d4p1:SchemaInfo>
          <d4p1:MessageType>http://EDI.Schemas.HCB/855#Edi</d4p1:MessageType>
          <d4p1:SchemaPath>/SCHEMAS/HCB/855.XSD</d4p1:SchemaPath>
         </d4p1:SchemaInfo>
         <d4p1:Xpath>/*[local-name()='Edi' and namespace-uri()='http://EDI.Schemas.HCB/855']/*[local-name()='Header' and namespace-uri()='']/*[local-name()='EntityId' and namespace-uri()='']</d4p1:Xpath>
        </d4p1:XmlPropertyDefinition>
       </d4p1:XmlPropertyCollection>
      </d4p1:ExtractorSettings>