sjwsdk111

package
v0.0.0-...-6fb0a0c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2018 License: Apache-2.0 Imports: 12 Imported by: 8

Documentation

Overview

Package sjwsdk111 is an UnOfficial SOAP client SDK for Sriwijaya Air Web Services (SOAP)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugHTTP

func DebugHTTP(data []byte, err error)

DebugHTTP is function to debug HTTP Request/Response

func DebugHTTPRequest

func DebugHTTPRequest(data []byte, err error)

DebugHTTPRequest is a function to debug HTTP Request

func DebugHTTPResponse

func DebugHTTPResponse(data []byte, err error)

DebugHTTPResponse is a function to debug HTTP Response

func GetSoapActionMethod

func GetSoapActionMethod(m string, d *wsdlDefinitions) string

GetSoapActionMethod retrieve Soap Action Method

Types

type HeaderParams

type HeaderParams map[string]string

HeaderParams holds params specific to the header

type SoapSJClient

type SoapSJClient struct {
	WSDL                   string
	URL                    string
	ServiceAddressLocation string
	Method                 string
	SoapAction             string
	Params                 interface{}
	HeaderName             string
	HeaderParams           HeaderParams
	Definitions            *wsdlDefinitions
	SoapResponse           []byte
	Header                 []byte
	Body                   []byte
	// contains filtered or unexported fields
}

SoapSJClient struct hold all the informations about WSDL, request and response of the server

func NewSoapSJClient

func NewSoapSJClient(httpClient *http.Client, wsdlLocation string, locationType string) (*SoapSJClient, error)

NewSoapSJClient return new *SoapSJClient to handle the requests with the WSDL

func (*SoapSJClient) Call

func (c *SoapSJClient) Call(method string, params []byte, debug bool) (err error)

Call call's the method m with Params p

func (*SoapSJClient) CallWsAccountStatement

func (c *SoapSJClient) CallWsAccountStatement(params []byte, debug bool) (*WsAccountStatementResponse, error)

CallWsAccountStatement is a function to call WsCreditBalance Method

func (*SoapSJClient) CallWsCancelPNR

func (c *SoapSJClient) CallWsCancelPNR(params []byte, debug bool) (*WsCancelPNRResponse, error)

CallWsCancelPNR is a function to call WsCancelPNR Method

func (*SoapSJClient) CallWsCreditBalance

func (c *SoapSJClient) CallWsCreditBalance(params []byte, debug bool) (*WsCreditBalanceResponse, error)

CallWsCreditBalance is a function to call WsCreditBalance Method

func (*SoapSJClient) CallWsGeneratePNR

func (c *SoapSJClient) CallWsGeneratePNR(params []byte, debug bool) (*WsGeneratePNRResponse, error)

CallWsGeneratePNR is a function to call WsGeneratePNR Method

func (*SoapSJClient) CallWsIssuing

func (c *SoapSJClient) CallWsIssuing(params []byte, debug bool) (*WsIssuingResponse, error)

CallWsIssuing is a function to call WsIssuing Method

func (*SoapSJClient) CallWsRetrievePNR

func (c *SoapSJClient) CallWsRetrievePNR(params []byte, debug bool) (*WsRetrievePNRResponse, error)

CallWsRetrievePNR is a function to call WsRetrievePNR Method

func (*SoapSJClient) CallWsRouteOperate

func (c *SoapSJClient) CallWsRouteOperate(params []byte, debug bool) (*WsRouteOperateResponse, error)

CallWsRouteOperate is a function to call WsRouteOperate Method

func (*SoapSJClient) CallWsSearchFlight

func (c *SoapSJClient) CallWsSearchFlight(params []byte, debug bool) (*WsSearchFlightResponse, error)

CallWsSearchFlight is a function to call WsSearchFlight Method

func (*SoapSJClient) GetLastRequest

func (c *SoapSJClient) GetLastRequest() []byte

GetLastRequest returns the last request

func (SoapSJClient) MarshalXML

func (c SoapSJClient) MarshalXML(e *xml.Encoder, _ xml.StartElement) error

MarshalXML envelope the body and encode to xml

func (*SoapSJClient) SetUserAgent

func (c *SoapSJClient) SetUserAgent(value string)

SetUserAgent is a function to set (HTTPClient) UserAgent

type WsAccountStatementResponse

