Forum Discussion

Willa's avatar
Willa
Occasional Contributor
9 years ago

WCF client gets ProtocolException when trying to consume a response from the MockService

Hi all,

 

I've created a MockService in SoapUI to test WCF client. When the MockService dispatches a static response everything works fine, but when it uses a script to transfer values from the request to the response as described here http://www.soapui.org/soap-mocking/creating-dynamic-mockservices.html my client gets ProtocolException - The content type text/html; charset=iso-8859-1 of the response message does not match the content type of the binding (text/xml; charset=utf-8). What is the cause of this?

 

Thanks

1 Reply

  • Willa's avatar
    Willa
    Occasional Contributor

    The described behavior occurs even if I don't transfer values from the request to the response, but simply extract the values from the response using XmlHolder. E.g.

     

    def holder = new com.eviware.soapui.support.XmlHolder( mockRequest.requestContent)
    def messageId = holder["//messageId"]