Consuming a Web Service

Started by Douglas Martin, September 14, 2012, 10:45:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Douglas Martin

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
Doug

José Roca

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.