Author Topic: Consuming a Web Service  (Read 5364 times)

0 Members and 1 Guest are viewing this topic.

Offline Douglas Martin

  • Newbie
  • *
  • Posts: 22
  • User-Rate: +0/-0
  • Gender: Male
    • ProfiTouch
Consuming a Web Service
« 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
Doug

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2525
  • User-Rate: +209/-0
  • Gender: Male
Re: Consuming a Web Service
« Reply #1 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.