How do I timeout client side call to a SOAP webservice
up vote
0
down vote
favorite
I have a REST API which is being consumed by java script front end ( angular ).
When my REST API endpoint is invoked the API in turn needs to make a call to a SOAP webservice .
The client jar for the soap service is in classpath.
REST service is running in Jetty and Open JDK 1.8 .
SOAP web service is hosted separately details of which I do not possess other than end point and wsdl etc .
Everything is working fine .
One of the requirements is for the REST API to timeout in 5 seconds.
Sometimes the SOAP endpoint takes about 10 seconds to respond.
So ideally the REST endpoint should time out after 5 seconds but it never does.
It keeps waiting for the SOAP service to respond so whatever is the response time of the SOAP service determines REST API response.
Please do not suggest asynchronous calls - the aim is to make the SOAP client call to the SOAP web service timeout.
Have tried a number of options to set the timeout. See below options found over the internet.
Unfortunately none of them work :
Get QName
Create Service from QName
GetPort
Map<String,Object> context = ((BindingProvider)port).getRequestContext();
context.put("javax.xml.ws.service.endpoint.address",https wsdl location");
/** try and timeout after 5 seconds - NOT working **/
/** option 1 **/
context.put("com.sun.xml.internal.ws.request.timeout", "5000");
context.put("com.sun.xml.internal.ws.connect.timeout","5000");
/** option 2 **/
context.put("javax.xml.ws.client.receiveTimeout", "5000");
context.put("javax.xml.ws.client.connectionTimeout","5000");
/** option 3 **/
context.put("com.sun.xml.ws.request.timeout", "5000");
context.put("com.sun.xml.ws.connect.timeout","5000");
None of these work.
Somewhere on the internet someone had suggested the following which also did not work:
context.put("timeout","10");
NOTE: above options have been tried one at a time. Havent put all of them together in one go !
Does anyone have any pointers ?
If it helps I am using soap client jar - wsclient_extended.jar
To sum up : soap client running in Jetty with Open JDK 1.8 .
Thanks
java web-services soap soap-client
add a comment |
up vote
0
down vote
favorite
I have a REST API which is being consumed by java script front end ( angular ).
When my REST API endpoint is invoked the API in turn needs to make a call to a SOAP webservice .
The client jar for the soap service is in classpath.
REST service is running in Jetty and Open JDK 1.8 .
SOAP web service is hosted separately details of which I do not possess other than end point and wsdl etc .
Everything is working fine .
One of the requirements is for the REST API to timeout in 5 seconds.
Sometimes the SOAP endpoint takes about 10 seconds to respond.
So ideally the REST endpoint should time out after 5 seconds but it never does.
It keeps waiting for the SOAP service to respond so whatever is the response time of the SOAP service determines REST API response.
Please do not suggest asynchronous calls - the aim is to make the SOAP client call to the SOAP web service timeout.
Have tried a number of options to set the timeout. See below options found over the internet.
Unfortunately none of them work :
Get QName
Create Service from QName
GetPort
Map<String,Object> context = ((BindingProvider)port).getRequestContext();
context.put("javax.xml.ws.service.endpoint.address",https wsdl location");
/** try and timeout after 5 seconds - NOT working **/
/** option 1 **/
context.put("com.sun.xml.internal.ws.request.timeout", "5000");
context.put("com.sun.xml.internal.ws.connect.timeout","5000");
/** option 2 **/
context.put("javax.xml.ws.client.receiveTimeout", "5000");
context.put("javax.xml.ws.client.connectionTimeout","5000");
/** option 3 **/
context.put("com.sun.xml.ws.request.timeout", "5000");
context.put("com.sun.xml.ws.connect.timeout","5000");
None of these work.
Somewhere on the internet someone had suggested the following which also did not work:
context.put("timeout","10");
NOTE: above options have been tried one at a time. Havent put all of them together in one go !
Does anyone have any pointers ?
If it helps I am using soap client jar - wsclient_extended.jar
To sum up : soap client running in Jetty with Open JDK 1.8 .
Thanks
java web-services soap soap-client
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a REST API which is being consumed by java script front end ( angular ).
When my REST API endpoint is invoked the API in turn needs to make a call to a SOAP webservice .
The client jar for the soap service is in classpath.
REST service is running in Jetty and Open JDK 1.8 .
SOAP web service is hosted separately details of which I do not possess other than end point and wsdl etc .
Everything is working fine .
One of the requirements is for the REST API to timeout in 5 seconds.
Sometimes the SOAP endpoint takes about 10 seconds to respond.
So ideally the REST endpoint should time out after 5 seconds but it never does.
It keeps waiting for the SOAP service to respond so whatever is the response time of the SOAP service determines REST API response.
Please do not suggest asynchronous calls - the aim is to make the SOAP client call to the SOAP web service timeout.
Have tried a number of options to set the timeout. See below options found over the internet.
Unfortunately none of them work :
Get QName
Create Service from QName
GetPort
Map<String,Object> context = ((BindingProvider)port).getRequestContext();
context.put("javax.xml.ws.service.endpoint.address",https wsdl location");
/** try and timeout after 5 seconds - NOT working **/
/** option 1 **/
context.put("com.sun.xml.internal.ws.request.timeout", "5000");
context.put("com.sun.xml.internal.ws.connect.timeout","5000");
/** option 2 **/
context.put("javax.xml.ws.client.receiveTimeout", "5000");
context.put("javax.xml.ws.client.connectionTimeout","5000");
/** option 3 **/
context.put("com.sun.xml.ws.request.timeout", "5000");
context.put("com.sun.xml.ws.connect.timeout","5000");
None of these work.
Somewhere on the internet someone had suggested the following which also did not work:
context.put("timeout","10");
NOTE: above options have been tried one at a time. Havent put all of them together in one go !
Does anyone have any pointers ?
If it helps I am using soap client jar - wsclient_extended.jar
To sum up : soap client running in Jetty with Open JDK 1.8 .
Thanks
java web-services soap soap-client
I have a REST API which is being consumed by java script front end ( angular ).
When my REST API endpoint is invoked the API in turn needs to make a call to a SOAP webservice .
The client jar for the soap service is in classpath.
REST service is running in Jetty and Open JDK 1.8 .
SOAP web service is hosted separately details of which I do not possess other than end point and wsdl etc .
Everything is working fine .
One of the requirements is for the REST API to timeout in 5 seconds.
Sometimes the SOAP endpoint takes about 10 seconds to respond.
So ideally the REST endpoint should time out after 5 seconds but it never does.
It keeps waiting for the SOAP service to respond so whatever is the response time of the SOAP service determines REST API response.
Please do not suggest asynchronous calls - the aim is to make the SOAP client call to the SOAP web service timeout.
Have tried a number of options to set the timeout. See below options found over the internet.
Unfortunately none of them work :
Get QName
Create Service from QName
GetPort
Map<String,Object> context = ((BindingProvider)port).getRequestContext();
context.put("javax.xml.ws.service.endpoint.address",https wsdl location");
/** try and timeout after 5 seconds - NOT working **/
/** option 1 **/
context.put("com.sun.xml.internal.ws.request.timeout", "5000");
context.put("com.sun.xml.internal.ws.connect.timeout","5000");
/** option 2 **/
context.put("javax.xml.ws.client.receiveTimeout", "5000");
context.put("javax.xml.ws.client.connectionTimeout","5000");
/** option 3 **/
context.put("com.sun.xml.ws.request.timeout", "5000");
context.put("com.sun.xml.ws.connect.timeout","5000");
None of these work.
Somewhere on the internet someone had suggested the following which also did not work:
context.put("timeout","10");
NOTE: above options have been tried one at a time. Havent put all of them together in one go !
Does anyone have any pointers ?
If it helps I am using soap client jar - wsclient_extended.jar
To sum up : soap client running in Jetty with Open JDK 1.8 .
Thanks
java web-services soap soap-client
java web-services soap soap-client
asked Nov 10 at 1:35
akila
1052212
1052212
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53235282%2fhow-do-i-timeout-client-side-call-to-a-soap-webservice%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown