Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / December 2004

Tip: Looking for answers? Try searching our database.

Custom Class in a Web Service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Josue Avila M. - 26 Nov 2004 04:21 GMT
   HI
  I Design a Class  Wich contains severals DataTypes . (2 Strings and Other
Data Types from a Class wich i Desing to)
  Its Something like This

 <serializable()>
  Public Class Emitor
         Public NameMsg as String
         Public KeyCode  as String
         Public Parmas    as DAtaParams

  Public Class  DataParams
  inherits Arraylist

Ok thats de Way ... When i Use The Class into the web service it create the
.asmx succesfuly but in the soap envelope seccion
it does'nt represent the Xml Code Element to the datatype of Param argument
.. So on the client Cosumer does reconize it

I Read in a document that i need to use the SoapRPCMethod Attribute and the
SoapInlcude (gettype(class)) in the function that use to pass this data
However when i compile the WS ... i get an error abot the
system.data.dataset it imposible to searilize on a sope code ... (Ha!!!! I
missed... it the web service im using a Dataset and in tje DataParams Class
To )

So please Any Body Help..
Where Do i Put the Descripto for the class or do i Have to use XMLAttributes
on my class definition ...
Thaks A lot
Dan Rogers - 02 Dec 2004 01:29 GMT
Hi Josue,

Custom classes such as this are definitely supported in both return and
parameter arguments for web methods.  The default behaviors
(SoapDocumentServiceAttribute) handles this well.

When you say it is not seen in the client, what do you mean.  If you have
your custom classes as inputs or outputs to your methods, the WSDL should
reflect the right types, and the generated proxy will contain a projection
of your classes.

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
From: "Josue Avila M." <josue_avila200@hotmail.com>
Subject: Custom Class in a Web Service
Date: Thu, 25 Nov 2004 22:21:43 -0600
Lines: 44
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <udLdv920EHA.1652@TK2MSFTNGP11.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: dsl-201-129-76-67.prod-infinitum.com.mx 201.129.76.67
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11
.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7642
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

   HI
  I Design a Class  Wich contains severals DataTypes . (2 Strings and Other
Data Types from a Class wich i Desing to)
  Its Something like This

 <serializable()>
  Public Class Emitor
         Public NameMsg as String
         Public KeyCode  as String
         Public Parmas    as DAtaParams

  Public Class  DataParams
  inherits Arraylist

Ok thats de Way ... When i Use The Class into the web service it create the
.asmx succesfuly but in the soap envelope seccion
it does'nt represent the Xml Code Element to the datatype of Param argument
. So on the client Cosumer does reconize it

I Read in a document that i need to use the SoapRPCMethod Attribute and the
SoapInlcude (gettype(class)) in the function that use to pass this data
However when i compile the WS ... i get an error abot the
system.data.dataset it imposible to searilize on a sope code ... (Ha!!!! I
missed... it the web service im using a Dataset and in tje DataParams Class
To )

So please Any Body Help..
Where Do i Put the Descripto for the class or do i Have to use XMLAttributes
on my class definition ...
Thaks A lot

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.