JBoss development,
A new message was posted in the thread "Allow Service execution from
HttpGatewayServlet with ?wsdl requests when there is no ContractProvider available":
http://community.jboss.org/message/528013#528013
Author : David Ward
Profile :
http://community.jboss.org/people/dward
Message:
--------------------------------------------------------------
Please first read this JBoss ESB User Forum thread first:
http://community.jboss.org/thread/148046
Right now, the SOAPProxyWsdlContractPublisher is the only Publisher that implements
ContractProvider. When an action pipeline contains the SOAPProxy, then, the
HttpGatewayServlet knows to execute it to get the WSDL contract from a
http://.../http/category/service?wsdl URL. This is correct behavior.
Now, say that a developer has his/her own actions +not+ including the SOAPProxy, but still
want to expose his/her own WSDL for it, as in the aforementioned user forum thread... If
a developer wants to, there is nothing stopping him/her from creating his/her own custom
action that has a Publish annotation defining a custom Publisher implementation that
extends, for example, DefaultContractReferencePublisher and implements the
ContractProvider interface. Then not only can the developer serve up this/her own WSDL,
but that WSDL would also dynamically be available via the contract JSP application (
http://.../contract/ ). But that's a bit of work...
However, if the developer doesn't care about exposing the WSDL in the contract JSP
application, but still wants the HttpGatewayServlet to expose their own WSDL, but
DOESN'T want to go through the work mentioned above, it would be nice to provide that
functionality. To do that, a very simple change to HttpGatewayServlet would have to be
made:
Right now, the HttpGatewayServlet looks for query strings of ?wsdl (or ?WSDL). If found,
it immediately short-circuits and exposes the WSDL contract it found using the
ContractProvider. +*If there was no ContractProvider, an empty <definitions/> WSDL
is returned.*+ The easy change would be that once the servlet knows it's a WSDL
request, if there is a ContractProvider, spit out the WSDL it provides, but if there is NO
ContractProvider don't short-circuit, instead go ahead and execute ServiceInvoker.
Then, in a custom action at the beginning of the pipeline, the developer could use
HttpRequest requestInfo = HttpRequest.getRequest(message); to inspect the message, see
that it was a WSDL request, and spit out the custom WSDL, otherwise, do something else.
Thoughts?
--------------------------------------------------------------
To reply to this message visit the message page:
http://community.jboss.org/message/528013#528013