Forum Replies Created
-
AuthorPosts
-
ABC is constant and %date% does not work.
May 29, 2008 at 2:45 AM in reply to: sending an email attachment from a blob field in a database #19787hi,
i have just gone thrugh the smaple from the link, but my question is how to count the number of attachements and the type of attachemnts in the email i am not able to do that can you please help me.
Hi,
take as ABC_%date%.csv
or
what is ABC ..it is a variable or constant …
if constant use above
May 28, 2008 at 11:21 PM in reply to: sending an email attachment from a blob field in a database #19784Check out this article by Stephen Thomas on handling emails with an indeterminate number of attachments:
Typically mail is received as a multipart message, one part for the body and one part for each attachment.
If you need data from the message body you need some way of parsing this info. Maybe a flatfile disassembler in the receive pipeline
If you need info from the SMTP header (such as To, From, Subject, etc) then this is included in the message context as properties – depending on the adapter you are using. The Biztalk POP3 adapter is not available until Biztalk 2006, with 2004 you need an open source version. Not sure where it is anymore.
May 28, 2008 at 9:55 PM in reply to: sending an email attachment from a blob field in a database #19783Hi,
I have
following scenario,I want to
extract the attachments from mail, I want to count the number of attachments
and their type, for me type should be .pdf.If number
of attachments is greater than 1 or less than one I have to send an email
notification for that I have a .net component. And if number of attachment equal
to 1 then I have to extract the same and put it to some location and at the
same time create one xml file which contains mail information.can you please help me out.
May 28, 2008 at 12:45 PM in reply to: Interesting Scenario with WebService Call Suggestions needed. #19781The /child::*/child::* xpath expression returns the first child of the first child of the document. You could have use /string/child::*[1] as <string is the first node.
All the casting and message manipulation is done by Biztalk. The orchestration compiler converts that line into the appropriate C# code.
ruselw, you forgot to remove the <string> wrapper node from the message oops missed the string cast
Yes, that is correct. The custom Xslt file overrides all content within the mapping grid.
Disadvantages: No GUI mapper and you have to learn Xslt
Advantages: Line by line debugging with breakpoints using Xslt, Handle more complicated mapping scenarios, More efficient maps, You can use templates, better structured output,
You can use Xslt maps for message validation-even in the pipeline by having a choice of output i.e. the original message or an error message
I still use the mapper but only for simple maps.
May 28, 2008 at 11:17 AM in reply to: Interesting Scenario with WebService Call Suggestions needed. #19779Thanks greg and ruselw it works!!!!!!!!!!
Thanks for Help…
Once he implements custom XSLT, he loses the ability to maintain the map in the mapping tool, correct?
May 28, 2008 at 8:46 AM in reply to: Interesting Scenario with WebService Call Suggestions needed. #19776Another approach would be to load an XmlDocument from the string, and then assign it to the 271 message:
GenericXmlDoc = new System.Xml.XmlDocument();
GenerixXmlDoc.Load(WebServiceResponseString);
271Message = GenericXmlDoc;
I would probably go with the XPath approach though, because it is only 1 line of code!
May 28, 2008 at 7:45 AM in reply to: Interesting Scenario with WebService Call Suggestions needed. #19775“/child::*/child::*[1]” Is it for getting perticuler string ?? Could u please elaborate this .As WebServiceResponse Message Is in the form of string which could i cast back to xmldocument ?.
Here is a custom Xslt that will perform the map required
<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“ version=“1.0“>
<xsl:output omit-xml-declaration=“yes“ method=“xml“ version=“1.0“ />
<xsl:key name=“OfferKey“ match=“Offer“ use =“Key“/>
<xsl:template match=“/“>
<xsl:apply-templates select=“/Root“ />
</xsl:template>
<xsl:template match=“/Root“>
<xsl:element name=“Root“>
<xsl:for-each select=“Offer“>
<xsl:variable name=“group“ select =“key(‘OfferKey’, Key)“ />
<xsl:if test=“generate-id($group[1]) = generate-id()“>
<xsl:element name=“Offer“>
<xsl:element name=“Key“>
<xsl:value-of select =“Key“/>
</xsl:element>
<xsl:for-each select=“$group“>
<xsl:element name=“Line“>
<xsl:element name=“Field1“>
<xsl:value-of select=“field1“/>
</xsl:element>
<xsl:element name=“Field2“>
<xsl:value-of select=“field2“/>
</xsl:element>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:if>
</xsl:for-each>
</xsl:element>
</xsl:template>
</xsl:stylesheet>May 27, 2008 at 3:23 PM in reply to: Need to access MSMQ Context properties within an Orchestation #19773This is caused by the BodyType property on the MSMQ message. If you send a string, then Biztalk will wrap the message in <string> tags. You could try sending an XmlDocument object.
May 27, 2008 at 3:08 PM in reply to: Interesting Scenario with WebService Call Suggestions needed. #19772The easiest way would be to use the xpath function in a message assignement shape:
Message271 = xpath(WebServiceResponseMessage, “/child::*/child::*[1]“);
Have you looked at the ESB Guidance? (http://www.codeplex.com/esb) It includes a management portal that does some of what you need. The poral is designed to manage exceptions, and not current activity. It is open source, so you can modify it to fit your needs, or just to see a potential architecture. The management portal has it’s own exception message database instead of pulling messages through the BizTalk APIs. This approach is good for reporting purposes, but not so good for viewing current activity. The management portal has a good example of editing and resubmitting messages. One thing to note: You can’t modify and resume a suspend message, you have to resubmit the message through a receive port.
-
AuthorPosts