After reading the post XmlSerializer with specified pattern not working I try to implement such a service : OperationContract with the XmlSerializerFormat. But my Soap message contains an additional tag that is the operation parameter. How can I remove that tag ?
Here is my service sample
[System.ServiceModel.ServiceContractAttribute(Namespace = "http://mynamespace.com/", ConfigurationName = "ConfigName")]
public interface MyInterfacePort
{
[System.ServiceModel.OperationContractAttribute(Action = "http://mynamespace.com/opName", ReplyAction = "*")]
[System.ServiceModel.FaultContractAttribute(typeof(MyError), Action = "http://mynamespace.com/opName", Name = "opErr")]
[System.ServiceModel.XmlSerializerFormatAttribute()]
opResponse opName(opRequest request);
Then the serialized request:
[System.Serializable]
public partial class opRequest
{
public string myProperty;
generated soap message:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<opName xmlns="http://mynamespace.com/">
<request>
<myProperty>262157</myProperty>
</request>
</opName>
</s:Body>
</s:Envelope>
My service doesn't handle the additional <request> tag
Thank's for your help.