Aravind Suresh

Aravind Suresh

  • NA
  • 5
  • 965

Soap Message Issue

Jan 31 2016 5:01 AM

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 

Answers (3)