BizTalk Server General - External Assembly calls from a Map

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > December 2005 > External Assembly calls from a Map





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 External Assembly calls from a Map
Gareth ( Auckland - NZ )

2005-09-04, 8:47 pm

Hi,

I've implemented a helper class for my map which will provide access to
external logic and database interaction. It is necessary for the method calls
on the external assembly to return multiple values, which would suggest the
use of an array or collection of some sort as the return data type.

I'm however getting 'Object type cannot be converted to target type' errors
when trying to access the result of the external assembly call i.e. return
list[0];

Is it possible to have this sort of interaction with an external assembly or
is it necessary to pass only string variables around? Can anyone provide me
with a sample or instruction on how to implement this.

Thanks in advance
Gareth

Alan Smith

2005-09-05, 7:47 am

Hi,

I've only been able to figure out using string parameters. You may have a
bit more power if you create custim functioids, but i've not tried that.
Another option may be to call the helper class from an orchestration, passing
the messages as XmlDocuments, if your scenario supports this.

Regards,

Alan



--
The Bloggers Guide to BizTalk
http://geekswithblogs.com/asmith



"Gareth ( Auckland - NZ )" wrote:

> Hi,
>
> I've implemented a helper class for my map which will provide access to
> external logic and database interaction. It is necessary for the method calls
> on the external assembly to return multiple values, which would suggest the
> use of an array or collection of some sort as the return data type.
>
> I'm however getting 'Object type cannot be converted to target type' errors
> when trying to access the result of the external assembly call i.e. return
> list[0];
>
> Is it possible to have this sort of interaction with an external assembly or
> is it necessary to pass only string variables around? Can anyone provide me
> with a sample or instruction on how to implement this.
>
> Thanks in advance
> Gareth
>

Jon Flanders[MVP]

2005-09-05, 5:57 pm

With a custom functiod - you can create a functoid that works like sum or
avg - or like the database functiod (where the database functiod returns
multiple values and then uses the value extractor to get those values)

--
Jon Flanders
http://www.masteringbiztalk.com/blogs/jon/

"Alan Smith" <AlanSmith@discussions.microsoft.com> wrote in message
news:78485890-DF93-447E-9CDC-542F14724D2E@microsoft.com...[vbcol=seagreen]
> Hi,
>
> I've only been able to figure out using string parameters. You may have a
> bit more power if you create custim functioids, but i've not tried that.
> Another option may be to call the helper class from an orchestration,
> passing
> the messages as XmlDocuments, if your scenario supports this.
>
> Regards,
>
> Alan
>
>
>
> --
> The Bloggers Guide to BizTalk
> http://geekswithblogs.com/asmith
>
>
>
> "Gareth ( Auckland - NZ )" wrote:
>


Gareth ( Auckland - NZ )

2005-09-05, 5:57 pm

Thanks guys, looks like i'll be investigating the use of Custom Functoids then.

"Jon Flanders[MVP]" wrote:

> With a custom functiod - you can create a functoid that works like sum or
> avg - or like the database functiod (where the database functiod returns
> multiple values and then uses the value extractor to get those values)
>
> --
> Jon Flanders
> http://www.masteringbiztalk.com/blogs/jon/
>
> "Alan Smith" <AlanSmith@discussions.microsoft.com> wrote in message
> news:78485890-DF93-447E-9CDC-542F14724D2E@microsoft.com...
>
>
>

dickdijkstra@hotmail.com

2005-09-06, 6:02 pm

I think it's rather complicated to put all this logic into a map.
Wouldn't it be better to do your all mapping in an external assembly
instead of calling external logic from BizTalk mapper?

Niclas

2005-12-08, 7:51 am

I have had a similar situation, but didn't manage to receive data from an
external assembly as an array. What I did instead was to concatenate the
returnvalues in to one string where every value had a fixed lenght. Then I
used custom functoids to extract the the values from the different positions
in the string.

Not an optimal solution, but it works.

"Gareth ( Auckland - NZ )" wrote:

> Hi,
>
> I've implemented a helper class for my map which will provide access to
> external logic and database interaction. It is necessary for the method calls
> on the external assembly to return multiple values, which would suggest the
> use of an array or collection of some sort as the return data type.
>
> I'm however getting 'Object type cannot be converted to target type' errors
> when trying to access the result of the external assembly call i.e. return
> list[0];
>
> Is it possible to have this sort of interaction with an external assembly or
> is it necessary to pass only string variables around? Can anyone provide me
> with a sample or instruction on how to implement this.
>
> Thanks in advance
> Gareth
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com