Christian responds to my earlier question on a comment: "As you are using a Document/literal ASMX based Web Service which aims at *messages* and not *RPCs* (you know this distinction and the ongoing discussions ...), the top element of the serialized instance is just a signal for what kind of message is sent back to the original caller ... nothing more. The inbound message is GetCustomer and the outbound is GetCustomerResult - you see: just XML block :-)"

Thanks for the comment!. I understand what's going on with document/literal and the messages going back and forth, however, that was not what I was refering to.

You say the inbound message is GetCustomer and the outbound message is GetCustomerResult. Well, no, not really. The inbound message indeed is GetCustomer, but the outbound message, if you look at my original example, is actually GetCustomerResponse. The GetCusomerResult element is how the Customer object is being serialized. "That* is what I'm arguing about.

Allow me to present it with a counter example: Why couldn't this be the default SOAP answer:




This is indeed exactly what would happen if I had changed my Customer definition like this:

[ XmlRoot("Customer", Namespace="") ]
public class Customer

Tomas Restrepo

Software developer located in Colombia. Sr. PFE at Microsoft.