BizTalk Server Applications Integration - Arrays and Biztalk web references

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Applications Integration > August 2004 > Arrays and Biztalk web references





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 Arrays and Biztalk web references
ian.thomas@online.nospam

2004-08-03, 8:13 am

Hallo,

I've got a couple of web services that I want to consume with BT but unfortunately the underlying ASMXs return arrays of person objects. Within the WSDL, therefore, there is an ArrayOfPerson type. On failing to get a web reference to work I've discovere
d that BT doesn't support creating web references for services that use arrays.

Is there any way of returning multiple Person objects such that BT can understand the WSDL and if so how do you specifiy this in the WSDL?

Thanks

Ian
ian.thomas@online.nospam

2004-08-03, 8:13 am

It's OK I've answered my own question:

Arrays aren't supported and so you need to change your .net web service to return a normal class that encloses the array e.g.

intead of:

public Person[] findPeople(string surname)

you need:

public PersonSearchResult findPeople(string surname)

with the return class enclosing the actual array of matches:

public class PersonSearchResult
{
public Person[] matchingPeople;
}

Luckily I have control over these particular web services and so I can alter the signatures; it'a bit of pain, though, for integrating existing services.

Thanks

Ian
"ian.thomas@online.nospam" wrote:

> Hallo,
>
> I've got a couple of web services that I want to consume with BT but unfortunately the underlying ASMXs return arrays of person objects. Within the WSDL, therefore, there is an ArrayOfPerson type. On failing to get a web reference to work I've discove

red that BT doesn't support creating web references for services that use arrays.
>
> Is there any way of returning multiple Person objects such that BT can understand the WSDL and if so how do you specifiy this in the WSDL?
>
> Thanks
>
> Ian

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com