Powerbasic Museum 2020-B

Webmaster: José Roca (PBWIN 10+/PBCC 6+) (SDK Forum) => Web Development => Topic started by: Douglas Martin on September 14, 2012, 10:45:41 PM

Title: Consuming a Web Service
Post by: Douglas Martin on September 14, 2012, 10:45:41 PM
I am trying to learn how to consume a web service in PB.  Does anyone have any examples of PB programs that consume a web service?  I have searched the forums but come up empty.  Found some examples of using "Pocket Soap"?  Is that where I need to start?

Here is how it is done in DOTNET.

Public Sub GetOnlineOrders()

        Dim F, BX, IX As Integer
        Dim AdvMin, ItemCnt, MediaCnt, NewChkCount, NewChkID As Integer
        Dim AuthToken As String
        Dim ChkBuild, ChkAllPLU, ChkAllMedia, ChkFileNam, NewChkStr As String
        Dim CurrPLUStr As String
        Dim StoreID As Guid
        Dim DownloadChecks As List(Of MPOS.Check)
        Dim SWChk As StreamWriter
        Dim ChkHead As PTCheckHeader
        Dim ChkPLU(1000) As PTCHECKPLU
        Dim ChkMedia(99) As PTCHECKMedia
        Dim PadChkHd, PadChkPLU, PadChkMedia As String
        Dim TempDate As DateTime
        Dim ChkBitArr1, ChkBitArr2 As BitArray
        Dim ChkInfoByte1 As Int16

        Try
            NewChkStr = ""

            UpdateIQSLog("LoadUpdate", "Retrieving Online Orders", "", "", "")

            StoreID = New Guid(gStoreIDGuid)
            Dim authClient As New MPOSSecurity.IsecClient()
            AuthToken = authClient.Authenticate("pyrimont", "pyri2010")
            authClient.Close()

            Dim posClient As New MPOS.ImposClient()
            DownloadChecks = posClient.GetNewOnlineOrders(AuthToken, StoreID)
            posClient.Close()

            NewChkCount = DownloadChecks.Count

            If NewChkCount < 1 Then Exit Sub
Title: Re: Consuming a Web Service
Post by: José Roca on September 15, 2012, 12:37:55 AM
Look for SOAP. I posted something here and/or in the PB Forum some years ago, but lost interest when M$ decided to make it non distributable and you could only get it installing Office.