This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Services and the fly likes UnsupportedMediaException : Unsupported content-type:text/html; Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "UnsupportedMediaException : Unsupported content-type:text/html;" Watch "UnsupportedMediaException : Unsupported content-type:text/html;" New topic
Author

UnsupportedMediaException : Unsupported content-type:text/html;

Somak Dalui
Ranch Hand

Joined: Apr 19, 2005
Posts: 40
Hi, I have generated the client Java files by accessing the remote WSDL file through 'wsimport' tool.
Now when I am trying to invoke the service I am getting this UnsupportedMediaException : Unsupported content-type:text/html; charset=utf-8 Supported ones are: [text/xml].

I have seen the others posts related to the same topic but are of little use to me. I dont have any kind of local WSDL file, my @WebServiceClient annotation attributes are all fine and I am just running a standalone Java class as client.

Here's my Ant wsimport task


And this is my Java client code -


Please help me on this. I can understand instead of xml what I am getting back is text/html, but have little clue how to advance further.
Let me know of you need to see more code of anything.
Somak Dalui
Ranch Hand

Joined: Apr 19, 2005
Posts: 40
Just set this VM property to view the detailed response
 
jQuery in Action, 2nd edition
 
subject: UnsupportedMediaException : Unsupported content-type:text/html;