Forum Replies Created
-
AuthorPosts
-
Thanks greg for your reply. It seems like it’s because of the method that I used to created the envelop schema. I will give your method a try soon.
Anyhow, here were the envelop schema I created that didn’t promot the property properly:
<?xml version=”1.0″ encoding=”utf-16″ ?>– <xs:schema xmlns:b=”http://schemas.microsoft.com/BizTalk/2003“ xmlns=”http://ArielBPM.Biztalk.WaitManagement.RegisterWaitSchemas“ elementFormDefault=”qualified“ targetNamespace=”http://ArielBPM.Biztalk.WaitManagement.RegisterWaitSchemas“ xmlns:xs=”http://www.w3.org/2001/XMLSchema“><b:schemaInfo is_envelope=”yes“ root_reference=”RegisteredWaitExpirys“ xmlns:b=”http://schemas.microsoft.com/BizTalk/2003“ /></xs:appinfo></xs:annotation><b:recordInfo body_xpath=”/*[local-name()=’RegisteredWaitExpirys’ and namespace-uri()=’http://ArielBPM.Biztalk.WaitManagement.RegisterWaitSchemas’%5D“ /></xs:appinfo></xs:annotation></xs:element></xs:schema>—————————————————————–
<?xml version=”1.0″ encoding=”utf-16″ ?>– <xs:schema xmlns:ns0=”http://ArielBPM.Biztalk.WaitManagement.Schemas.RegisterWaitPropertySchema“ xmlns:b=”http://schemas.microsoft.com/BizTalk/2003“ xmlns=”http://ArielBPM.Biztalk.WaitManagement.RegisterWaitSchemas“ elementFormDefault=”qualified“ targetNamespace=”http://ArielBPM.Biztalk.WaitManagement.RegisterWaitSchemas“ xmlns:xs=”http://www.w3.org/2001/XMLSchema“><b:namespace prefix=”ns0“ uri=”http://ArielBPM.Biztalk.WaitManagement.Schemas.RegisterWaitPropertySchema“ location=”ArielBPM.Biztalk.WaitManagement.Schemas.RegisterWaitPropertySchema“ /></b:imports></xs:appinfo></xs:annotation><b:property name=”ns0:RegWaitID“ xpath=”/*[local-name()=’RegisteredWaitExpiry’ and namespace-uri()=’http://ArielBPM.Biztalk.WaitManagement.RegisterWaitSchemas’%5D/*%5Blocal-name()=’RegWaitID’ and namespace-uri()=’http://ArielBPM.Biztalk.WaitManagement.RegisterWaitSchemas’%5D“ /><b:property distinguished=”true“ xpath=”/*[local-name()=’RegisteredWaitExpiry’ and namespace-uri()=’http://ArielBPM.Biztalk.WaitManagement.RegisterWaitSchemas’%5D/*%5Blocal-name()=’ClientCode’ and namespace-uri()=’http://ArielBPM.Biztalk.WaitManagement.RegisterWaitSchemas’%5D“ /><b:property distinguished=”true“ xpath=”/*[local-name()=’RegisteredWaitExpiry’ and namespace-uri()=’http://ArielBPM.Biztalk.WaitManagement.RegisterWaitSchemas’%5D/*%5Blocal-name()=’RegWaitID’ and namespace-uri()=’http://ArielBPM.Biztalk.WaitManagement.RegisterWaitSchemas’%5D“ /></b:properties></xs:appinfo></xs:annotation></xs:element><xs:element name=”RegWaitID“ type=”xs:string“ /><xs:element name=”ClientCode“ type=”xs:string“ /></xs:sequence></xs:complexType></xs:schema>————————————————————-
Here is a sample data:<
ns0:RegisteredWaitExpirys xmlns:ns0=”http://ArielBPM.Biztalk.WaitManagement.RegisterWaitSchemas” xmlns:i=”http://www.w3.org/2001/XMLSchema-instance”><ns0:RegisteredWaitExpiry><ns0:RegWaitID>E1024902-6A70-4817-B281-7B3AB934E893</ns0:RegWaitID><ns0:ClientCode>BMS</ns0:ClientCode></ns0:RegisteredWaitExpiry></ns0:RegisteredWaitExpirys>
I tested this scenario successfully i.e. using your Envelop message above I debatched it into 3 SchemaA messages each with the appropriate ElementB field promoted into the header. Here is the schema I used:
<?
xml version=“1.0“ encoding=“utf-16“?>
<xs:schema xmlns:ns0=“http://GuoMingLi.Properties“ xmlns:b=“http://schemas.microsoft.com/BizTalk/2003“ xmlns:xs=“http://www.w3.org/2001/XMLSchema“>
<xs:annotation>
<xs:appinfo>
<b:imports>
<b:namespace prefix=“ns0“ uri=“http://GuoMingLi.Properties“ location=“.\properties.xsd“ />
</b:imports>
<b:schemaInfo is_envelope=“yes“ />
</xs:appinfo>
</xs:annotation>
<xs:element name=“Envelop“>
<xs:annotation>
<xs:appinfo>
<b:recordInfo body_xpath=“/*[local-name()=’Envelop’ and namespace-uri()=”]“ />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs=“unbounded“ ref=“SchemaA“/>
</xs:sequence >
</xs:complexType >
</xs:element >
<xs:element name=“SchemaA“>
<xs:annotation >
<xs:appinfo >
<b:properties >
<b:property name=“ns0:ElementB“ xpath=“/*[local-name()=’SchemaA’ and namespace-uri()=”]/*[local-name()=’ElementB’ and namespace-uri()”]“ />
</b:properties >
</xs:appinfo >
</xs:annotation>
<xs:complexType >
<xs:sequence>
<xs:element name=“ElementB“ type=“xs:string“/>
<xs:element name=“ElementC“ type=“xs:string“/>
</xs:sequence >
</xs:complexType >
</xs:element >
</xs:schema >To output a flat file from Biztalk you need to use a send pipeline with the FlatFile Assembler (this does the opposite of the FlatFile Disassembler) i.e. converts an Xml message into a flat file message. It uses a schema that is defined by the MessageType.
If the output file is the same format as the input flat file then you already have the schema, just create a send pipeline and place the flat file assembler component in the assembler stage, build and deploy. On you send port specify this send pipeline on your send port. You should not need to specify the document schema in the assembler as the outbound message should have the BTS.MessageType property set, which is the key to the schema deployed in BizTalk.I am calling a SP from BizTalk that returns XML without actually storing it in any tables. So I am returning the XML the SP is creating on the fly. I am however getting the error:
Event Type: Warning
Event Source: BizTalk Server 2006
Event Category: BizTalk Server 2006
Event ID: 5740
Date: 21/05/2009
Time: 11:45:16
User: N/A
Computer: XXXX
Description:
The adapter “SQL” raised an error message. Details “HRESULT=”0x80004005″ Description=”Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 1, current count = 0.”
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Any help will be fantastic.
May 20, 2009 at 10:54 AM in reply to: WCF Adapter PassthruTransmit choking on message – 0x80004005 #22430The size of the message was indeed the issue. The problem was not at the BizTalk end but the WCF service end. The WCF service by default accepts a message that is 64K long (I am assuming this is an all inclusive size). All I had to do was to add a binding to the called WCF service specifiying the right size for maxReceivedMessageSize parameter.
May 20, 2009 at 7:27 AM in reply to: Help: Compile error: error X2297: ‘System.Boolean’ must be Xml serializable #22428Hi,
I ran into an issue similar to yours. To resolve it, close down VS and open it again, then, in your Project Properties, change you Build Output Path to point to another location for building your DLL. This should solve your problem…
May 20, 2009 at 6:24 AM in reply to: How to set a default value to an destination schema element in BizTalk Map #22427Hi shadakshari85, I am more of a visual person, it would be helpful if you can provide the source the destination schema.
Another approach you can try is to use XSLT template inside a scripting functoid, where it enables you setup global variable that you can use in the map.
Thanks for your reply. I was able to generate a schema with the auto generation to call the CL program, but now I am having errors with my orchestration. I get two errors. The first error states “use of unconstructed message”. The second error states “an activatable receive must be the first executable statement in a service. I created the messages in the orchestration with the multi-part message type. I do not understand. I need to call the CL program first then do my receive of the data.
The Xslt1.0 standard used by Biztalk has a limited set of functions and current date time is not one of them.
You will need to implement some script to do this:
<xsl:stylesheet xmlns:xsl=”http://www.w3.org/1999/XSL/Transform“ xmlns:msxsl=”urn:schemas-microsoft-com:xslt“ xmlns:var=”http://schemas.microsoft.com/BizTalk/2003/var“ exclude-result-prefixes=”msxsl var userCSharp“ version=”1.0“ xmlns:userCSharp=http://schemas.microsoft.com/BizTalk/2003/userCSharp>
<xsl:template match=”/“>
<xsl:element name=”currentDateTime“>
<xsl:value-of select=”userCSharp:DateCurrentDateTime()“ />
<xsl:element>
</xsl:template>
<msxsl:script language=”C#“ implements-prefix=”userCSharp“>
public string DateCurrentDateTime()
{
DateTime dt = DateTime.Now;
string curdate = dt.ToString(“yyyy-MM-dd”, System.Globalization.CultureInfo.InvariantCulture);
string curtime = dt.ToString(“T”, System.Globalization.CultureInfo.InvariantCulture);
string retval = curdate + “T” + curtime;
return retval;
}
</msxsl:script>
</xsl:stylesheet>Hi,
I think i get it now
Orchestrations are
defined in a BizTalk Visual Studio project, and are compiled into .NET
classes that implement the BTXService interface. At run time, the XLANG/s sub-service creates instances of these classes. Each instance is an in-memory state machine that receives, processes and returns messages to and from the MessageBox.This is taken from Charles Young blog titled “How Subscription works“
http://geekswithblogs.net/cyoung/articles/7007.aspx
Thanks
You can create a C#/VB class library project, write a helper class with method to call the store procedure. Build the project/DLL with strongname, add DLL as reference to your BizTalk project. Call your help class/method to call the stored procedure. Hope this helps.
May 20, 2009 at 12:06 AM in reply to: Cannot see imported schema properties in BizTalk mapper #22419Hi, importing schema B into schema A doesn’t mean all the content in schema B will appear in schema A. Importing schema B into schema A only enables schema A to use the type that’s defined in schema B.
It seems like you want to map the source message to 2 output messages. if this is what you are trying to do, you can configure your Transform shape to have 2 destination messages.
Anyways, hope this helps.
You could use a scope shape in your orchestration. put all the shapes (where erros are usually occured) in the scope shape, then you can “Add New Exception handler” by right clicking the top of the scope shape. you can further define the type of Exception (for example System.Exception) you want to handle in the Exception handler shape. if all is done correctly, you should now be able to have access to the error/exception information/description. Hope this helps.
May 19, 2009 at 11:55 PM in reply to: How to set a default value to an destination schema element in BizTalk Map #22417Hey Guo,
Thanks for your reply. it works in case of ONE-TO-ONE Mapping.
In my case i am looping the source schema, and based on some conditions i am filling the same fields from the source elements to different elements in destination schema.
Hope you got my problem.
Did you get any error? One of the reasons could be BizTalk is still trying (or retrying) to send the message to the WCF service.
Second reason could be that your port is not setup properly in your orchestration, which cause the response could not be routed back to the requesting orchestration. Did you setup the port as Send-Receive port?
-
AuthorPosts
