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

Re: Getting HTML in my response



   Try this please...

     H DFTACTGRP(*NO) ACTGRP(*NEW) BNDDIR('HTTPAPI') � � �     H option(*nodebugio: *srcstmt) � � � � � � � � � � ��     �* � � � � � � � � � � � � � � � � � � � � �     � � � ��     �* validate address at [1]systemobjects.com � � � � � ��     �* � � � � � � � � � � � � � � � � � � � � �     � � � ��     �/define WEBFORMS � � � � � � � � � � � � � � � �     � �     �/copy qrpglesrc,httpapi_h � � � � � � � � � � � � ��     �/copy qrpglesrc,ifsio_h � � � � � � � � � � � � �     ��     � � � � � � � � � � � � � � � � � � � � � � �     � � � �     d Form � � � � � �s � � � � � � � � � like(WEBFORM)
     �     d url � � � � � � s � � � � �32767a � varying � � �     �     d urlLen � � � � �s � � � � � � 10i 0 � � � � � �     � �     d rc � � � � � � �s � � � � � � 10I 0 � � � � � �     � �     d tempFile � � � �s � � � � � � 64a � varying � � � �
   On Thu, Dec 3, 2015 at 6:38 AM, Chris Edmondson <[2]chris@xxxxxxxxxxx>
   wrote:

   Mark,
   Here's some working code for Service Objects, hope it helps.

     c* build url � � � � � � � � � � � � � � � � � �     � � � � � � � �     c � � � � � � � � � eval � � �url = %trim('http://' + �     � � � ��     c � � � � � � � � � � � � � � � � �     '[3]ws.serviceobjects.com' + ��     c � � � � � � � � � � � � � � � � �     '/ap/AddressPlus.asmx/' + ��     c � � � � � � � � � � � � � � � � �     'GetAddressPlus?') � � � � �     �/free � � � � � � � � � � � � � � � � � � � �     � � � � � � � � �     � � �Form = WEBFORM_open(); � � � � � � � � � � � �     � � � � � ��     � � �WEBFORM_setVar(Form : 'Address' � � : %trim(adrs)); � �     � �     � � �WEBFORM_setVar(Form : 'Address2' � �: ''); � � � � �     � � ��     � � �WEBFORM_setVar(Form : 'City' � � � �: %trim(city)); �     � � �     � � �WEBFORM_setVar(Form : 'State' � � � : %trim(state)); �     � ��     � � �WEBFORM_setVar(Form : 'PostalCode' �: %trim(zip)); � � �     ��     � � �WEBFORM_setVar(Form : 'LicenseKey' �: %trim(licKey)); � �     �     � � � � � � � � � � � � � � � � � � � � � � �     � � � � � � � � ��     � � �url = url + WEBFORM_getData(Form); � � � � � � � �     � � � ��     � � � � � � � � � � � � � � � � � � � � � � �     � � � � � � � � ��     � � �WEBFORM_Close(Form); � � � � � � � � � � � � �     � � � � � ��     �/end-free � � � � � � � � � � � � � � � � � � �     � � � � � � � � � � ��     c* get a temp file name in the IFS � � � � � � � � � � �     � � � � � � ��     c � � � � � � � � � eval � � �tempFile= http_tempfile()
     + '.xml' � � ��     c* validate address � � � � � � � � � � � � � � � �     � � � � � � � � � � � � ��     c � � � � � � � � � eval � � �rc = http_url_get(url:
     tempFile) � � � ��
   On Wed, Dec 2, 2015 at 9:59 AM, Mark Lenz <[4]mark.lenz@xxxxxxxxxxxxxx>
   wrote:

   � �I am sending XML to retrieve address information from Service
   Objects
   � �web service. My response coming back is in HTML.� I don't know
   why. I
   � �am also getting an error:
   � �SetError() #66: XML parse failed at line 22, col 2: mismatched tag
   � �Thanks
   � �Mark E. Lenz | Programmer
   � �[5]507.774.8266 - Direct
   � �[6]507.455.4100 ext. 8266 | 800.4WENGER (493.6437)
   � �Wenger Corporation | 555 Park Drive | Owatonna MN 55060
   � �[1]WENGER CORPORATION
   � �Our latest innovation - [2]StageTek(TM) Staging
   � �Learn more about [3]Wenger Corporation
   � �Stay Connected!
   � �[4]Facebook | [5]Twitter | [6]YouTube
   � �Visit the [7]Your Performance Partners Blog
   References
   � �1. [7]http://www.wengercorp.com/
   � �2. [8]http://www.wengercorp.com/stagetek
   � �3. [9]http://youtu.be/vNgDvTaPQug?t=1s
   � �4. [10]https://www.facebook.com/WengerCorp
   � �5. [11]https://twitter.com/WengerCorp
   � �6. [12]http://www.youtube.com/user/wengercorp?feature=results_main
   � �7. [13]http://www.yourperformancepartners.com/

     --------------------------------------------------------------------
     ---
     This is the FTPAPI mailing list.� To unsubscribe, please go to:
     [14]http://www.scottklement.com/mailman/listinfo/ftpapi
     --------------------------------------------------------------------
     ---

   --
   Chris Edmondson
   [15]509.670.6817

   --
   Chris Edmondson
   509.670.6817

References

   1. http://systemobjects.com/
   2. mailto:chris@xxxxxxxxxxx
   3. http://ws.serviceobjects.com/
   4. mailto:mark.lenz@xxxxxxxxxxxxxx
   5. tel:507.774.8266
   6. tel:507.455.4100%20ext.%208266
   7. http://www.wengercorp.com/
   8. http://www.wengercorp.com/stagetek
   9. http://youtu.be/vNgDvTaPQug?t=1s
  10. https://www.facebook.com/WengerCorp
  11. https://twitter.com/WengerCorp
  12. http://www.youtube.com/user/wengercorp?feature=results_main
  13. http://www.yourperformancepartners.com/
  14. http://www.scottklement.com/mailman/listinfo/ftpapi
  15. tel:509.670.6817
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------