Ok, start from adding property to client

client.setProperty(CommonsHttpMessageSender.DISABLE_PROXY_UTILS,"true");
This will disable checking for nonproxy hosts.

If this will not work, attach xfire source to your ide and add
breakpoint somewhere around line

String proxyHost = (String) context.getContextualProperty(HTTP_PROXY_HOST);
in CommonsHttpMessageSender class. Then you can see in your debuger
what options are set on client.

You can also use some tcp monitor to make sure that connection is
really trying to hit proxy server.



On 3/14/07, Asleson, Ryan <[EMAIL PROTECTED]> wrote:

OK, I downloaded the new 1.2.5 release this morning and I'm still
getting the connection timeout error.

I do have a few questions/comments:

1.  The Xfire distribution includes a "lib" directory and a "modules"
directory.  What's the difference between the jars located in these
directories?

2.  Related to #1, there's an xfire-java5-1.2.5.jar file in the
"modules" directory.  Is this jar required?  I tried using it both with
and without this jar, and there was no change.

3.  Failure was under both JDK 1.5 and 1.6

4.  I don't think it matters, but just in case, I do get these warnings
when compiling the generated stubs:

Note: C:\dev\xfire\src\xfiregen\ReceiveClient.java uses unchecked or
unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

5.  Removing the ProxyUtils.class file from the xfire-java5-1.2.5.jar
file made no difference.

Any thoughts on where I should turn to next?  I'd love to use xfire but
I can't seem to get through the corporate proxy.



