SOAPProcessor problems with HTTP-Gateway?
kimba74 Jul 24, 2010 9:13 AMHi everyone,
I know it is a very common question discussed in this forum and others but I haven't found a solution to it yet. Here is the problem I'm facing and my approach of how I tried to solve it:
Problem:
I want to expose my ESB Service via Web Service so that other applications can consume it directly by making a WS call. When starting with this I was hoping I could just expose a WSDL through my listeners but aparently JBoss doesn't have any means of exposing a pre-existing WSDL as contract. So here is what I did.
Approach:
I created a JSR-181 Web Service as a shell to be the handler for the incoming SOAP request. Then I configured my action-pipeline to have a SOAPProcessor using this previously created Web Service and expose it's WSDL as contract. Next I configured a http-gateway as listener so my Web Service is listening on the default HTTP port(s) exposed by the Web Server. Everything compiled, built and deployed well but when I looked into the Contracts application the http-gateway doesn't seem to be recognized as an endpoint of my service and therefore also no contract gets published. The endpoint (under: http://<host>[:<port>]/<.esb>/http/<servercat>/<servername> seems to handle my SOAP requests correctly but the WSDL could not be found. If I try using the same URL with '?wsdl' at the end I only get a response that says <definitions/>.
However when I use the JBR listener with the HTTP protocol instead of the HTTP-Gateway it seems to be working fine. The only problem why I can't use JBR is because I need to run my as Web Service exposed ESB Services through the HTTP(S) ports used by the server.
What am I missing or doing wrong??
Source (jboss-esb.xml):
... <service category="MyCat" name="MyWSEP" description="" invmScope="GLOBAL"> <listeners> <http-gateway name="HTTPConsumer"/> </listeners> <actions> <action name="print_message_1" class="mystuff.PrintMessageAction"/> <action name="process_ws_call" class="org.jboss.soa.esb.actions.soap.SOAPProcessor"> <property name="jbossws-endpoint" value="jumconsumer"/> </action> <action name="print_message_2" class="mystuff.PrintMessageAction"/> </actions> </service> ...
My Environment:
- JBossAS 4.2.3
- JBossESB 4.8
- Ubuntu 10.4
- JDK 1.6.0_20
Can anybody help me??
--Kimba