default timeout for JAX-WS client - web-services

We are calling web service for which using cxf-codegen-plugin for code generation from WSDL and have configured JAX-WS client in Spring xml as follows:
<jaxws:client id="abcApiInterface" serviceClass="abc.api.AbcApi" address="${xyz.abcApi.endpoint}" />
And we have our webservice interface generated by Apache CXF 3.0.3. We are seeing timed-out when calling that service, we have not specified any timeout on client side so just want to know what's the default value for timeout for JAX-WS client?

Default value is 30 seconds for connection timeout and 60 seconds for receive timeout.
See: http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport(includingSSLsupport)-Theclientelement

Related

How to change soap context's mode in Gsoap when deploying a service using mod_gsoap?

So I am deploying a web service developed using gsoap using mod_gsoap. I wanted to set SOAP_IO_KEEPALIVE and SOAP_IO_CHUNK modes of the soap context object to accept chunked requests. How do I achieve this?
Or is there any other way to accept chunked requests? Right now the server responds as soon as it receives the first chunk without waiting for the rest.
The documentation says:
Warning
Do not use any of the SOAP_IO flags to initialize or set the
context, such as SOAP_IO_KEEPALIVE and SOAP_IO_CHUNK.
The Apache server controls the connection settings and HTTP payload parameters to send and receive HTTP requests. Data is received with ap_get_client_block, which de-chunks the content when chunked.

Camel Web service message consumer

I am trying to build an xml spring-based camel web service consumer using apache cxf endpoint similar to the example here...
<cxf:cxfEndpoint id="soapMessageEndpoint"
serviceClass="org.apache.camel.example.cxf.provider.GreeterProvider"
address="http://localhost:9000/GreeterContext/SOAPMessageService"
wsdlURL="wsdl/hello_world.wsdl"
endpointName="s:SoapOverHttpRouter"
serviceName="s:SOAPService"
xmlns:s="http://apache.org/hello_world_soap_http"/>
<camelContext id="test_context" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="cxf:bean:soapMessageEndpoint"/>
<to uri="bean:testBean?method=processSOAP"/>
</route>
</camelContext>
The web service already exists, but I'm not interested in setting up and exposing a client like in the example. Under normal operation clients would subscribe to the web service and the web service in turn publishes out events to the subscribers periodically.
I have a simulator that generates the web service messages automatically already and I just want to consume the web service message in my camel route and log it, so I don't need to process it or do something with the messages.
I just want my endpoint to act as a listener/sniffer for these messages as they are published therefore I don't really need a service class.
What's the easiest or most efficient way to set this up in camel? Maybe cxf is the wrong component to be leveraging here. The web service is using SOAP.

How to call web service Asynchronously in Tibco BW?

I am able to call web service synchronously in tibco BW using SOAP Request Reply but unable to call asynchronously.
Can anyone please help me how to call web service asynchronously in tibco.
Asynchronous web service calls is accomplished using SOAP over JMS. A SOAP/JMS binding must be declared in the WSDL and the web service provider must be listening on the associated queue or topic.
You can use the SOAP Request Reply activity to call a web service over JMS.
It depends on the transport, if you use a HTTP transport you must always wait for a response. Waiting for a HTTP response doesn't mean you have to execute the functionality at that moment, if you are able to save the request at server side you may response with just a 200, the response could event be blank. If you use JMS transport, it will provide loosly coupling in time, that means, the point in time when an action is requested does not have to be the same as when the server process the action. If you plan to use the service under heavy load, jms transport is preferred as it is non-blocking, and use of hardware resources is more predictible.
Webservices may define in the wsdls http transport, jms transport or even both at the same time.
If the WSDL does not have response message, then the SoapRequestReply will not wait for response and will work asynchronously.
In Asynchronously communication client or request input will do it's work without waiting for response instantaneously after sending the message.
We can use SOAP over JMS to accomplish Asynchronous web service calls. A SOAP/JMS binding must be stated in the WSDL and the web service provider must be listening on the related queue or topic. We can utilize the SOAP Request Reply activity to call a web service over JMS.
If you utilizing JMS transport, it will give loosely coupling in time, that means, the point in time when an action is requested does not have to be the same as when the server process the action. If you are planning to utilize the service under heavy load, JMS transport is preferred as it is non-blocking, and use of hardware resources is more predictable.

Why does my WebService client request the WSDL from the server when consuming the service?

I have a WS client deployed in Websphere container under linux that successfully calls a WebService published by a different application (I used CXF implementation). When I try the same client in a Tomcat container under Windows it behaves differently: wireshark captures reveal:
before invoking the webservice call my client requests the WSDL from the server at URL A
the server redirects the client to a different URL B
the client gets the WSDL from URL B.
Since the WSDL has a reference to an XSD file, the client requests the XSD from URL B assuming that the redirection also applies to the XSD file
The server responds with a not found error and the communication fails
My questions are:
A) How can it be that the client assumes that the XSD is at URL B, but it is actually at URL A?
B) Why is it that the same client does not ask for the WSDL when running on Websphere under Linux and it does ask for it when running on Tomcat under Windows? Is there any way to prevent it from requesting the WSDL an thus avoid the redirection issue?
Thanks a lot in advance!!!

Java EE: Communication between few servers

I need a system in which I can send SOAP request to 1 server from a few and then if server has this service it calls and returns value to client.
If not it passes the request to next server on his "list of neighbors". Request is passed until some server has needed service (or not, so we return error result).
My question is. What will be the best way to communicate between those servers. SOAP? Message Driven?
It will be great If it could work without central server. If I will use MD, should not all servers use common JMS on some central server?
Is it possible to send MD to specific server on given address?
Take a look at Apache ActiveMQ or Apache Camel or Spring Remoting