简体   繁体   中英

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

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'.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM