WCF servicebinding able to receive XML with Bare bodystyle

164 views Asked by At

I am building a WCF service that is implementing the SPML standard. This means that one endpoint needs to be able to receive a number of XML request that is interpreted to Add/Modify/Delete commands. All XML request is starting with a request name tag defined by the standard.

For instance:

<SOAP:Header />
<SOAP:Body>
    <ns0:addRequest xmlns:ns0='urn:oasis:names:tc:SPML:1:0'>
        <identifier type='urn:oasis:names:tc:SPML:1:0#GUID'>
            <id>uid=Z3SP</id>
        </identifier>
        <attributes>
            <ns1:attr xmlns:ns1='urn:oasis:names:tc:DSML:2:0:core'
                name='sn'>
                <ns1:value>Bobby</ns1:value>
            </ns1:attr>             
        </attributes>
    </ns0:addRequest>
</SOAP:Body>

My question is whether it is possible to send xml to a WCF service without the xml being wrapped in tags identifying the wcf service method name.

I have tried setting the following on the webservice method.

WebInvoke(BodyStyle = WebMessageBodyStyle.Bare)

However I can not get this to work on a basicHttpBinding.

Is this possible using a basicHttpBinding?

0

There are 0 answers