Serialize all elements with namespace prefix

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Don

    Serialize all elements with namespace prefix

    I am calling a web service that requires all elements to have a namespace (or
    alias) prefix before all elements. Here is an example of xml that works
    correctly:

    <SOAP-ENV:Body>
    <m:VINValidatio nRequest xmlns:m="http://...">
    <m:requestHeade r>
    <m:RequestingAp plicationCd>Tes t</m:requestingApp licationCd>
    </m:requestHeader >
    </m:VINValidation Request>
    </SOAP-ENV:Body>

    The xml stream that gets generated from my .Net call to the web method does
    not contain the namespace prefix though (the m: is omitted).

    <SOAP-ENV:Body>
    <VINValidationR equest xmlns="http://...">
    <requestHeade r>
    <RequestingAppl icationCd>Test</requestingAppli cationCd>
    </requestHeader>
    </VINValidationRe quest>
    </SOAP-ENV:Body>

    Can someone tell me how to get this namespace in each element when the .Net
    serialization function is invoked?

    Thank you

Working...