>That is perfectly platform-neutral.
> Thanks
>>That is perfectly platform-neutral.
> I've read some of your critique about the ultimate goal of a service
> Agnostic and durable, and the "training wheels" of VS.NET.
> Would you have a wdsl signature of such an struct array,
> or point me to a web service that does.
This is simpler than it sounds. You should aim to return what is known as a
Data Transfer Object (DTO). This sort of object is meant to do nothing more
than transfer data from one layer to another. It is not meant to have any
behavior associated with it at all.
To give a simple example of the sort of object I mean:
public struct Order {
public int ID;
public int CustomerID;
public DateTime OrderDate;
public OrderLineItem[] LineItems;
}
public struct OrderLineItem {
public int ID;
public int Quantity;
public float SalePrice;
public Product Item;
}
public struct Product {
public int ID;
public string Name;
public float StandardPrice;
// etc.
}
[WebMethod]
public Order[] GetOrdersByCustomerID(int id)
{
...
}
This is a set of primitive types, and arrays and structs of primitive types,
etc. This should all map nicely and by default to and from WSDL and XSD.
Messages of this nature should be useable by any platform.

Signature
John Saunders [MVP]
John Sitka - 29 Aug 2007 13:41 GMT
Thanks,
That's what I ended up with. I realize now that in fact I didn't
want a wsdl, I just wanted the most basic of
returned XML pattern which I now understand from your
example would be ArrayofOrder.
a very simple complex type made up of Orders
That leads me to two more questions.
How would this be delivered "as messaging". I've heard mention of this.
How would I encrypt this returned DTO.
>> Thanks
>>>That is perfectly platform-neutral.
[quoted text clipped - 38 lines]
> This is a set of primitive types, and arrays and structs of primitive types, etc. This should all map nicely and by default to and
> from WSDL and XSD. Messages of this nature should be useable by any platform.