XML errors in webservice call

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

    #1

    XML errors in webservice call

    I am creating some code that runs in Excel using VSTO. I am trying to get
    some xml from a webservice, using the following code:

    GBWPipeline.Pip elineService pipeline = new GBWPipeline.Pip elineService();
    string xml = pipeline.GetOff erSale(OfferShe etId, CustomerId).Get Xml();

    I get a "There is an error in XML document. (1, 220)" message. If I execute
    the same method from WebServiceStudi o, it works fine (using the same values
    for the parameters) and returns the xml that I expect (and doesn't complain
    about any errors). It also works in a normal WinForms application. It is
    only inside Excel that it fails.

    I have other Excel workbooks that also retrieve xml from webservices and
    they work. Thanks for any suggestions.

    Colin


  • Tom Egginger

    #2
    XML errors in webservice call

    Hello Colin,

    I actually have not used vsto - but I faced a similar
    problem using MSXML (using vb6) accessing a .net
    WebService .

    A .Net TestClient Application has been able to call the
    WebService without any problems, but MSXML failed with
    an "invalid unicode character"-error.

    I assume there are some "difference s" handling unicode
    (invalid or not) between MSXML and others (like IE, .Net,
    XMLSpy,...) - is it possible, that vsto is based on MSXML?

    I finally ended up (workaround solution due to lack of
    time) decoding the "problemati c" fields as base64...

    Hope this helps

    Regards,

    Tom




    [color=blue]
    >-----Original Message-----
    >I am creating some code that runs in Excel using VSTO. I[/color]
    am trying to get[color=blue]
    >some xml from a webservice, using the following code:
    >
    >GBWPipeline.Pi pelineService pipeline = new[/color]
    GBWPipeline.Pip elineService();[color=blue]
    >string xml = pipeline.GetOff erSale(OfferShe etId,[/color]
    CustomerId).Get Xml();[color=blue]
    >
    >I get a "There is an error in XML document. (1, 220)"[/color]
    message. If I execute[color=blue]
    >the same method from WebServiceStudi o, it works fine[/color]
    (using the same values[color=blue]
    >for the parameters) and returns the xml that I expect[/color]
    (and doesn't complain[color=blue]
    >about any errors). It also works in a normal WinForms[/color]
    application. It is[color=blue]
    >only inside Excel that it fails.
    >
    >I have other Excel workbooks that also retrieve xml from[/color]
    webservices and[color=blue]
    >they work. Thanks for any suggestions.
    >
    >Colin
    >
    >
    >.
    >[/color]

    Comment

    • Colin Young

      #3
      Re: XML errors in webservice call

      Thanks. I'll keep that in mind, but right now there is nothing in the
      problem XML that isn't also in other XML that is working in different Excel
      solutions (at least as far as I can tell). I'll be doing some more testing
      today to see if I can turn up any clues, so maybe this tip will help there.

      Colin

      "Tom Egginger" <tomegginger@gg mmxx.net> wrote in message
      news:2582201c46 07c$b7e054c0$a5 01280a@phx.gbl. ..[color=blue]
      > Hello Colin,
      >
      > I actually have not used vsto - but I faced a similar
      > problem using MSXML (using vb6) accessing a .net
      > WebService .
      >
      > A .Net TestClient Application has been able to call the
      > WebService without any problems, but MSXML failed with
      > an "invalid unicode character"-error.
      >
      > I assume there are some "difference s" handling unicode
      > (invalid or not) between MSXML and others (like IE, .Net,
      > XMLSpy,...) - is it possible, that vsto is based on MSXML?
      >
      > I finally ended up (workaround solution due to lack of
      > time) decoding the "problemati c" fields as base64...
      >
      > Hope this helps
      >
      > Regards,
      >
      > Tom
      >
      >
      >
      >
      >[color=green]
      > >-----Original Message-----
      > >I am creating some code that runs in Excel using VSTO. I[/color]
      > am trying to get[color=green]
      > >some xml from a webservice, using the following code:
      > >
      > >GBWPipeline.Pi pelineService pipeline = new[/color]
      > GBWPipeline.Pip elineService();[color=green]
      > >string xml = pipeline.GetOff erSale(OfferShe etId,[/color]
      > CustomerId).Get Xml();[color=green]
      > >
      > >I get a "There is an error in XML document. (1, 220)"[/color]
      > message. If I execute[color=green]
      > >the same method from WebServiceStudi o, it works fine[/color]
      > (using the same values[color=green]
      > >for the parameters) and returns the xml that I expect[/color]
      > (and doesn't complain[color=green]
      > >about any errors). It also works in a normal WinForms[/color]
      > application. It is[color=green]
      > >only inside Excel that it fails.
      > >
      > >I have other Excel workbooks that also retrieve xml from[/color]
      > webservices and[color=green]
      > >they work. Thanks for any suggestions.
      > >
      > >Colin
      > >
      > >
      > >.
      > >[/color][/color]


      Comment

      Working...