WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: MW4 on April 11, 2020, 02:07:24 PM

Title: Push to FedEx Web Services
Post by: MW4 on April 11, 2020, 02:07:24 PM
I'm trying to set up a pull from our Access Databases to push a FedEx Web Services request that will generate a shipping label.

Does anyone have experience with this or a point in the right direction to start?
Title: Re: Push to FedEx Web Services
Post by: JTaylor on April 11, 2020, 02:42:41 PM
That is a pretty BROAD question...

There are plenty of examples of database stuff in the Tech Database.   Search for DAO. 

WebService side depends a lot on the requirements of the WebService.   Does it require Authentication?  Is it a REST call?   In the simplest form a WebService call is simply submitting a URL with the required parameters.   There are many ways and examples in the Tech Database for this as well.  You might find the WinInet Extender helpful with this side of things or use one of Microsoft's COM options such as WinHttp, MSXML, etc.

Jim
Title: Re: Push to FedEx Web Services
Post by: MW4 on April 12, 2020, 03:25:40 PM
Yeah, I understand the broadness, I was hoping that someone had actually done this, or something close.
Title: Re: Push to FedEx Web Services
Post by: JTaylor on April 12, 2020, 03:46:27 PM
Unless FedEx makes things overly complicated what you want to do should be pretty easy.    Just grab an example of the database stuff from the Tech Database and work that out and then form the URL for the webservice with the needed data and submit that.   This is probably more simplistic than what you will need but here is an example of one (of many) way to Submit the webservice call.

Jim

Code (winbatch) Select


  XMLURL = "http://search2.mybooks.com/search?isbn=9780012349871&maxresults=200&outputsize=long&clientkey=your_key
  WinHttpReq = ObjectOpen("WinHttp.WinHttpRequest.5.1")
  WinHttpReq.Open("GET", XMLURL, @false)
  WinHttpReq.Send()
  xtxt = WinHttpReq.ResponseText
  ObjectClose(WinHttpReq)