Namespace Prefix in Response Element child nodes

Ask a Question related to ASP.NET Web Services, Design and Development.

  1. #1

    Default Namespace Prefix in Response Element child nodes

    In my .Net web service. I want to declare all the namespaces in my soap response element and have all the child elements use prefixes. I know how to use XmlNamespaceDeclarations but I don't know how to apply them to the response element.

    I have: <soap:body>
    <MyMethodResponse >
    <MyElement xmlns="blah1">
    <MyElement2 xmlns="blah2">
    ....

    I want: <soap:body>
    <MyMethodResponse xmlns:b1="blah1" xmlns:b2="blah2">
    <b1:MyElement>
    <b2:MyElement>
    ...

    How do I do it?

    MowTin Guest

  2. Similar Questions and Discussions

    1. #40388 [NEW]: Subclassed SimpleXMLElements with differently-subclassed child nodes
      From: jazzslider at gmail dot com Operating system: Linux PHP version: 5.2.0 PHP Bug Type: Feature/Change Request Bug...
    2. Help! SOAP::Lite: How to set the namespace prefix for the request?
      Hi, I have to send attributes as <urn:Foo> ... </urn:Foo> and *not* <Foo xsi:type="..."> ... </Foo>
    3. Check for missing xml nodes or empty nodes
      Hi, Is it possible to check for missing or empty xml nodes "before" putting them into a table or doing a XMLSearch . Sometimes the xml will come...
    4. method parameters empty? XML namespace prefix issue?
      Hi, I'm trying to create a simple test/dummy .NET XML web service (using WSDL/XSD and the WSDL.exe tool) that an existing .NET Remoting XML web...
    5. Namespace Prefix problem
      Hi, i have a SOAP XML which is similar to this: <request xmlns="http://www.someurl.com"> <abc> <xyz></xyz> <xyz></xyz> </abc> I need the...
  3. #2

    Default Re: Namespace Prefix in Response Element child nodes

    I have a same problem. Not able to find out how to add prefixes to the web service response. Were you able to get any solution to your problem?

    Quote Originally Posted by MowTin View Post
    In my .Net web service. I want to declare all the namespaces in my soap response element and have all the child elements use prefixes. I know how to use XmlNamespaceDeclarations but I don't know how to apply them to the response element.

    I have: <soap:body>
    <MyMethodResponse >
    <MyElement xmlns="blah1">
    <MyElement2 xmlns="blah2">
    ....

    I want: <soap:body>
    <MyMethodResponse xmlns:b1="blah1" xmlns:b2="blah2">
    <b1:MyElement>
    <b2:MyElement>
    ...

    How do I do it?
    Pratik Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139