Hi Arun,
Thanks for all your prompt responses.
That piece of code works nicely with the proxy settings from the JAXRPC example - I can trace the calls through the proxy server. However the JAXRPC example itself still "avoids" the proxy and goes straight to the service. What in the world could I be doing wrong???
Following is the verbose output from a run:
E:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello>ant run -verbose
Ant version 1.4.1 compiled on March 14 2002
Buildfile: build.xml
Detected Java version: 1.3 in: E:\jdk1.3.1_03\jre
Detected OS: Windows 2000
parsing buildfile E:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello\build.xml
with URI = file:E:/jwsdp-1_0-ea2/docs/tutorial/examples/jaxrpc/hello/build.xml
Project base dir set to: E:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello
[property] Loading E:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\common\build.
properties
[property] Loading E:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello\build.p
roperties
resolving systemId: file:E:/jwsdp-1_0-ea2/docs/tutorial/examples/jaxrpc/common/t
argets.xml
Build sequence for target `run' is [run]
Complete build sequence is [run, setup-web-inf, reload, prepare, compile-server,
xrpcc-client, xrpcc-server, install, remove, list, clean, compile-client, jar-c
lient, package, build]
run:
[echo] Running the hello.HelloClient program:
[echo] java -classpath dist/hello-client.jar:e:\jwsdp-1_0-ea2/common/lib/ja
xrpc-ri.jar:e:\jwsdp-1_0-ea2/common/lib/jaxrpc-api.jar:e:\jwsdp-1_0-ea2/common/l
ib/activation.jar:e:\jwsdp-1_0-ea2/common/lib/dom4j.jar:e:\jwsdp-1_0-ea2/common/
lib/jaxm-api.jar:e:\jwsdp-1_0-ea2/common/lib/jaxm-client.jar:e:\jwsdp-1_0-ea2/co
mmon/lib/log4j.jar:e:\jwsdp-1_0-ea2/common/lib/mail.jar:e:\jwsdp-1_0-ea2/common/
lib/xalan.jar:e:\jwsdp-1_0-ea2/common/lib/xerces.jar:e:\jwsdp-1_0-ea2/common/lib
/jaxp-api.jar:e:\jwsdp-1_0-ea2/common/lib/servlet.jar:e:\jwsdp-1_0-ea2/common/li
b/msbase.jar:e:\jwsdp-1_0-ea2/common/lib/mssqlserver.jar:e:\jwsdp-1_0-ea2/common
/lib/msutil.jar:e:\jwsdp-1_0-ea2/common/lib/classes12.jar -Dhttp.proxySet=true -
Dhttp.proxyHost=localhost -Dhttp.proxyPort=1101 hello.HelloClient
http://localho
st:8080/jaxrpc-hello/jaxrpc/HelloIF
[echo]
[java] Forking E:\jdk1.3.1_03\jre\..\bin\java.exe -Dhttp.proxySet=true -Dht
tp.proxyHost=evie.compuware.com -Dhttp.proxyPort=1101 -classpath E:\jwsdp-1_0-ea
2\docs\tutorial\examples\jaxrpc\hello\dist\hello-client.jar;E:\jwsdp-1_0-ea2\com
mon\lib\jaxrpc-ri.jar;E:\jwsdp-1_0-ea2\common\lib\jaxrpc-api.jar;E:\jwsdp-1_0-ea
2\common\lib\activation.jar;E:\jwsdp-1_0-ea2\common\lib\dom4j.jar;E:\jwsdp-1_0-e
a2\common\lib\jaxm-api.jar;E:\jwsdp-1_0-ea2\common\lib\jaxm-client.jar;E:\jwsdp-
1_0-ea2\common\lib\mail.jar;E:\jwsdp-1_0-ea2\common\lib\jaxp-api.jar;E:\jwsdp-1_
0-ea2\common\lib\servlet.jar;E:\jwsdp-1_0-ea2\common\endorsed\dom.jar;E:\jwsdp-1
_0-ea2\common\endorsed\sax.jar;E:\jwsdp-1_0-ea2\common\endorsed\xalan.jar;E:\jws
dp-1_0-ea2\common\endorsed\xercesImpl.jar;E:\jwsdp-1_0-ea2\common\endorsed\xsltc
.jar;E:\jwsdp-1_0-ea2\common\lib\msbase.jar;E:\jwsdp-1_0-ea2\common\lib\mssqlser
ver.jar;E:\jwsdp-1_0-ea2\common\lib\msutil.jar;E:\jwsdp-1_0-ea2\common\lib\class
es12.jar hello.HelloClient
http://localhost:8080/jaxrpc-hello/jaxrpc/HelloIF
[java] "hi there"Duke!
BUILD SUCCESSFUL
Total time: 2 seconds
E:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello>
On Tue, 21 May 2002 12:16:22 -0700, Arun Gupta <arun.gupta_at_SUN.COM> wrote:
>Hi Luc,
>
>Try the following code:
>
>URL url = new URL("http://java.sun.com/xml/jaxrpc/index.html");
>URLConnection conn = url.openConnection();
>System.out.println("Content-length: " + conn.getContentLength());
>System.out.println("Content-type: " + conn.getContentType());
>
>with your -Dhttp.proxyHost and -Dhttp.proxyPort. This is a very basic piece of code that should work if your proxy settings are correct. If this does not work, then you need to provide correct proxy host and port number.
>
>Thanks for your interest in JAX-RPC.
>
>Regards,
>-Arun
>
>
>
>Luc Plaetinck wrote:
>
>>On Tue, 21 May 2002 07:11:06 -0600, Luc Plaetinck <luc_plaetinck_at_COMPUWARE.COM> wrote:
>>
>>>On Mon, 20 May 2002 14:37:45 -0700, Arun Gupta <arun.gupta_at_SUN.COM> wrote:
>>>
>>>>Hi Luc,
>>>>
>>>>You need to set the properties as -Dhttp.proxyHost and -Dhttp.proxyPort.
>>>>It seems there is a slight typo, you are using -Dhttp:proxyHost.
>>>>
>>>>Thanks for your interest in JAX-RPC.
>>>>
>>>>Regards,
>>>>-Arun
>>>>
>>>