forked from radoslav/soap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenvelope.go
More file actions
61 lines (52 loc) · 1.38 KB
/
envelope.go
File metadata and controls
61 lines (52 loc) · 1.38 KB
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
package soap
import (
"encoding/xml"
)
type Envelope struct {
XMLName xml.Name `xml:"SOAP-ENV:Envelope"`
XmlnsSoapenv string `xml:"xmlns:SOAP-ENV,attr"`
XmlnsUniv string `xml:"xmlns:univ,attr"`
Header *Header
Body *Body
}
type Body struct {
XMLName xml.Name `xml:"SOAP-ENV:Body"`
Payload interface{}
}
type Header struct {
XMLName xml.Name `xml:"SOAP-ENV:Header"`
WsseSecurity *WsseSecurity
}
type WsseSecurity struct {
MustUnderstand string `xml:"SOAP-ENV:mustUnderstand,attr"`
XMLName xml.Name `xml:"wsse:Security"`
XmlnsWsse string `xml:"xmlns:wsse,attr"`
XmlnsWsu string `xml:"xmlns:wsu,attr"`
UsernameToken *UsernameToken
}
type UsernameToken struct {
XMLName xml.Name `xml:"wsse:UsernameToken"`
WsuId string `xml:"wsu:Id,attr,omitempty"`
Username *Username
Password *Password
Nonce *Nonce
Created *Created
}
type Username struct {
XMLName xml.Name `xml:"wsse:Username"`
Value string `xml:",chardata"`
}
type Password struct {
XMLName xml.Name `xml:"wsse:Password"`
Type string `xml:"Type,attr"`
Value string `xml:",chardata"`
}
type Nonce struct {
XMLName xml.Name `xml:"wsse:Nonce,omitempty"`
EncodingType string `xml:"EncodingType,attr,omitempty"`
Value string `xml:",chardata"`
}
type Created struct {
XMLName xml.Name `xml:"wsu:Created,omitempty"`
Value string `xml:",chardata"`
}