-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsoap.go
75 lines (62 loc) · 2.06 KB
/
soap.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package vim25
import (
"encoding/xml"
"fmt"
)
// SOAP 1.1 Envelope
type Envelope struct {
XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
Header *Header `xml:",omitempty"`
Body *Body
}
// SOAP 1.1 Header
type Header struct {
XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Header"`
}
// SOAP 1.1 Fault
type Fault struct {
XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault"`
Code string `xml:"faultcode"`
String string `xml:"faultstring"`
Detail struct {
Message string `xml:",innerxml"`
} `xml:"detail"`
}
func (f *Fault) Error() string {
return fmt.Sprintf("[%s] %s;%s", f.Code, f.String, f.Detail)
}
// SOAP 1.1 Body
type Body struct {
XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`
Fault *Fault
// SearchIndex
FindByUuidRequest *FindByUuid
FindByUuidResponse *FindByUuidResponse
// ServiceInstance
RetrieveServiceContentRequest *RetrieveServiceContent
RetrieveServiceContentResponse *RetrieveServiceContentResponse
CurrentTimeRequest *CurrentTime
CurrentTimeResponse *CurrentTimeResponse
// SessionManager
LoginRequest *Login
LoginResponse *LoginResponse
// ViewManager
CreateContainerViewRequest *CreateContainerView
CreateContainerViewResponse *CreateContainerViewResponse
// PropertyCollector
RetrievePropertiesExRequest *RetrievePropertiesEx
RetrievePropertiesExResponse *RetrievePropertiesExResponse
ContinueRetrievePropertiesExRequest *ContinueRetrievePropertiesEx
ContinueRetrievePropertiesExResponse *ContinueRetrievePropertiesExResponse
CancelRetrievePropertiesExRequest *CancelRetrievePropertiesEx
// VirtualMachine
PowerOnVM_Task *PowerOnVM_Task
PowerOnVM_TaskResponse *PowerOnVM_TaskResponse
PowerOffVM_Task *PowerOffVM_Task
PowerOffVM_TaskResponse *PowerOffVM_TaskResponse
// OvfManager
CreateImportSpecRequest *CreateImportSpec
CreateImportSpecResponse *CreateImportSpecResponse
ImportVAppRequest *ImportVApp
ImportVAppResponse *ImportVAppResponse
}