https://github.com/nagilum/gsx-next-gen
AppleCare GSX C# Implementation without WSDL
https://github.com/nagilum/gsx-next-gen
Last synced: 3 months ago
JSON representation
AppleCare GSX C# Implementation without WSDL
- Host: GitHub
- URL: https://github.com/nagilum/gsx-next-gen
- Owner: nagilum
- Created: 2015-09-17T13:11:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-17T13:12:47.000Z (over 9 years ago)
- Last Synced: 2025-01-16T13:48:09.166Z (4 months ago)
- Language: C#
- Size: 125 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# AppleCare GSX C# Implementation without WSDL
I had a great deal of trouble implementing the new (aug 15 2015) WSDL of Apple's GSX API, so I ended up writing my own wrapper for it.
WebserviceHandler.cs handles the actual communication to the AppleCare GSX endpoint, or any webservice for that matter.
Just pass it the service endpoint URL as well as the SSL certificate file (and passord if used), then call up the Call() function with the XML data to send and you're golden.
The response will come back as an XDocument.GSXNextGen.cs is the C# class wrapper for the various functions to call the GSX API for.
## Example
const string serviceUrl = "https://gsxapi.apple.com/gsx-ws/services/emea/asp";
var userId = "[email protected]"; // This is a verified GSX user.
var serviceAccountNo = "XXX"; // Insert your ShipTo number here.var res = GSXNextGen.Execute(
new GSXNextGen.Authenticate.globAuthenticate {
ColonCutOffset = 4,
AuthenticateRequest = new GSXNextGen.Authenticate.AuthenticateRequest {
languageCode = "EN",
serviceAccountNo = serviceAccountNo,
userId = userId,
userTimeZone = "CET"
}
},
GSXNextGen.Envelope.Global,
serviceUrl,
"Authenticate");This will create a authenticate object which is passed into the Execute() function, which will convert it to XML and pass it along to the WebserviceHandler for request and response.