[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Consume WCF web service with .svc extension
That log I can read..
And it clearly shows the encoding line Scott K suggested you remove and
the [1],[2] that Scott M said to removed.
You code should be as shown here
[1]http://code.midrange.com/941a2c756b.html
Charles
On Thu, Aug 28, 2014 at 11:08 AM, Nikhil Rustagi
<[2]nik.rust@xxxxxxxxx> wrote:
� �Thanks for the help. But just to be double sure, I am attaching
the
� �debug log as a .txt document. Let me know if there is anything
else
� �also that I need to change.
� �Thanks,
� �Nikhil
� �On Thu, Aug 28, 2014 at 8:21 PM, Scott Mildenberger
� �<[1][3]SMildenberger@xxxxxxxxxxxxxxxxxx> wrote:
� � �Ok I was wrong, then I was right :)� Probably a cut and
paste from
� � �gmail.
� � �Scott
� �-----Original Message-----
� �From: [2][4]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
� �[mailto:[3][5]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
Charles
� �Wilt
� �Sent: Thursday, August 28, 2014 8:43 AM
� �To: HTTPAPI and FTPAPI Projects
� �Subject: Re: Consume WCF web service with .svc extension
� �Ok, so it is in his code...
� �Yeah, those need to be removed.
� �Charles
� � �On Thu, Aug 28, 2014 at 10:41 AM, Charles Wilt
� � �<[4][6]charles.wilt@xxxxxxxxx>
� �wrote:
� �> gmail adds those to the email...
� �>
� �> It's not in his code..
� �>
� �> Charles
� �>
� �>
� �> On Thu, Aug 28, 2014 at 10:11 AM, Scott Mildenberger <
� �> [5][7]SMildenberger@xxxxxxxxxxxxxxxxxx> wrote:
� �>
� �>> You have a [1] and [2] in your soap variable just before http,
� �remove
� �>> those.
� �>>
� �>> Scott
� �>>
� �>> -----Original Message-----
� �>> From: [6][8]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:
� �>> [7][9]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
Nikhil
� �Rustagi
� �>> Sent: Wednesday, August 27, 2014 11:35 PM
� �>> To: HTTPAPI and FTPAPI Projects
� �>> Subject: Re: Consume WCF web service with .svc extension
� �>>
� �>> Hi,
� �>>
� �>> Still I am getting the same error. Below are the details from
my
� �>> debug log.
� �>> Also attached is the program which I modified using your
example16
� �>> from LIBHTTP. Would be really grateful if you can help me
understand
� �my error.
� �>>
� �>> HTTPAPI Ver 1.24 released 2012-01-23
� �>> OS/400 Ver V5R4M0
� �>>
� �>> http_persist_open(): entered
� �>> http_long_ParseURL(): entered
� �>> DNS resolver retrans: 2
� � �>> DNS resolver retry� : 2
� �>> DNS resolver options: x'00000136'
� � �>> DNS default domain: [8][10]AON.COM
� �>> DNS server found: 10.191.2.65
� �>> DNS server found: 10.184.2.65
� �>> DNS server found: 10.178.200.20
� �>> 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 /wcf/CurrencyService.svc HTTP/1.1 POST
/wcf/CurrencyService.svc
� �>> HTTP/1.1
� �>>
� � �>> Host: [9][11]www.restfulwebservices.net
� �>>
� �>> User-Agent: http-api/1.24
� �>>
� �>> Content-Type: text/xml
� �>>
� �>> SOAPAction: GetConversionRate
� �>>
� �>> Content-Length: 393
� �>>
� �>>
� �>>
� �>>
� �>>
� �>> senddoc(): entered
� �>>
� �>> <?xml version="1.0" encoding="iso-8859-1"
� �>> standalone="no"?><soapenv:Envelope xmlns:soapenv="[1]
� �>> [10][12]http://schemas.xmlsoap.org/soap/envellope/"
xmlns:ns="[2]
� �>>
[11][13]http://www.restfulwebservices.net/ServiceContracts/2008/01
� �>>
� �>>
� �"><soapenv:Header/><soapenv:Body><ns:GetConversionRate><ns:FromCurren
� �>>
� �cy>USD</ns:FromCurrency><ns:ToCurrency>EUR</ns:ToCurrency></ns:GetCon
� �>> versionRate></soapenv:Body></soapenv:Envelope>
� �>> recvresp(): entered
� �>> HTTP/1.1 400 Bad Request
� �>> Server: Microsoft-IIS/7.0
� � �>> X-Powered-By: [12][14]ASP.NET
� �>> Date: Thu, 28 Aug 2014 05:19:45 GMT
� �>> Content-Length: 0
� �>> Connection: Keep-Alive
� �>>
� �>> SetError() #13: HTTP/1.1 400 Bad Request
� �>> recvresp(): end with 400
� �>> recvdoc parms: identity 0
� �>> header_load_cookies() entered
� �>> recvdoc(): entered
� �>> SetError() #0:
� �>> SetError() #13: HTTP/1.1 400 Bad Request
� �>> http_close(): entered
� �>>
� �>>
� �>> Thanks,
� �>> Nikhil
� �>>
� �>>
� �>> On Thu, Aug 28, 2014 at 1:21 AM, Charles Wilt
� � �>> <[13][15]charles.wilt@xxxxxxxxx>
� �>> wrote:
� �>>
� �>> >� � The extension doesn't matter...it's a standard SOAP
web
� �service
� �>> >� � �(though there is a REST version also)
� �>> >� � Sending it an XML like so:
� � �>> >� � <soapenv:Envelope
� �>> >� � � �xmlns:soapenv="[1][14][16]http://schemas.xmlsoap.org/soap/envelope
/"
� �>> >� � xmlns:ns="[2]
� �>>
[15][17]http://www.restfulwebservices.net/ServiceContracts/2008/01
� �>> >� � ">
� �>> >� � �� �<soapenv:Header/>
� �>> >� � �� �<soapenv:Body>
� �>> >� � �� �� �� <ns:GetConversionRate>
� �>> >� � �� �� �� �� � <ns:FromCurrency>USD</ns:FromCurrency>
� �>> >� � �� �� �� �� � <ns:ToCurrency>EUR</ns:ToCurrency>
� �>> >� � �� �� �� </ns:GetConversionRate>
� �>> >� � �� �</soapenv:Body>
� �>> >� � </soapenv:Envelope>
� �>> >� � Gets a response back of:
� �>> >� � <s:Envelope
� �xmlns:s="[3][16][18]http://schemas.xmlsoap.org/soap/envelope/">
� �>> >� � �� �<s:Body>
� �>> >� � �� �� �� <GetConversionRateResponse
� �>> >
� �>> >
� �xmlns="[4][17][19]http://www.restfulwebservices.net/ServiceContrac
ts/2008/0
� �>> > 1
� �>> ">
� �>> >� � �� �� �� �� �<GetConversionRateResult
� �>> >� � � �xmlns:a="[5][18][20]http://www.restfulwebservices.net/DataContract
s/2008/01
� �"
� �>> >� �
xmlns:i="[6][19][21]http://www.w3.org/2001/XMLSchema-instance">
� �>> >� � �� �� �� �� �� �� <a:FromCurrency>USD</a:FromCurrency>
� �>> >� � �� �� �� �� �� �� <a:ToCurrency>EUR</a:ToCurrency>
� �>> >� � �� �� �� �� �� �� <a:Rate>0.7577</a:Rate>
� �>> >� � �� �� �� �� �</GetConversionRateResult>
� �>> >� � �� �� �� </GetConversionRateResponse>
� �>> >� � �� �</s:Body>
� �>> >� � </s:Envelope>
� �>> >� � Scott's presentation on consuming Web services is a
good
� �place
� �>> > to
� �>> start
� � �>> >� �
[7][20][22]http://www.scottklement.com/presentations/#HTTPAPI
� �>> >� � Otherwise, turn on HTTP debuging
� � �>> >� � callp http_debug(*ON);
� �>> >� � And post the resulting log
� � �>> >� � /tmp/httpapi_debug.txt
� � �>> >� � Charles
� �>> >
� �>> >� � On Wed, Aug 27, 2014 at 12:58 PM, Nikhil Rustagi
� �>> >� � <[8][21][23]nik.rust@xxxxxxxxx> wrote:
� �>> >
� �>> >� � � �� �Hi,
� �>> >� � � �� �I have been trying to consume a wcf
service using
� �HTTPAPI, but
� �>> >� � � have
� �>> >� � � �� �been consistently getting error code 400
'Bad
� �Request'. Is � � �>> >� � � there any
� �>> >� � � �� �example which I can use to consume a wcf
service.
� �The current
� �>> >� � � examples
� �>> >� � � �� �all use .asmx services.� � �>> >� � � �� �I tried with the below service:
� �>> >� � � �� �[1][9]
� �>>
[22][24]http://www.restfulwebservices.net/wcf/CurrencyService.svc
� �>> >� � � �� �Nikhil
� �>> >� � � References
� �>> >� � � �� �1.
� �>> >
� �>> >
� �[10][23][25]http://www.restfulwebservices.net/wcf/CurrencyService.
svc?wsdl
� �>> >
� � �>>
� � �------------------------------------------------------------------
--
� � �>> >� � � ---
� � �>> >� � � This is the FTPAPI mailing list.�� To
unsubscribe,
� � �please go to:
� � �>> >� � � � � �[11][24][26]http://www.scottklement.com/mailman/listinfo/ftpapi
� � �>> >
� � �>>
� � �------------------------------------------------------------------
--
� � �>> >� � � ---
� � �>> >
� � �>> > References
� � �>> >
� �>> >� � 1.
[25][27]http://schemas.xmlsoap.org/soap/envelope/
� �>> >� � 2.
� �[26][28]http://www.restfulwebservices.net/ServiceContracts/2008/01
� �>> >� � 3.
[27][29]http://schemas.xmlsoap.org/soap/envelope/
� �>> >� � 4.
� �[28][30]http://www.restfulwebservices.net/ServiceContracts/2008/01
� �>> >� � 5.
� �[29][31]http://www.restfulwebservices.net/DataContracts/2008/01
� �>> >� � 6.
[30][32]http://www.w3.org/2001/XMLSchema-instance
� �>> >� � 7.
[31][33]http://www.scottklement.com/presentations/#HTTPAPI
� �>> >� � 8. mailto:[32][34]nik.rust@xxxxxxxxx
� �>> >� � 9.
� �[33][35]http://www.restfulwebservices.net/wcf/CurrencyService.svc
� �>> >� �10.
� �[34][36]http://www.restfulwebservices.net/wcf/CurrencyService.svc?
wsdl
� � �>> >� �11.
[35][37]http://www.scottklement.com/mailman/listinfo/ftpapi
� � �>> >
� � �>> >
� � �------------------------------------------------------------------
-
� � �>> > ---
� � �>> > - This is the FTPAPI mailing list.� To unsubscribe,
please go
� � �to:
� �>> >
[36][38]http://www.scottklement.com/mailman/listinfo/ftpapi
� �>> >
� �-------------------------------------------------------------------
� �>> > ---
� �>> > -
� �>> >
� �>> >
� � �>>
� � �--------------------------------------------------------------------
� � �-
� � �>> -- This is the FTPAPI mailing list.� To unsubscribe,
please go
� � �to:
� �>> [37][39]http://www.scottklement.com/mailman/listinfo/ftpapi
� �>>
� �------------------------------------------------------------------
---
� �>> --
� �>>
� �>
� �>
� �------------------------------------------------------------------
-----
� � �This is the FTPAPI mailing list.� To unsubscribe, please go
to:
� � �[38][40]http://www.scottklement.com/mailman/listinfo/ftpapi
� � �------------------------------------------------------------------
--
� � �---
References
� �1. mailto:[41]SMildenberger@xxxxxxxxxxxxxxxxxx
� �2. mailto:[42]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
� �3. mailto:[43]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
� �4. mailto:[44]charles.wilt@xxxxxxxxx
� �5. mailto:[45]SMildenberger@xxxxxxxxxxxxxxxxxx
� �6. mailto:[46]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
� �7. mailto:[47]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
� �8. [48]http://AON.COM/
� �9. [49]http://www.restfulwebservices.net/
� 10. [50]http://schemas.xmlsoap.org/soap/envellope/
� 11.
[51]http://www.restfulwebservices.net/ServiceContracts/2008/01
� 12. [52]http://ASP.NET/
� 13. mailto:[53]charles.wilt@xxxxxxxxx
� 14. [54]http://schemas.xmlsoap.org/soap/envelope/
� 15.
[55]http://www.restfulwebservices.net/ServiceContracts/2008/01
� 16. [56]http://schemas.xmlsoap.org/soap/envelope/
� 17. [57]http://www.restfulwebservices.net/ServiceContracts/2008/0
� 18. [58]http://www.restfulwebservices.net/DataContracts/2008/01
� 19. [59]http://www.w3.org/2001/XMLSchema-instance
� 20. [60]http://www.scottklement.com/presentations/#HTTPAPI
� 21. mailto:[61]nik.rust@xxxxxxxxx
� 22. [62]http://www.restfulwebservices.net/wcf/CurrencyService.svc
� 23.
[63]http://www.restfulwebservices.net/wcf/CurrencyService.svc?wsdl
� 24. [64]http://www.scottklement.com/mailman/listinfo/ftpapi
� 25. [65]http://schemas.xmlsoap.org/soap/envelope/
� 26.
[66]http://www.restfulwebservices.net/ServiceContracts/2008/01
� 27. [67]http://schemas.xmlsoap.org/soap/envelope/
� 28.
[68]http://www.restfulwebservices.net/ServiceContracts/2008/01
� 29. [69]http://www.restfulwebservices.net/DataContracts/2008/01
� 30. [70]http://www.w3.org/2001/XMLSchema-instance
� 31. [71]http://www.scottklement.com/presentations/#HTTPAPI
� 32. mailto:[72]nik.rust@xxxxxxxxx
� 33. [73]http://www.restfulwebservices.net/wcf/CurrencyService.svc
� 34.
[74]http://www.restfulwebservices.net/wcf/CurrencyService.svc?wsdl
� 35. [75]http://www.scottklement.com/mailman/listinfo/ftpapi
� 36. [76]http://www.scottklement.com/mailman/listinfo/ftpapi
� 37. [77]http://www.scottklement.com/mailman/listinfo/ftpapi
� 38. [78]http://www.scottklement.com/mailman/listinfo/ftpapi
--------------------------------------------------------------------
---
This is the FTPAPI mailing list.� To unsubscribe, please go to:
[79]http://www.scottklement.com/mailman/listinfo/ftpapi
--------------------------------------------------------------------
---
References
1. http://code.midrange.com/941a2c756b.html
2. mailto:nik.rust@xxxxxxxxx
3. mailto:SMildenberger@xxxxxxxxxxxxxxxxxx
4. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
5. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
6. mailto:charles.wilt@xxxxxxxxx
7. mailto:SMildenberger@xxxxxxxxxxxxxxxxxx
8. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
9. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
10. http://AON.COM/
11. http://www.restfulwebservices.net/
12. http://schemas.xmlsoap.org/soap/envellope/
13. http://www.restfulwebservices.net/ServiceContracts/2008/01
14. http://ASP.NET/
15. mailto:charles.wilt@xxxxxxxxx
16. http://schemas.xmlsoap.org/soap/envelope/
17. http://www.restfulwebservices.net/ServiceContracts/2008/01
18. http://schemas.xmlsoap.org/soap/envelope/
19. http://www.restfulwebservices.net/ServiceContracts/2008/0
20. http://www.restfulwebservices.net/DataContracts/2008/01
21. http://www.w3.org/2001/XMLSchema-instance
22. http://www.scottklement.com/presentations/#HTTPAPI
23. mailto:nik.rust@xxxxxxxxx
24. http://www.restfulwebservices.net/wcf/CurrencyService.svc
25. http://www.restfulwebservices.net/wcf/CurrencyService.svc?wsdl
26. http://www.scottklement.com/mailman/listinfo/ftpapi
27. http://schemas.xmlsoap.org/soap/envelope/
28. http://www.restfulwebservices.net/ServiceContracts/2008/01
29. http://schemas.xmlsoap.org/soap/envelope/
30. http://www.restfulwebservices.net/ServiceContracts/2008/01
31. http://www.restfulwebservices.net/DataContracts/2008/01
32. http://www.w3.org/2001/XMLSchema-instance
33. http://www.scottklement.com/presentations/#HTTPAPI
34. mailto:nik.rust@xxxxxxxxx
35. http://www.restfulwebservices.net/wcf/CurrencyService.svc
36. http://www.restfulwebservices.net/wcf/CurrencyService.svc?wsdl
37. http://www.scottklement.com/mailman/listinfo/ftpapi
38. http://www.scottklement.com/mailman/listinfo/ftpapi
39. http://www.scottklement.com/mailman/listinfo/ftpapi
40. http://www.scottklement.com/mailman/listinfo/ftpapi
41. mailto:SMildenberger@xxxxxxxxxxxxxxxxxx
42. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
43. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
44. mailto:charles.wilt@xxxxxxxxx
45. mailto:SMildenberger@xxxxxxxxxxxxxxxxxx
46. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
47. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
48. http://AON.COM/
49. http://www.restfulwebservices.net/
50. http://schemas.xmlsoap.org/soap/envellope/
51. http://www.restfulwebservices.net/ServiceContracts/2008/01
52. http://ASP.NET/
53. mailto:charles.wilt@xxxxxxxxx
54. http://schemas.xmlsoap.org/soap/envelope/
55. http://www.restfulwebservices.net/ServiceContracts/2008/01
56. http://schemas.xmlsoap.org/soap/envelope/
57. http://www.restfulwebservices.net/ServiceContracts/2008/0
58. http://www.restfulwebservices.net/DataContracts/2008/01
59. http://www.w3.org/2001/XMLSchema-instance
60. http://www.scottklement.com/presentations/#HTTPAPI
61. mailto:nik.rust@xxxxxxxxx
62. http://www.restfulwebservices.net/wcf/CurrencyService.svc
63. http://www.restfulwebservices.net/wcf/CurrencyService.svc?wsdl
64. http://www.scottklement.com/mailman/listinfo/ftpapi
65. http://schemas.xmlsoap.org/soap/envelope/
66. http://www.restfulwebservices.net/ServiceContracts/2008/01
67. http://schemas.xmlsoap.org/soap/envelope/
68. http://www.restfulwebservices.net/ServiceContracts/2008/01
69. http://www.restfulwebservices.net/DataContracts/2008/01
70. http://www.w3.org/2001/XMLSchema-instance
71. http://www.scottklement.com/presentations/#HTTPAPI
72. mailto:nik.rust@xxxxxxxxx
73. http://www.restfulwebservices.net/wcf/CurrencyService.svc
74. http://www.restfulwebservices.net/wcf/CurrencyService.svc?wsdl
75. http://www.scottklement.com/mailman/listinfo/ftpapi
76. http://www.scottklement.com/mailman/listinfo/ftpapi
77. http://www.scottklement.com/mailman/listinfo/ftpapi
78. http://www.scottklement.com/mailman/listinfo/ftpapi
79. 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
-----------------------------------------------------------------------