BizTalk Server Applications Integration - calling .net class from biztalk 2004 orchestration

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Applications Integration > September 2004 > calling .net class from biztalk 2004 orchestration





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 .net class from biztalk 2004 orchestration
Ruchi

2004-08-23, 7:54 am

I am trying to pass a xml document from biztalk to vb.net and
read a value from the document .. perform manupulation and again
return a value from vb.net to biztalk.

I am getting a error of file or assembly name or dependency was not found.
I have checked everything but not able to solve

Code in expression shape is
Total=addfile.AppendFiles1(IndentInstance);

vb.net
Public Class Append
Public Function AppendFiles1(ByVal Doc As XmlDocument) As String
Dim m_xmld As New XmlDocument
Dim m_nodelist As XmlNodeList
Dim m_node As XmlNode
Dim Qty As String

m_xmld = Doc
Dim root As XmlElement = m_xmld.DocumentElement
m_node = root.FirstChild
m_node = m_node.NextSibling
Qty = m_node.InnerText
Return Qty

End Function

End Class




Devdutt Patnaik

2004-08-23, 5:50 pm

Verify that your external assembly dll is installed into GAC i.e assuming
that is the file or dependancy which is not being found.

Regards
Dev

"Ruchi" <ruchi@discussions.microsoft.com> wrote in message
news:215D912C-059A-4CB7-9630-852177E3E9DB@microsoft.com...
> I am trying to pass a xml document from biztalk to vb.net and
> read a value from the document .. perform manupulation and again
> return a value from vb.net to biztalk.
>
> I am getting a error of file or assembly name or dependency was not found.
> I have checked everything but not able to solve
>
> Code in expression shape is
> Total=addfile.AppendFiles1(IndentInstance);
>
> vb.net
> Public Class Append
> Public Function AppendFiles1(ByVal Doc As XmlDocument) As String
> Dim m_xmld As New XmlDocument
> Dim m_nodelist As XmlNodeList
> Dim m_node As XmlNode
> Dim Qty As String
>
> m_xmld = Doc
> Dim root As XmlElement = m_xmld.DocumentElement
> m_node = root.FirstChild
> m_node = m_node.NextSibling
> Qty = m_node.InnerText
> Return Qty
>
> End Function
>
> End Class
>
>
>
>



ruchi

2004-08-23, 5:50 pm

I have added the code in assembly for strong key
and installed the assembly dll using gauctil.exe in bin folder
where schema and orchest. dll is also present

"Devdutt Patnaik" wrote:

> Verify that your external assembly dll is installed into GAC i.e assuming
> that is the file or dependancy which is not being found.
>
> Regards
> Dev
>
> "Ruchi" <ruchi@discussions.microsoft.com> wrote in message
> news:215D912C-059A-4CB7-9630-852177E3E9DB@microsoft.com...
>
>
>

Devdutt Patnaik

2004-08-23, 5:50 pm

Can you please copy and paste the error that you are getting?

"ruchi" <ruchi@discussions.microsoft.com> wrote in message
news:9CF52746-E933-47DF-A6D3-BF13D0F72752@microsoft.com...[vbcol=seagreen]
> I have added the code in assembly for strong key
> and installed the assembly dll using gauctil.exe in bin folder
> where schema and orchest. dll is also present
>
> "Devdutt Patnaik" wrote:
>
assuming[vbcol=seagreen]
found.[vbcol=seagreen]


ruchi

2004-08-23, 5:50 pm


File or assembly name ClassLibrary1, or one of its dependencies, was not
found.
Assembly name ClassLibrary1


"Devdutt Patnaik" wrote:

> Can you please copy and paste the error that you are getting?
>
> "ruchi" <ruchi@discussions.microsoft.com> wrote in message
> news:9CF52746-E933-47DF-A6D3-BF13D0F72752@microsoft.com...
> assuming
> found.
>
>
>

Devdutt Patnaik

2004-08-23, 5:50 pm

Is ClassLibrary1, the name of you external VB.net assembly? In that case can
you go to c:\WINDOWS\assembly and verify whether you can see your assembly
listed there?
Have you restarted BizTalk Services after installing your assembly into GAC?

Regards
Dev

"ruchi" <ruchi@discussions.microsoft.com> wrote in message
news:9B3E4206-5303-4914-8118-A3A4227943EF@microsoft.com...[vbcol=seagreen]
>
> File or assembly name ClassLibrary1, or one of its dependencies, was not
> found.
> Assembly name ClassLibrary1
>
>
> "Devdutt Patnaik" wrote:
>
not[vbcol=seagreen]
String[vbcol=seagreen]


ruchi

