community-content

Forum Replies Created

Viewing 15 posts - 7,501 through 7,515 (of 9,648 total)
  • Author
    Posts
  • in reply to: Flat File Source only brings in one row #15185

    I did as codecola said..

    Set your root node (not <Schema> node) Group Max Occurs property to \”unbounded\” (u will find this in the Advanced section).

    in reply to: SAP Adapter For BTS2006 Wizard Disappeared #15092

    stick to the 1.0.3 RUNTIME! U get it from SAP’s marketplace. Remember no other version higher than version 1 is supported!

    Cheers

    Iggi

    in reply to: execute application windows and call biztalk rules engine #15220

    i have develop a simple windows application that call biztalk rules engine. But i can only execute on the biztalk server.
    If it’s run on my post, i have the message : \”impossible to connect\”
    What i must doing to execute on a client post, and call biztalk rules engine from the server biztalk??
    thanks a lot

    in reply to: Schema for an XML #15195

    The schema for the query is an \”online\” schema (it’s in the webreference).
    Thanks for the answer, I’m now trying a different approach to the problem, but it still might com in handy! 🙂

    Thks.

    in reply to: Email attachments – POP3 adapter #15213

    Hi
    I need to get email with attachments and just transfer them “as is” from folder A to folder B (also I need to get the name of the file)
    How can I do that? Should I execute pipeline inside my orchestration?
    Should I know in advance how many attachments I have (some sort of “count” method)

    10x!

    in reply to: XML Validator – C# code – catching errors problem #14133

    [… continued from previous… ]

    This works perfectly when I test my orchestration and validate 1 or a few xml files at a time. However, when I try to validate 100 files at once (50 valid and 50 invalid), I get unpredictable behaviors (the number of files that pass validation is not always 50, and the error messages sometimes get \”mixed up\” between the different messages).

    I am not an expert in C#, but I think there may be something wrong with the class I’m using.

    I also tried putting the call to the validation function inside an Atomic Scope, disabling batching and playing with the other settings, but the different instances that are being run by BizTalk still seem to interfere with each other. As I said, if I validate just one file at a time, everything works perfectly.

    I would REALLY appreciate any comments on why this behavior may be occuring. Thanks

    in reply to: XML Validator – C# code – catching errors problem #14132

    Hello, I’m working in a project where one of the requirements is to validate an incoming or outgoing document against the schema, catching the error messages that may appear while failing validation. I looked on the web for answers, and the best I could find is in the following site:

    http://thearchhacker.blogspot.com/2004/09/cool-xsd-validation-function-for.html

    Because I wanted the function to return multiple errors (and not just the first failure) I have modified the code to the following:

    [code:1:42eadef361]
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Xml;
    using System.Xml.Schema;
    using System.Reflection;

    namespace BiztalkUtils
    {
    public class Utils
    {
    static int ErrorsCount = 0;
    static string ErrorMessage = \"\";

    public static void ValidateDocument(XmlDocument businessDocument, string schemaStrongName)
    {
    // Constants
    const int PARTS_IN_SCHEMA_STRONG_NAME = 2;
    const int PART_CLASS_NAME = 0;
    const int PART_QUALIFIED_ASSEMBLY_NAME = 1;

    ErrorsCount = 0;
    ErrorMessage = \"\";

    // Parse schema strong name
    string[] assemblyNameParts = schemaStrongName.Split(new char[] { ‘,’ }, PARTS_IN_SCHEMA_STRONG_NAME);
    string className = assemblyNameParts[PART_CLASS_NAME].Trim();
    string fullyQualifiedAssemblyName = assemblyNameParts[PART_QUALIFIED_ASSEMBLY_NAME].Trim();

    // Load assembly
    Assembly schemaAssembly = Assembly.Load(fullyQualifiedAssemblyName);

    // Create instance of the BTS schema in order to get to the actual schemas
    Type schemaType = schemaAssembly.GetType(className);
    Microsoft.XLANGs.BaseTypes.SchemaBase btsSchemaCollection = (Microsoft.XLANGs.BaseTypes.SchemaBase)Activator.CreateInstance(schemaType);

    // Set up XmlVali######Reader and validate document
    XmlParserContext parserContext = new XmlParserContext(null,null, \"\", XmlSpace.None);
    XmlVali######Reader reader = new XmlVali######Reader(businessDocument.OuterXml, XmlNodeType.Document,parserContext);

    reader.ValidationType = ValidationType.Schema;
    reader.Schemas.Add(btsSchemaCollection.SchemaCollection);

    // Set up ValidationEventHandler
    reader.ValidationEventHandler += new ValidationEventHandler(reader_ValidationEventHandler);

    while (reader.Read()) { }

    reader.Close();

    // Throw XmlSchemaException to be caught by BizTalk containing all validation errors
    if (ErrorsCount > 0)
    {
    throw new System.Xml.Schema.XmlSchemaException(ErrorMessage);
    }
    }

    private static void reader_ValidationEventHandler(object sender, ValidationEventArgs e)
    {
    ErrorsCount++;

    //Construct error message
    ErrorMessage = ErrorMessage
    + \"Error #\" + ErrorsCount
    + \" (Line \" + e.Exception.LineNumber
    + \", Pos \" + e.Exception.LinePosition + \"): \"
    + e.Exception.Message
    + System.Environment.NewLine;
    }

    }

    }
    [/code:1:42eadef361]

    Note: Substitute \”######\” in the code with [i:42eadef361]d`a`t`i`n`g[/i:42eadef361] (without the \”‘\”) as the spam blocker would not let me attach the code otherwise.

    This works perfectly when I test my orchestration and validate 1 or a few xml files at a time. However, when I try to validate 100 files at once (50 valid and 50 invalid), I get unpredictable behaviors (the number of files that pass validation is not always 50, and the error messages sometimes get \”mixed up\” between the different messages).

    I am not an expert in C#, but I think there may be something wrong with the class I’m using.

    I also tried putting the call to the validation function inside an Atomic Scope, disabling batching and playing with the other settings, but the different instances that are being run by BizTalk still seem to interfere with each other. As I said, if I validate just one file at a time, everything works perfectly.

    I would REALLY appreciate any comments and help on why this behavior may be occuring. Thanks

    in reply to: Schema for an XML #15196

    Do you have the schema for http://schemas.microsoft.com/crm/2006/Query ?

    If you do, then the rest should be fairly trivial, however, exactly how it is will depend on how the other schema is defined. At least you’ll need somethgin like this:

    <xs:import namespace=\”http://schemas.microsoft.com/crm/2006/Query\”/>

    <xs:element name=\”RetrieveMultipleRequest\” xmlns:d1=’http://schemas.microsoft.com/crm/2006/Query’&gt;
    <xs:complexType>
    <xs:sequence>
    <xs:element name=’Query’ type=’d1:Query (or whatever)’/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>

    You should be able to catch a SoapException. Do note that the send port settings will affect *when* the exception is actually thown.

    I wrote a bit about this here:
    http://www.winterdom.com/weblog/2005/03/30/HandlingErrorsInOrchestrationsFromInvokedWebServices.aspx

    in reply to: NON-Uniform SEQ Convoy Issue #14077

    In your case, you have a requirement that Message A is received first. You need to ensure this happens. You will need to make sure you have order delivery enabled (see my lab on Message Debatching). Maybe you are just missing this setting on your Receive Port inside the Orchestration..

    If you can not guarantee A will arrive first you will need to build some other process to catch Message B and wait until Message A arrives. A few ways to do that – none that are very elegant.

    in reply to: Sending emails #15202

    Yes, you should be able to get that kind of behavior if you want with a little work. I’m not a Notification Services Expert by any means, but there is some good information out there that might be useful:

    http://www.codeproject.com/dotnet/SQLNS.asp
    http://www.microsoft.com/technet/prodtechnol/sql/2000/evaluate/sqlnsto.mspx

    in reply to: Sending emails #15199

    I haven’t used Notification Services before. Can I schedule it to send emails at certain times? For instance, if the system hasn’t received results from respondents in 10, 20 … day intervals, it will send emails to remind them.

    Thanks a lot.

    in reply to: Sending emails #15201

    It should work well, I think, and Biztalks facilities for XML<->FF mapping should be very useful. I was only concerned you might be, for example, taking 100s or 1000s of addresses and start generating huge number of messages in a tight loop. Sounds like that might not be the case, though.

    That said, if you do need to send a huge number of emails, sounds like you could certainly extend that little part with Notification Services and still take advantage of BizTalk for all the rest.

    in reply to: Sending emails #15198

    Actually, what I want to do is to build a system that will take clients’ survey specifications (flat file), check and save to database. There will be another program which will build survey forms (Adobe) based on these specifications. The survey forms are then sent to respondents. Respondents fill out the forms and send back to the system where survey results are parsed and save to database. Finally survey results are converted to flat file or xml to send back to clients.

    Biztalk and Adobe are chosen for this project. Biztalk acts like a parser, taking in specifiations, sending survey forms to respondents, parsing the results received from respondents and sending confirmations/reminders to respondents.

    So do you think Biztalk is the right tool for this kind of project?

    in reply to: Business rule .net class #14129

    Hi JMan,

    I was a little lost writing my first Business Rules .net class and implementing the IFactRetriever interface – but I found a great sample on this very site that helped me get started.

    http://www.biztalkgurus.com/Samples/BizTalk-Business-Rules-In-Code.html

    Basically you have to create your class(es) and then a fact retrievier class that implements the IFactRetriever interface so the Business Rules Engine can access the data in your class. You won’t need the interface when you move the business rules into your orchestration. I read descriptions like this many times and still didn’t understand what to do until I saw this sample. Hope this helps!

    Regards,
    Cody

Viewing 15 posts - 7,501 through 7,515 (of 9,648 total)