-----Original Message-----
From: Tomek Sztelak [mailto:[EMAIL PROTECTED]
Sent: Monday, March 12, 2007 9:10 AM
To: [email protected]
Subject: Re: [xfire-user] Web Service Client that uses HTTP Proxy

> Can you verify that I'm using the correct method for setting what the
> proxy server name and port are?

Method is correct, but 1.2.4 may have a little bug with proxy support :/
Now you can try 2 things:
1. First try to run this code on java 5, if its still fails then :
2. Remove class ProxyUtils.class from xfire-java5.jar

This will tell us if the old bug causes that problem.

> It would be nice if these were just
> properties on the service or soap object, as creating a Client seems
> rather obtuse and error prone.

Nope, you are not creating any client, the used method just cast  soap
client , to its internal representations :)
>
>
>
> -----Original Message-----
> From: Tomek Sztelak [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 12, 2007 8:55 AM
> To: [email protected]
> Subject: Re: [xfire-user] Web Service Client that uses HTTP Proxy
>
> What xfire version and jdk are you using ?
>
> On 3/12/07, Asleson, Ryan <[EMAIL PROTECTED]> wrote:
> >
> >
> > How might that help?  I'm sure that the problem is getting through
> > the
>
> > proxy... I'm just not sure how to tell Xfire to get through the
proxy.
> >
> >
> >
> > -----Original Message-----
> > From: Tomek Sztelak [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 12, 2007 8:13 AM
> > To: [email protected]
> > Subject: Re: [xfire-user] Web Service Client that uses HTTP Proxy
> >
> > Maybe try to use tcpmon to see where the message is send.
> >
> > On 3/12/07, Asleson, Ryan <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > Hello,
> > >
> > > I'm trying to use XFire as a web services client so I can access
> > > remote web services.  I generated the client stub using the
> > instructions found here:
> > >
> > > http://xfire.codehaus.org/Client+and+Server+Stub+Generation+from+W
> > > SD
> > > L
> > >
> > > I need to go through a proxy server located at port 8080 to get
> > > through the corporate firewall.  From the page listed above, it
> > > looks like I need to create a Client object and then set the HTTP
> > > proxy
> > settings on that client.
> > > So, here's what I have so far:
> > >
> > > //Create the service and the soap object ReceiveClient service =
> > > new
>
> > > ReceiveClient(); ReceiveSoap receiveClient =
> > > service.getReceiveSoap();
> > >
> > > //create a Client and set the properties for the proxy (proxy name

> > > and
> >
> > > port) Client client = Client.getInstance(receiveClient);
> > > client.setProperty(CommonsHttpMessageSender.HTTP_PROXY_HOST,
> > > "intproxy.biperf.com");
> > > client.setProperty(CommonsHttpMessageSender.HTTP_PROXY_PORT,
> > > "8080");
> > >
> > > //call the service
> > > ResponseStatus status = receiveClient.login(loginInfo);
> > >
> > > Unfortunately the call fails with the exception listed below.  I'm

> > > pretty sure the connection timeouts are caused by the client's
> > > inability to contact or get through the proxy.
> > >
> > > Can anybody shed some light on what I'm doing wrong or  why it
> > > won't
>
> > > go through the proxy??
> > >
> > > Thank you!!
> > >
> > > -Ryan
> > >
> > >
> > > Exception:
> > >
> > > Mar 12, 2007 7:21:33 AM
> > > org.apache.commons.httpclient.HttpMethodDirector
> > > executeWithRetry
> > > INFO: I/O exception (java.net.ConnectException) caught when
> > > processing
> > > request: Connection timed out: connect Mar 12, 2007 7:21:33 AM
> > > org.apache.commons.httpclient.HttpMethodDirector
> > > executeWithRetry
> > > INFO: Retrying request
> > > Mar 12, 2007 7:21:54 AM
> > > org.apache.commons.httpclient.HttpMethodDirector
> > > executeWithRetry
> > > INFO: I/O exception (java.net.ConnectException) caught when
> > > processing
> > > request: Connection timed out: connect Mar 12, 2007 7:21:54 AM
> > > org.apache.commons.httpclient.HttpMethodDirector
> > > executeWithRetry
> > > INFO: Retrying request
> > > Mar 12, 2007 7:22:15 AM
> > > org.apache.commons.httpclient.HttpMethodDirector
> > > executeWithRetry
> > > INFO: I/O exception (java.net.ConnectException) caught when
> > > processing
> > > request: Connection timed out: connect Mar 12, 2007 7:22:15 AM
> > > org.apache.commons.httpclient.HttpMethodDirector
> > > executeWithRetry
> > > INFO: Retrying request
> > > Mar 12, 2007 7:22:36 AM
> > > org.codehaus.xfire.transport.http.HttpChannel sendViaClient
> > > SEVERE: java.net.ConnectException: Connection timed out: connect
> > >
> > >
> > >
> > > org.codehaus.xfire.XFireRuntimeException: Could not invoke
service..
> > > Nested exception is
> > > org.codehaus.xfire.fault.XFireFault: Couldn't send message.
> > > ******************************
> > > org.codehaus.xfire.fault.XFireFault: Couldn't send message.
> > > Error: org.codehaus.xfire.XFireRuntimeException: Could not invoke
> > > service.. Nested exception is
> > > org.codehaus.xfire.fault.XFireFault: Couldn't send message.
> > >         at
> > > org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89
> > > )
> > > ******************************
> > >         at
> > >
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.
> > > ja
> > > va:30)
> > >
> > >         at
> > > org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.
> > > ja
> > > va
> > > :131)
> > >
> > >         at
> > > org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
> > >
> > >         at
> > > org.codehaus.xfire.client.Client.invoke(Client.java:335)
> > >         at
> > >
> org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
> > >         at
> > > org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
> > >         at $Proxy12.login(Unknown Source)
> > >         at xfire.Main.login(Main.java:50)
> > >         at xfire.MainTest.testLogin(MainTest.java:15)
> > >         at
> > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >         at
> > >
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
> > .j
> > av
> > a:39)
> > >         at
> > >
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
> > ss
> > or
> > Impl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > >         at
> > > junit.framework.TestCase.runTest(TestCase.java:154)
> > >         at
> > > junit.framework.TestCase.runBare(TestCase.java:127)
> > >         at
> > > junit.framework.TestResult$1.protect(TestResult.java:106)
> > >         at
> > > junit.framework.TestResult.runProtected(TestResult.java:124)
> > >         at junit.framework.TestResult.run(TestResult.java:109)
> > >         at junit.framework.TestCase.run(TestCase.java:118)
> > >         at
> > > junit.framework.TestSuite.runTest(TestSuite.java:208)
> > >         at junit.framework.TestSuite.run(TestSuite.java:203)
> > >         at
> > >
> > org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUn
> > it
> > Te
> > stRunner.java:297)
> > >         at
> > >
> > org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(
> > JU
> > ni
> > tTestRunner.java:672)
> > >         at
> > > org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(
> > > JU
> > > ni
> > > tTestRunner.java:567) Caused by:
org.codehaus.xfire.XFireException:
> > > Couldn't send message.
> > >         at
> > >
> >
>
org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.
> > java:145)
> > >         at
> > >
> > org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:
> > 48
> > )
> > >         at
> > >
> > org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.
> > ja
> > va
> > :26)
> > >         ... 23 more
> > > Caused by: java.net.ConnectException: Connection timed out:
connect
> > >         at java.net.PlainSocketImpl.socketConnect(Native
> > > Method)
> > >         at
> > > java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
> > >         at
> > >
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
> > >         at
> > > java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
> > >         at
> > > java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
> > >         at java.net.Socket.connect(Socket.java:519)
> > >         at
> > >
> >
com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:
> > 54
> > 8)
> > >         at
> > >
> > com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java
> > :3
> > 92
> > )
> > >         at
> > >
> > com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSo
> > ck
> > et
> > FactoryImpl.java:123)
> > >         at
> > >
> > org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.crea
> > te
> > So
> > cket(SSLProtocolSocketFactory.java:81)
> > >         at
> > >
> > org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.crea
> > te
> > So
> > cket(SSLProtocolSocketFactory.java:126)
> > >         at
> > >
> >
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:
> > 70
> > 6)
> > >         at
> > >
> > org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$Htt
> > pC
> > on
> > nectionAdapter.open(MultiThreadedHttpConnectionManager.java:1321)
> > >         at
> > >
> > org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Ht
> > tp
> > Me
> > thodDirector.java:386)
> > >         at
> > >
> > org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpM
> > et
> > ho
> > dDirector.java:170)
> > >         at
> > >
> > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.ja
> > va
> > :3
> > 96)
> > >         at
> > >
> > org.codehaus.xfire.transport.http.CommonsHttpMessageSender.send(Comm
> > on
> > sH
> > ttpMessageSender.java:335)
> > >         at
> > >
> >
>
org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.
> > java:123)
> > >         ... 25 more
> > > Testsuite: xfire.MainTest
> > > Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 91.798 sec
> > >
> > > ------------- Standard Output ---------------
> > >
> > >
> > >
> > > ******************************
> > > Error: org.codehaus.xfire.XFireRuntimeException: Could not invoke
> > > service.. Nested exception is
> > > org.codehaus.xfire.fault.XFireFault: Couldn't send message.
> > > ******************************
> > >
> > >  This e-mail message is being sent solely for use by the intended
> > > recipient(s) and may contain confidential information. Any
> > > unauthorized review, use, disclosure or distribution is
prohibited.
> > > If
> >
> > > you are not the intended recipient, please contact the sender by
> > > phone
> >
> > > or reply by e-mail, delete the original message and destroy all
> > copies. Thank you.
> > >
> >
> >
> > --
> > -----
> > When one of our products stops working, we'll blame another vendor
> > within 24 hours.
> >
> > --------------------------------------------------------------------
> > - To unsubscribe from this list please visit:
> >
> >     http://xircles.codehaus.org/manage_email
> >
> >
> > This e-mail message is being sent solely for use by the intended
> recipient(s) and may contain confidential information.  Any
> unauthorized review, use, disclosure or distribution is prohibited.
> If you are not the intended recipient, please contact the sender by
> phone or reply by e-mail, delete the original message and destroy all
copies. Thank you.
> >
> > --------------------------------------------------------------------
> > - To unsubscribe from this list please visit:
> >
> >     http://xircles.codehaus.org/manage_email
> >
> >
>
>
> --
> -----
> When one of our products stops working, we'll blame another vendor
> within 24 hours.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
> This e-mail message is being sent solely for use by the intended
recipient(s) and may contain confidential information.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not
the intended recipient, please contact the sender by phone or reply by
e-mail, delete the original message and destroy all copies. Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
-----
When one of our products stops working, we'll blame another vendor
within 24 hours.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


This e-mail message is being sent solely for use by the intended recipient(s) 
and may contain confidential information.  Any unauthorized review, use, 
disclosure or distribution is prohibited.  If you are not the intended 
recipient, please contact the sender by phone or reply by e-mail, delete the 
original message and destroy all copies. Thank you.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email




--
-----
When one of our products stops working, we'll blame another vendor
within 24 hours.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to