Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

HTTP Response Code 415

Saravanan
Saravanan Posts: 4

Hi,

I am new to SOA Test. Recently I have started using SOA test in my project. But I am facing an issue in the response. The error message states as below.

Error Message:
Received HTTP Response Code 415: Cannot process the message because the content type 'text/xml' was
not the expected type 'application/soap+msbin1'.

Can anyone tell why this error is prompted? And how to resolve this?

Comments

  • Ireneusz Szmigiel
    Ireneusz Szmigiel Posts: 227 ✭✭✭
    edited August 2018

    Hi Saravanan

    you have answer in error message.
    You have to change content type from text/xml into application/soap+msbin1
    Usually open tool and in Request View change content type:

    See here and here
    What kind of the web services do you want to test?
    What kind of request do you need to send?
    Could you post your tst on forum, here?
    As I remember content type: application/soap+msbin1 is a binary encoding of WCF, so you might not be able to send it as text.
    Maybe you have to encode your request into binary data?

    --
    Ireneusz Szmigiel
    http://www.catb.org/esr/faqs/smart-questions.html

  • Saravanan
    Saravanan Posts: 4
    edited August 2018

    Hi Ireneusz,

    Thanks for your response.

    I have already changed the content type to application/soap+msbin1 in Request view. Initially this content type was not available. So I added it in preferences-> MIME Types.

    I want to test WCF service. It is a simple GET request. I can't post the tst here due to policy restrictions.

  • jakubiak
    jakubiak Posts: 795 admin

    You will probably be interested in the .NET WCF support in the SOAP Client:

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited August 2018

    It sounds like your service is expecting a MS-binary encoded SOAP message over HTTP. You need to make sure your SOAP Client test is using a WSDL or .NET client config file that has binary message encoding enabled. For example, see Microsoft config file docs.

  • Saravanan
    Saravanan Posts: 4
    edited August 2018

    @benken_parasoft How to configure SOAP client to use WSDL or .NET client config file? Can you elaborate in detail?

    I'm getting content type error for WSHttpBinding. Whereas for BasicHttpBinding, I'm getting 405: Forbidden error.

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited August 2018

    You configure the WSDL URL in the SOAP Client's WSDL tab.
    You configure the .NET client config file in the Transport tab. If you have a WSDL then you might not need to configure a .NET client config file. Make sure you have ".NET WCF HTTP" selected for the Transport and not "HTTP". Also see the documentation links that @jakubiak mentioned earlier.

  • lribaya
    lribaya Posts: 2

    Hi,

    When creating the SOAP client from scratch and not using a WSDL, I was wondering if there was any way to create WCF config files without the use of the Microsoft Service Configuration Editor mentioned in the the following link: https://docs.parasoft.com/display/SOA9105/.NET+WCF+HTTP?

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭

    was wondering if there was any way to create WCF config files without the use of the Microsoft Service Configuration Editor mentioned in the the following link

    It is an XML file. I wouldn't recommend trying to hand code it but that is a possible if you really prefer to create it by hand instead of using the Microsoft Service Configuration Editor UI. If your service has a WSDL then you could also autogenerate one from the WSDL using svcutil.exe. See ServiceModel Metadata Utility Tool (Svcutil.exe)