This content has been marked as final.
Show 5 replies
-
1. Re: lower timeout in accessing a web service
sigitm Jan 27, 2007 12:51 PM (in response to sigitm)Don't you know how to lower the connection timeout? :(
Please!! -
2. Re: lower timeout in accessing a web service
thomas.diesler Feb 14, 2007 3:58 PM (in response to sigitm)Not for the wsdl request, but the client should have the wsdl locally anyway. After all it is the abstract contract shared by both parties.
Also have a look at
http://jira.jboss.org/jira/browse/JBWS-1410 -
3. Re: lower timeout in accessing a web service
jemodurn Mar 8, 2007 8:22 PM (in response to sigitm)JBWS-1410 is working for JAX-RPC but it is not working for JAX-WS. Is there a jira for this?
Here is a test case:
modify the JSR181WebServiceJSETestCase in the jbossws-1.2.0 samples can reproduce the problem.public void testWebService() throws Exception { URL wsdlURL = new File("resources/jaxws/samples/jsr181pojo/META-INF/wsdl/TestService.wsdl").toURL(); QName qname = new QName("http://org.jboss.ws/samples/jsr181pojo", "TestService"); Service service = Service.create(wsdlURL, qname); port = (EndpointInterface)service.getPort(EndpointInterface.class); ((Stub) port)._setProperty(StubExt.PROPERTY_CLIENT_TIMEOUT, String .valueOf(500)); Object retObj = port.echo(new String[]{}); assertNotNull(retObj); assertEquals(0, ((String[])retObj).length); }
Testcase: testWebService took 1.672 sec Caused an ERROR $Proxy17 java.lang.ClassCastException: $Proxy17 at org.jboss.test.ws.jaxws.samples.jsr181pojo.JSR181WebServiceJSETestCase.testWebService(JSR181WebServiceJSETestCase.java:72) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) at junit.extensions.TestSetup$1.protect(TestSetup.java:23) at junit.extensions.TestSetup.run(TestSetup.java:27)
-
4. Re: lower timeout in accessing a web service
jemodurn Mar 8, 2007 8:40 PM (in response to sigitm)I saw a post on JAX-WS: http://forums.java.net/jive/message.jspa?messageID=109927
will this work with jbossws 1.2.0?((BindingProvider)port).getRequestContext().put(StubExt.PROPERTY_CLIENT_TIMEOUT, new Integer(500));
-
5. Re: lower timeout in accessing a web service
jemodurn Mar 9, 2007 2:58 PM (in response to sigitm)I tried this code to lower the JAX-WS client's connection timeout and it works beautifully
((BindingProvider)port).getRequestContext().put(StubExt.PROPERTY_CLIENT_TIMEOUT, new Integer(500));
Issue resolved.