Im new to webservices.
Im sending a webservice request to cxf endpoint through a camel route marked "transacted" and the response is got.
In the same transaction route, next statement throws an exception so that my Exception handler rollsback the transaction.
I can find other things in my transaction rolledback, except my webservice request response since its already commited.
Is there a way of rolling back commited webservice request?
Or is there a way of sending a rollback last webservice request ??
Please help, Stuck for 3 days on same...
Just make another webservice to undone everything done by the first webservice and call it in .onException() routine
No there is no such thing as transactions for web services. You can find information on wikipedia such as http://en.wikipedia.org/wiki/Compensating_transaction
Related
I encounter problem with Apache Camel.
I did two SOAP WebServices. First (i will call it A ) is a standard Proxy which calling WebServices B which do all job (getting data from Datebase, parsing response etc.).
It works very well as i expected. Im sending data to the A by SoapUI, A is sending request to B, B is getting data from database, parsing response, sending it to A, A is sending response to Soap UI. Perfect... until everything is working on http.
When i turn on ssl on JbossFuse where WebService A is deployed i'am able to send request by SoapUI to Webservice A, A is sending request to B, B is sending response, A is getting responce ( i see it in log ), and ... nothing more happen. SoapUI getting SocketTimeoutException: Read timed out.
It's look like WebService A doesn't know where should send response. Nothing especially happened in logs, 0 exceptions. Probably i forgot about one thing and i don't know what.
Jboss which i use is old one 6.1.0.redhat-379.
Have someone any ideas what can i do/what can i check which help me solve my problem?
It's not solution, but it's workaround of my problem.
I just did simple Ws Client in Webservice A which connect to Webservice B. Then instead of calling endpoint of WS B from blueprint, i call Bean with WS Client.
Im new to Apache camel - groovy, maven projects.
I am trying to create a route like this
from("file://E://Target//JVNumber")
.transacted("PROPAGATION_REQUIRED")
.convertBodyTo(String.class)
.setHeader("operationName",simple("updateJVNumber"))
.to("cxf:bean:webservice-ws?dataFormat=PAYLOAD")
.markRollbackOnly()
.log('${body}');
The Webservice request succeeds and sends the response. But since the whole route contains a rollback call, I want to rollback the cxf request lastly sent also. Could How someone help me to achieve this?
The rollback is only for the transaction status, and the transaction manager can only rollback resources which native supports transaction. Such resources are typically JMS and JDBC resources. You cannot rollback a web service call.
The concept of Asynchronous Web Service is a web service where the client does not have to wait to receive a response from the server. in AJAX this is implemented by having a callback function to process the response. So the server indeed still sends the response to the client.
Is it possible to have an Asynchronous Web Service without response? Is there any platform that provide this?
Thank you.
I have done asynch web services in the past. They are very useful. YOu do not need a detailed response but you at least need an HTTP response, like 200 OK. If the client that makes the request provides some sort of ID or key for that request, then the client can use the same ID/key to later on query for the result/response of the request.
As far as frameworks that provide this, I do not know of any. In the past I would just have a shared memory store, like Memcache, to store the state and result of the request. As long as the state is shared across all nodes, any node can then process the call back request.
EDIT: Providing a key in the request can be done in either REST or SOAP environment. HTTP provides multiple places where a key can be communicated.
GET query param (REST)
HTTP header (SOAP/REST)
Added to the message body of a POST request. This can be done through two ways.
param in the message body (REST)
variable or attribute in serialized object (SOAP/REST))
I am calling the third party web service using the SOAP request in my java application. SOAP request is having 2000 patient records to get their updates. While calling to the web service I am getting runtime uncaught exception net.sf.saxon.om.NamePool$NamePoolLimitException: NamePool limit exceeded: max 1023 prefixes per URI. An internal error occurred in the ESB. I want to know 1. Is this client side issue or server side. 2. If this is client side issue how to resolve this problem. Please suggest ASAP as I am facing this issue in my production environment.Thanks
How to create Asynchronous web service in java using eclipse??
I have created a normal web service in Java using eclipse. I am calling an external jar, which is taking long time to complete the process. By that time my web service is getting an exception throwing timed out exception.
In order to over come the problem, decided to create asynchronous web service, but couldn,t find proper details. Please help.
no one responded to the question...
Found tentative solution for this....in order to over come the timed out exception, as soon as the request is received by the web service immediate response a unique id is sent acknowledging the request. A thread is initiated inside the web service for the corresponding request, which will take care of the process and stores the response in a table with a unique id for the request.