Hi,
I'm following http://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.vsphere.vco_develop_web_services.doc... and I'm able to retrieve workflow informations. However, when sending such request (as stated in documentation example):
<html><head><title>JBossWeb/2.0.1.GA - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 415 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server refused this request because the request entity is in a format not supported by the requested resource for the requested method ().</u></p><HR size="1" noshade="noshade"><h3>JBossWeb/2.0.1.GA</h3></body></html>
Any ideas?
How exactly do you make the request? The request's Content-Type header should be application/xml. The error you are getting says it is text/html.
Hi
Welcome to the communities.
Are you using port number 8281 or any other port .
Make sure ports are open if any firewall.
Hi,
I'm using default port and it's not blocked in firewall. I was able to consume web service using SOAP, still getting errors while trying to use REST.
Hi,
It seems you've missed the namespace definition.
Instead of
<execution-countext>
...
</execution-countext>
try with
<execution-context xmlns="http://www.vmware.com/vco">
...
</execution-countext>
No success, request:
Response:
- Status Code: 415 Unsupported Media Type
- Content-Length: 1045
- Content-Type: text/html;charset=utf-8
- Date: Wed, 10 Apr 2013 12:21:53 GMT
- Server: vCO Server
How exactly do you make the request? The request's Content-Type header should be application/xml. The error you are getting says it is text/html.
I was using Firefox RESTClient plugin, adding custom header with content-type you've specified helped. Thanks!