community-content

Forum Replies Created

Viewing 15 posts - 4,486 through 4,500 (of 9,648 total)
  • Author
    Posts
  • in reply to: Constructing File Names at Send Port #19789

     ABC is constant and %date% does not work.

    hi,

    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.

     

     

    in reply to: Constructing File Names at Send Port #19786

     Hi,

    take as ABC_%date%.csv

    or

    what is ABC ..it is a variable or constant …

    if constant use above

    Check out this article by Stephen Thomas on handling emails with an indeterminate number of attachments: 

     http://www.biztalkgurus.com/blogs/biztalk/archive/2006/08/08/How-to-Split-Received-Email-Attachments-in-BizTalk-2006.aspx

    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. 

     

     

    Hi,

    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.

     The /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

    in reply to: Looping problem with mapper #19780

     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.

     Thanks greg and ruselw it works!!!!!!!!!!

     

    Thanks for Help…

    in reply to: Looping problem with mapper #19778

    Once he implements custom XSLT, he loses the ability to maintain the map in the mapping tool, correct?

     

    Another 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!

     “/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 ?.

    in reply to: Looping problem with mapper #19774

     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>

     

     

    This 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.

    The easiest way would be to use the xpath function in a message assignement shape:

    Message271 = xpath(WebServiceResponseMessage, “/child::*/child::*[1]“);

     

    in reply to: GUI for monitoring messages #19771

    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.

Viewing 15 posts - 4,486 through 4,500 (of 9,648 total)