Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hi,

I am trying to access a webservice whose WSDL is 
http://ec.europa.eu/taxation_customs/dds2/eos/validation/services/validation?wsdl

But on calling the method , I got the below error.
 
Client found response content type of 'text/html', but expected 'text/xml'. 
The request failed with an empty response. 
 
 The webservice expects the SOAP message to be in the below format.
 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 
 <soap:Body> 
<ev:validateEORI xmlns:ev="http://eori.ws.eos.dds.s/"> 
<ev:eori>DE123456</ev:eori> 
<ev:eori>IT123456789</ev:eori> 
</ev:validateEORI> 
</soap:Body> 
</soap:Envelope> 
 
But the SOAP message generated by my c# code 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> 
<ev:validateEORI xmlns:ev="http://eori.ws.eos.dds.s/"> 
<ev:eori>DE123456</ev:eori> 
<ev:eori>IT123456789</ev:eori> 
</ev:validateEORI> 
</soap:Body> 
</soap:Envelope> 
 
How can I avoid   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
from the soap message generated by the C# code/client? 
 
Thanks,
Aravind 
Posted
Comments
Fatih Erdem 2-Dec-16 12:42pm    
I'm having the same error. Is this issue solved ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900