I tried that. My Web method is:
[WebMethod(), SoapDocumentMethod(ParameterStyle=SoapParameterSty le.Bare)]
public string HelloWorld()
{
...
}
Despite this, my response comes out as:
<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope ...>
<soap:Body>
<HelloWorldResult xmlns="http://tempuri.org/"> desired result elements
here... </HelloWorldResult>
</soap:Body>
</soap:Envelope>
I can't seem to get rid of the overriding <HelloWorldResult> element
wrapper. I can rename it using [result: XmlElement(...)], but not get rid
of it.
Is there some parameter of the SoapDocumentMethod constructor I'm not aware
of?
Thanks
Earl
"Drew Robbins" <"drew at drewby.com"> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
You should be able to add the SoapDocumentMethod attribute and set the
ParameterStyle to Bare.
[SoapDocumentMethod(ParameterStyle=SoapParameterSty le.Bare),
WebMethod]
public void DoSomething(SummaryClass summary_data, DetailClass
detail_data)
{
}
Drew Robbins
Earl Damron wrote: Hello All.
Is it possible to create a Web service with C# that returns a response
with two different elements in the SOAP Body? I'm thinking of something like
this:
<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope ...>
<soap:Body>
<summary_data>
<!-- summary_data elements here -->
</summary_data>
<detail_data>
<!-- detail_data elements here -->
</detail_data>
</soap:Body>
</soap:Envelope>
I've tried a few different method attributes, but just can't seem to get
it looking this way.
Thanks very much.