× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello everyone. I've posted this exact same email - pretty much - on Scott
Klement's FTPAPI/HTTPAPI mailing list, however I'm not getting any
response back, so I thought I'd report my problem here.

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 Klements'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:
https://www.myshawtracking.ca/otsWebWS/services/OTSWebSvcs/wsdl/OTSWebSvcs.wsdl
The WIKI for this Web Service is:
https://intinfo.myqualcomm.com/display/iWebInt/ESS+High-Volume+Dequeue
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(
'https:
//www.myshawtracking.ca:443/otsWebWS/services/OTSWebSvcs'
: %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 Klement's EXAMPLE11.

The response XML is as follows.
<soapenv:Body>
<dequeue2Response>
<dequeue2Return>
<count>6</count>
(transactions>
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48dHJjaz4=
</transactions>
<transactionIdOut>58744654</transactionIdOut>
</dequeue2Return>
</dequeue2Response>
</soapenv:Body>

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 to use it.
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??? I'm not sure how to handle something that big.

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.
Thanks!
___________________________________________________________
Paul Reid
Application Developer III
Erb Group of Companies | 290 Hamilton Road | New Hamburg, Ontario | N3A
1A2
Phone: 519.662.6133 ext. 2363
Web: http://www.erbgroup.com/

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.