mirror of
https://wiilab.wiimart.org/wiimart/WiiSOAP
synced 2025-09-05 21:11:02 +02:00
fixy wixy
This commit is contained in:
parent
4abcb47890
commit
0842985b84
41
main.go
41
main.go
@ -1,32 +1,43 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"encoding/xml"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
// Header is a generic XML header suitable for use with the output of Marshal.
|
|
||||||
// This is not automatically added to any output of this package,
|
|
||||||
// it is provided as a convenience.
|
|
||||||
Header = `<?xml version="1.0" encoding="UTF-8"?>` + "\n"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// The Check struct(ure) will attempt to retrieve all the namespace data.
|
// The Check struct(ure) will attempt to retrieve all the namespace data.
|
||||||
// Assuming that namespaces that don't exist are given a "nil", the first result that
|
// Assuming that namespaces that don't exist are given a "nil", the first result that isn't a "nil" will be used as the template response.
|
||||||
// isn't a "nil" will be used as the template response.
|
|
||||||
|
|
||||||
type Check struct {
|
type Check struct {
|
||||||
// ECommerce Namespaces
|
// ECommerce Namespaces
|
||||||
CDS xml.Name `ecs:"CheckDeviceStatus"`
|
CDS string `ecs:"CheckDeviceStatus"`
|
||||||
LET xml.Name `ecs:"ListETickets"`
|
LET string `ecs:"ListETickets"`
|
||||||
NETS xml.Name `ecs:"NotifyETicketsSynced"`
|
NETS string `ecs:"NotifyETicketsSynced"`
|
||||||
PT xml.Name `ecs:"PurchaseTitle"`
|
PT string `ecs:"PurchaseTitle"`
|
||||||
|
|
||||||
// Identity Authentication Namespaces
|
// Identity Authentication Namespaces
|
||||||
|
CR string `ecs:"CheckRegistration"`
|
||||||
|
GRI string `ecs:"GetRegistrationInfo"`
|
||||||
|
REG string `ecs:"Register"`
|
||||||
|
UNR string `ecs:"Unregister"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
|
// ChRes is a variable that's in the form of JSON. This organises all the data into sub-variables like ChRes.CDS.
|
||||||
|
// This is probably my favourite thing in GoLang to be honest.
|
||||||
|
ChRes := Check{
|
||||||
|
CDS: "",
|
||||||
|
LET: "",
|
||||||
|
NETS: "",
|
||||||
|
PT: "",
|
||||||
|
CR: "",
|
||||||
|
GRI: "",
|
||||||
|
REG: "",
|
||||||
|
UNR: "",
|
||||||
|
}
|
||||||
|
fmt.Println(ChRes)
|
||||||
|
|
||||||
|
// http.ListenAndServe starts a HTTP server, which is important to take note of as we will be using this to deliver the SOAP.
|
||||||
http.ListenAndServe(":80", nil)
|
http.ListenAndServe(":80", nil)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user