[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Advice on how to process xsd:base64Binary XML element retrieved from a web service.

   Hello everyone. I am not very experienced with Web Services so bear
   with me. I did a fair bit of research on the various forums before
   posting, but I failed to find a good example of what I am looking for.
   I'm hoping that someone can help, possibly with an example.
   I am predominately an RPG programmer. We are running an IBM Power 7 at
   V7R1, and I have Scott's HTTPAPI V1.24 downloaded and installed. I am
   using HTTPAPI to consume another Web Service and it works beautifully.
   My latest challenge it that I have consume a Web Service that includes
   an element in the XML response that is data type xsd:base64Binary and
   I'm not really sure how to do it. The WSDL for this web service is:
   The WIKI for this Web Service is:
   The method that I must consume is named DEQUEUE2.
   I have created an RPG program that POSTS a request to the Web Service
   using the following HTTPAPI subprocedure:
      rc = http_url_post_xml(

                : %addr(SOAP) + 2
                : %len(SOAP)
                : *NULL
                : %paddr(Incoming)
                : %addr(rate)
                : HTTP_TIMEOUT
                : HTTP_USERAGENT
                : 'text/xml'
                : 'http://www.qualcomm.com/dequeue2');
   I am receiving rc = 1 which I believe means that I am successfully
   receiving an XML response. FYI - The procedure "Incoming" was copied
   from Scott's EXAMPLE11.
   The response XML is as follows.
   The "transactions" element is xsd:base64Binary and I don't know how to
   decode it. I have downloaded Scott's BASE64R4 service program and I
   suspect I'd use procedure BASE64_DECODE, but I'm not sure how I would
   employ it in this situation. Also...according to the wiki the
   "transactions" element could be as large as "Approximately  1mb"
   although I'm not really sure what they mean by approximately??
   The "count" and "transactionIdOut" and not encoded and I need the data
   in them in addition to the encoded data.
   I understand that I may not even be using the correct post procedure
   (remember I'm not that experienced) and in the interim I am going to
   try some of Scott's other procedures.
   Any help or examples on how to get this data would be much appreciated.
   Paul Reid
   Application Developer III
   Erb Group of Companies | 290 Hamilton Road | New Hamburg, Ontario | N3A
   Phone: 519.662.6133 ext. 2363
   Web: [3]http://www.erbgroup.com/


   1. https://www.myshawtracking.ca/otsWebWS/services/OTSWebSvcs/wsdl/OTSWebSvcs.wsdl
   2. https://intinfo.myqualcomm.com/display/iWebInt/ESS+High-Volume+Dequeue
   3. http://www.erbgroup.com/
This is the FTPAPI mailing list.  To unsubscribe, please go to: