community-content

Forum Replies Created

Viewing 15 posts - 8,581 through 8,595 (of 9,652 total)
  • Author
    Posts
  • in reply to: CSV file to SQL table #13326

    Don’t know an example, but here are some steps.

    1) Design your flat file schema. Use right-click \”Validate Instance\” until it works with your csv file.

    2) You can optionally map your data to a regular XML schema. You will use this XMl in the next step. (If you want to build an simple csv-file-in/xml-file-out orchestration at this point you could. Get something small and easy working, then add to it step by step.)

    3) Most likely, your CSV file will contain many records, not just one, correct? You will need to write a stored proc that uses OpenXML. See this blog: http://nealwalters.blogspot.com/2005_12_01_nealwalters_archive.html .

    NOTE: There might be an another alternative here, but I have not tried it. You could try to build the updategram insert statements directly, but where I have worked, we always go through stored procs.

    4) Run the SQL Adapter to build a schema that represents the input/outputs of your stored proc. Your input parm to the stored proc will be one parm, something like \”xmlin\”. I always like returning a least a success/failure flag from the stored proc so that I can call it syncronously with request/response. In the schema, promote or distinguish your parm to make it easy to set below.

    5) Create an orchestration to receive the CSV file, map it to xml, use construct/message assignment shape to set parm, then call stored procedure (Send/Receive from a request/response port).

    Neal Walters
    http://Biztalk-Training.com

    P.S. My training videos include an entire CD on the SQL adapter, and also some videos on flat file schemas.

    in reply to: Debugging inside the Orchestration #13324

    The #if ain’t gonna work!

    We have a debug flag in the Biztalk config file
    \”c:\\Program Files\\Microsoft BizTalk Server 2004\\BTSNTSvc.exe.config\”.

    Then do something like this:
    blnTraceFlag = System.Convert.ToBoolean(System.Configuration.ConfigurationSettings.AppSettings.Get(\”MyProject.MyOrchName.TraceFlag\”));

    An if statement like this will work in expression shapes, but unfortunately not Message Assignment shapes.

    if(blnTraceFlag == true){

    // put your trace logic here.

    }

    Neal Walters
    http://Biztalk-Training.com

    in reply to: What is Biztalk server #14491

    Hi This is sathish 😀 , I am a fresher for this topic.
    Please guide me

    Thanks in advance

    Sathish kumar

    [email protected]
    Coimbatore, India

    in reply to: Connecting Biztalk to Exchange #13329

    Hi,
    I%u00b4m searching for an opportunity to connect my Biztalk 2004 to an Exchange 2000 Server. Newest Service Packs are applied. I want to achieve this scenario:
    The Biztalk should be able to send Mails to a special contact (like partnerfirms etc) via my exchange. If those mailings are not delivered I want to get an Information about that in an extra Mailbox. If it%u00b4s feasable to generate a report about that undelivered mails that is send every 7 days or so I would be glad.

    I appreciate all kinds of help and thx

    Gernot Kersken

    in reply to: Debugging inside the Orchestration #13323

    You will need to check out the System.Diagnostics.Trace/Debug options.

    These can be controlled via config file switches

    in reply to: Debugging inside the Orchestration #13321

    Hi Greg,

    Thanks for your reply, but as much as possible what I want is that I would not have to download any tools for it. We would just use what .NET or Biztalk has for debugging. Is there any other way on debugging it without any tools?

    Basically what I would like to have is to turn on the code \”System.Diagnostics.EventLog.WriteEntry\” when the proejct is set to Development mode and turn it off if when the project is set to Deployment mode.

    Thanks again,
    Fred

    in reply to: Debugging inside the Orchestration #13322

    The code in an orchestration is not C# it’s XLANG, so C# compiler directives will have no effect.

    You might like to check out log4net
    [url]http://www.traceofthought.net/PermaLink,guid,62b858b4-d8ba-4fc4-92aa-35a4ff1ba00a.aspx[/url]

    in reply to: Biztalk Schema Metadata #14486

    In Biztalk the Xml schema is just the definition of a message, not the message itself.
    The only places the schema is used at runtime is by the Xml Validator component, and the Flat File DASM and ASM where the schema extensions are used by the parser and serializer.

    It is used indirectly for message typing where the root node name and target namespace are used.

    It is also used by a web service to convey message format/structure information to the client.

    To access Biztalk via a web service you must first publish the schema or orchestration as a web service using the wizard. This is a design time function that creates a web service project that can be hosted in IIS.

    From the client you need to add a web reference by importing the WSDL file or referencing the Url of the web service. Visual Studio will take the WSDL info and create the necessary components that enable you to call the web service.
    You should end up with classes similar to the BPM sample.

    Not sure how you got the LoanImages class that derives from SchemaBase. Microsoft.XLANGs.BaseTypes.SchemaBase is an internal Biztalk class used for manipulating schemas.

    in reply to: Correlation between correlation sets and a headache #14469

    Sending the parameter should be fairly easy.
    You can use a dynamic send port and set the Url in your orchestartion

    [code:1:89f7ef210e]message(BTS.OutboundTransportType) = \"HTTP\"
    message(BTS.OutboundTransportLocation) = \"http://server/ebXml/servlet.jsp?\" + strParameter[/code:1:89f7ef210e]

    You might have a problem receiving a querystring parameter. Because the querystring is part of the Url, you need to configure an Http receive location for each possible querystring – this would be impossible using a dynamic querystring like ConversationId

    You could create your own custom HTTP adapter, to handle this situation

    in reply to: editing EDI transport properties #14474

    no one!? 🙁

    in reply to: Correlation between correlation sets and a headache #14464

    >> If you want to embed a message as an Xml string into a Xml node of another message you can use this trick in a message assignment shape:

    Oh! Will keep this one in mind for the future.

    >> How are you passing the parameter to the servlet. Is it in the QueryString
    e.g. http://server/ebXml/servlet.jsp?Parameter

    Yes, we would pursue this approach if we can. Can we? How can we pass from our orch an xml payload message *and* some conversationID which is of string type?

    in reply to: Sending e-mails with attachments in Biztalk 2006 #14482

    The simplest way is to use an orchestration, accept an untyped message (System.Xml.XmlDocument), send this message setting the [b:90e299c346]Microsoft.XLANGs.BaseTypes.Address[/b:90e299c346] property on the send port.

    You will need a custom pipeline using the MIME/SMIME encoder and set the [b:90e299c346]BodyAsAttachment[/b:90e299c346] property on this component

    If yoiu wish to get more complicated and add a body to the email then I suggest you read the following Biztalk 2004 docs – all the info here is still relavent for Biztalk 2006.

    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdk/htm/ebiz_prog_email_wgxr.asp[/url]

    in reply to: creating repeating node data on output #13319

    Probably one of those really easy things that I just keep missing: I have data coming from a variety of sources and need to create an output schema like:
    <root>
    <keys>
    <key name=\”first\” value=\”123\”/>
    <key name=\”second\” value=\”45678\”/>
    etc or
    <key>
    <name>first</name>
    <value>123</value>
    </key>
    <key>
    <name>second</name>
    <value> 45678</value>
    </key>

    Where the number of keys is only known during execution of the orchestration (or pipeline) ie it is not a constant known in advance.

    Getting the data from the sources is not a problem, but generating the repeating output nodes is??
    How can I accomplish this??

    Thanks in advance.

    Chuck

    in reply to: Problem Creating a BAM Activity with Excel #14484

    Hi all,
    after defining activities and views while trying to save or export to xml

    I get the following message:

    \”Valid chacarcters for names are letters, numbers, single space and undercscore and names must start with letter \”

    i can’t find any solution.

    Any ideas ?????

    TNX in advance

    I am using Debatching sample available on BizTalkGurus.com
    I am testing Orchestration outside .Net component Debatching using following xml document

    [color=blue:e3073d7e36] <ns0:SomeRoot xmlns:ns0=\”http://BizTalkOrch.InPutSchema\”>
    <Body>
    <anything>Ashish</anything>
    </Body>
    <Body>
    <anything>Joy</anything>
    </Body>
    </ns0:SomeRoot>[/color:e3073d7e36]

    The output I expect is two xml documents

    [color=blue:e3073d7e36] <Body>
    <anything>Ashish</anything>
    </Body>[/color:e3073d7e36]
    and

    [color=blue:e3073d7e36] <Body>
    <anything>Joy</anything>
    </Body>[/color:e3073d7e36]

    but I am getting the following exception.

    [color=red:e3073d7e36]The data at the root level is invalid. Line 1, position 1.
    Exception type: XmlException
    Source: System.Xml[/color:e3073d7e36]

    When I dig into xmlHelper class i found it is using [color=green:e3073d7e36]xmlnode.innertext [/color:e3073d7e36]to return the node.
    using this I am getting only the value of node as in My case only \”Ashish\”.

    When I change this to [color=green:e3073d7e36]xmlnode.outerxml[/color:e3073d7e36] I get the output properly but gets the following exception.

    [color=red:e3073d7e36]Exception type: SerializationException
    Source: mscorlib
    The type System.Xml.XPath.XPathNodeList in Assembly System.Xml, Version=1.0.5000.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089 is not marked as serializable.[/color:e3073d7e36]

    Any suggestion how can I resolve the issue.

Viewing 15 posts - 8,581 through 8,595 (of 9,652 total)