WCF Remove xmlns: tem = "http://tempuri.org/"

I have a problem connecting a client to my system. I think I narrowed down the problem. The client sends an xml message, and my system is configured to accept an xml message; however, he expects it in a specific format. The client expressed a desire to set up a format on my end to accept them.

This is customer message:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"  
                  xmlns:tem="http://tempuri.org/">
            <soapenv:Header/>
            <soapenv:Body>
               <NewOrder>
                  <Message id="d3a39c31-cc9f-4331-ad13-be74522df6eb">
                     <Header>
                        <LoginAccountIdentifier>Blank</LoginAccountIdentifier>
                        <LoginAccountPassword>password</LoginAccountPassword>
                     </Header>

I noticed that my expected format excludes the tem: prefix on the nodes.

This is the expected message:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                      xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:NewOrder>
         <tem:Message id="d3a39c31-cc9f-4331-ad13-be74522df6eb ">
            <Header>
               <LoginAccountIdentifier>Blank</LoginAccountIdentifier>
               <LoginAccountPassword>password</LoginAccountPassword>
            </Header>

I believe that if I can remove the prefix, this should match the client message with the expected message. The problem is where I can remove the prefix "<tem:"; Also, how can I prevent this xmlns: tem = "http://tempuri.org/" variable from appearing in my document?

+3
2

. :

[ServiceContract(Namespace = "")]

-, , , , .

!

+2

, WebService.svc( .asmx), [WebService(Namespace = "http://tempuri.org/")] . ( ) .

+1

All Articles