2004-08-23, 5:50 pm

Ya the dll is present in assembly folder.
I have restarted orches,ports

Error code System.IO.FileNotFoundException
Error description File or assembly name ClassLibrary1, or one of its
dependencies, was not found

"Devdutt Patnaik" wrote:

> Is ClassLibrary1, the name of you external VB.net assembly? In that case can
> you go to c:\WINDOWS\assembly and verify whether you can see your assembly
> listed there?
> Have you restarted BizTalk Services after installing your assembly into GAC?
>
> Regards
> Dev
>
> "ruchi" <ruchi@discussions.microsoft.com> wrote in message
> news:9B3E4206-5303-4914-8118-A3A4227943EF@microsoft.com...
> not
> String
>
>
>

Devdutt Patnaik

2004-08-23, 5:50 pm

Have you restarted "BizTalk Service BizTalk Group :
BizTalkServerApplication" service from the Services console?


"ruchi" <ruchi@discussions.microsoft.com> wrote in message
news:6123C550-AE6E-4265-8611-6910F27D8C7F@microsoft.com...[vbcol=seagreen]
> Ya the dll is present in assembly folder.
> I have restarted orches,ports
>
> Error code System.IO.FileNotFoundException
> Error description File or assembly name ClassLibrary1, or one of its
> dependencies, was not found
>
> "Devdutt Patnaik" wrote:
>
can[vbcol=seagreen]
assembly[vbcol=seagreen]
GAC?[vbcol=seagreen]
not[vbcol=seagreen]
again[vbcol=seagreen]
was[vbcol=seagreen]


Alan Smith

2004-08-23, 5:50 pm

Ruchi,

It could be the assembly version of the class dll is the problem. Have you set
it to a fixd version (1.0.0.0), or is it using the devault value (1.0.*.*).
Using
the default will mean that VisualStudio will increment the version number with
every build, meaning your BizTalk project will be looking for a version that
is
not in the GAC.

Hope this helps,

Alan

-----
BizTalk Patterns and Practices
http://geekswithblogs.com/asmith


"Ruchi" wrote:

> I am trying to pass a xml document from biztalk to vb.net and
> read a value from the document .. perform manupulation and again
> return a value from vb.net to biztalk.
>
> I am getting a error of file or assembly name or dependency was not found.
> I have checked everything but not able to solve
>
> Code in expression shape is
> Total=addfile.AppendFiles1(IndentInstance);
>
> vb.net
> Public Class Append
> Public Function AppendFiles1(ByVal Doc As XmlDocument) As String
> Dim m_xmld As New XmlDocument
> Dim m_nodelist As XmlNodeList
> Dim m_node As XmlNode
> Dim Qty As String
>
> m_xmld = Doc
> Dim root As XmlElement = m_xmld.DocumentElement
> m_node = root.FirstChild
> m_node = m_node.NextSibling
> Qty = m_node.InnerText
> Return Qty
>
> End Function
>
> End Class
>
>
>
>

ruchi

2004-08-24, 3:08 am

Thanks to Devdutt and alan
just wanted to know one more thing

If i am passing an xml document from BTS to .net class do i have
to use .LoadXML again in .net class. As i think BTS will load the
xml doc when BTS recive shape will be executed and then pass the doc to .net
class.
Is this right???
but when i am executing .net class the desired value is not getting changed.
I wanted to know when exactly the xml doc will load???


"Alan Smith" wrote:
[vbcol=seagreen]
> Ruchi,
>
> It could be the assembly version of the class dll is the problem. Have you set
> it to a fixd version (1.0.0.0), or is it using the devault value (1.0.*.*).
> Using
> the default will mean that VisualStudio will increment the version number with
> every build, meaning your BizTalk project will be looking for a version that
> is
> not in the GAC.
>
> Hope this helps,
>
> Alan
>
> -----
> BizTalk Patterns and Practices
> http://geekswithblogs.com/asmith
>
>
> "Ruchi" wrote:
>
ruchi

2004-08-24, 8:13 am

Debug mode it is displaying the following statement
'__XDomain_3.0.1.0_0': Loaded
'c:\windows\assembly\gac\classlibrary1\1
.0.0.0__76997a58d7414875\classlibrary1.dll', No symbols loaded.???
i am not getting ' y' as i have classlibrary1.dll in my assembly folder


"ruchi" wrote:
[vbcol=seagreen]
> Thanks to Devdutt and alan
> just wanted to know one more thing
>
> If i am passing an xml document from BTS to .net class do i have
> to use .LoadXML again in .net class. As i think BTS will load the
> xml doc when BTS recive shape will be executed and then pass the doc to .net
> class.
> Is this right???
> but when i am executing .net class the desired value is not getting changed.
> I wanted to know when exactly the xml doc will load???
>
>
> "Alan Smith" wrote:
>
Devdutt Patnaik

