|
Home > Archive > BizTalk Server Orchestration > July 2004 > Orchestartion Skipping Call to .NET Assembly
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Orchestartion Skipping Call to .NET Assembly
|
|
|
|
Hi All,
I have an Orchestartion that Calls a .Net Assembly(Serializable) in
Expression Shape for SQl Update .The Process works fine when i receive 100
Messages(Single Message size 3KB) at a time but Skips call to .NET
Assembly when there are like 200 Messages
Is this kind of some Leakage...how can i debug this
####.Net Assembly
[Serializable]
public class Test_Resp
{
public Test_Resp()
{
//
// TODO: Add constructor logic here
//
}
public void parse_conf_no(XmlDocument msg_in,ref string conf_no,ref
string error,ref string date_time,ref string loris_id)
{
string db_up_error="";
XmlNamespaceManager nsm = new XmlNamespaceManager(msg_in.NameTable);
nsm.AddNamespace("ns0","http://Test.Test_Response");
XmlNode root= msg_in.SelectSingleNode("ns0:Test_Resp",nsm);
try
{
XmlNode nodeA = root.SelectSingleNode("ns0:Test_Error",nsm);
error=nodeA.InnerText;
}
catch
{
error = "Cannot Parse Test_Error";
}
try
{
XmlNode nodeA = root.SelectSingleNode("ns0:Test_Confirm_No",nsm);
conf_no=nodeA.InnerText;
}
catch
{
conf_no="No Parse";
}
try
{
XmlNode nodeA = root.SelectSingleNode("ns0:Test_Date_Time",nsm);
date_time=nodeA.InnerText;
}
catch
{
date_time = "No Parse";
}
try
{
XmlNode nodeA = root.SelectSingleNode("ns0:Test_ID",nsm);
loris_id=nodeA.InnerText;
}
catch
{
loris_id= "0";
}
db_up_error=update_DB(loris_id,conf_no, error,date_time);
}
string update_DB(string rli_ros,string cfn_ros,string err_ros,string
dti_ros)
{
string ret_str="";
string SQL_str = "Update_DB";
string connString="Data Source=TEST_SHARE;Integrated
Security=SSPI;Initial Catalog=Test";
using(SqlConnection con_up= new SqlConnection(connString))
{
SqlCommand cmd_up = new SqlCommand(SQL_str,con_up);
try
{
cmd_up.CommandType=CommandType.StoredProcedure;
cmd_up.Parameters.Add("@ID_1",SqlDbType.Int).Value =
System.Convert.ToInt32(rli_ros);
cmd_up.Parameters.Add("@Node_3",SqlDbType.VarChar,20).Value=cfn_ros;
cmd_up.Parameters.Add("@Node_4",SqlDbType.VarChar,250).Value=err_ros;
cmd_up.Parameters.Add("@Node_9",SqlDbType.VarChar,50).Value=dti_ros;
con_up.Open();
cmd_up.ExecuteNonQuery();
ret_str="UpDated Test DB with Conf_No from Local";
}
catch
{
ret_str="Error in Updating Test DB";
}
finally
{
con_up.Close();
}
}
return ret_str;
}
}
Thanks,
| |
|
| I am sorry but I can not help you but I have an additional question on how you in detail write the code in the expression in the orch to pass the XmlDocument to your own method. I have tried this :
xmlDoc = My_Msg;
BTSSNClasses.MessageLogInfo.AddMessageLogPortNot(xmlDoc);
I have declare xmlDoc as a variable of the type System.Xml.XmlDocument
My_Msg is the orch message
The orch compiles, but I get this error in runtime:
Object reference not set to an instance of an object.
Exception type: NullReferenceException
Source: BTSSNClasses
Target Site: Void AddMessageLogPortNot(System.Xml.XmlDocument)
Thank you very mych if you can help
--
Regards Berit
"Tomms" wrote:
>
> Hi All,
>
> I have an Orchestartion that Calls a .Net Assembly(Serializable) in
> Expression Shape for SQl Update .The Process works fine when i receive 100
> Messages(Single Message size 3KB) at a time but Skips call to .NET
> Assembly when there are like 200 Messages
> Is this kind of some Leakage...how can i debug this
>
> ####.Net Assembly
> [Serializable]
> public class Test_Resp
> {
> public Test_Resp()
> {
> //
> // TODO: Add constructor logic here
> //
> }
>
>
> public void parse_conf_no(XmlDocument msg_in,ref string conf_no,ref
> string error,ref string date_time,ref string loris_id)
> {
>
> string db_up_error="";
>
> XmlNamespaceManager nsm = new XmlNamespaceManager(msg_in.NameTable);
> nsm.AddNamespace("ns0","http://Test.Test_Response");
>
> XmlNode root= msg_in.SelectSingleNode("ns0:Test_Resp",nsm);
> try
> {
>
> XmlNode nodeA = root.SelectSingleNode("ns0:Test_Error",nsm);
>
> error=nodeA.InnerText;
> }
> catch
> {
> error = "Cannot Parse Test_Error";
> }
> try
> {
> XmlNode nodeA = root.SelectSingleNode("ns0:Test_Confirm_No",nsm);
>
> conf_no=nodeA.InnerText;
>
> }
> catch
> {
> conf_no="No Parse";
> }
>
> try
> {
> XmlNode nodeA = root.SelectSingleNode("ns0:Test_Date_Time",nsm);
>
> date_time=nodeA.InnerText;
>
> }
> catch
> {
> date_time = "No Parse";
> }
>
> try
> {
> XmlNode nodeA = root.SelectSingleNode("ns0:Test_ID",nsm);
>
> loris_id=nodeA.InnerText;
>
> }
> catch
> {
> loris_id= "0";
> }
>
> db_up_error=update_DB(loris_id,conf_no, error,date_time);
>
> }
>
>
> string update_DB(string rli_ros,string cfn_ros,string err_ros,string
> dti_ros)
> {
> string ret_str="";
> string SQL_str = "Update_DB";
> string connString="Data Source=TEST_SHARE;Integrated
> Security=SSPI;Initial Catalog=Test";
> using(SqlConnection con_up= new SqlConnection(connString))
> {
> SqlCommand cmd_up = new SqlCommand(SQL_str,con_up);
>
> try
> {
> cmd_up.CommandType=CommandType.StoredProcedure;
>
> cmd_up.Parameters.Add("@ID_1",SqlDbType.Int).Value =
> System.Convert.ToInt32(rli_ros);
> cmd_up.Parameters.Add("@Node_3",SqlDbType.VarChar,20).Value=cfn_ros;
> cmd_up.Parameters.Add("@Node_4",SqlDbType.VarChar,250).Value=err_ros;
> cmd_up.Parameters.Add("@Node_9",SqlDbType.VarChar,50).Value=dti_ros;
>
> con_up.Open();
> cmd_up.ExecuteNonQuery();
> ret_str="UpDated Test DB with Conf_No from Local";
> }
> catch
> {
> ret_str="Error in Updating Test DB";
> }
> finally
> {
> con_up.Close();
>
> }
> }
>
> return ret_str;
> }
>
>
> }
>
>
>
> Thanks,
>
>
| |
|
| Hi Berit,
Parse is the object of the Class Test_Resp, under Variables in Orch.
Test_Response_1 is the Msg you recieve and all other parameters are
strings
Expression Shape
-----------------------------------------
Parse = new Test_Resp.Ros_Resp();
Parse.parse_conf_no(Test_Response_1,ref Conf_No,ref Error,ref
ros_date_time,ref ros_rip_lead_id);
--------------------------------------------
Regards,
| |
|
| Hi Berit,
Check July 27 Post on
invoke c# classes from orchestrations
Regards,
|
|
|
|
|