Getting raw XML from web service

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

    Getting raw XML from web service

    Hello,

    I have some web services which return quite large XML documents. I want to
    invoke the services and retrieve the raw XML in order to persist it through
    an XML database. I don't want to create a bunch of meaningless proxy classes.

    It seems like this should be quite simple; I would appreciate some pointers!

    Thanks,

    Simon
  • erymuzuan

    #2
    Re: Getting raw XML from web service


    SoapExtension, will give you the flexibilty to get to the raw soap
    messages,


    regards
    erymuzuan mustapa

    Simon wrote:[color=blue]
    > Hello,
    >
    > I have some web services which return quite large XML documents. I want to
    > invoke the services and retrieve the raw XML in order to persist it through
    > an XML database. I don't want to create a bunch of meaningless proxy classes.
    >
    > It seems like this should be quite simple; I would appreciate some pointers!
    >
    > Thanks,
    >
    > Simon[/color]

    Comment

    • erymuzuan

      #3
      Re: Getting raw XML from web service


      SoapExtension, will give you the flexibilty to get to the raw soap
      messages,


      regards
      erymuzuan mustapa

      Simon wrote:[color=blue]
      > Hello,
      >
      > I have some web services which return quite large XML documents. I want to
      > invoke the services and retrieve the raw XML in order to persist it through
      > an XML database. I don't want to create a bunch of meaningless proxy classes.
      >
      > It seems like this should be quite simple; I would appreciate some pointers!
      >
      > Thanks,
      >
      > Simon[/color]

      Comment

      • DC

        #4
        Re: Getting raw XML from web service

        Hey Simon,
        another way is to just morph the WSDL so that rather than retrieving a
        strongly typed complexType, you are receiving just XmlElement.

        This is sort of related:
        Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.


        But in your case, you are building clients. So what you want to do is
        change the existing WSDL so that the response element is an xsd:any.
        Replace this:
        <s:element name="MethodRes ponse">
        <s:complexTyp e>
        <s:sequence>
        <s:element minOccurs="0" maxOccurs="1" name="whatever"
        type="ns1:Custo mComplexType" />
        </s:sequence>
        </s:complexType>
        </s:element>

        ....with something like this:

        <s:element name="MethodRes ponse">
        <s:complexTyp e>
        <s:sequence>
        <s:any minOccurs="0" maxOccurs="1" />
        </s:sequence>
        </s:complexType>
        </s:element>

        Then, generate the client-side proxies from this generic-ized WSDL. Your
        client-side proxy will get a System.Xml.XmlE lement for each webmethod
        invocation. This element contains the raw XML response.


        -Dino
        dinoch // microsoft.com


        "erymuzuan" <erymuzuan@yaho o.com> wrote in message
        news:42AEBCB0.7 050607@yahoo.co m...[color=blue]
        >
        > SoapExtension, will give you the flexibilty to get to the raw soap
        > messages,
        > http://msdn.microsoft.com/library/de...classtopic.asp
        >
        > regards
        > erymuzuan mustapa
        >
        > Simon wrote:[color=green]
        >> Hello,
        >>
        >> I have some web services which return quite large XML documents. I want
        >> to invoke the services and retrieve the raw XML in order to persist it
        >> through an XML database. I don't want to create a bunch of meaningless
        >> proxy classes.
        >>
        >> It seems like this should be quite simple; I would appreciate some
        >> pointers!
        >>
        >> Thanks,
        >>
        >> Simon[/color][/color]


        Comment

        • DC

          #5
          Re: Getting raw XML from web service

          Hey Simon,
          another way is to just morph the WSDL so that rather than retrieving a
          strongly typed complexType, you are receiving just XmlElement.

          This is sort of related:
          Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.


          But in your case, you are building clients. So what you want to do is
          change the existing WSDL so that the response element is an xsd:any.
          Replace this:
          <s:element name="MethodRes ponse">
          <s:complexTyp e>
          <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="whatever"
          type="ns1:Custo mComplexType" />
          </s:sequence>
          </s:complexType>
          </s:element>

          ....with something like this:

          <s:element name="MethodRes ponse">
          <s:complexTyp e>
          <s:sequence>
          <s:any minOccurs="0" maxOccurs="1" />
          </s:sequence>
          </s:complexType>
          </s:element>

          Then, generate the client-side proxies from this generic-ized WSDL. Your
          client-side proxy will get a System.Xml.XmlE lement for each webmethod
          invocation. This element contains the raw XML response.


          -Dino
          dinoch // microsoft.com


          "erymuzuan" <erymuzuan@yaho o.com> wrote in message
          news:42AEBCB0.7 050607@yahoo.co m...[color=blue]
          >
          > SoapExtension, will give you the flexibilty to get to the raw soap
          > messages,
          > http://msdn.microsoft.com/library/de...classtopic.asp
          >
          > regards
          > erymuzuan mustapa
          >
          > Simon wrote:[color=green]
          >> Hello,
          >>
          >> I have some web services which return quite large XML documents. I want
          >> to invoke the services and retrieve the raw XML in order to persist it
          >> through an XML database. I don't want to create a bunch of meaningless
          >> proxy classes.
          >>
          >> It seems like this should be quite simple; I would appreciate some
          >> pointers!
          >>
          >> Thanks,
          >>
          >> Simon[/color][/color]


          Comment

          Working...