community-content

Forum Replies Created

Viewing 15 posts - 8,701 through 8,715 (of 9,652 total)
  • Author
    Posts
  • in reply to: xPath error #13203

    Also the context-position is 1- based
    So you should have something like this:

    [code:1:51ddb39d9a]/*[local-name()=’Sample’ and namespace-uri()=’http://BizTalkOrch.InPutSchema’]/*[local-name()=’Body’ and position()=1 and namespace-uri()=”][/code:1:51ddb39d9a]

    in reply to: BizTalk evaluation #13190

    Microsoft is about the only place I have seen they type of information. Check out the main BizTalk site at http://www.microsoft.com/biztalk/ Although, I have never found there info to be very helpful.

    I know HP has a performance white paper.

    in reply to: Biztalk Server 2004 Configuration #13181

    I think that’s a problem with your Analysis Services. Make sure you have SP 3a for that as well and if you are using a remote SQL you will need the client tools with SP 3a installed on the BizTalk Server.

    You might also want to check out Microsoft site. I think they have a lot of KB’s covering the different installation issues.

    in reply to: Error Connecting two orchestrations- Can anyone help #13184

    Is your direct binding working?

    I’m guessing the problem is in your direct binding. Make sure you have an active subscription for the message or you’ll get that error.

    in reply to: Positional flat file reads only 1. row #14409

    Thank you very much – now reading goes ok.

    Now to next file…
    /R

    in reply to: Creating an XML document from SQL Table Data #13208

    If this is part of the same process you can map either the incoming Xml data or the SQL data that you write to SQL into any format you wish and send it anywhere.

    If this is not the same process then you can use the SQL Receive Adapter with either a Select statement or store procedure. The SQL Receive adapter polls the database at an interval you specify.

    in reply to: Send Port Filter #13193

    First you need to create a Biztalk project, with a property schema defining you new property. This needs to be built and deployed.

    Then you create a simple pipeline component. I would suggest using Martijn Hoogendoorn’s Pipeline Component Wizard that will create the shell project for your component.

    http://www.gotdotnet.com/Workspaces/Workspace.aspx?id=1d4f7d6b-7d27-4f05-a8ee-48cfcd5abf4a

    You need a very simple pipeline component.
    In the Execute method you can read the FILE.ReceivedFileName property from the context,
    [code:1:b98450480e]inputMessage.Context.Read(\"ReceivedFileName\", \"http://schemas.microsoft.com/BizTalk/2003/file-properties\");[/code:1:b98450480e]
    possibly parse the string removing the path info and promote the result into your property
    [code:1:b98450480e]inputMessage.Context.Promote(<Your PropertyName>, <your property schema namespace>, <new value>);[/code:1:b98450480e]

    There is no need to to read the data stream, the most complicated part of a pipeline component. The FILE properties are set by the adapter so you can position your component in any stage except the Disassemble stage and you do not have to worry about the completion of the stream read.

    Once built you copy the resulting DLL to the [b:b98450480e]C:\\Program Files\\Microsoft Biztalk Server 2004\\Pipeline Components[/b:b98450480e] directory
    To debug, you can attach to the BTSNTSrv.exe process setting appropriate breakpoints in VS2003

    in reply to: Positional flat file reads only 1. row #14414

    You can do this with two scripting functoids:
    For a schema like this as both input and output:
    [code:1:2c46f67690]<Schema>
    Root
    Record
    Field1
    Field2
    Field3[/code:1:2c46f67690]

    Add a scripting functoid, select [b:2c46f67690]Inline XSLT Call Template[/b:2c46f67690]
    Add this code:
    [code:1:2c46f67690]<xsl:template match=\"Record\">
    <xsl:element name=\"Record\">
    <xsl:element name=\"Field1\">
    <xsl:value-of select=\"Field1\"/>
    </xsl:element>
    <xsl:element name=\"Field2\">
    <xsl:value-of select=\"Field2\"/>
    </xsl:element>
    <xsl:element name=\"Field3\">
    <xsl:value-of select=\"Field3\"/>
    </xsl:element>
    </xsl:element>
    </xsl:template>[/code:1:2c46f67690]

    Add another scripting functoid, select [b:2c46f67690]Inline XSLT[/b:2c46f67690]
    Add this code:
    [code:1:2c46f67690]<xsl:apply-templates select =\"Record[position() != last()]\"/>[/code:1:2c46f67690]

    Connect this functoid to the Record element of the output schema.
    You will get this warning [i:2c46f67690]The \”Scripting\” functoid has no output parameters[/i:2c46f67690] about the first functoid but you can ignore this

    in reply to: Problems with namespace prefix #14418

    Thank you kindly sir 🙂

    in reply to: Send Port Filter #13196

    How can l write a pipeline that extracts the File. ReceivedName?
    Thanks for your answers

    in reply to: Positional flat file reads only 1. row #14413

    I tried with functoids but could get the desired result.
    This is a custom Xslt that shows how to filter the last record

    [code:1:4407151d2d]<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\"
    xmlns:s0=\"urn:input:namespace\"
    xmlns:ns0=\"urn:output:namespace\">
    <xsl:output omit-xml-declaration=\"yes\" version=\"1.0\" method=\"xml\" />
    <xsl:template match=\"/s0:Root\">
    <xsl:element name=\"ns0:outputdocument\">
    <xsl:apply-templates select =\"Record[position() != last()]\"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match=\"Record\">
    <xsl:element name=\"Record\">
    <xsl:element name=\"Field1\">
    <xsl:value-of select=\"Field1\"/>
    </xsl:element>
    <xsl:element name=\"Field2\">
    <xsl:value-of select=\"Field2\"/>
    </xsl:element>
    <xsl:element name=\"Field3\">
    <xsl:value-of select=\"Field3\"/>
    </xsl:element>
    </xsl:element>
    </xsl:template>
    </xsl:stylesheet>[/code:1:4407151d2d]

    in reply to: Problems with namespace prefix #14417

    I’m new to all this so please excuse my ignorance 🙂
    Case: I made a schema for my XML data that looks like this:

    [code:1:72c3072d7e]<?xml version=\"1.0\" encoding=\"utf-16\"?>
    <xs:schema xmlns:b=\"http://schemas.microsoft.com/BizTalk/2003\" xmlns=\"http://BizTalk_Server_Project1.Schema1\" targetNamespace=\"http://BizTalk_Server_Project1.Schema1\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">
    <xs:element name=\"Root\">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs=\"1\" maxOccurs=\"unbounded\" name=\"Row\">
    <xs:complexType>
    <xs:sequence>
    <xs:element name=\"Field1\" type=\"xs:string\" />
    <xs:element name=\"Field2\" type=\"xs:string\" />
    <xs:element name=\"Field3\" type=\"xs:string\" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>[/code:1:72c3072d7e]

    When I chose Generate Instance on the schema in VS I get that following XML which works fine when I run it through my BizTalk project

    [code:1:72c3072d7e]<ns0:Root xmlns:ns0=\"http://BizTalk_Server_Project1.Schema1\">
    <Row>
    <Field1>Field1_0</Field1>
    <Field2>Field2_0</Field2>
    <Field3>Field3_0</Field3>
    </Row>
    </ns0:Root>[/code:1:72c3072d7e]

    My problem is that the real xml I will have to run through the project doesn’t have the ns0: prefix. Like this:

    [code:1:72c3072d7e]<Root xmlns=\"http://BizTalk_Server_Project1.Schema1\">
    <Row>
    <Field1>Field1_0</Field1>
    <Field2>Field2_0</Field2>
    <Field3>Field3_0</Field3>
    </Row>
    </Root>[/code:1:72c3072d7e]

    When I try to run that xml through biztalk it doesn’t work. I end up with an xml without the fields.

    I’m sure I’m just missing something simple and obvious. Afaik if you don’t have a ns prefix it should use the default namespace, which I set with the xmlns=\”http://BizTalk_Server_Project1.Schema1\” line in the schema, right?

    Any pointers would be appreciated

    in reply to: Positional flat file reads only 1. row #14408

    Hello

    How can I define in map to exclude this last line when reading file?

    \\R

    [quote:488cffc3c8=\”greg.forsythe\”]The parser starts at the top of the file, so it finds the header and then your List records.
    The problem is it cannot differentiate the trailer record from the List records.
    One solution is to use the Tag Identifier property on the List record. Is there some identifying data in each List record that you do not need that is different from the header and trailer.
    e.g.
    Hfield1field2field3
    Lfield1field2field3field4field5field6
    Lfield1field2field3field4field5field6
    Lfield1field2field3field4field5field6
    TLfield1

    In a file like this you can declare the Tag Identifier on the header to be H , the list records to be L and the trailer to be T.

    With delimited data the Tag Identifier must always be at the start of the record, but with positional data you can also specify an offset.

    If you have no data that can be used as a Tag Identifier then do not specify a trailer and you can use a map to exclude the last line of your List.[/quote:488cffc3c8]

    in reply to: Scope shape in Biztalk orchestration #13201

    Did you initialize the variable. If yes please send the expression details.

    in reply to: xPath error #13205

    I have the following xml:

    [color=blue:67475ee949]<ns0:Sample xmlns:ns0=\”http://BizTalkOrch.InPutSchema\”>
    <Body>
    <AnyThing>AnyThing_0</AnyThing>
    </Body>
    </ns0:Sample>[/color:67475ee949]

    This message is assigned to message variable InMsg.
    I have a variable called xmlDoc of type System.xml.xmldocument
    I have another message of type System.xml.xmldocument called OutMsg

    I am using xPath to extract some of InMsg message details:
    my xpath expression is:

    [color=darkred:67475ee949]xDoc = new System.Xml.XmlDocument();
    xDoc= xpath(InMsg, \”//*[local-name()=’Body’][0]\”);
    OutMsg=xDoc;[/color:67475ee949]

    When I execute this and check it the Debug mode tracked events:

    I get the following error:

    [color=red:67475ee949]Microsoft.XLANGs.Core.NullPartException: The part ‘part’ of message ‘OutMsg’ contained a null value at the end of the construct block[/color:67475ee949].
    at Microsoft.XLANGs.Core.Part.ConstructionCompleteEvent()
    at Microsoft.XLANGs.Core.XMessage.ConstructionCompleteEvent()
    at BizTalkOrch1.XPath.segment1(StopConditions stopOn)
    at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
    Microsoft.XLANGs.Core.NullPartException
    Scoped@
    XPath.XPath
    9363d962-4b5b-4fda-b012-74d2e73cf154

    I feel something is wrong in my xPath statment. Please help If you can suggest some thing better.

Viewing 15 posts - 8,701 through 8,715 (of 9,652 total)