This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a commit to branch master
in repository

The following commit(s) were added to refs/heads/master by this push:
     new e7e2dc4  Added ReadMe file
     new 05a573b  Merge pull request #391 from mayens/TOMEE-2402
e7e2dc4 is described below

commit e7e2dc4cf2aecbd7dcba6ae4ac3905af7b72508c
Author: mayens <>
AuthorDate: Fri Feb 8 22:40:24 2019 +0100

    Added ReadMe file
 .../README.adoc                                    | 87 ++++++++++++++++++++++
 1 file changed, 87 insertions(+)

diff --git a/examples/webservice-ws-with-resources-config/README.adoc 
new file mode 100644
index 0000000..c60310c
--- /dev/null
+++ b/examples/webservice-ws-with-resources-config/README.adoc
@@ -0,0 +1,87 @@
+= Webservice JAX-WS - Resources config
+:index-group: Webservice
+:jbake-type: page
+:jbake-status: published
+TomEE relies on Apache CXF for JAX-RS (RESTful Services) and JAX-WS (Web 
Services). This is an example of how to develop  EJB webservices thanks to CXF 
+== openejb-jar.xml Configuration
+You can use 
([openejb-jar.xml]) to 
configure your webservice.
+CXF API is reusable but you can also configure the interceptors through 
`openejb-jar.xml`(located in WEB-INF).
+As a quick reminder the configuration `openejb-jar.xml` looks like the 
following one for an EJB:
+<openejb-jar xmlns="";>
+  <ejb-deployment ejb-name="CalculatorBean"> <!-- configure the bean, values 
are in resources.xml -->
+    <properties>
+ = wss4j
+    </properties>
+  </ejb-deployment>
+For a Pojo webservice it is the same but using pojo-deployment instead of 
+Then once you selected your prefix and know where to write the config just use 
the following entries:
+* *properties*: server factory properties
+* *features*: CXF features
+* *in-interceptors*: CXF in interceptors
+* *out-interceptors*: CXF out interceptors
+* *in-fault-interceptors*: CXF in interceptors for fault handling
+* *out-fault-interceptors*: CXF out interceptors for fault handling
+* *databinding*: server databinding
+* *providers (only for JAX-RS endpoint)*: list of JAX-RS providers
+* *skip-provider-scanning (only for JAX-RS)*: is provider scanning on or not 
(default true)
+For features and interceptors the rule is the same: value is a list comma 
separated. Each value of the list is either a qualified class name or an id of 
a service in resources.xml.
+== Sample for JAX-WS
+To configure WSS4J on the EJB `CalculatorBean` for instance add in 
+  <!-- the interceptors -->
+  <Service id="wss4j1" 
+    action = UsernameToken
+    passwordType = PasswordText
+    passwordCallbackClass =
+  </Service>
+== passwordCallbackClass
+`passwordCallbackClass` is one of property of `WSS4JInInterceptorFactory` and 
his value is the class `PasswordCallbackHandler`.
+`PasswordCallbackHandler` use `org.apache.wss4j.common.ext.WSPasswordCallback` 
to provide password callback mechanism.
+==== Example
+Full example can be found[here]:
+=== Run the tests
+Full project example can be found[here].
+It's a maven project, and all the tests can be executed by running `mvn clean 
test` command.
+    mvn clean test
+[INFO] Results:
+[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

Reply via email to