Cannot process the message because of the exception 'application/soap+xml; was not the expected type 'application/soap+msbin1'

811 views Asked by At

I have made import classes through WS Import and then place in eclipse . The problem is that I cannot process the message because of Unsupported media type . The problem is

'application/soap+xml; was not the expected type 'application/soap+msbin1'.

I know that we are requesting the service through Soap1.2 but service is asking from the WCF format but how can I solve this problem? Can anyone tell me how to change the application/soap+xml to application/soap+msbin1 through annotation not XML? I went through number of solution on web but couldn't get it to work, issues the problem is below?

The server sent HTTP status code 415: Cannot process the message because the content type 'application/soap+xml;charset="utf-8";action="http://tempuri.org/IReceiveNoteService/ReceiveNote"' was not the expected type 'application/soap+msbin1'.

1

There are 1 answers

0
M.Siddiqui On

Thanks @il_raffa for showing interest. Below is mine Sample client code

`/* Simply initializing the object for the service class*/ /* Create Resware Web Service Client... */ ReceiveNoteService receiveNoteService = new ReceiveNoteService();

/* Created Web Service by calling simple service*/ IReceiveNoteService port = receiveNoteService.getCustomBindingIReceiveNoteService();

/* Calling function and printing the response of service*/ /* Line where i am getting exception*/ System.out.println("Server response: " + port.receiveNote(newReceiveNoteData()));`

I cannot provide my WSDL File because of its privacy issue