Author |
Message |
29/01/2010 11:45:32
|
brandt
Power User
Joined: 12/03/2008 16:37:34
Messages: 45
Location: Bern
Offline
|
Hi Björn,
i want to use the CLIENTHTTPSENDER component to call a webserive on the client side. From the server side i can not reach this webservice.
so i need a little extension of the CLIENTHTTPSENDER component.
1.) i need a possibility to set the HttpRequestMethod to "POST"
2.) and i need a possibility that the CLIENTHTTPSENDER component is sending/posting a given xml file or byte[] with a given content-type to the url of the webservice.
As attachment you find a sample code for calling a webservice. May be this code is a help for extending the CLIENTHTTPSENDER component.
Do you think you can extend the CLIENTHTTPSENDER component to meet my needs?
Regards
Joe
Filename |
TestAutoidatWebservice.java |
Download
|
Description |
Sample code to call webservice. |
Filesize |
7 Kbytes
|
Downloaded: |
640 time(s) |
|
|
|
29/01/2010 11:54:09
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
Hi,
...yessss, we can do this.
This does not seem to be a too big issue. We added it to our list of short term activities.
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
01/02/2010 08:31:40
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
...is part of today's update...
Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
03/02/2010 14:23:58
|
brandt
Power User
Joined: 12/03/2008 16:37:34
Messages: 45
Location: Bern
Offline
|
Hi Björn,
thanks for the improvement of CLIENTHTTPSENDER.
But one thing is still missing for my application scenario which i did not mention before. :-(
I need a property to set the Content-Type for the HttpRequest.
--------------------------------
HttpURLConnection urlConn = null;
...
urlConn.setRequestProperty( "Content-Type", "here comes captain casa ui property" );
-------------------------------
Can you add this missing property, please?
i promise it will be my last request for CLIENTHTTPSENDER,
Regards
Joe
|
|
|
03/02/2010 16:20:23
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
Hi,
no problem to add this, as well. We will do a more generic approach to pass http-header-parameters in form of csv-String.
Available with next update. (If urgent on your side: tell us...)
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
17/02/2010 11:04:13
|
brandt
Power User
Joined: 12/03/2008 16:37:34
Messages: 45
Location: Bern
Offline
|
Hi Björn,
i still have problems to call my specific webservice via CLIENTHTTPSENDER.
I used a proxy to log the http data transfer.
It seems that CLIENTHTTPSENDER still uses HTTP GET even if the property urlpostdata is set.
And it seems that setting the content type via property httpheaderparams does not work.
It looks like that both parameters urlpostdata and httpheaderparams are ignored.
I use the current version of CaptainCasa (Build date 15.02.2010).
Can you check your code, please?
Another issue for httpheaderparams:
As separator for the key/value pairs a semicolon is used.
But i want to set the content type to text/xml; charset=UTF-8
So a semicolon can be a valid character inside a value.
Can you use an other separator, please? May be we can use the pipe character ("|") as separator.
Regards joe
|
|
|
17/02/2010 13:49:19
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
Hi,
just re-testing... results will follow in some minutes...
ad semicolon: please use ValueManager.encode(...) for building the CSV String, then semicolons are "escaped"...
Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
17/02/2010 14:52:12
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
Hi,
grrrr... we somehow mixed the new httpheaderparams with the poststring in the component... sorry.
Bug is fixed. I'll contact you by mail because of update.
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
|