Loading ...
Sorry, an error occurred while loading the content.

Using namespace prefix for webservice in .NET

Expand Messages
  • alexweiner2003
    I would like to send webservice soap messages using .NET that utilize a namespace definition in the Root element, and then only namespace prefixes for all
    Message 1 of 3 , Jan 15, 2004
    • 0 Attachment
      I would like to send webservice soap messages using .NET that utilize
      a namespace definition in the Root element, and then only namespace
      prefixes for all child elements. I have only been able to specify
      prefixes for each Object that is serialized - i.e. each individual
      soapheader and each object in the soapbody, using the
      XmlNamespaceDeclarationsAttribute for a public property of type
      XmlSerializerNamespaces contained in each serialized object.

      Does anyone know how I could apply the namespace/prefixes at the Root
      level for a webservice soap request? Thanks, Alex.
    • Simon Fell
      ... Why do you want to control the prefixes so much ? they re meaningless only the namespace URI s matter. Cheers Simon www.pocketsoap.com
      Message 2 of 3 , Jan 15, 2004
      • 0 Attachment
        On Fri, 16 Jan 2004 04:53:51 -0000, in ws you wrote:

        >I would like to send webservice soap messages using .NET that utilize
        >a namespace definition in the Root element, and then only namespace
        >prefixes for all child elements. I have only been able to specify
        >prefixes for each Object that is serialized - i.e. each individual
        >soapheader and each object in the soapbody, using the
        >XmlNamespaceDeclarationsAttribute for a public property of type
        >XmlSerializerNamespaces contained in each serialized object.
        >
        >Does anyone know how I could apply the namespace/prefixes at the Root
        >level for a webservice soap request? Thanks, Alex.

        Why do you want to control the prefixes so much ? they're meaningless
        only the namespace URI's matter.

        Cheers
        Simon
        www.pocketsoap.com
      • MOA
        Alex, You may set RequestNamespace= http://bogusuri.org/myservice in the System.Web.Services.Protocols.SoapDocumentMethodAttribute for a particular request.
        Message 3 of 3 , Jan 16, 2004
        • 0 Attachment
          Alex,

          You may set RequestNamespace="http://bogusuri.org/myservice" in the
          System.Web.Services.Protocols.SoapDocumentMethodAttribute for a particular
          request. I have used this only on a method calling Invoke() off a
          subclass of System.Web.Services.Protocols.SoapHttpClientProtocol (a
          wsdl.exe-generated proxy). I hope this applies to your situation.

          HTH,
          Vern

          On Fri, 16 Jan 2004 04:53:51 -0000, alexweiner2003 <a275703@...> wrote:

          > I would like to send webservice soap messages using .NET that utilize
          > a namespace definition in the Root element, and then only namespace
          > prefixes for all child elements. I have only been able to specify
          > prefixes for each Object that is serialized - i.e. each individual
          > soapheader and each object in the soapbody, using the
          > XmlNamespaceDeclarationsAttribute for a public property of type
          > XmlSerializerNamespaces contained in each serialized object.
          >
          > Does anyone know how I could apply the namespace/prefixes at the Root
          > level for a webservice soap request? Thanks, Alex.
        Your message has been successfully submitted and would be delivered to recipients shortly.