Asynchronous processing not supported on Servlet 2.x container jersy - web-services

I am doing an example on Asynchronous processing using jersy restful web services and getting the following
Asynchronous processing not supported on Servlet 2.x container
I am running on Tomcat 7 server.I kept servlet-api-3.0 jar file in tomcat/lib file .But still i am getting the error.What might be the reason for the exception.
Thanks in advance...

Related

Using wso2dss as AMQP consumer

I am using RabbitMq as my message queue and I have to use AMQP protocol in my application. I am publishing messages to my queues in RabbitMq and consume the messages using nodejs client. As an enhancement I want to omit the nodejs consumer client and replace it with WSO2 Data Service Server, since currently the nodejs client calls the services hosted on wso2-dss, after fetching them from queue.
I searched a lot and I didn't find proper way to do this without using wso2-esb. I may be able to solve my problem with qpid client, but I really need help.
Please go through https://docs.wso2.com/display/ESB490/RabbitMQ+AMQP+Transport and http://itsmaheeka.blogspot.com/2015/09/esb-490-enhanced-rabbitmq-support.html to get an idea about RabbitMq transport.ESB provides inbuilt RabbitMq transport But for DSS you may have to install required features.
You can directly use the DSS JMS transport[1] to achieve this, because RabbitMQ support JMS.
[1] https://docs.wso2.com/display/DSS350/JMS+Transport

Consuming webservice from application deployed on websphere

I have been trying to consume a webservice(WS-JAX) in java.
I have generated JAVA artifacts using wsimport tool. I constructed a standalone test class(on eclipse) and was able to call the webservice successfully.
But when I use the same actifacts and code in my application(deployed on websphere 8) I get below exception
`
[2/5/16 10:54:13:531 MST] FFDC Exception:java.lang.StackOverflowError SourceId:com.ibm.ejs.container.RemoteExceptionMappingStrategy.setUncheckedException ProbeId:200 Reporter:com.ibm.ejs.container.RemoteExceptionMappingStrategy#625fad44
java.lang.StackOverflowError
at java.util.HashMap.<init>(HashMap.java:367)
at com.ibm.wsdl.DefinitionImpl.getAllServices(DefinitionImpl.java:859)
at com.ibm.wsdl.DefinitionImpl.getAllServices(DefinitionImpl.java:873)
at org.apache.axis2.wsdl.util.WSDLWrapperReloadImpl.getAllServices(WSDLWrapperReloadImpl.java:903)
at org.apache.axis2.wsdl.util.WSDLDefinitionWrapper.getAllServices(WSDLDefinitionWrapper.java:478)
at com.ibm.wspolicy.wsdl.internal.subject.DefinitionSubjectProcessor.<init>(DefinitionSubjectProcessor.java:60)
at com.ibm.wspolicy.wsdl.internal.WSDLProcessorImpl.buildWSDLPolicyModel(WSDLProcessorImpl.java:79)
at com.ibm.ws.wspolicy.wsdl.WSDLProcessor.<init>(WSDLProcessor.java:137)
at com.ibm.ws.wspolicy.policyset.WSDLHelperImpl.processWSPolicyInPackagedWSDL(WSDLHelperImpl.java:80)
at com.ibm.ws.websvcs.deployment.WASAxis2PolicySetConfigurator.associatePolicySets(WASAxis2PolicySetConfigurator.java:385)
at com.ibm.ws.websvcs.client.WSClientConfigurationFactory.completeAxis2Configuration(WSClientConfigurationFactory.java:459)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:286)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:223)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.updateEndpointDescription(ServiceDescriptionImpl.java:534)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.updateEndpoint(DescriptionFactoryImpl.java:382)
at org.apache.axis2.jaxws.description.DescriptionFactory.updateEndpoint(DescriptionFactory.java:180)
at org.apache.axis2.jaxws.spi.ServiceDelegate.getPort(ServiceDelegate.java:597)
at org.apache.axis2.jaxws.spi.ServiceDelegate.getPort(ServiceDelegate.java:513)
at javax.xml.ws.Service.getPort(Service.java:99)`
Could someone shed some light on why the webservice call is failing when it is originating inside a application server?
Note: I have installed proper server certificates in the application server truststore.
So i found the solution, I had 2 different JRE's installed on my computer. One was from Oracle and the other was the jre bundled with websphere application server. For a application to be deployed on Websphere we have to generate the java artifacts using the IBM jre thats bundled with Websphere.
Thanks,
Harsha

