community-content

Forum Replies Created

Viewing 15 posts - 7,126 through 7,140 (of 9,652 total)
  • Author
    Posts
  • in reply to: xpath in orchestration – Problem #15661

    Have you tried writing a simple.net app to try to xpath out the data?  If your expression is wrong, that can usually help catch it (using SelectSingleNode).

     

    Might want to open the schema up inside BizTalk and view the node’s xpath expression in the editor.  That might point out an error as well.

     

    Also, double check namespaces since they play a key role in xpath inside BizTalk.

    in reply to: Schema Setup #15660

    Thats what I originally tired… but I tried setting those values (not group max occurs) again and the result is the same.  Here is the output… any other ideas?

    <Transactions ForeignKeyField="CustomerEntityID">
    <Transaction EntityTypeID="4">
    <ID AttributeName="ID">15</ID>
    <RepairNumber AttributeName="RepairNumber">101</RepairNumber>
    <TransactionCategories ForeignKeyField="TransactionEntityID">
     <TransactionCategory>
    <CategoryID AttributeName="CategoryID">714</CategoryID>
      <CategoryID AttributeName="CategoryID">715</CategoryID>
      <CategoryID AttributeName="CategoryID">719</CategoryID>
      <CategoryID AttributeName="CategoryID" />
      <CategoryID AttributeName="CategoryID">877</CategoryID>
      <CategoryID AttributeName="CategoryID">178</CategoryID>
      <CategoryID AttributeName="CategoryID">302</CategoryID>
      <CategoryID AttributeName="CategoryID">5</CategoryID>
      </TransactionCategory>
      </TransactionCategories>
      </Transaction>
      </Transactions>
    in reply to: routing edi messages #15659

    It's just solved,

    for info:

    one can route on:

    InvoiceInMessage(BTS.DestinationParty)

    in an orchestration and I think also on the send port subscription…

    in reply to: xpath in orchestration – Problem #15658

    I've tried every possible XPath xpression

    count(/spResponse/dbo.Person)

    count(//spResponse/dbo.Person)

    count(spResponse/dbo.Person)

    count(//dbo.Person)

    All of these expressions yield 0 !!! the <dbo.Person> node is there !! how come ?!

    Help! Por favor !

    in reply to: Application dependency in Biztalk #15657

    Yes, it's the pipeline problem.

     I create another pipeline using a correct schema then it works.

    Thanks 🙂

    in reply to: Schema Setup #15655

    You need to set maxOccurs on the TransactionCategory record to be unbounded and the maxOccurs on the CategoryID to be 1 (if you leave this property blank it defaults to 1)

    TransactionCategories
        TransactionCategory maxOccurs=unbounded
            CategoryID maxOccurs=<blank>

    If you have set the Group maxOccurs on any record you should reset it.

    in reply to: How can I resolve the Party Name #15654

    I have a small .Net helper class that allows you to cross reference the party properties.

    You can use the static method GetAliasFromSID to retrieve the OrganisationName:

    strPartyName = BTSParty.CrossReference.GetAliasFromSID(Message_1(BTS.SourcePartyID),"OrganisationName");

    Source:

    using System;
    using System.Data;
    using System.Data.SqlClient;
    using System.Management;
    using System.Xml;
    using Microsoft.BizTalk.ExplorerOM;
    using Microsoft.Win32;

    namespace BTSParty
    {
     /// <summary>
     /// Summary description for PartyAliasMapper.
     /// </summary>
     public class CrossReference
     {
      static private object syncRoot = new object();
      static private string MgmtDBConnString = String.Empty;

      public struct PartyDetails
      {
       public string SID;
       public string PartyName;
      }

      public static string GetMgmtDBConnectionString()
      {
       string BTSMgmtDBName = String.Empty, BTSMgmtDBServerName = String.Empty;
       //check to see if the string has already been retrieved.  If not, get it and store it.
       if( MgmtDBConnString.Length == 0 )
       {
        lock( syncRoot )
        {
         if( MgmtDBConnString.Length == 0)
         {
          ManagementObjectSearcher searcher =
           new ManagementObjectSearcher(@"root\MicrosoftBizTalkServer", "SELECT * FROM MSBTS_GroupSetting");
          foreach (ManagementObject Group in searcher.Get())
          {
           if(Group != null)
           {
            Group.Get();
            BTSMgmtDBName = Group["MgmtDbName"].ToString();
            BTSMgmtDBServerName = Group["MgmtDbServerName"].ToString();
           }      
          }
          if( BTSMgmtDBName.Length == 0 || BTSMgmtDBServerName.Length == 0 )
           throw new ApplicationException("Unable to find Management Database Name or Management Database Server Name");

          // Assuming Integrated Security is being used for database connection.
          MgmtDBConnString = string.Format("SERVER={0};DATABASE={1};Integrated Security=SSPI", BTSMgmtDBServerName, BTSMgmtDBName);
         }
        }
       }
       return MgmtDBConnString;
      }

      public static PartyDetails GetPartyFromAlias(string Alias, string Qualifier)
      {
       PartyDetails ThisParty;
       const string GetnvcSIDQueryString = "SELECT bts_party.nvcName, nvcSID " +
           "FROM bts_party_alias INNER JOIN bts_party " +
           "     ON bts_party_alias.nPartyID = bts_party.nID " +
           "   WHERE nvcValue='{0}' AND nvcQualifier='{1}'";

       ThisParty.SID = "s-1-5-7";   // set default SID to "Guest"
       ThisParty.PartyName = "";

       SqlConnection BTSMgmtDBconn = new SqlConnection(GetMgmtDBConnectionString());
       
       //Build the querystring by populating the Alias and Qualifier into the base query
       SqlCommand PartyIdCMD = new SqlCommand(string.Format(GetnvcSIDQueryString, Alias, Qualifier), BTSMgmtDBconn);

       // any exceptions raised here will be reported to the event log by the messaging engine.
       BTSMgmtDBconn.Open();
       SqlDataReader PartyReader = PartyIdCMD.ExecuteReader(CommandBehavior.CloseConnection);
       if(PartyReader.HasRows)
       {
        PartyReader.Read();
        ThisParty.PartyName = PartyReader.GetString(0);
        ThisParty.SID = PartyReader.GetString(1);
       }
       PartyReader.Close();
       BTSMgmtDBconn.Close();

       return ThisParty;
      }
      public static string GetSIDFromAlias(string Alias, string Qualifier)
      {
       string ThisSID = string.Empty;
       const string GetnvcSIDQueryString = "SELECT  nvcSID " +
           "FROM bts_party_alias INNER JOIN bts_party " +
           "     ON bts_party_alias.nPartyID = bts_party.nID " +
           "   WHERE nvcValue='{0}' AND nvcQualifier='{1}'";

       SqlConnection BTSMgmtDBconn = new SqlConnection(GetMgmtDBConnectionString());
       
       //Build the querystring by populating the Alias and Qualifier into the base query
       SqlCommand PartyIdCMD = new SqlCommand(string.Format(GetnvcSIDQueryString, Alias, Qualifier), BTSMgmtDBconn);

       // any exceptions raised here will be reported to the event log by the messaging engine.
       BTSMgmtDBconn.Open();
       SqlDataReader PartyReader = PartyIdCMD.ExecuteReader(CommandBehavior.CloseConnection);
       if(PartyReader.HasRows)
       {
        PartyReader.Read();
        ThisSID = PartyReader.GetString(0);
       }
       PartyReader.Close();
       BTSMgmtDBconn.Close();

       return ThisSID;
      }
      public static string GetAliasFromSID(string SID, string Qualifier)
      {
       string ThisAlias = string.Empty;

       const string GetnvcSIDQueryString = "SELECT bts_party_alias.nvcValue " +
           "FROM bts_party_alias INNER JOIN bts_party " +
           "     ON bts_party_alias.nPartyID = bts_party.nID " +
           "   WHERE bts_party.nvcSID='{0}' AND bts_party_alias.nvcQualifier='{1}'";

       SqlConnection BTSMgmtDBconn = new SqlConnection(GetMgmtDBConnectionString());
       
       //Build the querystring by populating the SID and Qualifier into the base query
       SqlCommand PartyIdCMD = new SqlCommand(string.Format(GetnvcSIDQueryString, SID, Qualifier), BTSMgmtDBconn);

       // any exceptions raised here will be reported to the event log by the messaging engine.
       BTSMgmtDBconn.Open();
       SqlDataReader PartyReader = PartyIdCMD.ExecuteReader(CommandBehavior.CloseConnection);
       if(PartyReader.HasRows)
       {
        PartyReader.Read();
        ThisAlias = PartyReader.GetString(0);
       }
       PartyReader.Close();
       BTSMgmtDBconn.Close();

       return ThisAlias;
      }

      public static string GetCustomPropertyFromSID(string SID, string customPropertyName)
      {
       string ThisProperty = string.Empty;

       const string GetnvcSIDQueryString = "SELECT bts_party.nvcCustomData " +
           "FROM bts_party" +
           "   WHERE bts_party.nvcSID='{0}'";

       SqlConnection BTSMgmtDBconn = new SqlConnection(GetMgmtDBConnectionString());
       
       //Build the querystring by populating the SID and Qualifier into the base query
       SqlCommand PartyIdCMD = new SqlCommand(string.Format(GetnvcSIDQueryString, SID), BTSMgmtDBconn);

       // any exceptions raised here will be reported to the event log by the messaging engine.
       BTSMgmtDBconn.Open();
       SqlDataReader PartyReader = PartyIdCMD.ExecuteReader(CommandBehavior.CloseConnection);
       if(PartyReader.HasRows)
       {
        try
        {
         PartyReader.Read();
         XmlDocument customData = new XmlDocument();
         customData.LoadXml( PartyReader.GetString(0));
         XmlNode propertyNode = customData.SelectSingleNode("/Properties/" + customPropertyName);
         ThisProperty = propertyNode.InnerText;
        }
        catch(Exception)
        { }
       }
       PartyReader.Close();
       BTSMgmtDBconn.Close();

       return ThisProperty;
      }
     }
    }

    in reply to: xpath in orchestration – Problem #15652

    is spResponse the root node?

    Have you tried personCount = xpath(xmlDom,"count(/spResponse/dbo.Person)");

    in reply to: How can I resolve the Party Name #15651

    Does it need to be promoted in order to be accessible at that point in the process?

    in reply to: routing edi messages #15650

    maybe you can route on sender and document type.

    The pub-sub nature of 2006 should accomplish your routing for you.

    The sender and receiver are Covast envelope fields in the node just below root. should be called Covast Envelope

     

    in reply to: ANY element to grab and pass along HTML #15649

    Nevermind. The Mass Copy functoid exists for this purpose.

    in reply to: Application dependency in Biztalk #15647

    Your pipelines have hard coded values for the full assembly name of your schema.  So, if you move the schema from one project to another or change strong name keys, you need to remove the flat file disassembler from the pipeline and re add it. 

     

    Could this be the problem?  Did you change strong name keys?

    in reply to: How can I resolve the Party Name #15644

    I have tried that. The BTS.Source does not seem to have a value. I used this code in an expression shape:

    System.Diagnostics.Debug.WriteLine("PID "+Message_1(BTS.SourcePartyID));
    System.Diagnostics.Debug.WriteLine("SourceParty "+Message_1(BTS.SourceParty));

    And the following output:

    And the following output:

    [1444] PID S-1-9-893551331-2747879358-2265075479-3534360612-3810352465-619529870-2917489459-2111898011

    And this XLANG/s error:

    [1444] PID S-1-9-893551331-2747879358-2265075479-3534360612-3810352465-619529870-2917489459-2111898011

    And this XLANG/s error:

    There is no value associated with the property 'BTS.SourceParty' in the message.

    If it is not the right way, what is?

    Johan

     

     

    in reply to: How can I resolve the Party Name #15643

    How about BTS.SourceParty ? <but notice that the BizTalk official documentation says: This property supports the BizTalk Server 2006 infrastructure and is not intended to be used directly from your code.

     

     

    in reply to: Application dependency in Biztalk #15640

    No, it's not circular dependency. (Not that complicated, yet. 🙂

    My main Application depends on a simple app only including a pipeline. After trying to break the dependency (but failed), the pipeline stopped working.  There's a flat file dissasember with a document schema defined to using built-in Global Property Schema –"BTS.soap_encoding_1__1+anyType, Microsoft.BizTalk.GlobalPropertySche"

     The error says: Unable to match the data in the input stream.  Fialed to execute the flatfile disassembler.

    But i didn't change any schema and the one used in pipeline is a built-in, how come have this error…..

    I deleted those 2 applications and rebuild all, still no luck.

Viewing 15 posts - 7,126 through 7,140 (of 9,652 total)