Webservice Help

Nate Bross

Contributor
Joined
Apr 6, 2005
Messages
601
Location
Chicago, IL
I'm calling a webservice and it seems to be working and then I get the error

"Exception Message: Response is not well-formed XML."

Here's all the other information too

Code:
Exception Message: Response is not well-formed XML.
Source: System.Web.Services
Stack Trace:    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Mywebservice.mydomain.servicename(String strToken, String strBatchNumber, String xmlstring, EnvironmentEnum envState) in C:\DOTNET\Projects\SISTRSImport\SISTRSImport\Web References\mywebservice.mydomain.servicename\Reference.vb:line 186
   at SISTRSImport.Module1.ProcessFiles() in C:\DOTNET\Projects\SISTRSImport\SISTRSImport\Module1.vb:line 68
Target Site: System.Object[] Invoke(System.String, System.Object[])

If anyone can tell me what it means I'd greatly appreciate it. I have searched for Exception Message: Response is not well-formed XML and turned up nothing.

My question is this I suppose: Is this an error in my application or the webservice I am calling?
 
Looks like a problem at their end as it is failing withing the generated wrapper class. If it isn't returning valid XML then you will just need to handle the exception.

Out of interest does it do this randomly or is it dependant on the parameters you provide?
 
It turns out that the problem was due to a bad char at the end of my input file.

(I read a file, convert to values and give to the webservice)

There was a character 26 at the end of my file and I was unknowlingly sending to the webservice.

After removing this character it worked.
 
Back
Top