VMware {code} Community
dave012345
Enthusiast
Enthusiast
Jump to solution

Error processing attribute "type" with value "DistributedVirtualPortgroup"

Hello everyone. I'm back with an API error message I cannot decipher. At first I thought I was maybe getting the wrong API version but I checked vimServiceVersions.xml and it is correct (namespace urn:vim25 has version 5.5)

I feel like I've tried everything under the sun and I have no idea what the heck is going wrong. RetrieveProperties method works against type VirtualMachine but not DistributedVirtualPortgroup.

Another hypothesis is that I'm just using the Login method instead of LoginByToken, but I'm not sure that has anything to do with it.

Outgoing request:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Body>

<RetrieveProperties xmlns="urn:vim25">

<_this type="PropertyCollector">propertyCollector</_this>

<specSet>

<propSet>

<type>DistributedVirtualPortgroup</type>

<all>true</all>

</propSet>

<objectSet>

<obj type="DistributedVirtualPortgroup">dvportgroup-72</obj>

</objectSet>

</specSet>

</RetrieveProperties>

</soap:Body>

</soap:Envelope>

Error response:

The remote server returned an error: (500) Internal Server Error.

<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Body>

<soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>

Error processing attribute &quot;type&quot; with value &quot;DistributedVirtualPortgroup&quot;

while parsing MoRef for ManagedObject of type vmodl.ManagedObject

at line 1, column 369

while parsing property &quot;obj&quot; of static type ManagedObject

while parsing serialized DataObject of type vmodl.query.PropertyCollector.ObjectSpec

at line 1, column 358

while parsing property &quot;objectSet&quot; of static type ArrayOfObjectSpec

while parsing serialized DataObject of type vmodl.query.PropertyCollector.FilterSpec

at line 1, column 275

while parsing call information for method RetrieveProperties

at line 1, column 180

while parsing SOAP body

at line 1, column 169

while parsing SOAP envelope

at line 1, column 0

while parsing HTTP request for method retrieveContents

on object of type vmodl.query.PropertyCollector

at line 1, column 0</faultstring><detail><InvalidRequestFault xmlns="urn:vim25" xsi:type="InvalidRequest"></InvalidRequestFault></detail></soapenv:Fault>

</soapenv:Body>

</soapenv:Envelope>

0 Kudos
1 Solution

Accepted Solutions
dave012345
Enthusiast
Enthusiast
Jump to solution

Nevermind! Got it. Was a malformed and/or absent header:

SOAPAction: "urn:vim25/6.0"

View solution in original post

0 Kudos
1 Reply
dave012345
Enthusiast
Enthusiast
Jump to solution

Nevermind! Got it. Was a malformed and/or absent header:

SOAPAction: "urn:vim25/6.0"

0 Kudos