Re: Exporting embeded objects passed in object[] parameters

Tech-Archive recommends: Speed Up your PC by fixing your registry



Let's say you have a customer object that includes finance information and
inventory information. In this case the customer object has a reference to a
finance object and an inventory object. The client creates and initializes a
finance object and an inventory object. Then it creates the client object and
initializes the client object with the finance and inventory object.

The web method signature might be

class ClientInfo
{
FinanceInfo financeInfo;
InventoryInfo inventoryInfo;
}

[WebMethod(EnableSession = true)]
public void SendClientInfo(ClientInfo clientInfo)
{
...
}

This is an example; whether or not you'd design the class hierarchy like
this isn't important.

FinanceInfo and InventoryInfo won't appear in the proxy dll or the document
description.

I hope this answers your question. At least they don't in mine.


--
Al


"John Saunders" wrote:

"Al" <Al@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:288F8E1C-64AF-4F8B-BE45-18DDD2287A20@xxxxxxxxxxxxxxxx
Hello,

I'm writing a service using VS2005 and C#. I've found that only the
objects
used as parameters in WebMethods get exported to proxy dlls and the
Service
Description. I'd like my service clients to be able to use the objects
I've
defined in messages to the service and send them as "object" parameters or
as
embeded items in other objects.

I can work around the problem by declaring all of the objects as public
members of a dummy class and then putting a dummy WebMethod on my service
class that takes a reference to the dummy class. If I do this the xml
Service
Description contains all of the type information and WSDL.EXE emits the
correct information into the proxy dll. It occurs to me, though, that
there
must be some type of directive or something that lets you tell the proxy
and
Service Description generator that you want certain items included in
their
output.

Can anyone tell me the correct way to do this?

I don't understand. You have defined some classes which are not used as
parameters to or return types from your web service. Yet you want the
clients of your web service to be able to use them? What will they be using
them _for_?

John



.



Relevant Pages

  • Re: Exporting embeded objects passed in object[] parameters
    ... finance object and an inventory object. ... The client creates and initializes ... FinanceInfo and InventoryInfo won't appear in the proxy dll or the ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Exporting embeded objects passed in object[] parameters
    ... finance object and an inventory object. ... Then it creates the client object and ... FinanceInfo and InventoryInfo won't appear in the proxy dll or the document ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: OT: labor costs, auto bailout
    ... All of the importers, without a single exception, have a very large and increasing inventory of unsold vehicles moving from the ports onto rented land in the local area. ... None of the Big Three can finance new vehicle sales today and in January the importers will start to broom their inventories at fire sale prices and provide whatever financing is needed in order to convert their inventory to whatever cash they can. ... Production exceeding purchasing so storage of excess cars and reducing production and hours. ...
    (rec.crafts.metalworking)
  • Re: OT: labor costs, auto bailout
    ... increasing inventory of unsold vehicles moving from the ports onto rented ... None of the Big Three can finance new vehicle sales today and in January the ... importers will start to broom their inventories at fire sale prices and ... vehicles, the Big Three or even the Big Six, won't need to produce a single ...
    (rec.crafts.metalworking)
  • New finance/economics positions at http://jobs.phds.org, May 08, 2006
    ... UK Hedge Fund: Huxley Associates, ... Client, New York, NY. ... High Frequency Trading: LaMonica Associates, NYC, NY. ... Vice President for Business and Finance: ...
    (sci.econ)