Hi,

I have a web service (deployed inside a Sharepoint site - though this is not important).
I have a client - windows application where I call the web service to populate a grid & for other purposes like getting Sharepoint document library's fields, etc.,.
In the winform's constructor, I invoke the web service. But I get a SoapException with the following details:

Message: Response is not well-formed XML:

Inner Exception: Element 'Envelope' was not found. Line 1, position 2.

Stack Trace:

at System.Xml.XmlReader.ReadStartElement(String name)

at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

I debugged the web service, & it works fine. The web method returns either true/false, but just after the control leaves the web service, I get this error. Can someone tell what may be the problem or ways to further drill down, understand this & fix this.

I also checked the response XML & it is:

SoapResponse at 8/20/2008 2:28:04 PM
<?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><isUserAuthorizedResponse xmlns="http://skeltaWS.org/"><isUserAuthorizedResult>true</isUserAuthorizedResult></isUserAuthorizedResponse></soap:Body></soap:Envelope>


I'm able to see the 'Envelope' node, not sure why or where the exception is occurring.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.