2004-08-24, 6:58 pm

Ruchi,
this looks suspiciously like BTS is using an older version of the class
library dll from its cache. Whenever you change your assembly and re-deploy
to GAC, make it a point to restart the BizTalk service from the Services
console. Put the gacutil /i statement and net stop -> net start statements
(for restarting BizTalk Services) in a .cmd file and use that cmd file as
the post-build command for your class library project. This will save you
the hassle each time you make some chane in your class library.
To answer you other question, when you pass a biztalk message to an external
library the XmlDocument inside the method will be loaded already. The
message variable will get its value in the orchestration, at the receive
shape or a construct message shape.
Regards
Dev

"ruchi" <ruchi@discussions.microsoft.com> wrote in message
news:898AD080-6C6B-497D-B64C-5AD7BC34602D@microsoft.com...
> Debug mode it is displaying the following statement
> '__XDomain_3.0.1.0_0': Loaded
>

'c:\windows\assembly\gac\classlibrary1\1
.0.0.0__76997a58d7414875\classlibrar
y1.dll', No symbols loaded.???[vbcol=seagreen]
> i am not getting ' y' as i have classlibrary1.dll in my assembly folder
>
>
> "ruchi" wrote:
>
..net[vbcol=seagreen]
changed.[vbcol=seagreen]
you set[vbcol=seagreen]
(1.0.*.*).[vbcol=seagreen]
number with[vbcol=seagreen]
version that[vbcol=seagreen]
found.[vbcol=seagreen]


Alan Smith

2004-08-24, 6:58 pm

Hi Ruchi,

I think i know what your getting at.

Rcv the document is InMsg.
Create an OutMsg message.

In a construct block, constructing OutMsg, use a message assigment with
something like this:


OutMsg = class.AppendFIles1 (InMsg)

(your AppendFIles1 method should return an XmlDocument.)

Cheers,

/Alan




"ruchi" wrote:
[vbcol=seagreen]
> Thanks to Devdutt and alan
> just wanted to know one more thing
>
> If i am passing an xml document from BTS to .net class do i have
> to use .LoadXML again in .net class. As i think BTS will load the
> xml doc when BTS recive shape will be executed and then pass the doc to .net
> class.
> Is this right???
> but when i am executing .net class the desired value is not getting changed.
> I wanted to know when exactly the xml doc will load???
>
>
> "Alan Smith" wrote:
>
ruchi

2004-08-25, 4:19 am


(your AppendFIles1 method should return an XmlDocument.)???

i want to pass a xml document to .net class and the return a single value
Total = class.appendfiles1(xmldocument)
the problem i am facing is that... total is not giving me the right value.
Code is right as i checked the same code using interface (form).
i am confused when is the xml is getting loaded exactly in orchestration ...
receive shape or i have to load it somewhere explicitly...???



"Alan Smith" wrote:
[vbcol=seagreen]
> Hi Ruchi,
>
> I think i know what your getting at.
>
> Rcv the document is InMsg.
> Create an OutMsg message.
>
> In a construct block, constructing OutMsg, use a message assigment with
> something like this:
>
>
> OutMsg = class.AppendFIles1 (InMsg)
>
> (your AppendFIles1 method should return an XmlDocument.)
>
> Cheers,
>
> /Alan
>
>
>
>
> "ruchi" wrote:
>
Billy DeLion

2004-09-02, 6:18 pm

I know this seems like a proof of concept type of project, but if you need a
value inside your orchestration from a field inside of a message, why don't
you make the field 'distinguished' and access it directly from an expression
shape?

"Ruchi" wrote:

> I am trying to pass a xml document from biztalk to vb.net and
> read a value from the document .. perform manupulation and again
> return a value from vb.net to biztalk.
>
> I am getting a error of file or assembly name or dependency was not found.
> I have checked everything but not able to solve
>
> Code in expression shape is
> Total=addfile.AppendFiles1(IndentInstance);
>
> vb.net
> Public Class Append
> Public Function AppendFiles1(ByVal Doc As XmlDocument) As String
> Dim m_xmld As New XmlDocument
> Dim m_nodelist As XmlNodeList
> Dim m_node As XmlNode
> Dim Qty As String
>
> m_xmld = Doc
> Dim root As XmlElement = m_xmld.DocumentElement
> m_node = root.FirstChild
> m_node = m_node.NextSibling
> Qty = m_node.InnerText
> Return Qty
>
> End Function
>
> End Class
>
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com