I need to return dataset in XML format so Flash can read it properly.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • casucci@gmail.com

    I need to return dataset in XML format so Flash can read it properly.

    I do a return as XMLDataDocument in my webservice but it returns not
    with the namespaces etc in them. Anyone have and example where I can
    have the webservice return it as a XML. C# preferred.
    Flash just sees it as an object when it calls the web service.
    Thanks
  • John Saunders

    #2
    Re: I need to return dataset in XML format so Flash can read it properly.

    <casucci@gmail. comwrote in message
    news:27cfbfb2-ce92-4582-bdd7-ddc4bda661f9@8g 2000hse.googleg roups.com...
    I do a return as XMLDataDocument in my webservice but it returns not
    with the namespaces etc in them. Anyone have and example where I can
    have the webservice return it as a XML. C# preferred.
    Flash just sees it as an object when it calls the web service.
    What do you mean, "without the namespaces"? Can you give more detail on what
    you're looking for?


    --
    John Saunders | MVP - Connected System Developer

    Comment

    • casucci@gmail.com

      #3
      Re: I need to return dataset in XML format so Flash can read itproperly.

      On Oct 2, 12:20 pm, "John Saunders" <n...@dont.do.t hat.comwrote:
      <casu...@gmail. comwrote in message
      >
      news:27cfbfb2-ce92-4582-bdd7-ddc4bda661f9@8g 2000hse.googleg roups.com...
      >
      I do a return as XMLDataDocument in my webservice but it returns not
      with the namespaces etc in them. Anyone have and example where I can
      have the webservice return it as a XML. C# preferred.
      Flash just sees it as an object when it calls the web service.
      >
      What do you mean, "without the namespaces"? Can you give more detail on what
      you're looking for?
      >
      --
      John Saunders | MVP - Connected System Developer
      Here is my code:
      [WebMethod(Descr iption = "Get All Floors", EnableSession = true)]
      public XmlDocument GetCurrentFloor (string identity)
      {
      DataTable dt;
      try
      {
      I get my dataset here from the database
      XmlDocument xml = new XmlDocument();
      xml.LoadXml(dt. DataSet.GetXml( ));
      return xml;
      }
      catch (SoapException sox)
      {
      throw sox;
      }

      it returns as this:
      <?xml version="1.0" encoding="utf-8" ?>
      - <NewDataSet>
      - <Table1>
      <FirstName>Ar i N.</FirstName>
      <LastName>Lefko vits</LastName>
      <Title>Director </Title>
      <Email>ari.lefk ovits@lazard.co m</Email>
      <Phone>+1 212-555-5555</Phone>
      <BusinessLine>C lothinh</BusinessLine>
      <DepartmentName >industry</DepartmentName>
      <DepartmentId>1 88989</DepartmentId>
      <ProductGroup>5 5555</ProductGroup>
      <Assistant xml:space="pres erve"></Assistant>
      <FloorLocationI d>177</FloorLocationId >
      <UserName>nam e</UserName>
      <LazardId>666 6</LazardId>
      <Location>New York</Location>
      <Floor>61</Floor>
      <BusinessUnit>3 333</BusinessUnit>
      <CPUGroup>1</CPUGroup>
      </Table1>........ ...

      I need it to return it like this:
      <?xml version="1.0" encoding="utf-8" ?>
      - <WeatherForecas ts xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xmlns="http://
      www.webservicex .net">
      <Latitude>40.75 97275</Latitude>
      <Longitude>73.9 823456</Longitude>
      <AllocationFact or>2.2E-05</AllocationFacto r>
      <FipsCode>36</FipsCode>
      <PlaceName>NE W YORK</PlaceName>
      <StateCode>NY </StateCode>
      - <Details>
      - <WeatherData>
      <Day>Thursday , October 02, 2008</Day>
      <WeatherImage>h ttp://forecast.weathe r.gov/images/wtf/shra20.jpg</
      WeatherImage>
      <MaxTemperature F>68</MaxTemperatureF >
      <MinTemperature F>51</MinTemperatureF >
      <MaxTemperature C>20</MaxTemperatureC >
      <MinTemperature C>11</MinTemperatureC >
      </WeatherData>
      - <WeatherData>
      <Day>Friday, October 03, 2008</Day>
      <WeatherImage>h ttp://forecast.weathe r.gov/images/wtf/sct.jpg</
      WeatherImage>
      <MaxTemperature F>69</MaxTemperatureF >
      <MinTemperature F>53</MinTemperatureF >
      <MaxTemperature C>21</MaxTemperatureC >
      <MinTemperature C>12</MinTemperatureC >
      </WeatherData>
      - <WeatherData>
      <Day>Saturday , October 04, 2008</Day>
      <WeatherImage>h ttp://forecast.weathe r.gov/images/wtf/sct.jpg</
      WeatherImage>
      <MaxTemperature F>66</MaxTemperatureF >
      <MinTemperature F>51</MinTemperatureF >
      <MaxTemperature C>19</MaxTemperatureC >
      <MinTemperature C>11</MinTemperatureC >
      </WeatherData>
      - <WeatherData>
      <Day>Sunday, October 05, 2008</Day>
      <WeatherImage>h ttp://forecast.weathe r.gov/images/wtf/sct.jpg</
      WeatherImage>
      <MaxTemperature F>64</MaxTemperatureF >
      <MinTemperature F>48</MinTemperatureF >
      <MaxTemperature C>18</MaxTemperatureC >
      <MinTemperature C>9</MinTemperatureC >
      </WeatherData>
      - <WeatherData>
      <Day>Monday, October 06, 2008</Day>
      <WeatherImage>h ttp://forecast.weathe r.gov/images/wtf/sct.jpg</
      WeatherImage>
      <MaxTemperature F>62</MaxTemperatureF >
      <MinTemperature F>48</MinTemperatureF >
      <MaxTemperature C>17</MaxTemperatureC >
      <MinTemperature C>9</MinTemperatureC >
      </WeatherData>
      - <WeatherData>
      <Day>Tuesday, October 07, 2008</Day>
      <WeatherImage>h ttp://forecast.weathe r.gov/images/wtf/sct.jpg</
      WeatherImage>
      <MaxTemperature F>61</MaxTemperatureF >
      <MinTemperature F>52</MinTemperatureF >
      <MaxTemperature C>16</MaxTemperatureC >
      <MinTemperature C>11</MinTemperatureC >
      </WeatherData>
      <WeatherData />
      </Details>
      </WeatherForecast s>

      Comment

      • John Saunders

        #4
        Re: I need to return dataset in XML format so Flash can read it properly.

        <casucci@gmail. comwrote in message
        news:dafd87cc-901a-4466-9fdd-0ded9b6cee74@m4 5g2000hsb.googl egroups.com...
        On Oct 2, 12:20 pm, "John Saunders" <n...@dont.do.t hat.comwrote:
        ><casu...@gmail .comwrote in message
        >>
        >news:27cfbfb 2-ce92-4582-bdd7-ddc4bda661f9@8g 2000hse.googleg roups.com...
        >>
        I do a return as XMLDataDocument in my webservice but it returns not
        with the namespaces etc in them. Anyone have and example where I can
        have the webservice return it as a XML. C# preferred.
        Flash just sees it as an object when it calls the web service.
        >>
        >What do you mean, "without the namespaces"? Can you give more detail on
        >what
        >you're looking for?
        >>
        >--
        >John Saunders | MVP - Connected System Developer
        >
        Here is my code:
        [WebMethod(Descr iption = "Get All Floors", EnableSession = true)]
        public XmlDocument GetCurrentFloor (string identity)
        {
        DataTable dt;
        try
        {
        I get my dataset here from the database
        XmlDocument xml = new XmlDocument();
        xml.LoadXml(dt. DataSet.GetXml( ));
        return xml;
        }
        catch (SoapException sox)
        {
        throw sox;
        }
        >
        it returns as this:
        <?xml version="1.0" encoding="utf-8" ?>
        - <NewDataSet>
        - <Table1>
        <FirstName>Ar i N.</FirstName>
        <LastName>Lefko vits</LastName>
        <Title>Director </Title>
        <Email>ari.lefk ovits@lazard.co m</Email>
        <Phone>+1 212-555-5555</Phone>
        <BusinessLine>C lothinh</BusinessLine>
        <DepartmentName >industry</DepartmentName>
        <DepartmentId>1 88989</DepartmentId>
        <ProductGroup>5 5555</ProductGroup>
        <Assistant xml:space="pres erve"></Assistant>
        <FloorLocationI d>177</FloorLocationId >
        <UserName>nam e</UserName>
        <LazardId>666 6</LazardId>
        <Location>New York</Location>
        <Floor>61</Floor>
        <BusinessUnit>3 333</BusinessUnit>
        <CPUGroup>1</CPUGroup>
        </Table1>........ ...
        >
        I need it to return it like this:
        <?xml version="1.0" encoding="utf-8" ?>
        - <WeatherForecas ts xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xmlns="http://
        www.webservicex .net">
        <Latitude>40.75 97275</Latitude>
        <Longitude>73.9 823456</Longitude>
        <AllocationFact or>2.2E-05</AllocationFacto r>
        <FipsCode>36</FipsCode>
        <PlaceName>NE W YORK</PlaceName>
        <StateCode>NY </StateCode>
        - <Details>
        - <WeatherData>
        <Day>Thursday , October 02, 2008</Day>
        <WeatherImage>h ttp://forecast.weathe r.gov/images/wtf/shra20.jpg</
        WeatherImage>
        <MaxTemperature F>68</MaxTemperatureF >
        <MinTemperature F>51</MinTemperatureF >
        <MaxTemperature C>20</MaxTemperatureC >
        <MinTemperature C>11</MinTemperatureC >
        </WeatherData>
        - <WeatherData>
        <Day>Friday, October 03, 2008</Day>
        <WeatherImage>h ttp://forecast.weathe r.gov/images/wtf/sct.jpg</
        WeatherImage>
        <MaxTemperature F>69</MaxTemperatureF >
        <MinTemperature F>53</MinTemperatureF >
        <MaxTemperature C>21</MaxTemperatureC >
        <MinTemperature C>12</MinTemperatureC >
        </WeatherData>
        - <WeatherData>
        <Day>Saturday , October 04, 2008</Day>
        <WeatherImage>h ttp://forecast.weathe r.gov/images/wtf/sct.jpg</
        WeatherImage>
        <MaxTemperature F>66</MaxTemperatureF >
        <MinTemperature F>51</MinTemperatureF >
        <MaxTemperature C>19</MaxTemperatureC >
        <MinTemperature C>11</MinTemperatureC >
        </WeatherData>
        - <WeatherData>
        <Day>Sunday, October 05, 2008</Day>
        <WeatherImage>h ttp://forecast.weathe r.gov/images/wtf/sct.jpg</
        WeatherImage>
        <MaxTemperature F>64</MaxTemperatureF >
        <MinTemperature F>48</MinTemperatureF >
        <MaxTemperature C>18</MaxTemperatureC >
        <MinTemperature C>9</MinTemperatureC >
        </WeatherData>
        ....
        </Details>
        </WeatherForecast s>
        First of all, did you post the correct XML? The first example seems
        unrelated to the second example.

        Second of all, when you talk about namespace, I presume you mean
        xmlns="http://www.webservicex .net"? If that's true, then try setting the
        Namespace property of the DataSet to "http://www.webservicex .net".

        Third, never ever catch exceptions unless you have to, and unless you're
        going to add something over and above what would happen if you didn't catch
        the exception. All you are doing is throwing what you caught, which is worse
        than not catching it (you're screwing up the stack trace).

        Finally, there are several other methods of gettinig XML from a DataSet into
        an XmlDocument. I haven't had time to do performance testing on them to see
        which is better, but I'm certain that you've chosen about the worst way
        possible. After asking the DataSet to emit its contents as a string, you're
        then turning around and asking the XmlDocument instance to parse that
        string. That can be a very expensive operation. Try one of these:

        public XmlDocument GetDocument()
        {
        return new XmlDataDocument (_ds);
        }

        public XmlDocument GetDocument()
        {
        XmlDocument doc = new XmlDocument();
        XPathNavigator navigator = doc.CreateNavig ator();
        using (var writer = navigator.Appen dChild())
        {
        _ds.WriteXml(wr iter, XmlWriteMode.Ig noreSchema);
        }
        return doc;
        }

        --
        John Saunders | MVP - Connected System Developer

        Comment

        • casucci@gmail.com

          #5
          Re: I need to return dataset in XML format so Flash can read itproperly.

          On Oct 2, 5:12 pm, "John Saunders" <n...@dont.do.t hat.comwrote:
          <casu...@gmail. comwrote in message
          >
          news:dafd87cc-901a-4466-9fdd-0ded9b6cee74@m4 5g2000hsb.googl egroups.com...
          >
          >
          >
          >
          >
          On Oct 2, 12:20 pm, "John Saunders" <n...@dont.do.t hat.comwrote:
          <casu...@gmail. comwrote in message
          >
          >news:27cfbfb 2-ce92-4582-bdd7-ddc4bda661f9@8g 2000hse.googleg roups.com...
          >
          I do a return as XMLDataDocument in my webservice but it returns not
          with the namespaces etc in them. Anyone have and example where I can
          have the webservice return it as a XML. C# preferred.
          Flash just sees it as an object when it calls the web service.
          >
          What do you mean, "without the namespaces"? Can you give more detail on
          what
          you're looking for?
          >
          --
          John Saunders | MVP - Connected System Developer
          >
          Here is my code:
          [WebMethod(Descr iption = "Get All Floors", EnableSession = true)]
                 public XmlDocument GetCurrentFloor (string identity)
                 {
                     DataTable dt;
                     try
                     {
                        I get my dataset here from the database
                         XmlDocument xml = new XmlDocument();
                         xml.LoadXml(dt. DataSet.GetXml( ));
                        return xml;
                     }
                     catch (SoapException sox)
                     {
                         throw sox;
                     }
          >
          it returns as this:
          <?xml version="1.0" encoding="utf-8" ?>
          - <NewDataSet>
          - <Table1>
           <FirstName>Ar i N.</FirstName>
           <LastName>Lefko vits</LastName>
           <Title>Director </Title>
           <Email>ari.lefk ov...@lazard.co m</Email>
           <Phone>+1 212-555-5555</Phone>
           <BusinessLine>C lothinh</BusinessLine>
           <DepartmentName >industry</DepartmentName>
           <DepartmentId>1 88989</DepartmentId>
           <ProductGroup>5 5555</ProductGroup>
           <Assistant xml:space="pres erve"></Assistant>
           <FloorLocationI d>177</FloorLocationId >
           <UserName>nam e</UserName>
           <LazardId>666 6</LazardId>
           <Location>New York</Location>
           <Floor>61</Floor>
           <BusinessUnit>3 333</BusinessUnit>
           <CPUGroup>1</CPUGroup>
           </Table1>........ ...
          >
          I need it to return it like this:
          <?xml version="1.0" encoding="utf-8" ?>
          - <WeatherForecas ts xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
          xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xmlns="http://
          www.webservicex .net">
           <Latitude>40.75 97275</Latitude>
           <Longitude>73.9 823456</Longitude>
           <AllocationFact or>2.2E-05</AllocationFacto r>
           <FipsCode>36</FipsCode>
           <PlaceName>NE W YORK</PlaceName>
           <StateCode>NY </StateCode>
          - <Details>
          - <WeatherData>
           <Day>Thursday , October 02, 2008</Day>
           <WeatherImage>h ttp://forecast.weathe r.gov/images/wtf/shra20.jpg</
          WeatherImage>
           <MaxTemperature F>68</MaxTemperatureF >
           <MinTemperature F>51</MinTemperatureF >
           <MaxTemperature C>20</MaxTemperatureC >
           <MinTemperature C>11</MinTemperatureC >
           </WeatherData>
          - <WeatherData>
           <Day>Friday, October 03, 2008</Day>
           <WeatherImage>h ttp://forecast.weathe r.gov/images/wtf/sct.jpg</
          WeatherImage>
           <MaxTemperature F>69</MaxTemperatureF >
           <MinTemperature F>53</MinTemperatureF >
           <MaxTemperature C>21</MaxTemperatureC >
           <MinTemperature C>12</MinTemperatureC >
           </WeatherData>
          - <WeatherData>
           <Day>Saturday , October 04, 2008</Day>
           <WeatherImage>h ttp://forecast.weathe r.gov/images/wtf/sct.jpg</
          WeatherImage>
           <MaxTemperature F>66</MaxTemperatureF >
           <MinTemperature F>51</MinTemperatureF >
           <MaxTemperature C>19</MaxTemperatureC >
           <MinTemperature C>11</MinTemperatureC >
           </WeatherData>
          - <WeatherData>
           <Day>Sunday, October 05, 2008</Day>
           <WeatherImage>h ttp://forecast.weathe r.gov/images/wtf/sct.jpg</
          WeatherImage>
           <MaxTemperature F>64</MaxTemperatureF >
           <MinTemperature F>48</MinTemperatureF >
           <MaxTemperature C>18</MaxTemperatureC >
           <MinTemperature C>9</MinTemperatureC >
           </WeatherData>
          ...
           </Details>
           </WeatherForecast s>
          >
          First of all, did you post the correct XML? The first example seems
          unrelated to the second example.
          >
          Second of all, when you talk about namespace, I presume you mean
          xmlns="http://www.webservicex .net"? If that's true, then try setting the
          Namespace property of the DataSet to "http://www.webservicex .net".
          >
          Third, never ever catch exceptions unless you have to, and unless you're
          going to add something over and above what would happen if you didn't catch
          the exception. All you are doing is throwing what you caught, which is worse
          than not catching it (you're screwing up the stack trace).
          >
          Finally, there are several other methods of gettinig XML from a DataSet into
          an XmlDocument. I haven't had time to do performance testing on them to see
          which is better, but I'm certain that you've chosen about the worst way
          possible. After asking the DataSet to emit its contents as a string, you're
          then turning around and asking the XmlDocument instance to parse that
          string. That can be a very expensive operation. Try one of these:
          >
          public XmlDocument GetDocument()
          {
              return new XmlDataDocument (_ds);
          >
          }
          >
          public XmlDocument GetDocument()
          {
              XmlDocument doc = new XmlDocument();
              XPathNavigator navigator = doc.CreateNavig ator();
              using (var writer = navigator.Appen dChild())
              {
                  _ds.WriteXml(wr iter, XmlWriteMode.Ig noreSchema);
              }
              return doc;
          >
          }
          >
          --
          John Saunders | MVP - Connected System Developer- Hide quoted text -
          >
          - Show quoted text -
          Hi John,
          This is a POC on something that is why it is very general code. The
          code you gave me I already returned it as XMLDocument. The first xml
          is what I returned the second is an example on how I would like it
          returned. Almost like a datafeed. Flash when calling a webservice sees
          it as a object. I want to return it where it sees it as a xml file but
          in memory not an actual file on the server. Can it be some
          configuration on the project itself.....

          Thanks for your time.
          Damon

          Comment

          • John Saunders

            #6
            Re: I need to return dataset in XML format so Flash can read it properly.

            <casucci@gmail. comwrote in message
            news:c31ebb0d-f782-459c-91d4-9ca34cbe340c@m3 g2000hsc.google groups.com...
            On Oct 2, 5:12 pm, "John Saunders" <n...@dont.do.t hat.comwrote:
            Hi John,
            This is a POC on something that is why it is very general code. The
            code you gave me I already returned it as XMLDocument. The first xml
            is what I returned the second is an example on how I would like it
            returned. Almost like a datafeed. Flash when calling a webservice sees
            it as a object. I want to return it where it sees it as a xml file but
            in memory not an actual file on the server. Can it be some
            configuration on the project itself.....
            I don't see any fundamental difference between the two. They are both valid
            XML Documents.

            I think you are seeing differences and mistaking them for important
            differences. I think you are missing what the important difference really
            is. I think you'll need to create a simpler POC, maybe with only a few
            columns, and see how Flash treats it.
            --
            John Saunders | MVP - Connected System Developer

            Comment

            • casucci@gmail.com

              #7
              Re: I need to return dataset in XML format so Flash can read itproperly.

              On Oct 3, 11:28 am, "John Saunders" <n...@dont.do.t hat.comwrote:
              <casu...@gmail. comwrote in message
              >
              news:c31ebb0d-f782-459c-91d4-9ca34cbe340c@m3 g2000hsc.google groups.com...
              >
              On Oct 2, 5:12 pm, "John Saunders" <n...@dont.do.t hat.comwrote:
              Hi John,
              This is a POC on something that is why it is very general code. The
              code you gave me I already returned it as XMLDocument. The first xml
              is what I returned the second is an example on how I would like it
              returned. Almost like a datafeed. Flash when calling a webservice sees
              it as a object. I want to return it where it sees it as a xml file but
              in memory not an actual file on the server. Can it be some
              configuration on the project itself.....
              >
              I don't see any fundamental difference between the two. They are both valid
              XML Documents.
              >
              I think you are seeing differences and mistaking them for important
              differences. I think you are missing what the important difference really
              is. I think you'll need to create a simpler POC, maybe with only a few
              columns, and see how Flash treats it.
              --
              John Saunders | MVP - Connected System Developer
              Well the where is my namespace, it is there in my code.
              I already connected to the weather service and it worked fine. I got
              results back in my Flash application, without any issues. only thing
              it does is a binding. Like a datagrid would do.
              maybe I need to look into another forum. Thanks

              Comment

              • John Saunders

                #8
                Re: I need to return dataset in XML format so Flash can read it properly.



                <casucci@gmail. comwrote in message
                news:f2bca23e-407e-4e71-98bc-4e40838ee766@i7 6g2000hsf.googl egroups.com...
                On Oct 3, 11:28 am, "John Saunders" <n...@dont.do.t hat.comwrote:
                ><casu...@gmail .comwrote in message
                >>
                >news:c31ebb0 d-f782-459c-91d4-9ca34cbe340c@m3 g2000hsc.google groups.com...
                >>
                On Oct 2, 5:12 pm, "John Saunders" <n...@dont.do.t hat.comwrote:
                Hi John,
                This is a POC on something that is why it is very general code. The
                code you gave me I already returned it as XMLDocument. The first xml
                is what I returned the second is an example on how I would like it
                returned. Almost like a datafeed. Flash when calling a webservice sees
                it as a object. I want to return it where it sees it as a xml file but
                in memory not an actual file on the server. Can it be some
                configuration on the project itself.....
                >>
                >I don't see any fundamental difference between the two. They are both
                >valid
                >XML Documents.
                >>
                >I think you are seeing differences and mistaking them for important
                >differences. I think you are missing what the important difference really
                >is. I think you'll need to create a simpler POC, maybe with only a few
                >columns, and see how Flash treats it.
                >--
                >John Saunders | MVP - Connected System Developer
                >
                Well the where is my namespace, it is there in my code.
                I already connected to the weather service and it worked fine. I got
                results back in my Flash application, without any issues. only thing
                it does is a binding. Like a datagrid would do.
                maybe I need to look into another forum. Thanks
                Did you try setting the Namespace property of the DataSet like I suggested?

                But I don't think that will solve your problem. The problem is that you
                don't know what Flash likes and doesn't like about your XML.

                And I don't see any namespace in the code you posted. Please point it out to
                me.

                --
                John Saunders | MVP - Connected System Developer

                Comment

                • casucci@gmail.com

                  #9
                  Re: I need to return dataset in XML format so Flash can read itproperly.

                  On Oct 3, 11:51 am, "John Saunders" <n...@dont.do.t hat.comwrote:
                  <casu...@gmail. comwrote in message
                  >
                  news:f2bca23e-407e-4e71-98bc-4e40838ee766@i7 6g2000hsf.googl egroups.com...
                  >
                  >
                  >
                  >
                  >
                  On Oct 3, 11:28 am, "John Saunders" <n...@dont.do.t hat.comwrote:
                  <casu...@gmail. comwrote in message
                  >
                  >news:c31ebb0 d-f782-459c-91d4-9ca34cbe340c@m3 g2000hsc.google groups.com....
                  >
                  On Oct 2, 5:12 pm, "John Saunders" <n...@dont.do.t hat.comwrote:
                  Hi John,
                  This is a POC on something that is why it is very general code. The
                  code you gave me I already returned it as XMLDocument. The first xml
                  is what I returned the second is an example on how I would like it
                  returned. Almost like a datafeed. Flash when calling a webservice sees
                  it as a object. I want to return it where it sees it as a xml file but
                  in memory not an actual file on the server. Can it be some
                  configuration on the project itself.....
                  >
                  I don't see any fundamental difference between the two. They are both
                  valid
                  XML Documents.
                  >
                  I think you are seeing differences and mistaking them for important
                  differences. I think you are missing what the important difference really
                  is. I think you'll need to create a simpler POC, maybe with only a few
                  columns, and see how Flash treats it.
                  --
                  John Saunders | MVP - Connected System Developer
                  >
                  Well the where is my namespace, it is there in my code.
                  I already connected to the weather service and it worked fine. I got
                  results back in my Flash application, without any issues. only thing
                  it does is a binding. Like a datagrid would do.
                  maybe I need to look into another forum. Thanks
                  >
                  Did you try setting the Namespace property of the DataSet like I suggested?
                  >
                  But I don't think that will solve your problem. The problem is that you
                  don't know what Flash likes and doesn't like about your XML.
                  >
                  And I don't see any namespace in the code you posted. Please point it outto
                  me.
                  >
                  --
                  John Saunders | MVP - Connected System Developer- Hide quoted text -
                  >
                  - Show quoted text -
                  I might have found something can I customize the WSDL ?

                  Comment

                  • John Saunders

                    #10
                    Re: I need to return dataset in XML format so Flash can read it properly.




                    <casucci@gmail. comwrote in message
                    news:e3bb34eb-7e11-48a0-a522-a6020df1b707@26 g2000hsk.google groups.com...
                    On Oct 3, 11:51 am, "John Saunders" <n...@dont.do.t hat.comwrote:
                    ><casu...@gmail .comwrote in message
                    >>
                    >news:f2bca23 e-407e-4e71-98bc-4e40838ee766@i7 6g2000hsf.googl egroups.com...
                    >>
                    >>
                    >>
                    >>
                    >>
                    On Oct 3, 11:28 am, "John Saunders" <n...@dont.do.t hat.comwrote:
                    ><casu...@gmail .comwrote in message
                    >>
                    >>news:c31ebb 0d-f782-459c-91d4-9ca34cbe340c@m3 g2000hsc.google groups.com...
                    >>
                    On Oct 2, 5:12 pm, "John Saunders" <n...@dont.do.t hat.comwrote:
                    Hi John,
                    This is a POC on something that is why it is very general code. The
                    code you gave me I already returned it as XMLDocument. The first xml
                    is what I returned the second is an example on how I would like it
                    returned. Almost like a datafeed. Flash when calling a webservice
                    sees
                    it as a object. I want to return it where it sees it as a xml file
                    but
                    in memory not an actual file on the server. Can it be some
                    configuration on the project itself.....
                    >>
                    >I don't see any fundamental difference between the two. They are both
                    >valid
                    >XML Documents.
                    >>
                    >I think you are seeing differences and mistaking them for important
                    >differences. I think you are missing what the important difference
                    >really
                    >is. I think you'll need to create a simpler POC, maybe with only a few
                    >columns, and see how Flash treats it.
                    >--
                    >John Saunders | MVP - Connected System Developer
                    >>
                    Well the where is my namespace, it is there in my code.
                    I already connected to the weather service and it worked fine. I got
                    results back in my Flash application, without any issues. only thing
                    it does is a binding. Like a datagrid would do.
                    maybe I need to look into another forum. Thanks
                    >>
                    >Did you try setting the Namespace property of the DataSet like I
                    >suggested?
                    >>
                    >But I don't think that will solve your problem. The problem is that you
                    >don't know what Flash likes and doesn't like about your XML.
                    >>
                    >And I don't see any namespace in the code you posted. Please point it out
                    >to
                    >me.
                    >>
                    >--
                    >John Saunders | MVP - Connected System Developer- Hide quoted text -
                    >>
                    >- Show quoted text -
                    >
                    I might have found something can I customize the WSDL ?
                    What did you find?

                    It is unlikely that you need to customize the WSDL. It is more likely that
                    you need to follow a few of my suggestions, like setting the Namespace
                    property of the DataSet and finding out what Flash would like to see.

                    You can write the WSDL by hand if you think that would help, and there are a
                    few customizations you can make. They vary from easy to very difficult,
                    which is why you should say what you're trying to accomplish.
                    --
                    John Saunders | MVP - Connected System Developer

                    Comment

                    • casucci@gmail.com

                      #11
                      Re: I need to return dataset in XML format so Flash can read itproperly.

                      On Oct 3, 2:57 pm, "John Saunders" <n...@dont.do.t hat.comwrote:
                      <casu...@gmail. comwrote in message
                      >
                      news:e3bb34eb-7e11-48a0-a522-a6020df1b707@26 g2000hsk.google groups.com...
                      >
                      >
                      >
                      >
                      >
                      On Oct 3, 11:51 am, "John Saunders" <n...@dont.do.t hat.comwrote:
                      <casu...@gmail. comwrote in message
                      >
                      >news:f2bca23 e-407e-4e71-98bc-4e40838ee766@i7 6g2000hsf.googl egroups.com....
                      >
                      On Oct 3, 11:28 am, "John Saunders" <n...@dont.do.t hat.comwrote:
                      <casu...@gmail. comwrote in message
                      >
                      >news:c31ebb0 d-f782-459c-91d4-9ca34cbe340c@m3 g2000hsc.google groups.com...
                      >
                      On Oct 2, 5:12 pm, "John Saunders" <n...@dont.do.t hat.comwrote:
                      Hi John,
                      This is a POC on something that is why it is very general code. The
                      code you gave me I already returned it as XMLDocument. The first xml
                      is what I returned the second is an example on how I would like it
                      returned. Almost like a datafeed. Flash when calling a webservice
                      sees
                      it as a object. I want to return it where it sees it as a xml file
                      but
                      in memory not an actual file on the server. Can it be some
                      configuration on the project itself.....
                      >
                      I don't see any fundamental difference between the two. They are both
                      valid
                      XML Documents.
                      >
                      I think you are seeing differences and mistaking them for important
                      differences. I think you are missing what the important difference
                      really
                      is. I think you'll need to create a simpler POC, maybe with only a few
                      columns, and see how Flash treats it.
                      --
                      John Saunders | MVP - Connected System Developer
                      >
                      Well the where is my namespace, it is there in my code.
                      I already connected to the weather service and it worked fine. I got
                      results back in my Flash application, without any issues. only thing
                      it does is a binding. Like a datagrid would do.
                      maybe I need to look into another forum. Thanks
                      >
                      Did you try setting the Namespace property of the DataSet like I
                      suggested?
                      >
                      But I don't think that will solve your problem. The problem is that you
                      don't know what Flash likes and doesn't like about your XML.
                      >
                      And I don't see any namespace in the code you posted. Please point it out
                      to
                      me.
                      >
                      --
                      John Saunders | MVP - Connected System Developer- Hide quoted text -
                      >
                      - Show quoted text -
                      >
                      I might have found something can I customize the WSDL ?
                      >
                      What did you find?
                      >
                      It is unlikely that you need to customize the WSDL. It is more likely that
                      you need to follow a few of my suggestions, like setting the Namespace
                      property of the DataSet and finding out what Flash would like to see.
                      >
                      You can write the WSDL by hand if you think that would help, and there are a
                      few customizations you can make. They vary from easy to very difficult,
                      which is why you should say what you're trying to accomplish.
                      --
                      John Saunders | MVP - Connected System Developer- Hide quoted text -
                      >
                      - Show quoted text -
                      I found that if I create a wsdl file and bind in my code it should
                      work. I did a POC at microsoft a little while back and remember that
                      is what sharepoint actually does. Except Sharepoint does it on the
                      fly. I'm going to implement this but will do it statically and will
                      let you know. Thanks
                      Flash sees the code you wrote as <anythingbut when I connect to the
                      weather service to test out what Flash sees it returns the info fine.
                      I need to mimic what they are doing.

                      Comment

                      • John Saunders

                        #12
                        Re: I need to return dataset in XML format so Flash can read it properly.

                        <casucci@gmail. comwrote in message
                        news:3135cf47-41d7-4779-be22-43def7c7fe33@k7 g2000hsd.google groups.com...
                        Flash sees the code you wrote as <anythingbut when I connect to the
                        weather service to test out what Flash sees it returns the info fine.
                        I need to mimic what they are doing.
                        If you want to mimic what the weather service does, then I suggest you mimic
                        it with similar data.

                        --
                        John Saunders | MVP - Connected System Developer

                        Comment

                        Working...