Ask a Question related to ASP.NET Web Services, Design and Development.
-
Eric Porter #1
Custom Datatypes and how to get rid of ArrayOfAnyType.
I am writing a Web Service, using ASP.NET. I have two different collections
in a separate DLL, which I want to return from two different WebMethods in
the same Web Service. However, when serialized, both collections appear in
the XML message something like this :
<?xml version="1.0" encoding="utf-8" ?>
<ArrayOfAnyType xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xmlns="http://eric.the.name.space.com">
<anyType xsi:type="TheRealType">
<OwnerId>Id</OwnerId>
<Key>Key</Key>
</anyType>
<anyType xsi:type="TheRealType">
<OwnerId>Id</OwnerId>
<Key>Key</Key>
</anyType>
</ArrayOfAnyType>
Now, how can I force the WebMethod to make the elements within the array not
be <anyType xsi:type="TheRealType">...</>, but be <TheRealType> ... </>, and
the array not to be ArrayOfAnyType, but to be ArrayOfTheRealType?
Currently, because the two methods return ArrayOfAnyType, it causes a
confusion in .NET, when it creates the temporary C# DLL, and I get an
InvalidCastException (see previous posting).
Thanks.
Eric Porter Guest
-
Converting Datatypes
Hi, I need to change a varchar field in my DB to a small date/time field. The problem is I don't want to lose the data, as I have quite a lot of... -
Complex DataTypes
Ok, I created a Web Service using PHP5 SOAP extension. I created the WSDL and I can serve and consume that service in PHP. Now I am trying to... -
sql=access=datatypes?
What would be the corresponding data types for the following existing Access data types: Autonumber = (UniqueIdentifier?) Number =... -
Persisting Component Datatypes in Custom Controls
*** Appologies if a very similar version of this appears in the group *** I noticed my question has been answered before but I'm not very clear... -
Datatypes in Informix
Hi, I am trying to obtain an extract of my Informix database into a formatted spreadsheet. The information of the fields in a table is... -
Eric Porter #2
Re: Custom Datatypes and how to get rid of ArrayOfAnyType.
I should add that the <ArrayOfAnyType> nonesense is associated with the HTTP
POST test. If the documentation of the test Web page is to be believed,
using
[return : XmlElement(typeof(TheRealType))]
on the web method definition gives the correct sort of soap message.
But it would be nice if this were worked in the HTTP POST test.
Thanks.
"Eric Porter" <bodyremp70@hotmail.com> wrote in message
news:cc3nc5$jcn$1$830fa17d@news.demon.co.uk...collections> I am writing a Web Service, using ASP.NET. I have two differentin> in a separate DLL, which I want to return from two different WebMethods in
> the same Web Service. However, when serialized, both collections appearnot> the XML message something like this :
>
> <?xml version="1.0" encoding="utf-8" ?>
> <ArrayOfAnyType xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
> xmlns="http://eric.the.name.space.com">
> <anyType xsi:type="TheRealType">
> <OwnerId>Id</OwnerId>
> <Key>Key</Key>
> </anyType>
> <anyType xsi:type="TheRealType">
> <OwnerId>Id</OwnerId>
> <Key>Key</Key>
> </anyType>
> </ArrayOfAnyType>
>
> Now, how can I force the WebMethod to make the elements within the arrayand> be <anyType xsi:type="TheRealType">...</>, but be <TheRealType> ... </>,> the array not to be ArrayOfAnyType, but to be ArrayOfTheRealType?
>
> Currently, because the two methods return ArrayOfAnyType, it causes a
> confusion in .NET, when it creates the temporary C# DLL, and I get an
> InvalidCastException (see previous posting).
>
> Thanks.
>
>
Eric Porter Guest



Reply With Quote

