DataSet Vs Xml string

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

    #1

    DataSet Vs Xml string

    Hi All,

    I am very new to web services, so am struggling to understand exactly what I
    am doing with regards to its returns etc. I have been given the task of
    designing and developing a web service which will allow external companies,
    access to our information. The problem for me is that these companies will
    be using different platforms from which to consume our web service. My
    question is what I should use as the return type for more complex data
    structures. Should I use the intrinsic dataset object and return that,
    should I create a typed dataset as then a definitive XML Schema will be
    produced, or should I just build and XML string from the information I return
    from the database and send that back across.

    I know that all the return types are serialized into XML, but does this mean
    that they can be accessed when they get to other end?? I would really
    appreciate some input here, if anyone can help me understand this that would
    be great!

    Thanks,

    Rob

  • erymuzuan

    #2
    Re: DataSet Vs Xml string

    Take alook at Christian Weyer WS-Contract first, it's good tool for you
    to get started in designing web services. Remember services rely on
    schema as a contract not type.

    BTW, avoid ADO.Net dataset at all cost. It will not work since dataset
    is a strongly related to .Net.

    regards
    erymuzuan mustapa

    Modica82 wrote:[color=blue]
    > Hi All,
    >
    > I am very new to web services, so am struggling to understand exactly what I
    > am doing with regards to its returns etc. I have been given the task of
    > designing and developing a web service which will allow external companies,
    > access to our information. The problem for me is that these companies will
    > be using different platforms from which to consume our web service. My
    > question is what I should use as the return type for more complex data
    > structures. Should I use the intrinsic dataset object and return that,
    > should I create a typed dataset as then a definitive XML Schema will be
    > produced, or should I just build and XML string from the information I return
    > from the database and send that back across.
    >
    > I know that all the return types are serialized into XML, but does this mean
    > that they can be accessed when they get to other end?? I would really
    > appreciate some input here, if anyone can help me understand this that would
    > be great!
    >
    > Thanks,
    >
    > Rob
    >[/color]

    Comment

    • Modica82

      #3
      Re: DataSet Vs Xml string

      Hi Erymuzuan,

      Does this mean i should generate my own XML to send back, again i have not
      done loads of XML so this will take some doing, would it be best to send the
      XML back with a schema, or just send the XML down the wire as a string?

      Rob

      "erymuzuan" wrote:
      [color=blue]
      > Take alook at Christian Weyer WS-Contract first, it's good tool for you
      > to get started in designing web services. Remember services rely on
      > schema as a contract not type.
      >
      > BTW, avoid ADO.Net dataset at all cost. It will not work since dataset
      > is a strongly related to .Net.
      >
      > regards
      > erymuzuan mustapa
      >
      > Modica82 wrote:[color=green]
      > > Hi All,
      > >
      > > I am very new to web services, so am struggling to understand exactly what I
      > > am doing with regards to its returns etc. I have been given the task of
      > > designing and developing a web service which will allow external companies,
      > > access to our information. The problem for me is that these companies will
      > > be using different platforms from which to consume our web service. My
      > > question is what I should use as the return type for more complex data
      > > structures. Should I use the intrinsic dataset object and return that,
      > > should I create a typed dataset as then a definitive XML Schema will be
      > > produced, or should I just build and XML string from the information I return
      > > from the database and send that back across.
      > >
      > > I know that all the return types are serialized into XML, but does this mean
      > > that they can be accessed when they get to other end?? I would really
      > > appreciate some input here, if anyone can help me understand this that would
      > > be great!
      > >
      > > Thanks,
      > >
      > > Rob
      > >[/color]
      >[/color]

      Comment

      • SQLScott

        #4
        RE: DataSet Vs Xml string

        Rob,

        In my opinion you should build and return an XML string. In fact, the best
        way to do it is to build your xml string and return it as a byte array for
        quick performance. Let me know if you'd like a code sample. I have build
        several Web Services this way. In fact, I had questions such as yours and I
        went straight to Francesco Balena (if you know who he is) and this method was
        highly recommended.

        This way any company or customer can read it and you are not tied to any
        platform or language, that is the beauty of XML.

        HOpe this helps.

        Scott

        "Modica82" wrote:
        [color=blue]
        > Hi All,
        >
        > I am very new to web services, so am struggling to understand exactly what I
        > am doing with regards to its returns etc. I have been given the task of
        > designing and developing a web service which will allow external companies,
        > access to our information. The problem for me is that these companies will
        > be using different platforms from which to consume our web service. My
        > question is what I should use as the return type for more complex data
        > structures. Should I use the intrinsic dataset object and return that,
        > should I create a typed dataset as then a definitive XML Schema will be
        > produced, or should I just build and XML string from the information I return
        > from the database and send that back across.
        >
        > I know that all the return types are serialized into XML, but does this mean
        > that they can be accessed when they get to other end?? I would really
        > appreciate some input here, if anyone can help me understand this that would
        > be great!
        >
        > Thanks,
        >
        > Rob
        >[/color]

        Comment

        • erymuzuan

          #5
          Re: DataSet Vs Xml string

          Not necessarily, the best practive is to design the XML schema for your
          web services interface. the use the tool to generate server's web
          services stub. or you can use xsd.exe to generate .Net types from your
          XML Schema

          regards
          erymuzuan mustapa

          Modica82 wrote:[color=blue]
          > Hi Erymuzuan,
          >
          > Does this mean i should generate my own XML to send back, again i have not
          > done loads of XML so this will take some doing, would it be best to send the
          > XML back with a schema, or just send the XML down the wire as a string?
          >
          > Rob
          >
          > "erymuzuan" wrote:
          >
          >[color=green]
          >>Take alook at Christian Weyer WS-Contract first, it's good tool for you
          >>to get started in designing web services. Remember services rely on
          >>schema as a contract not type.
          >>
          >>BTW, avoid ADO.Net dataset at all cost. It will not work since dataset
          >>is a strongly related to .Net.
          >>
          >>regards
          >>erymuzuan mustapa
          >>
          >>Modica82 wrote:
          >>[color=darkred]
          >>>Hi All,
          >>>
          >>>I am very new to web services, so am struggling to understand exactly what I
          >>>am doing with regards to its returns etc. I have been given the task of
          >>>designing and developing a web service which will allow external companies,
          >>>access to our information. The problem for me is that these companies will
          >>>be using different platforms from which to consume our web service. My
          >>>question is what I should use as the return type for more complex data
          >>>structures . Should I use the intrinsic dataset object and return that,
          >>>should I create a typed dataset as then a definitive XML Schema will be
          >>>produced, or should I just build and XML string from the information I return
          >>>from the database and send that back across.
          >>>
          >>>I know that all the return types are serialized into XML, but does this mean
          >>>that they can be accessed when they get to other end?? I would really
          >>>appreciate some input here, if anyone can help me understand this that would
          >>>be great!
          >>>
          >>>Thanks,
          >>>
          >>>Rob
          >>>[/color]
          >>[/color][/color]

          Comment

          • Modica82

            #6
            RE: DataSet Vs Xml string

            Hi Scott,

            I was planning on using the XMLTextWriter class to create XML on the fly and
            return it as a string. I have read alot about XML but never really used it
            commercially, so i want to get it write (also i have only been at this job a
            month and trying to impress :)) Some code samles would be great if you could
            send them.

            Thanks in Advance,

            Rob

            "SQLScott" wrote:
            [color=blue]
            > Rob,
            >
            > In my opinion you should build and return an XML string. In fact, the best
            > way to do it is to build your xml string and return it as a byte array for
            > quick performance. Let me know if you'd like a code sample. I have build
            > several Web Services this way. In fact, I had questions such as yours and I
            > went straight to Francesco Balena (if you know who he is) and this method was
            > highly recommended.
            >
            > This way any company or customer can read it and you are not tied to any
            > platform or language, that is the beauty of XML.
            >
            > HOpe this helps.
            >
            > Scott
            >
            > "Modica82" wrote:
            >[color=green]
            > > Hi All,
            > >
            > > I am very new to web services, so am struggling to understand exactly what I
            > > am doing with regards to its returns etc. I have been given the task of
            > > designing and developing a web service which will allow external companies,
            > > access to our information. The problem for me is that these companies will
            > > be using different platforms from which to consume our web service. My
            > > question is what I should use as the return type for more complex data
            > > structures. Should I use the intrinsic dataset object and return that,
            > > should I create a typed dataset as then a definitive XML Schema will be
            > > produced, or should I just build and XML string from the information I return
            > > from the database and send that back across.
            > >
            > > I know that all the return types are serialized into XML, but does this mean
            > > that they can be accessed when they get to other end?? I would really
            > > appreciate some input here, if anyone can help me understand this that would
            > > be great!
            > >
            > > Thanks,
            > >
            > > Rob
            > >[/color][/color]

            Comment

            • SQLScott

              #7
              RE: DataSet Vs Xml string

              Ask and ye shall receive.

              Web Service Code:
              <WebMethod()> _
              Public Function GetData() As Byte()
              Dim ms As MemoryStream
              Dim xmlms() As Byte

              ms = New MemoryStream

              'code to get data goes here

              'Now create your xml doc
              xtw.Formatting = Formatting.Inde nted
              xtw.Indentation = 2

              xtw.QuoteChar = """"c

              xtw.WriteStartD ocument(True)

              xtw.WriteCommen t("Data from db")

              xtw.WriteStartE lement("Data")

              xtw.WriteStartE lement("Employe e")


              Dim xtw As New Xml.XmlTextWrit er(ms, System.Text.Enc oding.UTF8)

              xtw.WriteElemen tString("FirstN ame", "Evel")
              xtw.WriteElemen tString("LastNa me", "Knievel")

              xtw.WriteEndEle ment() 'closes the data node
              xtw.WriteEndEle ment() 'closes the employee node

              xtw.WriteEndDoc ument()

              xtw.Flush()
              xmlms = ms.ToArray

              ms.Close()
              xtw.Close()

              Return xmlms

              End Function

              Hope this help!

              Scott

              "Modica82" wrote:
              [color=blue]
              > Hi Scott,
              >
              > I was planning on using the XMLTextWriter class to create XML on the fly and
              > return it as a string. I have read alot about XML but never really used it
              > commercially, so i want to get it write (also i have only been at this job a
              > month and trying to impress :)) Some code samles would be great if you could
              > send them.
              >
              > Thanks in Advance,
              >
              > Rob
              >
              > "SQLScott" wrote:
              >[color=green]
              > > Rob,
              > >
              > > In my opinion you should build and return an XML string. In fact, the best
              > > way to do it is to build your xml string and return it as a byte array for
              > > quick performance. Let me know if you'd like a code sample. I have build
              > > several Web Services this way. In fact, I had questions such as yours and I
              > > went straight to Francesco Balena (if you know who he is) and this method was
              > > highly recommended.
              > >
              > > This way any company or customer can read it and you are not tied to any
              > > platform or language, that is the beauty of XML.
              > >
              > > HOpe this helps.
              > >
              > > Scott
              > >
              > > "Modica82" wrote:
              > >[color=darkred]
              > > > Hi All,
              > > >
              > > > I am very new to web services, so am struggling to understand exactly what I
              > > > am doing with regards to its returns etc. I have been given the task of
              > > > designing and developing a web service which will allow external companies,
              > > > access to our information. The problem for me is that these companies will
              > > > be using different platforms from which to consume our web service. My
              > > > question is what I should use as the return type for more complex data
              > > > structures. Should I use the intrinsic dataset object and return that,
              > > > should I create a typed dataset as then a definitive XML Schema will be
              > > > produced, or should I just build and XML string from the information I return
              > > > from the database and send that back across.
              > > >
              > > > I know that all the return types are serialized into XML, but does this mean
              > > > that they can be accessed when they get to other end?? I would really
              > > > appreciate some input here, if anyone can help me understand this that would
              > > > be great!
              > > >
              > > > Thanks,
              > > >
              > > > Rob
              > > >[/color][/color][/color]

              Comment

              • Modica82

                #8
                RE: DataSet Vs Xml string

                Thanks Scott,

                Has given me some ideas

                Rob

                "SQLScott" wrote:
                [color=blue]
                > Ask and ye shall receive.
                >
                > Web Service Code:
                > <WebMethod()> _
                > Public Function GetData() As Byte()
                > Dim ms As MemoryStream
                > Dim xmlms() As Byte
                >
                > ms = New MemoryStream
                >
                > 'code to get data goes here
                >
                > 'Now create your xml doc
                > xtw.Formatting = Formatting.Inde nted
                > xtw.Indentation = 2
                >
                > xtw.QuoteChar = """"c
                >
                > xtw.WriteStartD ocument(True)
                >
                > xtw.WriteCommen t("Data from db")
                >
                > xtw.WriteStartE lement("Data")
                >
                > xtw.WriteStartE lement("Employe e")
                >
                >
                > Dim xtw As New Xml.XmlTextWrit er(ms, System.Text.Enc oding.UTF8)
                >
                > xtw.WriteElemen tString("FirstN ame", "Evel")
                > xtw.WriteElemen tString("LastNa me", "Knievel")
                >
                > xtw.WriteEndEle ment() 'closes the data node
                > xtw.WriteEndEle ment() 'closes the employee node
                >
                > xtw.WriteEndDoc ument()
                >
                > xtw.Flush()
                > xmlms = ms.ToArray
                >
                > ms.Close()
                > xtw.Close()
                >
                > Return xmlms
                >
                > End Function
                >
                > Hope this help!
                >
                > Scott
                >
                > "Modica82" wrote:
                >[color=green]
                > > Hi Scott,
                > >
                > > I was planning on using the XMLTextWriter class to create XML on the fly and
                > > return it as a string. I have read alot about XML but never really used it
                > > commercially, so i want to get it write (also i have only been at this job a
                > > month and trying to impress :)) Some code samles would be great if you could
                > > send them.
                > >
                > > Thanks in Advance,
                > >
                > > Rob
                > >
                > > "SQLScott" wrote:
                > >[color=darkred]
                > > > Rob,
                > > >
                > > > In my opinion you should build and return an XML string. In fact, the best
                > > > way to do it is to build your xml string and return it as a byte array for
                > > > quick performance. Let me know if you'd like a code sample. I have build
                > > > several Web Services this way. In fact, I had questions such as yours and I
                > > > went straight to Francesco Balena (if you know who he is) and this method was
                > > > highly recommended.
                > > >
                > > > This way any company or customer can read it and you are not tied to any
                > > > platform or language, that is the beauty of XML.
                > > >
                > > > HOpe this helps.
                > > >
                > > > Scott
                > > >
                > > > "Modica82" wrote:
                > > >
                > > > > Hi All,
                > > > >
                > > > > I am very new to web services, so am struggling to understand exactly what I
                > > > > am doing with regards to its returns etc. I have been given the task of
                > > > > designing and developing a web service which will allow external companies,
                > > > > access to our information. The problem for me is that these companies will
                > > > > be using different platforms from which to consume our web service. My
                > > > > question is what I should use as the return type for more complex data
                > > > > structures. Should I use the intrinsic dataset object and return that,
                > > > > should I create a typed dataset as then a definitive XML Schema will be
                > > > > produced, or should I just build and XML string from the information I return
                > > > > from the database and send that back across.
                > > > >
                > > > > I know that all the return types are serialized into XML, but does this mean
                > > > > that they can be accessed when they get to other end?? I would really
                > > > > appreciate some input here, if anyone can help me understand this that would
                > > > > be great!
                > > > >
                > > > > Thanks,
                > > > >
                > > > > Rob
                > > > >[/color][/color][/color]

                Comment

                • SQLScott

                  #9
                  RE: DataSet Vs Xml string

                  OK, let me know if you have any question.

                  There is a copy/paste error in the code below. The "Dim xtw As New
                  Xml.XmlTextWrit er(ms, System.Text.Enc oding.UTF8)" statement should go with
                  the rest of the other Dim statements.

                  Sorry about that.

                  Scott

                  "Modica82" wrote:
                  [color=blue]
                  > Thanks Scott,
                  >
                  > Has given me some ideas
                  >
                  > Rob
                  >
                  > "SQLScott" wrote:
                  >[color=green]
                  > > Ask and ye shall receive.
                  > >
                  > > Web Service Code:
                  > > <WebMethod()> _
                  > > Public Function GetData() As Byte()
                  > > Dim ms As MemoryStream
                  > > Dim xmlms() As Byte
                  > >
                  > > ms = New MemoryStream
                  > >
                  > > 'code to get data goes here
                  > >
                  > > 'Now create your xml doc
                  > > xtw.Formatting = Formatting.Inde nted
                  > > xtw.Indentation = 2
                  > >
                  > > xtw.QuoteChar = """"c
                  > >
                  > > xtw.WriteStartD ocument(True)
                  > >
                  > > xtw.WriteCommen t("Data from db")
                  > >
                  > > xtw.WriteStartE lement("Data")
                  > >
                  > > xtw.WriteStartE lement("Employe e")
                  > >
                  > >
                  > > Dim xtw As New Xml.XmlTextWrit er(ms, System.Text.Enc oding.UTF8)
                  > >
                  > > xtw.WriteElemen tString("FirstN ame", "Evel")
                  > > xtw.WriteElemen tString("LastNa me", "Knievel")
                  > >
                  > > xtw.WriteEndEle ment() 'closes the data node
                  > > xtw.WriteEndEle ment() 'closes the employee node
                  > >
                  > > xtw.WriteEndDoc ument()
                  > >
                  > > xtw.Flush()
                  > > xmlms = ms.ToArray
                  > >
                  > > ms.Close()
                  > > xtw.Close()
                  > >
                  > > Return xmlms
                  > >
                  > > End Function
                  > >
                  > > Hope this help!
                  > >
                  > > Scott
                  > >
                  > > "Modica82" wrote:
                  > >[color=darkred]
                  > > > Hi Scott,
                  > > >
                  > > > I was planning on using the XMLTextWriter class to create XML on the fly and
                  > > > return it as a string. I have read alot about XML but never really used it
                  > > > commercially, so i want to get it write (also i have only been at this job a
                  > > > month and trying to impress :)) Some code samles would be great if you could
                  > > > send them.
                  > > >
                  > > > Thanks in Advance,
                  > > >
                  > > > Rob
                  > > >
                  > > > "SQLScott" wrote:
                  > > >
                  > > > > Rob,
                  > > > >
                  > > > > In my opinion you should build and return an XML string. In fact, the best
                  > > > > way to do it is to build your xml string and return it as a byte array for
                  > > > > quick performance. Let me know if you'd like a code sample. I have build
                  > > > > several Web Services this way. In fact, I had questions such as yours and I
                  > > > > went straight to Francesco Balena (if you know who he is) and this method was
                  > > > > highly recommended.
                  > > > >
                  > > > > This way any company or customer can read it and you are not tied to any
                  > > > > platform or language, that is the beauty of XML.
                  > > > >
                  > > > > HOpe this helps.
                  > > > >
                  > > > > Scott
                  > > > >
                  > > > > "Modica82" wrote:
                  > > > >
                  > > > > > Hi All,
                  > > > > >
                  > > > > > I am very new to web services, so am struggling to understand exactly what I
                  > > > > > am doing with regards to its returns etc. I have been given the task of
                  > > > > > designing and developing a web service which will allow external companies,
                  > > > > > access to our information. The problem for me is that these companies will
                  > > > > > be using different platforms from which to consume our web service. My
                  > > > > > question is what I should use as the return type for more complex data
                  > > > > > structures. Should I use the intrinsic dataset object and return that,
                  > > > > > should I create a typed dataset as then a definitive XML Schema will be
                  > > > > > produced, or should I just build and XML string from the information I return
                  > > > > > from the database and send that back across.
                  > > > > >
                  > > > > > I know that all the return types are serialized into XML, but does this mean
                  > > > > > that they can be accessed when they get to other end?? I would really
                  > > > > > appreciate some input here, if anyone can help me understand this that would
                  > > > > > be great!
                  > > > > >
                  > > > > > Thanks,
                  > > > > >
                  > > > > > Rob
                  > > > > >[/color][/color][/color]

                  Comment

                  • Modica82

                    #10
                    RE: DataSet Vs Xml string

                    Thanks again Scott,

                    I do have a quick question, but you may or may not have the answer, have you
                    ever created any sort of schema(xsd) to be passed back with your XML, if so
                    how did you do it?

                    Thanks in advance,

                    Rob

                    "Modica82" wrote:
                    [color=blue]
                    > Hi Scott,
                    >
                    > I was planning on using the XMLTextWriter class to create XML on the fly and
                    > return it as a string. I have read alot about XML but never really used it
                    > commercially, so i want to get it write (also i have only been at this job a
                    > month and trying to impress :)) Some code samles would be great if you could
                    > send them.
                    >
                    > Thanks in Advance,
                    >
                    > Rob
                    >
                    > "SQLScott" wrote:
                    >[color=green]
                    > > Rob,
                    > >
                    > > In my opinion you should build and return an XML string. In fact, the best
                    > > way to do it is to build your xml string and return it as a byte array for
                    > > quick performance. Let me know if you'd like a code sample. I have build
                    > > several Web Services this way. In fact, I had questions such as yours and I
                    > > went straight to Francesco Balena (if you know who he is) and this method was
                    > > highly recommended.
                    > >
                    > > This way any company or customer can read it and you are not tied to any
                    > > platform or language, that is the beauty of XML.
                    > >
                    > > HOpe this helps.
                    > >
                    > > Scott
                    > >
                    > > "Modica82" wrote:
                    > >[color=darkred]
                    > > > Hi All,
                    > > >
                    > > > I am very new to web services, so am struggling to understand exactly what I
                    > > > am doing with regards to its returns etc. I have been given the task of
                    > > > designing and developing a web service which will allow external companies,
                    > > > access to our information. The problem for me is that these companies will
                    > > > be using different platforms from which to consume our web service. My
                    > > > question is what I should use as the return type for more complex data
                    > > > structures. Should I use the intrinsic dataset object and return that,
                    > > > should I create a typed dataset as then a definitive XML Schema will be
                    > > > produced, or should I just build and XML string from the information I return
                    > > > from the database and send that back across.
                    > > >
                    > > > I know that all the return types are serialized into XML, but does this mean
                    > > > that they can be accessed when they get to other end?? I would really
                    > > > appreciate some input here, if anyone can help me understand this that would
                    > > > be great!
                    > > >
                    > > > Thanks,
                    > > >
                    > > > Rob
                    > > >[/color][/color][/color]

                    Comment

                    • SQLScott

                      #11
                      RE: DataSet Vs Xml string

                      Unfortunately, I have not. But i can point you to some great references on
                      XSD schemas if you want them.

                      Scott

                      "Modica82" wrote:
                      [color=blue]
                      > Thanks again Scott,
                      >
                      > I do have a quick question, but you may or may not have the answer, have you
                      > ever created any sort of schema(xsd) to be passed back with your XML, if so
                      > how did you do it?
                      >
                      > Thanks in advance,
                      >
                      > Rob
                      >
                      > "Modica82" wrote:
                      >[color=green]
                      > > Hi Scott,
                      > >
                      > > I was planning on using the XMLTextWriter class to create XML on the fly and
                      > > return it as a string. I have read alot about XML but never really used it
                      > > commercially, so i want to get it write (also i have only been at this job a
                      > > month and trying to impress :)) Some code samles would be great if you could
                      > > send them.
                      > >
                      > > Thanks in Advance,
                      > >
                      > > Rob
                      > >
                      > > "SQLScott" wrote:
                      > >[color=darkred]
                      > > > Rob,
                      > > >
                      > > > In my opinion you should build and return an XML string. In fact, the best
                      > > > way to do it is to build your xml string and return it as a byte array for
                      > > > quick performance. Let me know if you'd like a code sample. I have build
                      > > > several Web Services this way. In fact, I had questions such as yours and I
                      > > > went straight to Francesco Balena (if you know who he is) and this method was
                      > > > highly recommended.
                      > > >
                      > > > This way any company or customer can read it and you are not tied to any
                      > > > platform or language, that is the beauty of XML.
                      > > >
                      > > > HOpe this helps.
                      > > >
                      > > > Scott
                      > > >
                      > > > "Modica82" wrote:
                      > > >
                      > > > > Hi All,
                      > > > >
                      > > > > I am very new to web services, so am struggling to understand exactly what I
                      > > > > am doing with regards to its returns etc. I have been given the task of
                      > > > > designing and developing a web service which will allow external companies,
                      > > > > access to our information. The problem for me is that these companies will
                      > > > > be using different platforms from which to consume our web service. My
                      > > > > question is what I should use as the return type for more complex data
                      > > > > structures. Should I use the intrinsic dataset object and return that,
                      > > > > should I create a typed dataset as then a definitive XML Schema will be
                      > > > > produced, or should I just build and XML string from the information I return
                      > > > > from the database and send that back across.
                      > > > >
                      > > > > I know that all the return types are serialized into XML, but does this mean
                      > > > > that they can be accessed when they get to other end?? I would really
                      > > > > appreciate some input here, if anyone can help me understand this that would
                      > > > > be great!
                      > > > >
                      > > > > Thanks,
                      > > > >
                      > > > > Rob
                      > > > >[/color][/color][/color]

                      Comment

                      • Modica82

                        #12
                        RE: DataSet Vs Xml string

                        That would great. I think i was being a bit dim before, you can reference
                        the schema from anywhere, so as long as it is accessible on the web, you can
                        point you XML to use it, not sure how well that works for web services, but i
                        am sure i will find out soon enough.

                        Cheers!

                        Rob

                        "SQLScott" wrote:
                        [color=blue]
                        > Unfortunately, I have not. But i can point you to some great references on
                        > XSD schemas if you want them.
                        >
                        > Scott
                        >
                        > "Modica82" wrote:
                        >[color=green]
                        > > Thanks again Scott,
                        > >
                        > > I do have a quick question, but you may or may not have the answer, have you
                        > > ever created any sort of schema(xsd) to be passed back with your XML, if so
                        > > how did you do it?
                        > >
                        > > Thanks in advance,
                        > >
                        > > Rob
                        > >
                        > > "Modica82" wrote:
                        > >[color=darkred]
                        > > > Hi Scott,
                        > > >
                        > > > I was planning on using the XMLTextWriter class to create XML on the fly and
                        > > > return it as a string. I have read alot about XML but never really used it
                        > > > commercially, so i want to get it write (also i have only been at this job a
                        > > > month and trying to impress :)) Some code samles would be great if you could
                        > > > send them.
                        > > >
                        > > > Thanks in Advance,
                        > > >
                        > > > Rob
                        > > >
                        > > > "SQLScott" wrote:
                        > > >
                        > > > > Rob,
                        > > > >
                        > > > > In my opinion you should build and return an XML string. In fact, the best
                        > > > > way to do it is to build your xml string and return it as a byte array for
                        > > > > quick performance. Let me know if you'd like a code sample. I have build
                        > > > > several Web Services this way. In fact, I had questions such as yours and I
                        > > > > went straight to Francesco Balena (if you know who he is) and this method was
                        > > > > highly recommended.
                        > > > >
                        > > > > This way any company or customer can read it and you are not tied to any
                        > > > > platform or language, that is the beauty of XML.
                        > > > >
                        > > > > HOpe this helps.
                        > > > >
                        > > > > Scott
                        > > > >
                        > > > > "Modica82" wrote:
                        > > > >
                        > > > > > Hi All,
                        > > > > >
                        > > > > > I am very new to web services, so am struggling to understand exactly what I
                        > > > > > am doing with regards to its returns etc. I have been given the task of
                        > > > > > designing and developing a web service which will allow external companies,
                        > > > > > access to our information. The problem for me is that these companies will
                        > > > > > be using different platforms from which to consume our web service. My
                        > > > > > question is what I should use as the return type for more complex data
                        > > > > > structures. Should I use the intrinsic dataset object and return that,
                        > > > > > should I create a typed dataset as then a definitive XML Schema will be
                        > > > > > produced, or should I just build and XML string from the information I return
                        > > > > > from the database and send that back across.
                        > > > > >
                        > > > > > I know that all the return types are serialized into XML, but does this mean
                        > > > > > that they can be accessed when they get to other end?? I would really
                        > > > > > appreciate some input here, if anyone can help me understand this that would
                        > > > > > be great!
                        > > > > >
                        > > > > > Thanks,
                        > > > > >
                        > > > > > Rob
                        > > > > >[/color][/color][/color]

                        Comment

                        • Dev

                          #13
                          RE: DataSet Vs Xml string

                          if you are getting data from DataSet then dataset itself represent all data
                          in xml... n prob . u dont need to write your own parser

                          "Modica82" wrote:
                          [color=blue]
                          > That would great. I think i was being a bit dim before, you can reference
                          > the schema from anywhere, so as long as it is accessible on the web, you can
                          > point you XML to use it, not sure how well that works for web services, but i
                          > am sure i will find out soon enough.
                          >
                          > Cheers!
                          >
                          > Rob
                          >
                          > "SQLScott" wrote:
                          >[color=green]
                          > > Unfortunately, I have not. But i can point you to some great references on
                          > > XSD schemas if you want them.
                          > >
                          > > Scott
                          > >
                          > > "Modica82" wrote:
                          > >[color=darkred]
                          > > > Thanks again Scott,
                          > > >
                          > > > I do have a quick question, but you may or may not have the answer, have you
                          > > > ever created any sort of schema(xsd) to be passed back with your XML, if so
                          > > > how did you do it?
                          > > >
                          > > > Thanks in advance,
                          > > >
                          > > > Rob
                          > > >
                          > > > "Modica82" wrote:
                          > > >
                          > > > > Hi Scott,
                          > > > >
                          > > > > I was planning on using the XMLTextWriter class to create XML on the fly and
                          > > > > return it as a string. I have read alot about XML but never really used it
                          > > > > commercially, so i want to get it write (also i have only been at this job a
                          > > > > month and trying to impress :)) Some code samles would be great if you could
                          > > > > send them.
                          > > > >
                          > > > > Thanks in Advance,
                          > > > >
                          > > > > Rob
                          > > > >
                          > > > > "SQLScott" wrote:
                          > > > >
                          > > > > > Rob,
                          > > > > >
                          > > > > > In my opinion you should build and return an XML string. In fact, the best
                          > > > > > way to do it is to build your xml string and return it as a byte array for
                          > > > > > quick performance. Let me know if you'd like a code sample. I have build
                          > > > > > several Web Services this way. In fact, I had questions such as yours and I
                          > > > > > went straight to Francesco Balena (if you know who he is) and this method was
                          > > > > > highly recommended.
                          > > > > >
                          > > > > > This way any company or customer can read it and you are not tied to any
                          > > > > > platform or language, that is the beauty of XML.
                          > > > > >
                          > > > > > HOpe this helps.
                          > > > > >
                          > > > > > Scott
                          > > > > >
                          > > > > > "Modica82" wrote:
                          > > > > >
                          > > > > > > Hi All,
                          > > > > > >
                          > > > > > > I am very new to web services, so am struggling to understand exactly what I
                          > > > > > > am doing with regards to its returns etc. I have been given the task of
                          > > > > > > designing and developing a web service which will allow external companies,
                          > > > > > > access to our information. The problem for me is that these companies will
                          > > > > > > be using different platforms from which to consume our web service. My
                          > > > > > > question is what I should use as the return type for more complex data
                          > > > > > > structures. Should I use the intrinsic dataset object and return that,
                          > > > > > > should I create a typed dataset as then a definitive XML Schema will be
                          > > > > > > produced, or should I just build and XML string from the information I return
                          > > > > > > from the database and send that back across.
                          > > > > > >
                          > > > > > > I know that all the return types are serialized into XML, but does this mean
                          > > > > > > that they can be accessed when they get to other end?? I would really
                          > > > > > > appreciate some input here, if anyone can help me understand this that would
                          > > > > > > be great!
                          > > > > > >
                          > > > > > > Thanks,
                          > > > > > >
                          > > > > > > Rob
                          > > > > > >[/color][/color][/color]

                          Comment

                          • Modica82

                            #14
                            RE: DataSet Vs Xml string

                            Hi Dev,

                            I know that the DataSet can pump out XML based on the data contained within
                            it, the problem with it is that it creates elements with names that are not
                            always particularly descriptive for third parties. We wanted a bit more
                            control over the XML so i am choosing to write it myself, that way we know
                            what we are sending across and can document the web service to tell third
                            parties what to expect, safe in the knowledge that they are recieving what we
                            intended to send them as set out in our documentation.

                            Regards,

                            Rob

                            "Modica82" wrote:
                            [color=blue]
                            > That would great. I think i was being a bit dim before, you can reference
                            > the schema from anywhere, so as long as it is accessible on the web, you can
                            > point you XML to use it, not sure how well that works for web services, but i
                            > am sure i will find out soon enough.
                            >
                            > Cheers!
                            >
                            > Rob
                            >
                            > "SQLScott" wrote:
                            >[color=green]
                            > > Unfortunately, I have not. But i can point you to some great references on
                            > > XSD schemas if you want them.
                            > >
                            > > Scott
                            > >
                            > > "Modica82" wrote:
                            > >[color=darkred]
                            > > > Thanks again Scott,
                            > > >
                            > > > I do have a quick question, but you may or may not have the answer, have you
                            > > > ever created any sort of schema(xsd) to be passed back with your XML, if so
                            > > > how did you do it?
                            > > >
                            > > > Thanks in advance,
                            > > >
                            > > > Rob
                            > > >
                            > > > "Modica82" wrote:
                            > > >
                            > > > > Hi Scott,
                            > > > >
                            > > > > I was planning on using the XMLTextWriter class to create XML on the fly and
                            > > > > return it as a string. I have read alot about XML but never really used it
                            > > > > commercially, so i want to get it write (also i have only been at this job a
                            > > > > month and trying to impress :)) Some code samles would be great if you could
                            > > > > send them.
                            > > > >
                            > > > > Thanks in Advance,
                            > > > >
                            > > > > Rob
                            > > > >
                            > > > > "SQLScott" wrote:
                            > > > >
                            > > > > > Rob,
                            > > > > >
                            > > > > > In my opinion you should build and return an XML string. In fact, the best
                            > > > > > way to do it is to build your xml string and return it as a byte array for
                            > > > > > quick performance. Let me know if you'd like a code sample. I have build
                            > > > > > several Web Services this way. In fact, I had questions such as yours and I
                            > > > > > went straight to Francesco Balena (if you know who he is) and this method was
                            > > > > > highly recommended.
                            > > > > >
                            > > > > > This way any company or customer can read it and you are not tied to any
                            > > > > > platform or language, that is the beauty of XML.
                            > > > > >
                            > > > > > HOpe this helps.
                            > > > > >
                            > > > > > Scott
                            > > > > >
                            > > > > > "Modica82" wrote:
                            > > > > >
                            > > > > > > Hi All,
                            > > > > > >
                            > > > > > > I am very new to web services, so am struggling to understand exactly what I
                            > > > > > > am doing with regards to its returns etc. I have been given the task of
                            > > > > > > designing and developing a web service which will allow external companies,
                            > > > > > > access to our information. The problem for me is that these companies will
                            > > > > > > be using different platforms from which to consume our web service. My
                            > > > > > > question is what I should use as the return type for more complex data
                            > > > > > > structures. Should I use the intrinsic dataset object and return that,
                            > > > > > > should I create a typed dataset as then a definitive XML Schema will be
                            > > > > > > produced, or should I just build and XML string from the information I return
                            > > > > > > from the database and send that back across.
                            > > > > > >
                            > > > > > > I know that all the return types are serialized into XML, but does this mean
                            > > > > > > that they can be accessed when they get to other end?? I would really
                            > > > > > > appreciate some input here, if anyone can help me understand this that would
                            > > > > > > be great!
                            > > > > > >
                            > > > > > > Thanks,
                            > > > > > >
                            > > > > > > Rob
                            > > > > > >[/color][/color][/color]

                            Comment

                            • Daniel

                              #15
                              RE: DataSet Vs Xml string

                              Scott - Tried your code and it worked but when I call the HelloWorld function
                              from Cold Fusion I'm not getting data, just alot of numbers. I like this
                              idea and seems easy but how does the end user (consumer) see the correct data?

                              "Modica82" wrote:
                              [color=blue]
                              > Hi Dev,
                              >
                              > I know that the DataSet can pump out XML based on the data contained within
                              > it, the problem with it is that it creates elements with names that are not
                              > always particularly descriptive for third parties. We wanted a bit more
                              > control over the XML so i am choosing to write it myself, that way we know
                              > what we are sending across and can document the web service to tell third
                              > parties what to expect, safe in the knowledge that they are recieving what we
                              > intended to send them as set out in our documentation.
                              >
                              > Regards,
                              >
                              > Rob
                              >
                              > "Modica82" wrote:
                              >[color=green]
                              > > That would great. I think i was being a bit dim before, you can reference
                              > > the schema from anywhere, so as long as it is accessible on the web, you can
                              > > point you XML to use it, not sure how well that works for web services, but i
                              > > am sure i will find out soon enough.
                              > >
                              > > Cheers!
                              > >
                              > > Rob
                              > >
                              > > "SQLScott" wrote:
                              > >[color=darkred]
                              > > > Unfortunately, I have not. But i can point you to some great references on
                              > > > XSD schemas if you want them.
                              > > >
                              > > > Scott
                              > > >
                              > > > "Modica82" wrote:
                              > > >
                              > > > > Thanks again Scott,
                              > > > >
                              > > > > I do have a quick question, but you may or may not have the answer, have you
                              > > > > ever created any sort of schema(xsd) to be passed back with your XML, if so
                              > > > > how did you do it?
                              > > > >
                              > > > > Thanks in advance,
                              > > > >
                              > > > > Rob
                              > > > >
                              > > > > "Modica82" wrote:
                              > > > >
                              > > > > > Hi Scott,
                              > > > > >
                              > > > > > I was planning on using the XMLTextWriter class to create XML on the fly and
                              > > > > > return it as a string. I have read alot about XML but never really used it
                              > > > > > commercially, so i want to get it write (also i have only been at this job a
                              > > > > > month and trying to impress :)) Some code samles would be great if you could
                              > > > > > send them.
                              > > > > >
                              > > > > > Thanks in Advance,
                              > > > > >
                              > > > > > Rob
                              > > > > >
                              > > > > > "SQLScott" wrote:
                              > > > > >
                              > > > > > > Rob,
                              > > > > > >
                              > > > > > > In my opinion you should build and return an XML string. In fact, the best
                              > > > > > > way to do it is to build your xml string and return it as a byte array for
                              > > > > > > quick performance. Let me know if you'd like a code sample. I have build
                              > > > > > > several Web Services this way. In fact, I had questions such as yours and I
                              > > > > > > went straight to Francesco Balena (if you know who he is) and this method was
                              > > > > > > highly recommended.
                              > > > > > >
                              > > > > > > This way any company or customer can read it and you are not tied to any
                              > > > > > > platform or language, that is the beauty of XML.
                              > > > > > >
                              > > > > > > HOpe this helps.
                              > > > > > >
                              > > > > > > Scott
                              > > > > > >
                              > > > > > > "Modica82" wrote:
                              > > > > > >
                              > > > > > > > Hi All,
                              > > > > > > >
                              > > > > > > > I am very new to web services, so am struggling to understand exactly what I
                              > > > > > > > am doing with regards to its returns etc. I have been given the task of
                              > > > > > > > designing and developing a web service which will allow external companies,
                              > > > > > > > access to our information. The problem for me is that these companies will
                              > > > > > > > be using different platforms from which to consume our web service. My
                              > > > > > > > question is what I should use as the return type for more complex data
                              > > > > > > > structures. Should I use the intrinsic dataset object and return that,
                              > > > > > > > should I create a typed dataset as then a definitive XML Schema will be
                              > > > > > > > produced, or should I just build and XML string from the information I return
                              > > > > > > > from the database and send that back across.
                              > > > > > > >
                              > > > > > > > I know that all the return types are serialized into XML, but does this mean
                              > > > > > > > that they can be accessed when they get to other end?? I would really
                              > > > > > > > appreciate some input here, if anyone can help me understand this that would
                              > > > > > > > be great!
                              > > > > > > >
                              > > > > > > > Thanks,
                              > > > > > > >
                              > > > > > > > Rob
                              > > > > > > >[/color][/color][/color]

                              Comment

                              Working...