forked from hooklift/gowsdl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
myservice.go
80 lines (59 loc) · 1.76 KB
/
myservice.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
76
77
78
79
80
// Code generated by gowsdl DO NOT EDIT.
package gen
import (
"context"
"encoding/xml"
"github.com/ctengiz/gowsdl/soap"
"time"
)
// against "unused imports"
var _ time.Time
var _ xml.Name
type AnyType struct {
InnerXML string `xml:",innerxml"`
}
type AnyURI string
type NCName string
type GetInfo struct {
XMLName xml.Name `xml:"http://www.mnb.hu/webservices/ GetInfo"`
// comment
Id string `xml:"Id,omitempty" json:"Id,omitempty"`
}
type GetInfoResponse struct {
XMLName xml.Name `xml:"http://www.mnb.hu/webservices/ GetInfoResponse"`
// this is a comment
GetInfoResult string `xml:"GetInfoResult,omitempty" json:"GetInfoResult,omitempty"`
}
type ResponseStatus struct {
Status []struct {
Value string `xml:",chardata" json:"-,"`
Code string `xml:"code,attr,omitempty" json:"code,omitempty"`
} `xml:"status,omitempty" json:"status,omitempty"`
ResponseCode string `xml:"responseCode,attr,omitempty" json:"responseCode,omitempty"`
}
type MNBArfolyamServiceType interface {
GetInfoSoap(request *GetInfo) (*GetInfoResponse, error)
GetInfoSoapContext(ctx context.Context, request *GetInfo) (*GetInfoResponse, error)
}
type mNBArfolyamServiceType struct {
client *soap.Client
}
func NewMNBArfolyamServiceType(client *soap.Client) MNBArfolyamServiceType {
return &mNBArfolyamServiceType{
client: client,
}
}
func (service *mNBArfolyamServiceType) GetInfoSoapContext(ctx context.Context, request *GetInfo) (*GetInfoResponse, error) {
response := new(GetInfoResponse)
err := service.client.CallContext(ctx, "''", request, response)
if err != nil {
return nil, err
}
return response, nil
}
func (service *mNBArfolyamServiceType) GetInfoSoap(request *GetInfo) (*GetInfoResponse, error) {
return service.GetInfoSoapContext(
context.Background(),
request,
)
}