VMware Cloud Community
brandonp10
Contributor
Contributor
Jump to solution

vCloud UM 3.3 Beta API Parser Failure

I am seeing an issue with the installation of vCloud Usage Meter 3.3 Beta that we have installed. If I try to create a rule using the API, I am getting back a parsing error related to the vcServerId node in the XML request. If I make the same request to our UM 3.1 version, the error does not exist.

Here is the request I am making:

POST /um/api/rule HTTP/1.1

Host: **REDACTED**:8443

Accept: */*

Content-Type: application/xml

x-usagemeter-authorization: **REDACTED**

Content-Length: 262

<?xml version="1.0"?>

<rule xmlns="http://www.vmware.com/UM"><vcServerId>**REDACTED**</vcServerId><customerName>**REDACTED**</customerName><objectType>Folder</objectType><valueType>Unique ID</valueType><value>group-v773</value></rule>

And this is the response I am receiving back:

scalaxb.ParserFailure: Error while parsing <rule xmlns="http://www.vmware.com/UM"><vcServerId>**REDACTED**</vcServerId><customerName>**REDACTED**</customerName><objectType>Folder</objectType><valueType>Unique ID</valueType><value>group-v773</value></rule>: parser error "`{http://www.vmware.com/UM}customerName' expected but {http://www.vmware.com/UM}vcServerId found" while parsing /{http://www.vmware.com/UM}rule/{http://www.vmware.com/UM}vcServerId{http://www.vmware.com/UM}customerName{http://www.vmware.com/UM}objectType{http://www.vmware.com/UM}valueType{http://www.vmware.com/UM}value

^



If I move the order of the vcServerId node, the parser error moves with it. Additionally, if I change the valueType from Unique ID to Substring and remove the vcServerId node completely, the rule is created.

This error does not happen with our 3.1 instance and I am able to successfully create new rules using that API.


Has anyone seen this before? Could this be a possible regression with the latest version of the API?

Labels (1)
Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
mandipgill
VMware Employee
VMware Employee
Jump to solution

Parser error is caused by the node vcServerId. 3.3 and 3.3.1 use vcServerHost, but for 3.4 we will consider supporting both that and vcServerId

View solution in original post

Reply
0 Kudos
1 Reply
mandipgill
VMware Employee
VMware Employee
Jump to solution

Parser error is caused by the node vcServerId. 3.3 and 3.3.1 use vcServerHost, but for 3.4 we will consider supporting both that and vcServerId

Reply
0 Kudos