FAQ
I am very new to Go and unable to find help on other sources. I am trying
to create go code with standard vim25.wsdl file. It generated the go code
successfully. Two structures are here..

type RetrieveServiceContentRequestType struct {
XMLName xml.Name xml:"urn:vim25 RetrieveServiceContentRequestType"

This *ManagedObjectReference `xml:"_this,omitempty"`

}

type ManagedObjectReference struct {
XMLName xml.Name xml:"urn:vim25 ManagedObjectReference"

Value string

Type string `xml:"type,attr,omitempty"`

}

Now I am unable to assign values to RetrieveServiceContentRequestType as
follows with following error:
client := mysoap.NewVimPortType("https://myvc/sdk", true)

var serviceInstance = mysoap.ManagedObjectReference{
     Type: "ServiceInstance",
     Value: "ServiceInstance",
}
fmt.Println(serviceInstance)
req := mysoap.RetrieveServiceContentRequestType{
     This: &serviceInstance,
}
_, err:= client.RetrieveServiceContent(&req)

Error xml: name "_this" in tag of
mysoap.RetrieveServiceContentRequestType.This
conflicts with name "ManagedObjectReference" in
*mysoap.ManagedObjectReference.X
MLName

Any help would be appreciated.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 7, '15 at 1:01a
activeAug 7, '15 at 1:01a
posts1
users1
websitegolang.org

1 user in discussion

Parveen Seema: 1 post

People

Translate

site design / logo © 2022 Grokbase