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

Re: Webservice getCitiesByCountry



   Going back to your first msg as your second didn't come through right..
   Think your SOAP action:
   �� � � �:
   'urn."[1]http://www.webserviceX.NET/GetCitiesByCountry";');
   Should be
   ��� � � �: '"[2]http://www.webserviceX.NET/GetCitiesByCountry";');
   Charles

   On Fri, Jul 11, 2014 at 10:00 AM, Jan Grove Vejlstrup <[3]jgv@xxxxxxxx>
   wrote:

     � �Thank you Charles for your mail.
     � �I made the change, but unfortunately I get the same error:

   � � HTTPAPI Ver 1.24 released 2012-01-23
   � �OS/400 Ver V6R1M0

   � �http_url_post(): entered
   � �http_persist_open(): entered
   � �http_long_ParseURL(): entered
   � �DNS resolver retrans: 2
   � �DNS resolver retry �: 2
   � �DNS resolver options: x'00000136'
   � �DNS default domain: WEMAG.ch
   � �DNS server found: 195.186.1.110
   � �http_persist_post(): entered
   � �http_persist_req(POST) entered.
   � �http_long_ParseURL(): entered
   � �do_oper(POST): entered
   � �There are 0 cookies in the cache
   � �POST /globalweather.asmx/GetCitiesByCountry HTTP/1.1

     � �Host: [1][4]www.webserviceX.NET

   � �User-Agent: http-api/1.24
   � �Content-Type: text/xml; charset=utf-8

     � �SOAPAction:
     urn.[2]"[5]http://www.webserviceX.NET/GetCitiesByCountry";
     � �Content-Length: 278
     � �senddoc(): entered
     � �<soap:Envelope
     xmlns:soap=[3]"[6]http://www.w3.org/2003/05/soap-envelope";
     � �xmlns:web=[4]"[7]http://www.webserviceX.NET";> <soap:Header/>
     � �<soap:Body> � � �<web:GetCitiesByCountry>
     � �<web:CountryName>Italy</web:CountryName>

   � �</web:GetCitiesByCountry> � </soap:Body></soap:Envelope>
   � �recvresp(): entered
   � �HTTP/1.1 500 Internal Server Error
   � �Cache-Control: private
   � �Content-Length: 236
   � �Content-Type: text/plain; charset=utf-8
   � �Server: Microsoft-IIS/7.0
   � �X-AspNet-Version: 4.0.30319
   � �X-Powered-By: [8]ASP.NET

     � �Date: Fri, 11 Jul 2014 13:55:03 GMT

   � �SetError() #13: HTTP/1.1 500 Internal Server Error
   � �recvresp(): end with 500
   � �recvdoc parms: identity 236
   � �header_load_cookies() entered
   � �recvdoc(): entered
   � �SetError() #0:
   � �System.InvalidOperationException: Request format is invalid:
   text/xml;
   � �charset=utf-8.
   � � � at
   System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()
   � � � at
   �   �System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
   � �SetError() #13: HTTP/1.1 500 Internal Server Error
   � �http_close(): entered

     � �I still don't see the error.
     � �Best regards
     � �Jn
     � �Am 11.07.2014 14:41, schrieb Charles Wilt:

   � �You are not posting a proper XML document
   � �If you use SoapUI to examine the WSDL

     � �([1][5][9]http://www.webservicex.net/globalweather.asmx?WSDL)

   � �You'll see
   � �<web:CountryName>?</web:CountryName>
   � �Your doc is missing the / in the closing tag.
   � �Charles

     � �On Fri, Jul 4, 2014 at 9:05 AM, Jan Grove Vejlstrup
     [6]<[2][10]jgv@xxxxxxxx>

   � �wrote:
   � � �Hello
   � � �I'm trying to use HTTPAPI to consume this webservice:

     � �     �[3][7][11]http://www.webservicex.net/globalweather.asmx?op=GetCiti
     esByCount

   � � �ry
   � � �This is my little program:

     � � �&#65533; �&#65533; �&#65533; H DFTACTGRP(*NO) ACTGRP(*new)
     BNDDIR('HTTPAPI'
     )
     � � �&#65533; �&#65533; �&#65533; W*E CRTBNDRPG &#65533;
     get_cities &#65533; �sr
     cfile(*libl/qrpglesrc)
     � � �&#65533; �&#65533; �&#65533; W*E+ &#65533; �&#65533;
     �&#65533; �DBGVIEW(*SO
     URCE)
     � � �&#65533; �&#65533; �&#65533; W*E+ &#65533; �&#65533;
     �&#65533; �REPLACE(*YE
     S)
     � � �&#65533; �&#65533; �&#65533; E*W
     � � �&#65533; �&#65533; �&#65533; �/copy HTTPAPI_H
     � � �&#65533; �&#65533; �&#65533; d VARYINGDATAOFFSET...
     � � �&#65533; �&#65533; �&#65533; d &#65533; �&#65533;
     �&#65533; �&#65533; �&#65
     533; �&#65533; �&#65533; �&#65533; �c &#65533; �&#65533;
     �&#65533; �&#65533; �&#
     65533; �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     � � �const(2)
     � � �&#65533; �&#65533; �&#65533; d SOAP &#65533; �&#65533;
     �&#65533; �&#65533;
     �&#65533; �&#65533; s &#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �1024a &#
     65533; �&#65533; �varying
     � � �&#65533; �&#65533; �&#65533; d rc &#65533; �&#65533;
     �&#65533; �&#65533; �&
     #65533; �&#65533; �&#65533; s &#65533; �&#65533; �&#65533;
     �&#65533; �&#65533;
     &#65533; �10i 0
     � � �&#65533; �&#65533; �&#65533; d c_COUNTRY &#65533;
     �&#65533; �&#65533; �s &#
     65533; �&#65533; �&#65533; �&#65533; �&#65533; �&#65533; �20a
     &#65533; �&#65533;
     � varying
     � � �&#65533; �&#65533; �&#65533; �/free
     � � �&#65533; �&#65533; �&#65533; �&#65533; �c_COUNTRY =
     'Italy';
     � � �&#65533; �&#65533; �&#65533; �&#65533; �SOAP =
     '<soap:Envelope'
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; + '
     � �     �xmlns:soap="[4][8][12]http://www.w3.org/2003/05/soap-envelope'
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; + ' xm
     lns:web="[5][9][13]http://www.webserviceX.NET";>'
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; + ' <s
     oap:Header/>'
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; + ' &#
     65533; �<soap:Body>'
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; + ' &#
     65533; �&#65533; �&#65533; <web:GetCitiesByCountry>'
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; + ' &#
     65533; �&#65533; �&#65533; �&#65533; �&#65533;
     <web:CountryName>' + c_Country
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; + ' <w
     eb:CountryName>'
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; + ' &#
     65533; �&#65533; �&#65533; </web:GetCitiesByCountry>'
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; + ' &#
     65533; �</soap:Body>'
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; + '</s
     oap:Envelope>';
     � � �&#65533; �&#65533; �&#65533; �&#65533; �//
     http_setCCSIDs(1208 : 0);
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; http_debug(*ON:'
     /jgvtmp/httpapi_debug1.txt');
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; rc =
     � �     �http_post('[6][10][14]http://www.webserviceX.NET/globalweather.asm
     x'
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; �&#655
     33; �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �+ '/GetCitiesBy
     Country'
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; �&#655
     33; �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �: %addr(SOAP) +
     � � �VARYINGDATAOFFSET
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; �&#655
     33; �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �: %len(SOAP)
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; �&#655
     33; �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �:
     � � �'/jgvtmp/CitiesByCountry.txt'
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; �&#655
     33; �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �: HTTP_TIMEOUT
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; �&#655
     33; �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �: HTTP_USERAGEN
     T
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; �&#655
     33; �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �: 'text/xml;
     � � �charset=utf-8'
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; �&#655
     33; �&#65533; :
     � �     �'urn."[7][11][15]http://www.webserviceX.NET/GetCitiesByCountry";');
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; if (rc <> 1);
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; �&#65533; http_c
     rash();
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; endif;
     � � �&#65533; �&#65533; �&#65533; �&#65533; �&#65533;
     �&#65533; *inlr = *on;
     � � �&#65533; �&#65533; �&#65533; �/end-free

   � � �And this is the resulting debug-file:
   � � �HTTPAPI Ver 1.24 released 2012-01-23
   � � �OS/400 Ver V6R1M0
   � � �New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819.
   � � �ProtLoc=0
   � � �http_url_post(): entered
   � � �http_persist_open(): entered
   � � �http_long_ParseURL(): entered
   � � �DNS resolver retrans: 2

     � � �DNS resolver retry &#65533; : 2

   � � �DNS resolver options: x'00000136'
   � � �DNS default domain: WEMAG.ch
   � � �DNS server found: 195.186.1.110
   � � �http_persist_post(): entered
   � � �http_persist_req(POST) entered.
   � � �http_long_ParseURL(): entered
   � � �do_oper(POST): entered
   � � �There are 0 cookies in the cache
   � � �POST /globalweather.asmx/GetCitiesByCountry HTTP/1.1

     � � �Host: [8][16]www.webserviceX.NET

   � � �User-Agent: http-api/1.24
   � � �Content-Type: text/xml; charset=utf-8

     � � �SOAPAction:
     urn."[9][12][17]http://www.webserviceX.NET/GetCitiesByCountry";

   � � �Content-Length: 277
   � � �senddoc(): entered
   � � �<soap:Envelope

     � �     �xmlns:soap="[10][13][18]http://www.w3.org/2003/05/soap-envelope
     � � �xmlns:web="[11][14][19]http://www.webserviceX.NET";>
     <soap:Header/>
     � � �<soap:Body> &#65533; �&#65533; �&#65533;
     <web:GetCitiesByCountry> <web:Coun

   tryName>Italy
   � � �<web:CountryName> </web:GetCitiesByCountry>
   � � �</soap:Body></soap:Envelope>
   � � �recvresp(): entered
   � � �HTTP/1.1 500 Internal Server Error
   � � �Cache-Control: private
   � � �Content-Length: 236
   � � �Content-Type: text/plain; charset=utf-8
   � � �Server: Microsoft-IIS/7.0
   � � �X-AspNet-Version: 4.0.30319

     � � �X-Powered-By: [12][20]ASP.NET

   � � �Date: Fri, 04 Jul 2014 12:58:25 GMT
   � � �SetError() #13: HTTP/1.1 500 Internal Server Error
   � � �recvresp(): end with 500
   � � �recvdoc parms: identity 236
   � � �header_load_cookies() entered
   � � �recvdoc(): entered
   � � �SetError() #0:
   � � �System.InvalidOperationException: Request format is invalid:
   � � �text/xml; charset=utf-8.

     � � �&#65533; �&#65533; at
     � �     �System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()
     � � �&#65533; �&#65533; at

   � �   �System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
   � � �SetError() #13: HTTP/1.1 500 Internal Server Error
   � � �http_close(): entered
   � � �What am I doing wrong?
   � � �Best regards
   � � �Jan
   � �   �--------------------------------------------------------------------
   � � �---

     � � �This is the FTPAPI mailing list. &#65533; To unsubscribe,
     please go to:
     � �     �[13][15][21]http://www.scottklement.com/mailman/listinfo/ftpapi
     � �     �------------------------------------------------------------------
     --
     � � �---
     References
     � �1. [16][22]http://www.webservicex.net/globalweather.asmx?WSDL
     � �2. [17]mailto:[23]jgv@xxxxxxxx
     � �3.
     [18][24]http://www.webservicex.net/globalweather.asmx?op=GetCitiesBy
     Country
     � �4. [19][25]http://www.w3.org/2003/05/soap-envelope
     � �5. [20][26]http://www.webserviceX.NET/
     � �6. [21][27]http://www.webserviceX.NET/globalweather.asmx
     � �7. [22][28]http://www.webserviceX.NET/GetCitiesByCountry
     � �8. [23][29]http://www.webserviceX.NET/
     � �9. [24][30]http://www.webserviceX.NET/GetCitiesByCountry
     � 10. [25][31]http://www.w3.org/2003/05/soap-envelope
     � 11. [26][32]http://www.webserviceX.NET/
     � 12. [27][33]http://ASP.NET/
     � 13. [28][34]http://www.scottklement.com/mailman/listinfo/ftpapi

   -----------------------------------------------------------------------
   This is the FTPAPI mailing list. �To unsubscribe, please go to:

     [29][35]http://www.scottklement.com/mailman/listinfo/ftpapi
     --------------------------------------------------------------------
     ---
     References
     � �1. [36]http://www.webserviceX.NET/
     � �2. [37]http://www.webserviceX.NET/GetCitiesByCountry
     � �3. [38]http://www.w3.org/2003/05/soap-envelope
     � �4. [39]http://www.webserviceX.NET/
     � �5. [40]http://www.webservicex.net/globalweather.asmx?WSDL
     � �6. mailto:[2][41]jgv@xxxxxxxx
     � �7.
     [42]http://www.webservicex.net/globalweather.asmx?op=GetCitiesByCoun
     t
     � �8. [43]http://www.w3.org/2003/05/soap-envelope
     � �9. [44]http://www.webserviceX.NET/
     � 10. [45]http://www.webserviceX.NET/globalweather.asmx
     � 11. [46]http://www.webserviceX.NET/GetCitiesByCountry
     � 12. [47]http://www.webserviceX.NET/GetCitiesByCountry
     � 13. [48]http://www.w3.org/2003/05/soap-envelope
     � 14. [49]http://www.webserviceX.NET/
     � 15. [50]http://www.scottklement.com/mailman/listinfo/ftpapi
     � 16. [51]http://www.webservicex.net/globalweather.asmx?WSDL
     � 17. mailto:[52]jgv@xxxxxxxx
     � 18.
     [53]http://www.webservicex.net/globalweather.asmx?op=GetCitiesByCoun
     try
     � 19. [54]http://www.w3.org/2003/05/soap-envelope
     � 20. [55]http://www.webserviceX.NET/
     � 21. [56]http://www.webserviceX.NET/globalweather.asmx
     � 22. [57]http://www.webserviceX.NET/GetCitiesByCountry
     � 23. [58]http://www.webserviceX.NET/
     � 24. [59]http://www.webserviceX.NET/GetCitiesByCountry
     � 25. [60]http://www.w3.org/2003/05/soap-envelope
     � 26. [61]http://www.webserviceX.NET/
     � 27. [62]http://ASP.NET/
     � 28. [63]http://www.scottklement.com/mailman/listinfo/ftpapi
     � 29. [64]http://www.scottklement.com/mailman/listinfo/ftpapi
     --------------------------------------------------------------------
     ---
     This is the FTPAPI mailing list. �To unsubscribe, please go to:
     [65]http://www.scottklement.com/mailman/listinfo/ftpapi
     --------------------------------------------------------------------
     ---

References

   1. http://www.webservicex.net/GetCitiesByCountry
   2. http://www.webservicex.net/GetCitiesByCountry
   3. mailto:jgv@xxxxxxxx
   4. http://www.webserviceX.NET/
   5. http://www.webserviceX.NET/GetCitiesByCountry
   6. http://www.w3.org/2003/05/soap-envelope
   7. http://www.webserviceX.NET/
   8. http://ASP.NET/
   9. http://www.webservicex.net/globalweather.asmx?WSDL
  10. mailto:jgv@xxxxxxxx
  11. http://www.webservicex.net/globalweather.asmx?op=GetCitiesByCount
  12. http://www.w3.org/2003/05/soap-envelope
  13. http://www.webserviceX.NET/
  14. http://www.webserviceX.NET/globalweather.asmx
  15. http://www.webserviceX.NET/GetCitiesByCountry
  16. http://www.webserviceX.NET/
  17. http://www.webserviceX.NET/GetCitiesByCountry
  18. http://www.w3.org/2003/05/soap-envelope
  19. http://www.webserviceX.NET/
  20. http://ASP.NET/
  21. http://www.scottklement.com/mailman/listinfo/ftpapi
  22. http://www.webservicex.net/globalweather.asmx?WSDL
  23. mailto:jgv@xxxxxxxx
  24. http://www.webservicex.net/globalweather.asmx?op=GetCitiesByCountry
  25. http://www.w3.org/2003/05/soap-envelope
  26. http://www.webserviceX.NET/
  27. http://www.webserviceX.NET/globalweather.asmx
  28. http://www.webserviceX.NET/GetCitiesByCountry
  29. http://www.webserviceX.NET/
  30. http://www.webserviceX.NET/GetCitiesByCountry
  31. http://www.w3.org/2003/05/soap-envelope
  32. http://www.webserviceX.NET/
  33. http://ASP.NET/
  34. http://www.scottklement.com/mailman/listinfo/ftpapi
  35. http://www.scottklement.com/mailman/listinfo/ftpapi
  36. http://www.webserviceX.NET/
  37. http://www.webserviceX.NET/GetCitiesByCountry
  38. http://www.w3.org/2003/05/soap-envelope
  39. http://www.webserviceX.NET/
  40. http://www.webservicex.net/globalweather.asmx?WSDL
  41. mailto:jgv@xxxxxxxx
  42. http://www.webservicex.net/globalweather.asmx?op=GetCitiesByCount
  43. http://www.w3.org/2003/05/soap-envelope
  44. http://www.webserviceX.NET/
  45. http://www.webserviceX.NET/globalweather.asmx
  46. http://www.webserviceX.NET/GetCitiesByCountry
  47. http://www.webserviceX.NET/GetCitiesByCountry
  48. http://www.w3.org/2003/05/soap-envelope
  49. http://www.webserviceX.NET/
  50. http://www.scottklement.com/mailman/listinfo/ftpapi
  51. http://www.webservicex.net/globalweather.asmx?WSDL
  52. mailto:jgv@xxxxxxxx
  53. http://www.webservicex.net/globalweather.asmx?op=GetCitiesByCountry
  54. http://www.w3.org/2003/05/soap-envelope
  55. http://www.webserviceX.NET/
  56. http://www.webserviceX.NET/globalweather.asmx
  57. http://www.webserviceX.NET/GetCitiesByCountry
  58. http://www.webserviceX.NET/
  59. http://www.webserviceX.NET/GetCitiesByCountry
  60. http://www.w3.org/2003/05/soap-envelope
  61. http://www.webserviceX.NET/
  62. http://ASP.NET/
  63. http://www.scottklement.com/mailman/listinfo/ftpapi
  64. http://www.scottklement.com/mailman/listinfo/ftpapi
  65. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------