Forum Replies Created
-
AuthorPosts
-
Thanks a lot Dino. It’s Really help full.[:D]
Just need to add some of theese validation flags.
settings.ValidationType =
ValidationType
.Schema;
settings.ValidationFlags |=
XmlSchemaValidationFlags
.ProcessInlineSchema;
//settings.ValidationFlags |= XmlSchemaValidationFlags.AllowXmlAttributes;
settings.ValidationFlags |=
XmlSchemaValidationFlags
.ProcessSchemaLocation;
settings.ValidationFlags |=
XmlSchemaValidationFlags
.ProcessIdentityConstraints;
settings.ValidationFlags |=
XmlSchemaValidationFlags
.ReportValidationWarnings;
Can I ask why you are consuming a .NET webservice from a BizTalk orchestration and then exposing that orchestration as a web service in order to consume it from an ASP.Net application?
Why not just consume the .NET webservice from ASP.Net directly?
Ben McFarlin
BizTalk ConsultantYou need to create a BizTalk Server Group with two servers in that group. This will provide both high availability and scalability for message processing. The message box should be available via a clustered instance of SQL Server. You need two additional servers with Microsoft Windows Clustering Service installed in an active-passive configuration. This way, if one of your BizTalk nodes goes offline the other will pick up the work automatically. If both BizTalk nodes are up, they share the work load. Lastly, if either of the SQL Server nodes go offline, the other will pick up the work load. However the SQL Server nodes cannot share the work load since they are in an active-passive configuration.
Ben McFarlin
BizTalk ConsultantHi Phil,
Do you have any update on this? I am still getting this error and no luck with fixing it.
Siva
May 11, 2009 at 10:43 AM in reply to: Retrtrieving a xml File from Biztalk server to webservice #22349That assumes you are using either HTTP GET or POST for the web service and not SOAP. Plus it is going to require that you place additional code in the web service constructor to capture the posted data. I’ve done it before this way. It works, but it’s not an elegenat solution and probably takes more time do develop as well.
The proper way do it is to add a reference to the webservice in your BizTalk project. From there you can create an orchestration and add a web service port to send the XML and receive the response.
Ben McFarlin
BizTalk ConsultantMay 11, 2009 at 7:11 AM in reply to: Retrtrieving a xml File from Biztalk server to webservice #22347configure the send port (http) with webservive url
First in an expression shape get the count of IRPVoidedInfo in the incoming message.
Then use a decission to perform your operation (for count > 0)
use the xpath query: xpath(IncomingMsg, “count(//*[local-name()=’IRPVoidedInfo’])”)
Let me know if this helps.
HELP! Currently I was just utilizing a custom pipeline with an xml assembler to enclose the message in a SOAP envelope. (no orchestration or adapter) It looks like the SOAP header is my problem. My envelope schema references a header schema. The header schema is flat and does not have a root node which I do not know how to get around. This is the header schema:
<?xml version=”1.0″ encoding=”utf-16″ ?>– <xs:schema xmlns:tns=”http://schemas.xmlsoap.org/ws/2004/03/addressing“ xmlns:b=”http://schemas.microsoft.com/BizTalk/2003“ attributeFormDefault=”unqualified“ elementFormDefault=”qualified“ targetNamespace=”http://schemas.xmlsoap.org/ws/2004/03/addressing“ xmlns:xs=”http://www.w3.org/2001/XMLSchema“><schemaInfo is_envelope=”no“ is_receipt=”no“ schema_type=”document“ xmlns=”http://schemas.microsoft.com/BizTalk/2003“ /></xs:appinfo> </xs:annotation><xs:element name=”To“ type=”xs:string“ /><xs:element fixed=name=”Action“ type=”xs:string“ /></xs:schema>Which results in this? Do not understand why or know how to fix the To & Action nodes not having the ns1 prefix and their values?<?xml version=”1.0″ encoding=”utf-8″ ?><ns1:Address>AddressStr</ns1:Address></ns1:From><ns2:MessageNumber>1234567890</ns2:MessageNumber></ns2:Sequence></ns0:Header>May 8, 2009 at 4:48 AM in reply to: How to send an the incomming xml file as an attachement to admin through SMTP adaptors #22340Add an Smtp Send port, In the SMTP Transport properties
1. On the Compose tab set the Text option and specify the text body of the message.
2. On the Attachment tab set the Remaining BizTalk message parts property to Attach only body partBind this send port to the Orchestration or add a filter to consume the xml message you wish to send.
Firstly the namespace prefixs can be any value you like. When an Xml Parser loads the document it just uses the prefix to determine the namespace an element is in. It will use the prefix to find the namespace definition in the file
Can explain a bit more about the structure of you Soap Header, and what namespace definitions are missing. Could you possibly post a sample?
Also what adapter are you using?
This is not really that formidable. You have the use of an Xml Parser that will do all the grunt work for you. When you assign any string to an xml node the parser will automatically do all the required escaping for you. When you retrieve the text it will be unescaped for you.
In an orchestration you can assign the message to an XmlDocument variable and the assign the XmlDocument.InnerText to a distinguished field on the SQL message e.g.
xmlDoc = inputMessage;
SQLMessage.XmlDataField = xmlDoc.InnerText;If you want to do this in a map, you can create an external assembly like this:
public class ConvertNode
{
public static string ToXmlString(XPathNodeIterator node)
{
return node.Current.OuterXml;
}
}and call it from some custom Xslt (you need to declare your Custom Extension Xml as appropriate)
<xsl:element name=”XmlDataField”>
<xsl:value-of select=”ConvertNode:ToXmlString(.)”/>
</xsl:element>The ws-addressing does not use a parent node to encapsulate its elements. Each element is a child of the <soap:header>
Have you considered using the WCF adapter which will generate the ws-addressing header element for you?
May 8, 2009 at 3:22 AM in reply to: Finding the doucment specification by message type failed #22336You are already using the XmlDisassembler – it is reporting the error.
When a document arrives at the XmlDisassembler it will try and find a matching schema. It does this by creating the message type from the file and looking in the BiztalkMgmtDb for a matching messagetype.
The message type is creted by concatentaing the root element namespace with the root node.
e.g.
<root>…</root> the message type is ‘root’
<ns0:root xmlns:ns0=”MyNamespace”>…</root> the message type is ‘MyNamespace#DXLawson_Journal_Entries’In your case it will check for a schema with a root node of DXLawson_Journal_Entries and no TargetNamespace.
Check you schema to see if it has a TargetNamespace if it does you can either modify you Xml message to match or delete the TargetNamespace from the schema.
One other catch, if you have two schemas deployed with the same combination of root node name and targetnamespace the Biztalk cannot decide which one to use and you will get the same error. In this case you can delete the duplicate schema assembly from Biztalk or specify the actual assembly name for the schema on the XmlDisassembler.
I have worked with this area a lot, and have the scars to prove it… (all mental)!
Anyway, the sql adapter metadata generator automatically generates the insert schema that it uses to call stored procs.
You will notice that all parameters are generated as attributes with simple data types, and if you are using the xml data type the attribute gets created as a string. The attribute can not contain xml. This means to insert xml using the sql adapter you must to convert your xml data to string which means you will need to escape out the reserved characters such as < > ” ‘.
This is a non trivial task.
There are various horrible ways of doing this,
you can write some terribly complicated xslt as can be seen here.
create your insert message using a .net object based on the generated schema using xsd.exe, then assign your xml string to the property in th e.net object and let the serializer do the escaping for you (this is a very memory hungry method and not suitable for large xml files), see my article here
You should note that if the document you are trying to insert is huge (35 mb +) you may run into memory issues with teh sql adapter. I have encountered this and it was a trauma to work around.
The following blog helped me a great deal, read through to part 3 where there is a link to a custom adapter that removes this problem to a large degree.
-
AuthorPosts