Hi Andrea,
have you ever tried with:
requestContext.put(JAXWSProperties.REQUEST_TIMEOUT, (int) receiveTimeout);
in my application it works, I tested it last friday, I'm with Spring and client generated with JAX-WS RI
bye
Raffaele Gambelli
Raffaele Gambelli
[email protected] ha scritto: -----
Per: [email protected]
Da: Andrea Cappelli
Inviato da: [email protected]
Data: 26/05/2017 06.43PM
Oggetto: [jetty-users] JAX-WS and timeout with Jetty
The application calls an external SOAP webservice; the client is generated through JAX-WS RI 2.2.9-b130926.1035
I didn't found a way to setup a request timeout (a timeout which fires if the remote server didn't respond to my request within a certain amount of time)
I used this code
MyService_Service se = new MyService_Service(new URL(url));
MyService dt = se.getMyServicePort();
((BindingProvider)dt).getRequestContext().put("javax.xml.ws.client.connectionTimeout", 1000);
((BindingProvider)dt).getRequestContext().put("javax.xml.ws.client.receiveTimeout", 1000);
the remote function executes in about 10 seconds, but no exception is raised
I tried with 2 different jdk
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
Da: Andrea Cappelli
Inviato da: [email protected]
Data: 26/05/2017 06.43PM
Oggetto: [jetty-users] JAX-WS and timeout with Jetty
Hi everyone,
I try to ask here but not sure it's 100% jetty related
I have a spring application running on jetty 9.2.14MyService_Service se = new MyService_Service(new URL(url));
MyService dt = se.getMyServicePort();
((BindingProvider)dt).getRequestContext().put("javax.xml.ws.client.connectionTimeout", 1000);
((BindingProvider)dt).getRequestContext().put("javax.xml.ws.client.receiveTimeout", 1000);
dt.remoteLongFunction()
inside a try catch
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
and
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
I found many web pages reporting similar snippet of code, someone with different key to put (
com.sun.xml.ws.request.timeout) but the result is the sameAnyone has done something similar in jetty and can give me some hints?
Thank you
--
Andrea Cappelli
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