type WsAccountStatementResponse struct {
	XMLName xml.Name `xml:"WsAccountStatementResponse"`
	Return  struct {
		Username               string                            `xml:"Username"`
		AccountStatementDetail *respAccountStatementDetailArrays `xml:"AccountStatementDetail"`
		ErrorCode              string                            `xml:"ErrorCode"`
		ErrorMessage           string                            `xml:"ErrorMessage"`
	} `xml:"return"`
}

WsAccountStatementResponse represent WsAccountStatement soap response

type WsCancelPNRResponse

type WsCancelPNRResponse struct {
	XMLName xml.Name `xml:"WsCancelPNRResponse"`
	Return  struct {
		Username     string `xml:"Username"`
		BookingCode  string `xml:"BookingCode"`
		ErrorCode    string `xml:"ErrorCode"`
		ErrorMessage string `xml:"ErrorMessage"`
	} `xml:"return"`
}

WsCancelPNRResponse represent WsCancelPNR soap response

type WsCreditBalanceResponse

type WsCreditBalanceResponse struct {
	XMLName xml.Name `xml:"WsCreditBalanceResponse"`
	Return  struct {
		Username      string `xml:"Username"`
		CreditBalance string `xml:"CreditBalance"`
		ErrorCode     string `xml:"ErrorCode"`
		ErrorMessage  string `xml:"ErrorMessage"`
	} `xml:"return"`
}

WsCreditBalanceResponse represent WsCreditBalance soap response

type WsGeneratePNRResponse

type WsGeneratePNRResponse struct {
	XMLName xml.Name `xml:"WsGeneratePNRResponse"`
	Return  struct {
		Username             string                     `xml:"Username"`
		BookingCode          string                     `xml:"BookingCode"`
		YourItineraryDetails *yourItineraryDetailsArray `xml:"YourItineraryDetails"`
		ErrorCode            string                     `xml:"ErrorCode"`
		ErrorMessage         string                     `xml:"ErrorMessage"`
	} `xml:"return"`
}

WsGeneratePNRResponse represent WsGeneratePNR soap response

type WsIssuingResponse

type WsIssuingResponse struct {
	XMLName xml.Name `xml:"WsIssuingResponse"`
	Return  struct {
		Username             string                     `xml:"Username"`
		BookingCode          string                     `xml:"BookingCode"`
		YourItineraryDetails *yourItineraryDetailsArray `xml:"YourItineraryDetails"`
		ErrorCode            string                     `xml:"ErrorCode"`
		ErrorMessage         string                     `xml:"ErrorMessage"`
	} `xml:"return"`
}

WsIssuingResponse represent WsIssuing soap response

type WsRetrievePNRResponse

type WsRetrievePNRResponse struct {
	XMLName xml.Name `xml:"WsRetrievePNRResponse"`
	Return  struct {
		Username             string                     `xml:"Username"`
		BookingCode          string                     `xml:"BookingCode"`
		YourItineraryDetails *yourItineraryDetailsArray `xml:"YourItineraryDetails"`
		ErrorCode            string                     `xml:"ErrorCode"`
		ErrorMessage         string                     `xml:"ErrorMessage"`
	} `xml:"return"`
}

WsRetrievePNRResponse represent WsRetrievePNR soap response

type WsRouteOperateResponse

type WsRouteOperateResponse struct {
	XMLName xml.Name `xml:"WsRouteOperateResponse"`
	Return  struct {
		Username      string              `xml:"Username"`
		RouteOperates *routeOperatesArray `xml:"RouteOperates"`
		ErrorCode     string              `xml:"ErrorCode"`
		ErrorMessage  string              `xml:"ErrorMessage"`
	} `xml:"return"`
}

WsRouteOperateResponse represent WsRouteOperate soap response

type WsSearchFlightResponse

type WsSearchFlightResponse struct {
	XMLName xml.Name `xml:"WsSearchFlightResponse"`
	Return  struct {
		Username     string               `xml:"Username"`
		Adult        string               `xml:"Adult"`
		Child        string               `xml:"Child"`
		Infant       string               `xml:"Infant"`
		TripDetail   *respTripDetailArray `xml:"TripDetail"`
		SearchKey    string               `xml:"SearchKey"`
		ErrorCode    string               `xml:"ErrorCode"`
		ErrorMessage string               `xml:"ErrorMessage"`
	} `xml:"return"`
}

WsSearchFlightResponse represent WsSearchFlight soap response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL