Service works in Tomcat doesn´t work on Servicemix - web-services

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.

Related

Soap message name space issue on tomcat server

Hi I have a problem for quite some time that I can not solve. When I run my application on STS spring with spring run boot command, everything works fine. But if I try to deploy application on tomcat, everything works except the addition of a namespace to a soap message that reject the call to the soap service.
I insert below correct soap message on spring boot and follow the wrong message on tomcat.
SPING BOOT SUCCESS SOAP MSG:
<RetrieveDocumentSetRequest
xmlns="urn:ihe:iti:xds-b:2007"
xmlns:ns2="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"
xmlns:ns3="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
xmlns:ns4="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0"
xmlns:ns5="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0">
<DocumentRequest>
<RepositoryUniqueId>2.16.840.1.113883.2.9.2.999.4.5.113883</RepositoryUniqueId>
<DocumentUniqueId>2.16.840.1.113883.2.9.2.999.4.4^123456</DocumentUniqueId></DocumentRequest>
</RetrieveDocumentSetRequest>
TOMCAT 7 FAIL SOAP MSG:
<ns6:RetrieveDocumentSetRequest
xmlns:ns2="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"
xmlns:ns3="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
xmlns:ns4="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0"
xmlns:ns5="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0"
xmlns:ns6="urn:ihe:iti:xds-b:2007">
<DocumentRequest><RepositoryUniqueId>2.16.840.1.113883.2.9.2.999.4.5.113883</RepositoryUniqueId>
<DocumentUniqueId>2.16.840.1.113883.2.9.2.999.4.4^123456</DocumentUniqueId>
</DocumentRequest>
</ns6:RetrieveDocumentSetRequest>
As you can see messages are almost same except for n6 namespace. I can't understand why and if there is a wrong Jar on tomcat respect to springboot sever.
I have solved my problem.
The generator classes specified in the pom.xml of spring boot, using JAXB to generate classes from the interface WSDL, while the Jar that use and release of tomcat, using jax-ws library for generations of classes starting from WSDL.
The first library, JAXB, insert the annotation regarding the namespace, both on classes properties and inner classes of the generated classes. All this does not happen when using jax-ws, but only for some classes. This thing even if at first sight irrelevant, creates an answer rejected by the validator server side, the SOAP request sent.
I hope it will help someone in the future.

publish cxf webservice in localhost

used cxf framework for webservice. It works.
however the webservice is always published in public ip and I see followin in colsole
Setting the server's publish address to be soap.udp://239.255.255.250:3702
how to change that to localhost.
appreciate any help.
Thanks,
raen
That's the WS-Discovery service that runs along side your other services to allow for discovery of the services on the network. See http://cxf.apache.org/docs/ws-discovery.html
You can remove the WS-Discovery jars from the classpath and this would be disabled.

More than 1500 proxyes with JMS transport, WSO2 ESB 4.0.3 and Activemq

Is there developers who have been succeeded deployed to wso2 esb more than 1500 proxy services
with jms transport without any problems?
Criteria:
deploying process must be very fast
wso2esb use activemq client libraries and activemq brocker
someone please help me!
This should be possible. There is no limitation on the number of proxies that an ESB can have.
You may try this with using the hot deployment capabilities of WSO2 ESB.
You may create a bunch of proxy services and place them inside:
/repository/deployment/server/synapse-config/default/proxy-services
Then the proxies with get automatically deployed..
eg:
proxy_1.xml, proxy_2.xml, proxy_3.xml,..., proxy_1500.xml etc.
However, having this number of proxy services, gives some indication of some anti-pattern in your SOA. Please review whether you need this much of proxy services in your solution architecture.

Forwarding web services through JMS

I'm trying to figure out how to forward web service requests from the web server to a remote application server through jms.
In my architecture there are web services client which communicate with some web server (Tomcat) which needs to forward the request to be executed on a remote application server and at the end get the result and push it back to the web service client.
Something like:
Web Service Client <-> HTTP <-> Tomcat <-> JMS <-> Application Server.
I want to use jax-ws so my methods will be called automatically in the application server.
Although I've expected this will be common approach, I didn't find any examples.
I would appreciate if someone can provide some links or tips on how such a configuration can be built.
Currently I'm using Metro but any other solution is valid as well.
Another aspect which I'm interested in, is whether I can use the fast-infoset over JMS to increase performance.
Thanks in advance,
Avner
you can try wso2MB as a JMS provider ...Check following links, would be useful
[1]http://wso2.org/library/message-broker
[2]http://pzf.fremantle.org/2011/04/introduction-to-wso2-message-broker_05.html
One option to solve it is using Apache Camel.
Then you can configure such a thing with an XML configuration file.

Developing a secure WS client for consuming a Axis2 Web Service with Rampart WS Security module?

I have a Axis2 web service secured using Rampart. I do want to develop secure clients for it, preferably JAX-WS based. I tried a lot of tutorials but they are so closed tied with each other, like including Axis2 libraries in the client side. The client should be fairly independent of the WS service framework, as the service can be consumed by .NET based clients or even PHP based clients.
Thanks in advance...
As I understand it, you would want to be able to feed the policy defined for your Rampart secured web service into your JAX-WS client.
That ought to be doable. As you say-- the idea is to be able to execute different client and server technologies, standardized around WSDLs...
We're only just getting into this - so I don't have any hands on knowledge for you.
But I would think you should be able to copy the policy info for your rampart on the server in the services.xml file and put it in your client.
This seemed pretty helpful:
https://metro.dev.java.net/guide/
Sections 12 and 18 in particular.