Simple sender/reciever HL7 messaging service using WSO2

I'm looking for an open-source ESB solution on implementing a Messaging service based on the HL7 protocol.
The best solution may be WSO2, thus I've just downloaded and installed the last version (4.8.0).
After the installation and configuration of the HL7 transport through the Axis repository, I've created a Proxy Services according to the documentation (Creating an HL7 Proxy Service).
How can I, at now, test if the service is correctly implemented, by creating a simple sender/reciever?
Note: I found a tutorial, but on launching the command "ant hl7acceptor" I get the following error: Target "hl7acceptor" does not exist in project "samples".
How can I, at now, test if the service is correctly implemented, by
creating a simple sender/reciever?
Yes you can write your simple client and server to test this.
For client you can use Hapi test tool to send messages. For server, write a simple server code in java. Check this sample code

Support both SOAP 1.1 and 1.2 by same JAX-WS service

I have a JAX-WS #WebServiceProvider and would like to support both SOAP 1.1 and 1.2 protocols. I handle creation of response SOAPMessage of proper version manually. I have WSDL describing bindings for both, 1.1 and 1.2 protocol.
But the service endpoint is only able to support either version at a time.
I would appreciate either a solution or a pointer to a piece of doc where it's stated that it's impossible.
P.S. i'm using WebSphere 7 app server, which is bundled with JAX-WS 2.0 (which is Axis2 based)
I experienced the same problem. The main issue for me is that it is not possible to compile the class with both #BindingType(value = SOAPBinding.SOAP12HTTP_BINDING) and #BindingType(value = SOAPBinding.SOAP11HTTP_BINDING). Have a look to this http://www-01.ibm.com/support/docview.wss?uid=swg1PK96819, and this http://www-01.ibm.com/support/docview.wss?uid=swg1PK83482, it should be possible to set #BindingType(SOAPBinding.SOAP_HTTP_BINDING) to have the both SOAP version to be delivered. Unfortunaltely, i did not compile also with the Websphere runtime environment, what i don't understand.
I recently dealt with a service deployment issue related to trying to simultaneously enable both SOAP 1.1 and 1.2 for a service (on WebSphere v7.0). Unfortunately, I don't think that your question gives enough information to provide a specific solution.
It IS possible to support both bindings at the same time, but there are some considerations. I think the main thing is that the server has to be able to listen on separate endpoints (URLs) for each binding. As near as I can tell, this requires appropriate entries in your web.xml and/or your webservices.xml configuraiton files.
For an annotation based service, these configuration entries are theoretically optional; but when you try to enable multiple bindings for a given service without the "optional" configuration entries, the WAS Axis2 extension fails with various possible exceptions.
If you could provide more detail about your wsdl, and the relevant portions of web.xml and webservices.xml (if any), as well as any error messages reported in the WAS log(s) during deployment and application startup, then I could probably give a better answer.

Service works in Tomcat doesn´t work on Servicemix

I´ve deployed a service into Tomcat 6 and into Servicemix 4.3
I´ve used soapUI 4 to send a request to the servers, from tomcat i get an answer, from servicemix i don´t. Both requests are differente Tomcat port 8080, servicemix port 8181.
The service is SOAP web-service in a .war file.
Has anyone done this type of migration? Do i need libraries in servicemix from tomcat?
the issue is likely your packaging/installation of your war and/or missing OSGi bundles...
see this blog post for info on using Servicemix as a web server...
essentially something like this...
osgi:install -s war:file:/tmp/sample.war?Webapp-Context=sample
then you should be able to go to http://localhost:8080/sample
also, this guide should help explain the OSGi war commands a bit...
Sorry, I'm confused.
Tomcat is a servlet/JSP engine, built to deploy servlets, JSPs and web services (given the proper library support).
ServiceMix is an ESB that can do routing to servlets, transforming of messages, guarantee delivery, workflow, and other services. It's supposed to decouple producers of messages from consumers.
I don't see ServiceMix as an alternative deployment platform for servlets and JSPs. I see them as complementary, not one replacing the other.