BizTalk Server Orchestration - calling a dll from the orchestrationq

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > February 2005 > calling a dll from the orchestrationq





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 calling a dll from the orchestrationq
john

2005-02-26, 2:50 am

When I try calling this method from an orchestration I get a
missingmethodexception error

this is how i call it:

mathVar.WriteToFile("hello");

Thanks in advance



public int WriteToFile(string sText)

{

try

{

//Pass the filepath and filename to the StreamWriter Constructor

StreamWriter sw = new StreamWriter("C:\\Test.txt");

//Write a line of text

sw.WriteLine(sText);

//Write a second line of text

sw.WriteLine("From the StreamWriter class");

//Close the file

sw.Close();

return 0;

}

catch(Exception e)

{

return 1;



}

finally

{

//Console.WriteLine("Executing finally block.");

}

}


Jon Flanders[DevelopMentor]

2005-02-26, 5:52 pm

I would venture to guess that an older version of your assembly is in the
GAC. Make sure you do gacutil -i on the assembly and restart the BizTalk
host process.

--
Jon Flanders [DevelopMentor]
http://staff.develop.com/jfland/
http://www.develop.com/courses/biztalk
"john" <john88m@hotmail.com> wrote in message
news:e%23NNfN9GFHA.3912@TK2MSFTNGP10.phx.gbl...
> When I try calling this method from an orchestration I get a
> missingmethodexception error
>
> this is how i call it:
>
> mathVar.WriteToFile("hello");
>
> Thanks in advance
>
>
>
> public int WriteToFile(string sText)
>
> {
>
> try
>
> {
>
> //Pass the filepath and filename to the StreamWriter Constructor
>
> StreamWriter sw = new StreamWriter("C:\\Test.txt");
>
> //Write a line of text
>
> sw.WriteLine(sText);
>
> //Write a second line of text
>
> sw.WriteLine("From the StreamWriter class");
>
> //Close the file
>
> sw.Close();
>
> return 0;
>
> }
>
> catch(Exception e)
>
> {
>
> return 1;
>
>
>
> }
>
> finally
>
> {
>
> //Console.WriteLine("Executing finally block.");
>
> }
>
> }
>
>



Neal Walters

2005-02-28, 5:53 pm

Might also check static method vs instance method.
Looks like you have an orchestration called mathVar that we must assume is
tied ot the right class?

Neal Walters
http://Biztalk-Training.com


"john" wrote:

> When I try calling this method from an orchestration I get a
> missingmethodexception error
>
> this is how i call it:
>
> mathVar.WriteToFile("hello");
>
> Thanks in advance
>
>
>
> public int WriteToFile(string sText)
>
> {
>
> try
>
> {
>
> //Pass the filepath and filename to the StreamWriter Constructor
>
> StreamWriter sw = new StreamWriter("C:\\Test.txt");
>
> //Write a line of text
>
> sw.WriteLine(sText);
>
> //Write a second line of text
>
> sw.WriteLine("From the StreamWriter class");
>
> //Close the file
>
> sw.Close();
>
> return 0;
>
> }
>
> catch(Exception e)
>
> {
>
> return 1;
>
>
>
> }
>
> finally
>
> {
>
> //Console.WriteLine("Executing finally block.");
>
> }
>
> }
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com