Cross origin resource sharing in jboss - jboss

I have a web service in ejb project. How to add a filtre cors (cross origin resource sharing) in JBoss server?

Related

What's the differences between JBoss Web Server and JBoss EAP for running Redhat Decision Manager?

I'm researching how to deploy RedHat Decision Manger right now, there are two options for running enviroment, JBoss Web Server and JBoss EAP. But I'm new for JBoss and don't know what's the differences between them and which one is more suitable with Decision Manager for production enviroment?
JBoss web server is a server used to deploy web applications, whereas EAP is an application server which can be used also to deploy Java EE compatible applications. EAP gives many more features like messaging, RMI, EJB etc. apart from features provided by Web server.
Which one is better will depend on your use case.
To get more details about the difference between web server and application server refer below post
Difference between a Web server and application server

How to Develop CXF webService deploy on Wildfly 10.0 server in Eclipse-maven project

Apache CXF library (cxf-api-3.2.0.jar) detected in ws endpoint deployment; either provide a proper deployment replacing embedded libraries with container module dependencies or disable the webservices subsystem for the current deployment adding a proper jboss-deployment-structure.xml
Wildfly has it's own CXF integration therefore your deployment should not contain CXF libraries. If you want to use this, you'll have to disable Wildfly's CXF stuff as advised in the error message.

OSGi bundles as SOAP web services in a plugin architecture

I would like to expose OSGi bundles as SOAP web services or in other words publish web service endpoints which are provided by OSGi bundles.
The architectural model/idea is that there is a host web application which is a normal war file deployed on JBoss (5.1.0 GA) offering a SOAP web service interface (JAX-WS).This host application starts the OSGi framework embedded (via ServletContextListener - currently Equinox) and loads a number of OSGi bundles which function as plugins.
The plugin bundles have a dependency to the host application as part of the request processing is delegated to them via internally defined interfaces.At the same time the plugin bundles should also be able to contribute an own public SOAP web service interface (endpoint implementations and the respective WSDL files to be published and made available by the application server).
The first approach we followed was that the host web application deploys a dispatcher/proxy servlet which delegates the processing to the relevant endpoints provided by the OSGi bundles.
There is the servlet bridge solution in OSGi/Equinox (BridgeServlet/HTTPServiceServlet) which enables the programmatic registration of servlets (for ex. in BundleActivators of the plugin bundles) using the HTTP Service specification.
The problem is that I have SOAP-based web service endpoints and would need to be able to wrap them in a javax.servlet.Servlet implementation.
That's usually an interna of the WS stack implementations of Java EE 5 servers which follow the servlet–based web services approach (endpoints defined as servlets in web.xml) and internally use to install native endpoint servlets for web service endpoints.
I did not find such a public endpoint servlet implementation which could be registered with the HTTP Service (maybe something similar like com.sun.jersey.spi.container.servlet.ServletContainer which can be used to publish REST-based services for JAX-RS applications in OSGi)
I am a little surprised that I did not find as much about registering SOAP-based WS endpoints with the OSGi HTTP Service or may be I do not see the obvious.
I have found something similar, JAX-WS-Commons/Spring (spring support for configuring JAX-WS, http://jax-ws-commons.java.net/spring/), which internally uses the class WSServletDelegate of the JAX-WS RI (metro) to process web requests for the endpoints.
But I am not sure about it, it seems kind of deprecated and I need to provide the metro WS stack jars to JBoss (or in the war file) in order to make it work on JBoss 5.1.0 GA.
Another approach seems to be distributed OSGI, which allows to publish OSGi services for remote access.
However, I could not find clear information about how to provide these services as web services on JBoss.
Other realisation aspects are:
we are bound to JBoss 5.1.0 GA and changes to the JBoss configuration should be as minimal as possible (in order to have minimal constraints to the setup of our customers)
All web services are developed contract-first which means that the original WSDL's are to be used by the providing container.
the plugin components should be as simple as possible concerning dependencies or technologies (in order to have minimal requirements to the skill of the plugin developers)
we use Spring 3 and Gemini Blueprint.
Finally, there are some ambiguities and unclear aspects and unfortunately I could not find reports on projects with similar requirements.
So, I would be eager to hear some suggestions or comments of the experts.
Maybe there are options I don't see, or maybe somebody has realised similar projects before and likes to share experiences.
Thanks a lot.
I am not an expert but another approach I have seen is to put the whole app server with an application into the OSGi container. It is an option in Sling launchpad http://sling.apache.org/documentation/the-sling-engine/architecture.html#launchpad
HTH

Invoking OFBIZ web service using Apache CXF or JAX-WS

I have an OFBiz SOAP-based web service that is exposed (can accept requests) and has a WSDL code generated and a WSDL URL. My Question is, is there a way to consume this web service using a CXF Java client or JAX-WS client?
Overall, i want to be able to add the client in the Mule esb consigeration as part of a Mule FLOW. I can invoke the OFBiz web service using AXIS2, but Mule ESB does not seem to support AXIS2, which brings me to another question - Is there a way i can configure AXIS2 web service client in Mule ESB?
Thanks in Advance
Follow the WSDL-first approach from the Consuming Web Services user guide.
This involves:
generating a CXF client using the WSDL to Java tool from CXF or the Maven plugin,
configuring the client as an outbound endpoint.
And leads to a Mule configuration that looks like:
<cxf:jaxws-client
clientClass="org.apache.hello_world_soap_http.SOAPService"
wsdlPort="SoapPort"
wsdlLocation="classpath:/wsdl/hello_world.wsdl"
operation="greetMe"/>
<outbound-endpoint address="http://localhost:63081/services/greeter"/>

Web Services in Eclipse

I have many projects setup in eclipse. One of these projects is a Web Service Client Project. When I start tomcat using the Start Tomcat plugin in eclipse Juno, my Web Service project is not running. I get a 404 http error. However, using the Server tab in eclipse (on creating my web services project, a Server project is also created), if I start Server, my Web Service Projects runs corectly.
I am of the view therefore that Web Services projects must be started using the Server->Start option and not Start Tomcat using the plugin.
I am new to Web services. Can anyone share some information on this, and how perhaps I can get the Web Services project to run using the Tomcat plugin.
Regards
Fyzal
did you add the Web Service project on the Server ? Right Click on Webservice Project and Run on Server OR Right Click on the Server and "Add or Remove" Resource