Web Service giving The data at the root level is invalid error

Discussion in 'ASP .Net' started by =?Utf-8?B?am1ncm8=?=, Jun 15, 2007.

  1. I created a web service in visual studio 2003, tested it with a sample.xml
    file from a vendor we are using, and it worked exactly like it should. I
    depoloyed it to our server, created a project calling the webservice with
    the sample.xml file, and again it worked. Now the vendor is calling the web
    service from their application and receiving the following error, and stating
    that there is something with the Web Service or the SOAP Client on my end
    that is expecting the data differently then what it is :

    ?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
    <soap:Fault>
    <faultcode>soap:Server</faultcode>
    <faultstring>Server was unable to process request. --> The data at the root
    level is invalid. Line 1, position 1.</faultstring>
    <detail />
    </soap:Fault>
    </soap:Body>
    </soap:Envelope>


    Any suggestions?
     
    =?Utf-8?B?am1ncm8=?=, Jun 15, 2007
    #1
    1. Advertising

  2. "jmgro" <> wrote in message
    news:...
    >I created a web service in visual studio 2003, tested it with a sample.xml
    > file from a vendor we are using, and it worked exactly like it should. I
    > depoloyed it to our server, created a project calling the webservice with
    > the sample.xml file, and again it worked. Now the vendor is calling the
    > web
    > service from their application and receiving the following error, and
    > stating
    > that there is something with the Web Service or the SOAP Client on my end
    > that is expecting the data differently then what it is :
    >
    > ?xml version="1.0" encoding="utf-8"?>
    > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    > <soap:Body>
    > <soap:Fault>
    > <faultcode>soap:Server</faultcode>
    > <faultstring>Server was unable to process request. --> The data at the
    > root
    > level is invalid. Line 1, position 1.</faultstring>
    > <detail />
    > </soap:Fault>
    > </soap:Body>
    > </soap:Envelope>
    >
    >
    > Any suggestions?


    Line 1, position 1 is the first character of the data. I suspect they aren't
    sending any data, or are sending it in the wrong XML namespace.

    You should use your favorite network monitoring tool to see the exchange
    between the client and server, then look at it and see how it differs from
    your expectations.
    --
    John Saunders [MVP]
     
    John Saunders [MVP], Jun 15, 2007
    #2
    1. Advertising

  3. They state that something in my environment is stripping the xml, so that is
    why I am receiving it incorrectly. My web service is running on Windows
    Server 2003, my IIS version is 6.0.

    "John Saunders [MVP]" wrote:

    > "jmgro" <> wrote in message
    > news:...
    > >I created a web service in visual studio 2003, tested it with a sample.xml
    > > file from a vendor we are using, and it worked exactly like it should. I
    > > depoloyed it to our server, created a project calling the webservice with
    > > the sample.xml file, and again it worked. Now the vendor is calling the
    > > web
    > > service from their application and receiving the following error, and
    > > stating
    > > that there is something with the Web Service or the SOAP Client on my end
    > > that is expecting the data differently then what it is :
    > >
    > > ?xml version="1.0" encoding="utf-8"?>
    > > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    > > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    > > <soap:Body>
    > > <soap:Fault>
    > > <faultcode>soap:Server</faultcode>
    > > <faultstring>Server was unable to process request. --> The data at the
    > > root
    > > level is invalid. Line 1, position 1.</faultstring>
    > > <detail />
    > > </soap:Fault>
    > > </soap:Body>
    > > </soap:Envelope>
    > >
    > >
    > > Any suggestions?

    >
    > Line 1, position 1 is the first character of the data. I suspect they aren't
    > sending any data, or are sending it in the wrong XML namespace.
    >
    > You should use your favorite network monitoring tool to see the exchange
    > between the client and server, then look at it and see how it differs from
    > your expectations.
    > --
    > John Saunders [MVP]
    >
    >
    >
     
    =?Utf-8?B?am1ncm8=?=, Jun 15, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jm
    Replies:
    1
    Views:
    7,265
  2. Alan Wang
    Replies:
    1
    Views:
    5,773
    intrader
    Aug 5, 2005
  3. pabbu
    Replies:
    8
    Views:
    773
    Marc Boyer
    Nov 7, 2005
  4. Cirene
    Replies:
    2
    Views:
    886
    Cirene
    May 12, 2008
  5. Ulli
    Replies:
    0
    Views:
    175
Loading...

Share This Page