Client found response content type of 'application/soap'

N

nilok

My client is an ASP .NET Web Application developed
with .NET Framework 1.1 and VS .NET 2003

I used "Add Web Reference" and pointed VS .NET at the URL
of the my local WSDL:

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="Service-binding"
targetNamespace="http://www.Service.com/definitions/ServiceRemoteInterface"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:enc="http://www.w3.org/2001/06/soap-encoding"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.Service.com/definitions/ServiceRemoteInterface"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<message name="GetInput">
<part name="input" type="xsd:string"/>
</message>
<message name="commandResponse">
<part name="output" type="xsd:string" />
</message>
<portType name="Service">
<operation name="setClientRequest">
<input message="tns:GetInput" name="GetInput"/>
<output message="tns:commandResponse"
name="commandResponse"/>
</operation>
</portType>
<binding name="ServiceBinding" type="tns:Service">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="setClientRequest">
<soap:eek:peration soapAction="" style="rpc"/>
<input name="GetInput">
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:Service" use="encoded"/>
</input>
<output name="commandResponse">
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:Service" use="encoded"/>
</output>
</operation>
</binding>
<service name="commandService"></service>
</definitions>

There is just one method in the third party web service -
setClientRequest.

When I use wsdl just with input Ws work well, but when I add output to
wsdl I got correct answer but with content type of application/soap
that cause error.

Error: System.InvalidOperationException: Client found response content
type of 'application/soap; charset="utf-8"', but expected 'text/xml'.
The request failed with the error message: -- <?xml version="1.0"
encoding="UTF-8"?> <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://.............. <output
xsi:type="xsd:base64Binary">1500</output></commandResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

Source Error 38:
[return: System.Xml.Serialization.SoapElementAttribute("output")]
Line 37: public string setClientRequest(string input) {
Line 38: object[] results =
this.Invoke("setClientRequest", new object[] {
Line 39: input});
Line 40: return ((string)(results[0]));

How can I change ws response content type to 'text/xml'? Have you any
idea?
Thankx
Jaro
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top