http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/webservice-holder.adoc
----------------------------------------------------------------------
diff --git a/src/main/jbake/content/examples/webservice-holder.adoc 
b/src/main/jbake/content/examples/webservice-holder.adoc
new file mode 100755
index 0000000..bb4a5f4
--- /dev/null
+++ b/src/main/jbake/content/examples/webservice-holder.adoc
@@ -0,0 +1,201 @@
+= @WebService OUT params via javax.xml.ws.Holder
+:jbake-date: 2016-09-06
+:jbake-type: page
+:jbake-tomeepdf:
+:jbake-status: published
+
+Example webservice-holder can be browsed at 
https://github.com/apache/tomee/tree/master/examples/webservice-holder
+
+
+With SOAP it is possible to return multiple values in a single request.  This 
is impossible in Java as a method can only return one object.
+
+JAX-WS solves this problem with the concept of Holders.  A 
`javax.xml.ws.Holder` is a simple wrapper object that can be passed into the 
`@WebService` method as a parameter.  The application sets the value of the 
holder during the request and the server will send the value back as an OUT 
parameter.
+
+==  Using @WebParam and javax.xml.ws.Holder
+
+The `@WebParam` annotation allows us to declare the `sum` and `multiply` 
Holders as `WebParam.Mode.OUT` parameters.  As mentioned, these holders are 
simply empty buckets the application can fill in with data to have sent to the 
client.  The server will pass them in uninitialized.
+
+
+[source,java]
+----
+@Stateless
+@WebService(
+        portName = "CalculatorPort",
+        serviceName = "CalculatorService",
+        targetNamespace = "http://superbiz.org/wsdl";,
+        endpointInterface = "org.superbiz.ws.out.CalculatorWs")
+public class Calculator implements CalculatorWs {
+
+    public void sumAndMultiply(int a, int b,
+                               @WebParam(name = "sum", mode = 
WebParam.Mode.OUT) Holder<Integer> sum,
+                               @WebParam(name = "multiply", mode = 
WebParam.Mode.OUT) Holder<Integer> multiply) {
+        sum.value = a + b;
+        multiply.value = a * b;
+    }
+}
+----
+
+
+If the Holders were specified as `WebParam.Mode.INOUT` params, then the client 
could use them to send data and the application as well.  The `Holder` 
instances would then be initialized with the data from the client request.  The 
application could check the data before eventually overriting it with the 
response values.
+
+==  The WSDL
+
+The above JAX-WS `@WebService` component results in the folliwing WSDL that 
will be created automatically.  Note the `sumAndMultiplyResponse` complext type 
returns two elements.  These match the `@WebParam` declarations and our two 
`Holder<Integer>` params.
+
+
+[source,xml]
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
+                  name="CalculatorService"
+                  targetNamespace="http://superbiz.org/wsdl";
+                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
+                  xmlns:tns="http://superbiz.org/wsdl";
+                  xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
+  <wsdl:types>
+    <xsd:schema attributeFormDefault="unqualified" 
elementFormDefault="unqualified"
+                targetNamespace="http://superbiz.org/wsdl";
+                xmlns:tns="http://superbiz.org/wsdl";
+                xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
+      <xsd:element name="sumAndMultiply" type="tns:sumAndMultiply"/>
+      <xsd:complexType name="sumAndMultiply">
+        <xsd:sequence>
+          <xsd:element name="arg0" type="xsd:int"/>
+          <xsd:element name="arg1" type="xsd:int"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:element name="sumAndMultiplyResponse" 
type="tns:sumAndMultiplyResponse"/>
+      <xsd:complexType name="sumAndMultiplyResponse">
+        <xsd:sequence>
+          <xsd:element minOccurs="0" name="sum" type="xsd:int"/>
+          <xsd:element minOccurs="0" name="multiply" type="xsd:int"/>
+        </xsd:sequence>
+      </xsd:complexType>
+    </xsd:schema>
+  </wsdl:types>
+  <wsdl:message name="sumAndMultiplyResponse">
+    <wsdl:part element="tns:sumAndMultiplyResponse" name="parameters"/>
+  </wsdl:message>
+  <wsdl:message name="sumAndMultiply">
+    <wsdl:part element="tns:sumAndMultiply" name="parameters"/>
+  </wsdl:message>
+  <wsdl:portType name="CalculatorWs">
+    <wsdl:operation name="sumAndMultiply">
+      <wsdl:input message="tns:sumAndMultiply" name="sumAndMultiply"/>
+      <wsdl:output message="tns:sumAndMultiplyResponse" 
name="sumAndMultiplyResponse"/>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="CalculatorServiceSoapBinding" type="tns:CalculatorWs">
+    <soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
+    <wsdl:operation name="sumAndMultiply">
+      <soap:operation soapAction="" style="document"/>
+      <wsdl:input name="sumAndMultiply">
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output name="sumAndMultiplyResponse">
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="CalculatorService">
+    <wsdl:port binding="tns:CalculatorServiceSoapBinding" 
name="CalculatorPort">
+      <soap:address location="http://127.0.0.1:4204/Calculator?wsdl"/>
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>
+----
+
+
+==  Testing the OUT params
+
+Here we see a JAX-WS client executing the `sumAndMultiply` operation.  Two 
empty `Holder` instances are created and passed in as parameters.  The data 
from the `sumAndMultiplyResponse` is placed in the `Holder` instances and is 
then available to the client after the operation completes.
+
+The holders themselves are not actually sent in the request unless they are 
configured as INOUT params via WebParam.Mode.INOUT on `@WebParam`
+
+
+[source,java]
+----
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import javax.ejb.embeddable.EJBContainer;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Holder;
+import javax.xml.ws.Service;
+import java.net.URL;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+public class CalculatorTest {
+
+    @BeforeClass
+    public static void setUp() throws Exception {
+        Properties properties = new Properties();
+        properties.setProperty("openejb.embedded.remotable", "true");
+        //properties.setProperty("httpejbd.print", "true");
+        //properties.setProperty("httpejbd.indent.xml", "true");
+        EJBContainer.createEJBContainer(properties);
+    }
+
+    @Test
+    public void outParams() throws Exception {
+        final Service calculatorService = Service.create(
+                new URL("http://127.0.0.1:4204/Calculator?wsdl";),
+                new QName("http://superbiz.org/wsdl";, "CalculatorService"));
+
+        assertNotNull(calculatorService);
+
+        final CalculatorWs calculator = 
calculatorService.getPort(CalculatorWs.class);
+
+        final Holder<Integer> sum = new Holder<Integer>();
+        final Holder<Integer> multiply = new Holder<Integer>();
+
+        calculator.sumAndMultiply(4, 6, sum, multiply);
+
+        assertEquals(10, (int) sum.value);
+        assertEquals(24, (int) multiply.value);
+    }
+}
+----
+
+
+
+==  Inspecting the messages
+
+The above execution results in the following SOAP message.
+
+===  SOAP sumAndMultiply <small>client request</small>
+
+
+[source,xml]
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
+  <soap:Body>
+    <ns1:sumAndMultiply xmlns:ns1="http://superbiz.org/wsdl";>
+      <arg0>4</arg0>
+      <arg1>6</arg1>
+    </ns1:sumAndMultiply>
+  </soap:Body>
+</soap:Envelope>
+----
+
+
+===  SOAP sumAndMultiplyResponse <small>server response</small>
+
+
+[source,xml]
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
+  <soap:Body>
+    <ns1:sumAndMultiplyResponse xmlns:ns1="http://superbiz.org/wsdl";>
+      <sum>10</sum>
+      <multiply>24</multiply>
+    </ns1:sumAndMultiplyResponse>
+  </soap:Body>
+</soap:Envelope>
+----
+

http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/webservice-inheritance.adoc
----------------------------------------------------------------------
diff --git a/src/main/jbake/content/examples/webservice-inheritance.adoc 
b/src/main/jbake/content/examples/webservice-inheritance.adoc
new file mode 100755
index 0000000..cc8c4cb
--- /dev/null
+++ b/src/main/jbake/content/examples/webservice-inheritance.adoc
@@ -0,0 +1,476 @@
+= Webservice Inheritance
+:jbake-date: 2016-09-06
+:jbake-type: page
+:jbake-tomeepdf:
+:jbake-status: published
+
+Example webservice-inheritance can be browsed at 
https://github.com/apache/tomee/tree/master/examples/webservice-inheritance
+
+
+*Help us document this example! Click the blue pencil icon in the upper right 
to edit this page.*
+
+==  Item
+
+
+[source,java]
+----
+package org.superbiz.inheritance;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Inheritance;
+import javax.persistence.InheritanceType;
+import java.io.Serializable;
+
+@Entity
+@Inheritance(strategy = InheritanceType.JOINED)
+public class Item implements Serializable {
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    private Long id;
+    private String brand;
+    private String itemName;
+    private double price;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getBrand() {
+        return brand;
+    }
+
+    public void setBrand(String brand) {
+        this.brand = brand;
+    }
+
+    public String getItemName() {
+        return itemName;
+    }
+
+    public void setItemName(String itemName) {
+        this.itemName = itemName;
+    }
+
+    public double getPrice() {
+        return price;
+    }
+
+    public void setPrice(double price) {
+        this.price = price;
+    }
+}
+----
+
+
+==  Tower
+
+
+[source,java]
+----
+package org.superbiz.inheritance;
+
+import javax.persistence.Entity;
+
+@Entity
+public class Tower extends Item {
+    private Fit fit;
+    private String tubing;
+
+    public static enum Fit {
+        Custom, Exact, Universal
+    }
+
+    public Fit getFit() {
+        return fit;
+    }
+
+    public void setFit(Fit fit) {
+        this.fit = fit;
+    }
+
+    public String getTubing() {
+        return tubing;
+    }
+
+    public void setTubing(String tubing) {
+        this.tubing = tubing;
+    }
+
+    ;
+}
+----
+
+
+==  Wakeboard
+
+
+[source,java]
+----
+package org.superbiz.inheritance;
+
+import javax.persistence.Entity;
+
+@Entity
+public class Wakeboard extends Wearable {
+}
+----
+
+
+==  WakeboardBinding
+
+
+[source,java]
+----
+package org.superbiz.inheritance;
+
+import javax.persistence.Entity;
+
+@Entity
+public class WakeboardBinding extends Wearable {
+}
+----
+
+
+==  WakeRiderImpl
+
+
+[source,java]
+----
+package org.superbiz.inheritance;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.PersistenceContextType;
+import javax.persistence.Query;
+import java.util.List;
+
+/**
+ * This is an EJB 3 style pojo stateless session bean Every stateless session
+ * bean implementation must be annotated using the annotation @Stateless This
+ * EJB has a single interface: {@link WakeRiderWs} a webservice interface.
+ */
+@Stateless
+@WebService(
+        portName = "InheritancePort",
+        serviceName = "InheritanceWsService",
+        targetNamespace = "http://superbiz.org/wsdl";,
+        endpointInterface = "org.superbiz.inheritance.WakeRiderWs")
+public class WakeRiderImpl implements WakeRiderWs {
+
+    @PersistenceContext(unitName = "wakeboard-unit", type = 
PersistenceContextType.TRANSACTION)
+    private EntityManager entityManager;
+
+    public void addItem(Item item) throws Exception {
+        entityManager.persist(item);
+    }
+
+    public void deleteMovie(Item item) throws Exception {
+        entityManager.remove(item);
+    }
+
+    public List<Item> getItems() throws Exception {
+        Query query = entityManager.createQuery("SELECT i FROM Item i");
+        List<Item> items = query.getResultList();
+        return items;
+    }
+}
+----
+
+
+==  WakeRiderWs
+
+
+[source,java]
+----
+package org.superbiz.inheritance;
+
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import java.util.List;
+
+/**
+ * This is an EJB 3 webservice interface that uses inheritance.
+ */
+@WebService(targetNamespace = "http://superbiz.org/wsdl";)
+@XmlSeeAlso({Wakeboard.class, WakeboardBinding.class, Tower.class})
+public interface WakeRiderWs {
+    public void addItem(Item item) throws Exception;
+
+    public void deleteMovie(Item item) throws Exception;
+
+    public List<Item> getItems() throws Exception;
+}
+----
+
+
+==  Wearable
+
+
+[source,java]
+----
+package org.superbiz.inheritance;
+
+import javax.persistence.MappedSuperclass;
+
+@MappedSuperclass
+public abstract class Wearable extends Item {
+    protected String size;
+
+    public String getSize() {
+        return size;
+    }
+
+    public void setSize(String size) {
+        this.size = size;
+    }
+}
+----
+
+
+==  ejb-jar.xml
+
+
+[source,xml]
+----
+<ejb-jar/>
+----
+
+    
+
+==  persistence.xml
+
+
+[source,xml]
+----
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"; version="1.0">
+
+  <persistence-unit name="wakeboard-unit">
+
+    <jta-data-source>wakeBoardDatabase</jta-data-source>
+    <non-jta-data-source>wakeBoardDatabaseUnmanaged</non-jta-data-source>
+
+    <class>org.superbiz.inheritance.Item</class>
+    <class>org.superbiz.inheritance.Tower</class>
+    <class>org.superbiz.inheritance.Wakeboard</class>
+    <class>org.superbiz.inheritance.WakeboardBinding</class>
+    <class>org.superbiz.inheritance.Wearable</class>
+
+    <properties>
+      <property name="openjpa.jdbc.SynchronizeMappings" 
value="buildSchema(ForeignKeys=true)"/>
+    </properties>
+
+  </persistence-unit>
+</persistence>
+----
+
+
+==  InheritanceTest
+
+
+[source,java]
+----
+package org.superbiz.inheritance;
+
+import junit.framework.TestCase;
+import org.superbiz.inheritance.Tower.Fit;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import java.net.URL;
+import java.util.List;
+import java.util.Properties;
+
+public class InheritanceTest extends TestCase {
+
+    //START SNIPPET: setup     
+    private InitialContext initialContext;
+
+    protected void setUp() throws Exception {
+
+        Properties p = new Properties();
+        p.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.apache.openejb.core.LocalInitialContextFactory");
+        p.put("wakeBoardDatabase", "new://Resource?type=DataSource");
+        p.put("wakeBoardDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
+        p.put("wakeBoardDatabase.JdbcUrl", "jdbc:hsqldb:mem:wakeBoarddb");
+
+        p.put("wakeBoardDatabaseUnmanaged", "new://Resource?type=DataSource");
+        p.put("wakeBoardDatabaseUnmanaged.JdbcDriver", 
"org.hsqldb.jdbcDriver");
+        p.put("wakeBoardDatabaseUnmanaged.JdbcUrl", 
"jdbc:hsqldb:mem:wakeBoarddb");
+        p.put("wakeBoardDatabaseUnmanaged.JtaManaged", "false");
+
+        p.put("openejb.embedded.remotable", "true");
+
+        initialContext = new InitialContext(p);
+    }
+    //END SNIPPET: setup    
+
+    /**
+     * Create a webservice client using wsdl url
+     *
+     * @throws Exception
+     */
+    //START SNIPPET: webservice
+    public void testInheritanceViaWsInterface() throws Exception {
+        Service service = Service.create(
+                new URL("http://127.0.0.1:4204/WakeRiderImpl?wsdl";),
+                new QName("http://superbiz.org/wsdl";, "InheritanceWsService"));
+        assertNotNull(service);
+
+        WakeRiderWs ws = service.getPort(WakeRiderWs.class);
+
+        Tower tower = createTower();
+        Item item = createItem();
+        Wakeboard wakeBoard = createWakeBoard();
+        WakeboardBinding wakeBoardbinding = createWakeboardBinding();
+
+        ws.addItem(tower);
+        ws.addItem(item);
+        ws.addItem(wakeBoard);
+        ws.addItem(wakeBoardbinding);
+
+
+        List<Item> returnedItems = ws.getItems();
+
+        assertEquals("testInheritanceViaWsInterface, nb Items", 4, 
returnedItems.size());
+
+        //check tower
+        assertEquals("testInheritanceViaWsInterface, first Item", 
returnedItems.get(0).getClass(), Tower.class);
+        tower = (Tower) returnedItems.get(0);
+        assertEquals("testInheritanceViaWsInterface, first Item", 
tower.getBrand(), "Tower brand");
+        assertEquals("testInheritanceViaWsInterface, first Item", 
tower.getFit().ordinal(), Fit.Custom.ordinal());
+        assertEquals("testInheritanceViaWsInterface, first Item", 
tower.getItemName(), "Tower item name");
+        assertEquals("testInheritanceViaWsInterface, first Item", 
tower.getPrice(), 1.0d);
+        assertEquals("testInheritanceViaWsInterface, first Item", 
tower.getTubing(), "Tower tubing");
+
+        //check item
+        assertEquals("testInheritanceViaWsInterface, second Item", 
returnedItems.get(1).getClass(), Item.class);
+        item = (Item) returnedItems.get(1);
+        assertEquals("testInheritanceViaWsInterface, second Item", 
item.getBrand(), "Item brand");
+        assertEquals("testInheritanceViaWsInterface, second Item", 
item.getItemName(), "Item name");
+        assertEquals("testInheritanceViaWsInterface, second Item", 
item.getPrice(), 2.0d);
+
+        //check wakeboard
+        assertEquals("testInheritanceViaWsInterface, third Item", 
returnedItems.get(2).getClass(), Wakeboard.class);
+        wakeBoard = (Wakeboard) returnedItems.get(2);
+        assertEquals("testInheritanceViaWsInterface, third Item", 
wakeBoard.getBrand(), "Wakeboard brand");
+        assertEquals("testInheritanceViaWsInterface, third Item", 
wakeBoard.getItemName(), "Wakeboard item name");
+        assertEquals("testInheritanceViaWsInterface, third Item", 
wakeBoard.getPrice(), 3.0d);
+        assertEquals("testInheritanceViaWsInterface, third Item", 
wakeBoard.getSize(), "WakeBoard size");
+
+        //check wakeboardbinding
+        assertEquals("testInheritanceViaWsInterface, fourth Item", 
returnedItems.get(3).getClass(), WakeboardBinding.class);
+        wakeBoardbinding = (WakeboardBinding) returnedItems.get(3);
+        assertEquals("testInheritanceViaWsInterface, fourth Item", 
wakeBoardbinding.getBrand(), "Wakeboardbinding brand");
+        assertEquals("testInheritanceViaWsInterface, fourth Item", 
wakeBoardbinding.getItemName(), "Wakeboardbinding item name");
+        assertEquals("testInheritanceViaWsInterface, fourth Item", 
wakeBoardbinding.getPrice(), 4.0d);
+        assertEquals("testInheritanceViaWsInterface, fourth Item", 
wakeBoardbinding.getSize(), "WakeBoardbinding size");
+    }
+    //END SNIPPET: webservice
+
+    private Tower createTower() {
+        Tower tower = new Tower();
+        tower.setBrand("Tower brand");
+        tower.setFit(Fit.Custom);
+        tower.setItemName("Tower item name");
+        tower.setPrice(1.0f);
+        tower.setTubing("Tower tubing");
+        return tower;
+    }
+
+    private Item createItem() {
+        Item item = new Item();
+        item.setBrand("Item brand");
+        item.setItemName("Item name");
+        item.setPrice(2.0f);
+        return item;
+    }
+
+    private Wakeboard createWakeBoard() {
+        Wakeboard wakeBoard = new Wakeboard();
+        wakeBoard.setBrand("Wakeboard brand");
+        wakeBoard.setItemName("Wakeboard item name");
+        wakeBoard.setPrice(3.0f);
+        wakeBoard.setSize("WakeBoard size");
+        return wakeBoard;
+    }
+
+    private WakeboardBinding createWakeboardBinding() {
+        WakeboardBinding wakeBoardBinding = new WakeboardBinding();
+        wakeBoardBinding.setBrand("Wakeboardbinding brand");
+        wakeBoardBinding.setItemName("Wakeboardbinding item name");
+        wakeBoardBinding.setPrice(4.0f);
+        wakeBoardBinding.setSize("WakeBoardbinding size");
+        return wakeBoardBinding;
+    }
+}
+----
+
+
+=  Running
+
+    
+
+[source]
+----
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.inheritance.InheritanceTest
+Apache OpenEJB 4.0.0-beta-1    build: 20111002-04:06
+http://tomee.apache.org/
+INFO - openejb.home = /Users/dblevins/examples/webservice-inheritance
+INFO - openejb.base = /Users/dblevins/examples/webservice-inheritance
+INFO - Configuring Service(id=Default Security Service, type=SecurityService, 
provider-id=Default Security Service)
+INFO - Configuring Service(id=Default Transaction Manager, 
type=TransactionManager, provider-id=Default Transaction Manager)
+INFO - Configuring Service(id=wakeBoardDatabaseUnmanaged, type=Resource, 
provider-id=Default JDBC Database)
+INFO - Configuring Service(id=wakeBoardDatabase, type=Resource, 
provider-id=Default JDBC Database)
+INFO - Found EjbModule in classpath: 
/Users/dblevins/examples/webservice-inheritance/target/classes
+INFO - Beginning load: 
/Users/dblevins/examples/webservice-inheritance/target/classes
+INFO - Configuring enterprise application: 
/Users/dblevins/examples/webservice-inheritance/classpath.ear
+INFO - Configuring Service(id=Default Stateless Container, type=Container, 
provider-id=Default Stateless Container)
+INFO - Auto-creating a container for bean WakeRiderImpl: 
Container(type=STATELESS, id=Default Stateless Container)
+INFO - Configuring PersistenceUnit(name=wakeboard-unit)
+INFO - Enterprise application 
"/Users/dblevins/examples/webservice-inheritance/classpath.ear" loaded.
+INFO - Assembling app: 
/Users/dblevins/examples/webservice-inheritance/classpath.ear
+INFO - PersistenceUnit(name=wakeboard-unit, 
provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider 
time 396ms
+INFO - Created Ejb(deployment-id=WakeRiderImpl, ejb-name=WakeRiderImpl, 
container=Default Stateless Container)
+INFO - Started Ejb(deployment-id=WakeRiderImpl, ejb-name=WakeRiderImpl, 
container=Default Stateless Container)
+INFO - Deployed 
Application(path=/Users/dblevins/examples/webservice-inheritance/classpath.ear)
+INFO - Initializing network services
+INFO - Creating ServerService(id=httpejbd)
+INFO - Creating ServerService(id=cxf)
+INFO - Creating ServerService(id=admin)
+INFO - Creating ServerService(id=ejbd)
+INFO - Creating ServerService(id=ejbds)
+INFO - Initializing network services
+  ** Starting Services **
+  NAME                 IP              PORT  
+  httpejbd             127.0.0.1       4204  
+  admin thread         127.0.0.1       4200  
+  ejbd                 127.0.0.1       4201  
+  ejbd                 127.0.0.1       4203  
+-------
+Ready!
+WARN - Found no persistent property in 
"org.superbiz.inheritance.WakeboardBinding"
+WARN - Found no persistent property in "org.superbiz.inheritance.Wakeboard"
+WARN - Found no persistent property in 
"org.superbiz.inheritance.WakeboardBinding"
+WARN - Found no persistent property in "org.superbiz.inheritance.Wakeboard"
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.442 sec
+
+Results :
+
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+----
+
+    

http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/webservice-security.adoc
----------------------------------------------------------------------
diff --git a/src/main/jbake/content/examples/webservice-security.adoc 
b/src/main/jbake/content/examples/webservice-security.adoc
new file mode 100755
index 0000000..05588e3
--- /dev/null
+++ b/src/main/jbake/content/examples/webservice-security.adoc
@@ -0,0 +1,233 @@
+= Webservice Security
+:jbake-date: 2016-09-06
+:jbake-type: page
+:jbake-tomeepdf:
+:jbake-status: published
+
+Example webservice-security can be browsed at 
https://github.com/apache/tomee/tree/master/examples/webservice-security
+
+
+*Help us document this example! Click the blue pencil icon in the upper right 
to edit this page.*
+
+==  CalculatorImpl
+
+
+[source,java]
+----
+package org.superbiz.calculator;
+
+import javax.annotation.security.DeclareRoles;
+import javax.annotation.security.RolesAllowed;
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+/**
+ * This is an EJB 3 style pojo stateless session bean
+ * Every stateless session bean implementation must be annotated
+ * using the annotation @Stateless
+ * This EJB has a single interface: CalculatorWs a webservice interface.
+ */
+//START SNIPPET: code
+@DeclareRoles(value = {"Administrator"})
+@Stateless
+@WebService(
+        portName = "CalculatorPort",
+        serviceName = "CalculatorWsService",
+        targetNamespace = "http://superbiz.org/wsdl";,
+        endpointInterface = "org.superbiz.calculator.CalculatorWs")
+public class CalculatorImpl implements CalculatorWs, CalculatorRemote {
+
+    @RolesAllowed(value = {"Administrator"})
+    public int sum(int add1, int add2) {
+        return add1 + add2;
+    }
+
+    @RolesAllowed(value = {"Administrator"})
+    public int multiply(int mul1, int mul2) {
+        return mul1 * mul2;
+    }
+}
+----
+
+
+==  CalculatorRemote
+
+
+[source,java]
+----
+package org.superbiz.calculator;
+
+import javax.ejb.Remote;
+
+@Remote
+public interface CalculatorRemote {
+
+    public int sum(int add1, int add2);
+
+    public int multiply(int mul1, int mul2);
+}
+----
+
+
+==  CalculatorWs
+
+
+[source,java]
+----
+package org.superbiz.calculator;
+
+import javax.jws.WebService;
+
+//END SNIPPET: code
+
+/**
+ * This is an EJB 3 webservice interface
+ * A webservice interface must be annotated with the @Local
+ * annotation.
+ */
+//START SNIPPET: code
+@WebService(targetNamespace = "http://superbiz.org/wsdl";)
+public interface CalculatorWs {
+
+    public int sum(int add1, int add2);
+
+    public int multiply(int mul1, int mul2);
+}
+----
+
+
+==  ejb-jar.xml
+
+
+[source,xml]
+----
+<ejb-jar/>
+----
+
+
+==  openejb-jar.xml
+
+
+[source,xml]
+----
+<openejb-jar xmlns="http://tomee.apache.org/xml/ns/openejb-jar-2.2";>
+  <enterprise-beans>
+    <session>
+      <ejb-name>CalculatorImpl</ejb-name>
+      <web-service-security>
+        <security-realm-name/>
+        <transport-guarantee>NONE</transport-guarantee>
+        <auth-method>BASIC</auth-method>
+      </web-service-security>
+    </session>
+  </enterprise-beans>
+</openejb-jar>
+----
+
+
+==  CalculatorTest
+
+
+[source,java]
+----
+package org.superbiz.calculator;
+
+import junit.framework.TestCase;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import java.net.URL;
+import java.util.Properties;
+
+public class CalculatorTest extends TestCase {
+
+    //START SNIPPET: setup
+    private InitialContext initialContext;
+
+    protected void setUp() throws Exception {
+        Properties properties = new Properties();
+        properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, 
"org.apache.openejb.core.LocalInitialContextFactory");
+        properties.setProperty("openejb.embedded.remotable", "true");
+
+        initialContext = new InitialContext(properties);
+    }
+    //END SNIPPET: setup
+
+    /**
+     * Create a webservice client using wsdl url
+     *
+     * @throws Exception
+     */
+    //START SNIPPET: webservice
+    public void testCalculatorViaWsInterface() throws Exception {
+        URL url = new URL("http://127.0.0.1:4204/CalculatorImpl?wsdl";);
+        QName calcServiceQName = new QName("http://superbiz.org/wsdl";, 
"CalculatorWsService");
+        Service calcService = Service.create(url, calcServiceQName);
+        assertNotNull(calcService);
+
+        CalculatorWs calc = calcService.getPort(CalculatorWs.class);
+        ((BindingProvider) 
calc).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "jane");
+        ((BindingProvider) 
calc).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "waterfall");
+        assertEquals(10, calc.sum(4, 6));
+        assertEquals(12, calc.multiply(3, 4));
+    }
+    //END SNIPPET: webservice
+}
+----
+
+
+=  Running
+
+    
+
+[source]
+----
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.calculator.CalculatorTest
+Apache OpenEJB 4.0.0-beta-1    build: 20111002-04:06
+http://tomee.apache.org/
+INFO - openejb.home = /Users/dblevins/examples/webservice-security
+INFO - openejb.base = /Users/dblevins/examples/webservice-security
+INFO - Configuring Service(id=Default Security Service, type=SecurityService, 
provider-id=Default Security Service)
+INFO - Configuring Service(id=Default Transaction Manager, 
type=TransactionManager, provider-id=Default Transaction Manager)
+INFO - Found EjbModule in classpath: 
/Users/dblevins/examples/webservice-security/target/classes
+INFO - Beginning load: 
/Users/dblevins/examples/webservice-security/target/classes
+INFO - Configuring enterprise application: 
/Users/dblevins/examples/webservice-security/classpath.ear
+INFO - Configuring Service(id=Default Stateless Container, type=Container, 
provider-id=Default Stateless Container)
+INFO - Auto-creating a container for bean CalculatorImpl: 
Container(type=STATELESS, id=Default Stateless Container)
+INFO - Enterprise application 
"/Users/dblevins/examples/webservice-security/classpath.ear" loaded.
+INFO - Assembling app: 
/Users/dblevins/examples/webservice-security/classpath.ear
+INFO - Jndi(name=CalculatorImplRemote) --> Ejb(deployment-id=CalculatorImpl)
+INFO - 
Jndi(name=global/classpath.ear/webservice-security/CalculatorImpl!org.superbiz.calculator.CalculatorRemote)
 --> Ejb(deployment-id=CalculatorImpl)
+INFO - Jndi(name=global/classpath.ear/webservice-security/CalculatorImpl) --> 
Ejb(deployment-id=CalculatorImpl)
+INFO - Created Ejb(deployment-id=CalculatorImpl, ejb-name=CalculatorImpl, 
container=Default Stateless Container)
+INFO - Started Ejb(deployment-id=CalculatorImpl, ejb-name=CalculatorImpl, 
container=Default Stateless Container)
+INFO - Deployed 
Application(path=/Users/dblevins/examples/webservice-security/classpath.ear)
+INFO - Initializing network services
+INFO - Creating ServerService(id=httpejbd)
+INFO - Creating ServerService(id=cxf)
+INFO - Creating ServerService(id=admin)
+INFO - Creating ServerService(id=ejbd)
+INFO - Creating ServerService(id=ejbds)
+INFO - Initializing network services
+  ** Starting Services **
+  NAME                 IP              PORT  
+  httpejbd             127.0.0.1       4204  
+  admin thread         127.0.0.1       4200  
+  ejbd                 127.0.0.1       4201  
+  ejbd                 127.0.0.1       4203  
+-------
+Ready!
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.481 sec
+
+Results :
+
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+----
+
+    

http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/webservice-ws-security.adoc
----------------------------------------------------------------------
diff --git a/src/main/jbake/content/examples/webservice-ws-security.adoc 
b/src/main/jbake/content/examples/webservice-ws-security.adoc
new file mode 100755
index 0000000..ed54aea
--- /dev/null
+++ b/src/main/jbake/content/examples/webservice-ws-security.adoc
@@ -0,0 +1,766 @@
+= Webservice Ws Security
+:jbake-date: 2016-09-06
+:jbake-type: page
+:jbake-tomeepdf:
+:jbake-status: published
+
+Example webservice-ws-security can be browsed at 
https://github.com/apache/tomee/tree/master/examples/webservice-ws-security
+
+
+*Help us document this example! Click the blue pencil icon in the upper right 
to edit this page.*
+
+==  CalculatorImpl
+
+
+[source,java]
+----
+package org.superbiz.calculator;
+
+import javax.annotation.security.DeclareRoles;
+import javax.annotation.security.RolesAllowed;
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+/**
+ * This is an EJB 3 style pojo stateless session bean
+ * Every stateless session bean implementation must be annotated
+ * using the annotation @Stateless
+ * This EJB has a single interface: CalculatorWs a webservice interface.
+ */
+//START SNIPPET: code
+@DeclareRoles(value = {"Administrator"})
+@Stateless
+@WebService(
+        portName = "CalculatorPort",
+        serviceName = "CalculatorWsService",
+        targetNamespace = "http://superbiz.org/wsdl";,
+        endpointInterface = "org.superbiz.calculator.CalculatorWs")
+public class CalculatorImpl implements CalculatorWs, CalculatorRemote {
+
+    @RolesAllowed(value = {"Administrator"})
+    public int sum(int add1, int add2) {
+        return add1 + add2;
+    }
+
+    public int multiply(int mul1, int mul2) {
+        return mul1 * mul2;
+    }
+}
+----
+
+
+==  CalculatorRemote
+
+
+[source,java]
+----
+package org.superbiz.calculator;
+
+import javax.ejb.Remote;
+
+@Remote
+public interface CalculatorRemote {
+
+    public int sum(int add1, int add2);
+
+    public int multiply(int mul1, int mul2);
+}
+----
+
+
+==  CalculatorWs
+
+
+[source,java]
+----
+package org.superbiz.calculator;
+
+import javax.jws.WebService;
+
+//END SNIPPET: code
+
+/**
+ * This is an EJB 3 webservice interface
+ * A webservice interface must be annotated with the @Local
+ * annotation.
+ */
+//START SNIPPET: code
+@WebService(targetNamespace = "http://superbiz.org/wsdl";)
+public interface CalculatorWs {
+
+    public int sum(int add1, int add2);
+
+    public int multiply(int mul1, int mul2);
+}
+----
+
+
+==  ejb-jar.xml
+
+
+[source,xml]
+----
+<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd";
+         version="3.0" id="simple" metadata-complete="false">
+
+  <enterprise-beans>
+
+    <session>
+      <ejb-name>CalculatorImplTimestamp1way</ejb-name>
+      <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
+      <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+      <session-type>Stateless</session-type>
+      <transaction-type>Container</transaction-type>
+    </session>
+
+    <session>
+      <ejb-name>CalculatorImplTimestamp2ways</ejb-name>
+      <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
+      <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+      <session-type>Stateless</session-type>
+      <transaction-type>Container</transaction-type>
+    </session>
+
+    <session>
+      <ejb-name>CalculatorImplUsernameTokenPlainPassword</ejb-name>
+      <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
+      <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+      <session-type>Stateless</session-type>
+      <transaction-type>Container</transaction-type>
+    </session>
+
+    <session>
+      <ejb-name>CalculatorImplUsernameTokenHashedPassword</ejb-name>
+      <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
+      <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+      <session-type>Stateless</session-type>
+      <transaction-type>Container</transaction-type>
+    </session>
+
+    <session>
+      <ejb-name>CalculatorImplUsernameTokenPlainPasswordEncrypt</ejb-name>
+      <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
+      <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+      <session-type>Stateless</session-type>
+      <transaction-type>Container</transaction-type>
+    </session>
+
+    <session>
+      <ejb-name>CalculatorImplSign</ejb-name>
+      <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
+      <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+      <session-type>Stateless</session-type>
+      <transaction-type>Container</transaction-type>
+    </session>
+
+    <session>
+      <ejb-name>CalculatorImplEncrypt2ways</ejb-name>
+      <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
+      <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+      <session-type>Stateless</session-type>
+      <transaction-type>Container</transaction-type>
+    </session>
+
+    <session>
+      <ejb-name>CalculatorImplSign2ways</ejb-name>
+      <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
+      <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+      <session-type>Stateless</session-type>
+      <transaction-type>Container</transaction-type>
+    </session>
+
+    <session>
+      <ejb-name>CalculatorImplEncryptAndSign2ways</ejb-name>
+      <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
+      <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+      <session-type>Stateless</session-type>
+      <transaction-type>Container</transaction-type>
+    </session>
+
+  </enterprise-beans>
+
+</ejb-jar>
+----
+
+    
+
+==  openejb-jar.xml
+
+
+[source,xml]
+----
+<openejb-jar xmlns="http://www.openejb.org/openejb-jar/1.1";>
+
+  <ejb-deployment ejb-name="CalculatorImpl">
+    <properties>
+      # webservice.security.realm
+      # webservice.security.securityRealm
+      # webservice.security.transportGarantee = NONE
+      webservice.security.authMethod = WS-SECURITY
+      wss4j.in.action = UsernameToken
+      wss4j.in.passwordType = PasswordText
+      wss4j.in.passwordCallbackClass = 
org.superbiz.calculator.CustomPasswordHandler
+
+      # automatically added
+      
wss4j.in.validator.{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken
 = org.apache.openejb.server.cxf.OpenEJBLoginValidator
+    </properties>
+  </ejb-deployment>
+  <ejb-deployment ejb-name="CalculatorImplTimestamp1way">
+    <properties>
+      webservice.security.authMethod = WS-SECURITY
+      wss4j.in.action = Timestamp
+    </properties>
+  </ejb-deployment>
+  <ejb-deployment ejb-name="CalculatorImplTimestamp2ways">
+    <properties>
+      webservice.security.authMethod = WS-SECURITY
+      wss4j.in.action = Timestamp
+      wss4j.out.action = Timestamp
+    </properties>
+  </ejb-deployment>
+  <ejb-deployment ejb-name="CalculatorImplUsernameTokenPlainPassword">
+    <properties>
+      webservice.security.authMethod = WS-SECURITY
+      wss4j.in.action = UsernameToken
+      wss4j.in.passwordType = PasswordText
+      
wss4j.in.passwordCallbackClass=org.superbiz.calculator.CustomPasswordHandler
+    </properties>
+  </ejb-deployment>
+  <ejb-deployment ejb-name="CalculatorImplUsernameTokenHashedPassword">
+    <properties>
+      webservice.security.authMethod = WS-SECURITY
+      wss4j.in.action = UsernameToken
+      wss4j.in.passwordType = PasswordDigest
+      
wss4j.in.passwordCallbackClass=org.superbiz.calculator.CustomPasswordHandler
+    </properties>
+  </ejb-deployment>
+  <ejb-deployment ejb-name="CalculatorImplUsernameTokenPlainPasswordEncrypt">
+    <properties>
+      webservice.security.authMethod = WS-SECURITY
+      wss4j.in.action = UsernameToken Encrypt
+      wss4j.in.passwordType = PasswordText
+      
wss4j.in.passwordCallbackClass=org.superbiz.calculator.CustomPasswordHandler
+      wss4j.in.decryptionPropFile = 
META-INF/CalculatorImplUsernameTokenPlainPasswordEncrypt-server.properties
+    </properties>
+  </ejb-deployment>
+  <ejb-deployment ejb-name="CalculatorImplSign">
+    <properties>
+      webservice.security.authMethod = WS-SECURITY
+      wss4j.in.action = Signature
+      
wss4j.in.passwordCallbackClass=org.superbiz.calculator.CustomPasswordHandler
+      wss4j.in.signaturePropFile = 
META-INF/CalculatorImplSign-server.properties
+    </properties>
+  </ejb-deployment>
+
+</openejb-jar>
+----
+
+    
+
+==  webservices.xml
+
+
+[source,xml]
+----
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+             xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd";
+             xmlns:ger="http://ciaows.org/wsdl"; version="1.1">
+
+  <webservice-description>
+    
<webservice-description-name>CalculatorWsService</webservice-description-name>
+    <port-component>
+      <port-component-name>CalculatorImplTimestamp1way</port-component-name>
+      <wsdl-port>CalculatorImplTimestamp1way</wsdl-port>
+      
<service-endpoint-interface>org.superbiz.calculator.CalculatorWs</service-endpoint-interface>
+      <service-impl-bean>
+        <ejb-link>CalculatorImplTimestamp1way</ejb-link>
+      </service-impl-bean>
+    </port-component>
+    <port-component>
+      <port-component-name>CalculatorImplTimestamp2ways</port-component-name>
+      <wsdl-port>CalculatorImplTimestamp2ways</wsdl-port>
+      
<service-endpoint-interface>org.superbiz.calculator.CalculatorWs</service-endpoint-interface>
+      <service-impl-bean>
+        <ejb-link>CalculatorImplTimestamp2ways</ejb-link>
+      </service-impl-bean>
+    </port-component>
+    <port-component>
+      
<port-component-name>CalculatorImplUsernameTokenPlainPassword</port-component-name>
+      <wsdl-port>CalculatorImplUsernameTokenPlainPassword</wsdl-port>
+      
<service-endpoint-interface>org.superbiz.calculator.CalculatorWs</service-endpoint-interface>
+      <service-impl-bean>
+        <ejb-link>CalculatorImplUsernameTokenPlainPassword</ejb-link>
+      </service-impl-bean>
+    </port-component>
+    <port-component>
+      
<port-component-name>CalculatorImplUsernameTokenHashedPassword</port-component-name>
+      <wsdl-port>CalculatorImplUsernameTokenHashedPassword</wsdl-port>
+      
<service-endpoint-interface>org.superbiz.calculator.CalculatorWs</service-endpoint-interface>
+      <service-impl-bean>
+        <ejb-link>CalculatorImplUsernameTokenHashedPassword</ejb-link>
+      </service-impl-bean>
+    </port-component>
+    <port-component>
+      
<port-component-name>CalculatorImplUsernameTokenPlainPasswordEncrypt</port-component-name>
+      <wsdl-port>CalculatorImplUsernameTokenPlainPasswordEncrypt</wsdl-port>
+      
<service-endpoint-interface>org.superbiz.calculator.CalculatorWs</service-endpoint-interface>
+      <service-impl-bean>
+        <ejb-link>CalculatorImplUsernameTokenPlainPasswordEncrypt</ejb-link>
+      </service-impl-bean>
+    </port-component>
+  </webservice-description>
+
+</webservices>
+----
+
+    
+
+==  CalculatorTest
+
+
+[source,java]
+----
+package org.superbiz.calculator;
+
+import junit.framework.TestCase;
+import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
+import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor;
+import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
+import org.apache.ws.security.WSConstants;
+import org.apache.ws.security.WSPasswordCallback;
+import org.apache.ws.security.handler.WSHandlerConstants;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPBinding;
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public class CalculatorTest extends TestCase {
+
+    //START SNIPPET: setup
+    protected void setUp() throws Exception {
+        Properties properties = new Properties();
+        properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, 
"org.apache.openejb.core.LocalInitialContextFactory");
+        properties.setProperty("openejb.embedded.remotable", "true");
+
+        new InitialContext(properties);
+    }
+    //END SNIPPET: setup
+
+    //START SNIPPET: webservice
+    public void testCalculatorViaWsInterface() throws Exception {
+        Service calcService = Service.create(new 
URL("http://127.0.0.1:4204/CalculatorImpl?wsdl";),
+                new QName("http://superbiz.org/wsdl";, "CalculatorWsService"));
+        assertNotNull(calcService);
+
+        CalculatorWs calc = calcService.getPort(CalculatorWs.class);
+
+        Client client = ClientProxy.getClient(calc);
+        Endpoint endpoint = client.getEndpoint();
+        endpoint.getOutInterceptors().add(new SAAJOutInterceptor());
+
+        Map<String, Object> outProps = new HashMap<String, Object>();
+        outProps.put(WSHandlerConstants.ACTION, 
WSHandlerConstants.USERNAME_TOKEN);
+        outProps.put(WSHandlerConstants.USER, "jane");
+        outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
+        outProps.put(WSHandlerConstants.PW_CALLBACK_REF, new CallbackHandler() 
{
+
+            public void handle(Callback[] callbacks) throws IOException, 
UnsupportedCallbackException {
+                WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
+                pc.setPassword("waterfall");
+            }
+        });
+
+        WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
+        endpoint.getOutInterceptors().add(wssOut);
+
+        assertEquals(10, calc.sum(4, 6));
+    }
+
+    public void testCalculatorViaWsInterfaceWithTimestamp1way() throws 
Exception {
+        Service calcService = Service.create(new 
URL("http://127.0.0.1:4204/CalculatorImplTimestamp1way?wsdl";),
+                new QName("http://superbiz.org/wsdl";, "CalculatorWsService"));
+        assertNotNull(calcService);
+
+        // for debugging (ie. TCPMon)
+        calcService.addPort(new QName("http://superbiz.org/wsdl";,
+                "CalculatorWsService2"), SOAPBinding.SOAP12HTTP_BINDING,
+                "http://127.0.0.1:8204/CalculatorImplTimestamp1way";);
+
+//        CalculatorWs calc = calcService.getPort(
+//             new QName("http://superbiz.org/wsdl";, "CalculatorWsService2"),
+//             CalculatorWs.class);
+
+        CalculatorWs calc = calcService.getPort(CalculatorWs.class);
+
+        Client client = ClientProxy.getClient(calc);
+        Endpoint endpoint = client.getEndpoint();
+        endpoint.getOutInterceptors().add(new SAAJOutInterceptor());
+
+        Map<String, Object> outProps = new HashMap<String, Object>();
+        outProps.put(WSHandlerConstants.ACTION, WSHandlerConstants.TIMESTAMP);
+        WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
+        endpoint.getOutInterceptors().add(wssOut);
+
+        assertEquals(12, calc.multiply(3, 4));
+    }
+
+    public void testCalculatorViaWsInterfaceWithTimestamp2ways() throws 
Exception {
+        Service calcService = Service.create(new 
URL("http://127.0.0.1:4204/CalculatorImplTimestamp2ways?wsdl";),
+                new QName("http://superbiz.org/wsdl";, "CalculatorWsService"));
+        assertNotNull(calcService);
+
+        // for debugging (ie. TCPMon)
+        calcService.addPort(new QName("http://superbiz.org/wsdl";,
+                "CalculatorWsService2"), SOAPBinding.SOAP12HTTP_BINDING,
+                "http://127.0.0.1:8204/CalculatorImplTimestamp2ways";);
+
+//        CalculatorWs calc = calcService.getPort(
+//             new QName("http://superbiz.org/wsdl";, "CalculatorWsService2"),
+//             CalculatorWs.class);
+
+        CalculatorWs calc = calcService.getPort(CalculatorWs.class);
+
+        Client client = ClientProxy.getClient(calc);
+        Endpoint endpoint = client.getEndpoint();
+        endpoint.getOutInterceptors().add(new SAAJOutInterceptor());
+        endpoint.getInInterceptors().add(new SAAJInInterceptor());
+
+        Map<String, Object> outProps = new HashMap<String, Object>();
+        outProps.put(WSHandlerConstants.ACTION, WSHandlerConstants.TIMESTAMP);
+        WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
+        endpoint.getOutInterceptors().add(wssOut);
+
+        Map<String, Object> inProps = new HashMap<String, Object>();
+        inProps.put(WSHandlerConstants.ACTION, WSHandlerConstants.TIMESTAMP);
+        WSS4JInInterceptor wssIn = new WSS4JInInterceptor(inProps);
+        endpoint.getInInterceptors().add(wssIn);
+
+        assertEquals(12, calc.multiply(3, 4));
+    }
+
+    public void testCalculatorViaWsInterfaceWithUsernameTokenPlainPassword() 
throws Exception {
+        Service calcService = Service.create(new 
URL("http://127.0.0.1:4204/CalculatorImplUsernameTokenPlainPassword?wsdl";),
+                new QName("http://superbiz.org/wsdl";, "CalculatorWsService"));
+        assertNotNull(calcService);
+
+        // for debugging (ie. TCPMon)
+        calcService.addPort(new QName("http://superbiz.org/wsdl";,
+                "CalculatorWsService2"), SOAPBinding.SOAP12HTTP_BINDING,
+                
"http://127.0.0.1:8204/CalculatorImplUsernameTokenPlainPassword";);
+
+//        CalculatorWs calc = calcService.getPort(
+//             new QName("http://superbiz.org/wsdl";, "CalculatorWsService2"),
+//             CalculatorWs.class);
+
+        CalculatorWs calc = calcService.getPort(CalculatorWs.class);
+
+        Client client = ClientProxy.getClient(calc);
+        Endpoint endpoint = client.getEndpoint();
+        endpoint.getOutInterceptors().add(new SAAJOutInterceptor());
+
+        Map<String, Object> outProps = new HashMap<String, Object>();
+        outProps.put(WSHandlerConstants.ACTION, 
WSHandlerConstants.USERNAME_TOKEN);
+        outProps.put(WSHandlerConstants.USER, "jane");
+        outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
+        outProps.put(WSHandlerConstants.PW_CALLBACK_REF, new CallbackHandler() 
{
+
+            @Override
+            public void handle(Callback[] callbacks) throws IOException, 
UnsupportedCallbackException {
+                WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
+                pc.setPassword("waterfall");
+            }
+        });
+
+        WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
+        endpoint.getOutInterceptors().add(wssOut);
+
+        assertEquals(10, calc.sum(4, 6));
+    }
+
+    public void testCalculatorViaWsInterfaceWithUsernameTokenHashedPassword() 
throws Exception {
+        Service calcService = Service.create(new 
URL("http://127.0.0.1:4204/CalculatorImplUsernameTokenHashedPassword?wsdl";),
+                new QName("http://superbiz.org/wsdl";, "CalculatorWsService"));
+        assertNotNull(calcService);
+
+        // for debugging (ie. TCPMon)
+        calcService.addPort(new QName("http://superbiz.org/wsdl";,
+                "CalculatorWsService2"), SOAPBinding.SOAP12HTTP_BINDING,
+                
"http://127.0.0.1:8204/CalculatorImplUsernameTokenHashedPassword";);
+
+//        CalculatorWs calc = calcService.getPort(
+//             new QName("http://superbiz.org/wsdl";, "CalculatorWsService2"),
+//             CalculatorWs.class);
+
+        CalculatorWs calc = calcService.getPort(CalculatorWs.class);
+
+        Client client = ClientProxy.getClient(calc);
+        Endpoint endpoint = client.getEndpoint();
+        endpoint.getOutInterceptors().add(new SAAJOutInterceptor());
+
+        Map<String, Object> outProps = new HashMap<String, Object>();
+        outProps.put(WSHandlerConstants.ACTION, 
WSHandlerConstants.USERNAME_TOKEN);
+        outProps.put(WSHandlerConstants.USER, "jane");
+        outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
+        outProps.put(WSHandlerConstants.PW_CALLBACK_REF, new CallbackHandler() 
{
+
+            @Override
+            public void handle(Callback[] callbacks) throws IOException, 
UnsupportedCallbackException {
+                WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
+                pc.setPassword("waterfall");
+            }
+        });
+
+        WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
+        endpoint.getOutInterceptors().add(wssOut);
+
+        assertEquals(10, calc.sum(4, 6));
+    }
+
+    public void 
testCalculatorViaWsInterfaceWithUsernameTokenPlainPasswordEncrypt() throws 
Exception {
+        Service calcService = Service.create(new 
URL("http://127.0.0.1:4204/CalculatorImplUsernameTokenPlainPasswordEncrypt?wsdl";),
+                new QName("http://superbiz.org/wsdl";, "CalculatorWsService"));
+        assertNotNull(calcService);
+
+        // for debugging (ie. TCPMon)
+        calcService.addPort(new QName("http://superbiz.org/wsdl";,
+                "CalculatorWsService2"), SOAPBinding.SOAP12HTTP_BINDING,
+                
"http://127.0.0.1:8204/CalculatorImplUsernameTokenPlainPasswordEncrypt";);
+
+//        CalculatorWs calc = calcService.getPort(
+//             new QName("http://superbiz.org/wsdl";, "CalculatorWsService2"),
+//             CalculatorWs.class);
+
+        CalculatorWs calc = calcService.getPort(CalculatorWs.class);
+
+        Client client = ClientProxy.getClient(calc);
+        Endpoint endpoint = client.getEndpoint();
+        endpoint.getOutInterceptors().add(new SAAJOutInterceptor());
+
+        Map<String, Object> outProps = new HashMap<String, Object>();
+        outProps.put(WSHandlerConstants.ACTION, 
WSHandlerConstants.USERNAME_TOKEN
+                + " " + WSHandlerConstants.ENCRYPT);
+        outProps.put(WSHandlerConstants.USER, "jane");
+        outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
+        outProps.put(WSHandlerConstants.PW_CALLBACK_REF, new CallbackHandler() 
{
+
+            @Override
+            public void handle(Callback[] callbacks) throws IOException, 
UnsupportedCallbackException {
+                WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
+                pc.setPassword("waterfall");
+            }
+        });
+        outProps.put(WSHandlerConstants.ENC_PROP_FILE, 
"META-INF/CalculatorImplUsernameTokenPlainPasswordEncrypt-client.properties");
+        outProps.put(WSHandlerConstants.ENCRYPTION_USER, "serveralias");
+
+        WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
+        endpoint.getOutInterceptors().add(wssOut);
+
+        assertEquals(10, calc.sum(4, 6));
+    }
+
+    public void testCalculatorViaWsInterfaceWithSign() throws Exception {
+        Service calcService = Service.create(new 
URL("http://127.0.0.1:4204/CalculatorImplSign?wsdl";),
+                new QName("http://superbiz.org/wsdl";, "CalculatorWsService"));
+        assertNotNull(calcService);
+
+        // for debugging (ie. TCPMon)
+        calcService.addPort(new QName("http://superbiz.org/wsdl";,
+                "CalculatorWsService2"), SOAPBinding.SOAP12HTTP_BINDING,
+                "http://127.0.0.1:8204/CalculatorImplSign";);
+
+//      CalculatorWs calc = calcService.getPort(
+//     new QName("http://superbiz.org/wsdl";, "CalculatorWsService2"),
+//     CalculatorWs.class);
+
+        CalculatorWs calc = calcService.getPort(CalculatorWs.class);
+
+        Client client = ClientProxy.getClient(calc);
+        Endpoint endpoint = client.getEndpoint();
+        endpoint.getOutInterceptors().add(new SAAJOutInterceptor());
+
+        Map<String, Object> outProps = new HashMap<String, Object>();
+        outProps.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
+        outProps.put(WSHandlerConstants.USER, "clientalias");
+        outProps.put(WSHandlerConstants.PW_CALLBACK_REF, new CallbackHandler() 
{
+
+            @Override
+            public void handle(Callback[] callbacks) throws IOException, 
UnsupportedCallbackException {
+                WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
+                pc.setPassword("clientPassword");
+            }
+        });
+        outProps.put(WSHandlerConstants.SIG_PROP_FILE, 
"META-INF/CalculatorImplSign-client.properties");
+        outProps.put(WSHandlerConstants.SIG_KEY_ID, "IssuerSerial");
+
+        WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
+        endpoint.getOutInterceptors().add(wssOut);
+
+        assertEquals(24, calc.multiply(4, 6));
+    }
+    //END SNIPPET: webservice
+}
+----
+
+
+==  CustomPasswordHandler
+
+
+[source,java]
+----
+package org.superbiz.calculator;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import java.io.IOException;
+
+public class CustomPasswordHandler implements CallbackHandler {
+    @Override
+    public void handle(Callback[] callbacks) throws IOException, 
UnsupportedCallbackException {
+        WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
+
+        if (pc.getUsage() == WSPasswordCallback.USERNAME_TOKEN) {
+            // TODO get the password from the users.properties if possible
+            pc.setPassword("waterfall");
+        } else if (pc.getUsage() == WSPasswordCallback.DECRYPT) {
+            pc.setPassword("serverPassword");
+        } else if (pc.getUsage() == WSPasswordCallback.SIGNATURE) {
+            pc.setPassword("serverPassword");
+        }
+    }
+}
+----
+
+
+=  Running
+
+    
+    generate keys:
+    
+    do.sun.jdk:
+         [echo] *** Running on a Sun JDK ***
+         [echo] generate server keys
+         [java] Certificate stored in file 
</Users/dblevins/examples/webservice-ws-security/target/classes/META-INF/serverKey.rsa>
+         [echo] generate client keys
+         [java] Certificate stored in file 
</Users/dblevins/examples/webservice-ws-security/target/test-classes/META-INF/clientKey.rsa>
+         [echo] import client/server public keys in client/server keystores
+         [java] Certificate was added to keystore
+         [java] Certificate was added to keystore
+    
+    do.ibm.jdk:
+    
+    run:
+         [echo] Running JDK specific keystore creation target
+    
+
+[source]
+----
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.calculator.CalculatorTest
+Apache OpenEJB 4.0.0-beta-1    build: 20111002-04:06
+http://tomee.apache.org/
+INFO - openejb.home = /Users/dblevins/examples/webservice-ws-security
+INFO - openejb.base = /Users/dblevins/examples/webservice-ws-security
+INFO - Configuring Service(id=Default Security Service, type=SecurityService, 
provider-id=Default Security Service)
+INFO - Configuring Service(id=Default Transaction Manager, 
type=TransactionManager, provider-id=Default Transaction Manager)
+INFO - Found EjbModule in classpath: 
/Users/dblevins/examples/webservice-ws-security/target/classes
+INFO - Beginning load: 
/Users/dblevins/examples/webservice-ws-security/target/classes
+INFO - Configuring enterprise application: 
/Users/dblevins/examples/webservice-ws-security/classpath.ear
+INFO - Configuring Service(id=Default Stateless Container, type=Container, 
provider-id=Default Stateless Container)
+INFO - Auto-creating a container for bean CalculatorImplTimestamp1way: 
Container(type=STATELESS, id=Default Stateless Container)
+INFO - Enterprise application 
"/Users/dblevins/examples/webservice-ws-security/classpath.ear" loaded.
+INFO - Assembling app: 
/Users/dblevins/examples/webservice-ws-security/classpath.ear
+INFO - Jndi(name=CalculatorImplTimestamp1wayRemote) --> 
Ejb(deployment-id=CalculatorImplTimestamp1way)
+INFO - 
Jndi(name=global/classpath.ear/simple/CalculatorImplTimestamp1way!org.superbiz.calculator.CalculatorRemote)
 --> Ejb(deployment-id=CalculatorImplTimestamp1way)
+INFO - Jndi(name=global/classpath.ear/simple/CalculatorImplTimestamp1way) --> 
Ejb(deployment-id=CalculatorImplTimestamp1way)
+INFO - Jndi(name=CalculatorImplTimestamp2waysRemote) --> 
Ejb(deployment-id=CalculatorImplTimestamp2ways)
+INFO - 
Jndi(name=global/classpath.ear/simple/CalculatorImplTimestamp2ways!org.superbiz.calculator.CalculatorRemote)
 --> Ejb(deployment-id=CalculatorImplTimestamp2ways)
+INFO - Jndi(name=global/classpath.ear/simple/CalculatorImplTimestamp2ways) --> 
Ejb(deployment-id=CalculatorImplTimestamp2ways)
+INFO - Jndi(name=CalculatorImplUsernameTokenPlainPasswordRemote) --> 
Ejb(deployment-id=CalculatorImplUsernameTokenPlainPassword)
+INFO - 
Jndi(name=global/classpath.ear/simple/CalculatorImplUsernameTokenPlainPassword!org.superbiz.calculator.CalculatorRemote)
 --> Ejb(deployment-id=CalculatorImplUsernameTokenPlainPassword)
+INFO - 
Jndi(name=global/classpath.ear/simple/CalculatorImplUsernameTokenPlainPassword) 
--> Ejb(deployment-id=CalculatorImplUsernameTokenPlainPassword)
+INFO - Jndi(name=CalculatorImplUsernameTokenHashedPasswordRemote) --> 
Ejb(deployment-id=CalculatorImplUsernameTokenHashedPassword)
+INFO - 
Jndi(name=global/classpath.ear/simple/CalculatorImplUsernameTokenHashedPassword!org.superbiz.calculator.CalculatorRemote)
 --> Ejb(deployment-id=CalculatorImplUsernameTokenHashedPassword)
+INFO - 
Jndi(name=global/classpath.ear/simple/CalculatorImplUsernameTokenHashedPassword)
 --> Ejb(deployment-id=CalculatorImplUsernameTokenHashedPassword)
+INFO - Jndi(name=CalculatorImplUsernameTokenPlainPasswordEncryptRemote) --> 
Ejb(deployment-id=CalculatorImplUsernameTokenPlainPasswordEncrypt)
+INFO - 
Jndi(name=global/classpath.ear/simple/CalculatorImplUsernameTokenPlainPasswordEncrypt!org.superbiz.calculator.CalculatorRemote)
 --> Ejb(deployment-id=CalculatorImplUsernameTokenPlainPasswordEncrypt)
+INFO - 
Jndi(name=global/classpath.ear/simple/CalculatorImplUsernameTokenPlainPasswordEncrypt)
 --> Ejb(deployment-id=CalculatorImplUsernameTokenPlainPasswordEncrypt)
+INFO - Jndi(name=CalculatorImplSignRemote) --> 
Ejb(deployment-id=CalculatorImplSign)
+INFO - 
Jndi(name=global/classpath.ear/simple/CalculatorImplSign!org.superbiz.calculator.CalculatorRemote)
 --> Ejb(deployment-id=CalculatorImplSign)
+INFO - Jndi(name=global/classpath.ear/simple/CalculatorImplSign) --> 
Ejb(deployment-id=CalculatorImplSign)
+INFO - Jndi(name=CalculatorImplEncrypt2waysRemote) --> 
Ejb(deployment-id=CalculatorImplEncrypt2ways)
+INFO - 
Jndi(name=global/classpath.ear/simple/CalculatorImplEncrypt2ways!org.superbiz.calculator.CalculatorRemote)
 --> Ejb(deployment-id=CalculatorImplEncrypt2ways)
+INFO - Jndi(name=global/classpath.ear/simple/CalculatorImplEncrypt2ways) --> 
Ejb(deployment-id=CalculatorImplEncrypt2ways)
+INFO - Jndi(name=CalculatorImplSign2waysRemote) --> 
Ejb(deployment-id=CalculatorImplSign2ways)
+INFO - 
Jndi(name=global/classpath.ear/simple/CalculatorImplSign2ways!org.superbiz.calculator.CalculatorRemote)
 --> Ejb(deployment-id=CalculatorImplSign2ways)
+INFO - Jndi(name=global/classpath.ear/simple/CalculatorImplSign2ways) --> 
Ejb(deployment-id=CalculatorImplSign2ways)
+INFO - Jndi(name=CalculatorImplEncryptAndSign2waysRemote) --> 
Ejb(deployment-id=CalculatorImplEncryptAndSign2ways)
+INFO - 
Jndi(name=global/classpath.ear/simple/CalculatorImplEncryptAndSign2ways!org.superbiz.calculator.CalculatorRemote)
 --> Ejb(deployment-id=CalculatorImplEncryptAndSign2ways)
+INFO - 
Jndi(name=global/classpath.ear/simple/CalculatorImplEncryptAndSign2ways) --> 
Ejb(deployment-id=CalculatorImplEncryptAndSign2ways)
+INFO - Jndi(name=CalculatorImplRemote) --> Ejb(deployment-id=CalculatorImpl)
+INFO - 
Jndi(name=global/classpath.ear/simple/CalculatorImpl!org.superbiz.calculator.CalculatorRemote)
 --> Ejb(deployment-id=CalculatorImpl)
+INFO - Jndi(name=global/classpath.ear/simple/CalculatorImpl) --> 
Ejb(deployment-id=CalculatorImpl)
+INFO - Created Ejb(deployment-id=CalculatorImplUsernameTokenHashedPassword, 
ejb-name=CalculatorImplUsernameTokenHashedPassword, container=Default Stateless 
Container)
+INFO - Created Ejb(deployment-id=CalculatorImpl, ejb-name=CalculatorImpl, 
container=Default Stateless Container)
+INFO - Created Ejb(deployment-id=CalculatorImplSign, 
ejb-name=CalculatorImplSign, container=Default Stateless Container)
+INFO - Created Ejb(deployment-id=CalculatorImplEncryptAndSign2ways, 
ejb-name=CalculatorImplEncryptAndSign2ways, container=Default Stateless 
Container)
+INFO - Created Ejb(deployment-id=CalculatorImplTimestamp1way, 
ejb-name=CalculatorImplTimestamp1way, container=Default Stateless Container)
+INFO - Created Ejb(deployment-id=CalculatorImplSign2ways, 
ejb-name=CalculatorImplSign2ways, container=Default Stateless Container)
+INFO - Created Ejb(deployment-id=CalculatorImplEncrypt2ways, 
ejb-name=CalculatorImplEncrypt2ways, container=Default Stateless Container)
+INFO - Created Ejb(deployment-id=CalculatorImplUsernameTokenPlainPassword, 
ejb-name=CalculatorImplUsernameTokenPlainPassword, container=Default Stateless 
Container)
+INFO - Created Ejb(deployment-id=CalculatorImplTimestamp2ways, 
ejb-name=CalculatorImplTimestamp2ways, container=Default Stateless Container)
+INFO - Created 
Ejb(deployment-id=CalculatorImplUsernameTokenPlainPasswordEncrypt, 
ejb-name=CalculatorImplUsernameTokenPlainPasswordEncrypt, container=Default 
Stateless Container)
+INFO - Started Ejb(deployment-id=CalculatorImplUsernameTokenHashedPassword, 
ejb-name=CalculatorImplUsernameTokenHashedPassword, container=Default Stateless 
Container)
+INFO - Started Ejb(deployment-id=CalculatorImpl, ejb-name=CalculatorImpl, 
container=Default Stateless Container)
+INFO - Started Ejb(deployment-id=CalculatorImplSign, 
ejb-name=CalculatorImplSign, container=Default Stateless Container)
+INFO - Started Ejb(deployment-id=CalculatorImplEncryptAndSign2ways, 
ejb-name=CalculatorImplEncryptAndSign2ways, container=Default Stateless 
Container)
+INFO - Started Ejb(deployment-id=CalculatorImplTimestamp1way, 
ejb-name=CalculatorImplTimestamp1way, container=Default Stateless Container)
+INFO - Started Ejb(deployment-id=CalculatorImplSign2ways, 
ejb-name=CalculatorImplSign2ways, container=Default Stateless Container)
+INFO - Started Ejb(deployment-id=CalculatorImplEncrypt2ways, 
ejb-name=CalculatorImplEncrypt2ways, container=Default Stateless Container)
+INFO - Started Ejb(deployment-id=CalculatorImplUsernameTokenPlainPassword, 
ejb-name=CalculatorImplUsernameTokenPlainPassword, container=Default Stateless 
Container)
+INFO - Started Ejb(deployment-id=CalculatorImplTimestamp2ways, 
ejb-name=CalculatorImplTimestamp2ways, container=Default Stateless Container)
+INFO - Started 
Ejb(deployment-id=CalculatorImplUsernameTokenPlainPasswordEncrypt, 
ejb-name=CalculatorImplUsernameTokenPlainPasswordEncrypt, container=Default 
Stateless Container)
+INFO - Deployed 
Application(path=/Users/dblevins/examples/webservice-ws-security/classpath.ear)
+INFO - Initializing network services
+INFO - Creating ServerService(id=httpejbd)
+INFO - Creating ServerService(id=cxf)
+INFO - Creating ServerService(id=admin)
+INFO - Creating ServerService(id=ejbd)
+INFO - Creating ServerService(id=ejbds)
+INFO - Initializing network services
+  ** Starting Services **
+  NAME                 IP              PORT  
+  httpejbd             127.0.0.1       4204  
+  admin thread         127.0.0.1       4200  
+  ejbd                 127.0.0.1       4201  
+  ejbd                 127.0.0.1       4203  
+-------
+Ready!
+Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.582 sec
+
+Results :
+
+Tests run: 7, Failures: 0, Errors: 0, Skipped: 0
+----
+
+    

http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/webservice-ws-with-resources-config.adoc
----------------------------------------------------------------------
diff --git 
a/src/main/jbake/content/examples/webservice-ws-with-resources-config.adoc 
b/src/main/jbake/content/examples/webservice-ws-with-resources-config.adoc
new file mode 100755
index 0000000..6f15e05
--- /dev/null
+++ b/src/main/jbake/content/examples/webservice-ws-with-resources-config.adoc
@@ -0,0 +1,9 @@
+= webservice-ws-with-resources-config
+:jbake-date: 2016-09-06
+:jbake-type: page
+:jbake-tomeepdf:
+:jbake-status: published
+
+Example webservice-ws-with-resources-config can be browsed at 
https://github.com/apache/tomee/tree/master/examples/webservice-ws-with-resources-config
+
+No README.md yet, be the first to contribute one!

http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/security/index.adoc
----------------------------------------------------------------------
diff --git a/src/main/jbake/content/security/index.adoc 
b/src/main/jbake/content/security/index.adoc
new file mode 100755
index 0000000..004f3f2
--- /dev/null
+++ b/src/main/jbake/content/security/index.adoc
@@ -0,0 +1,72 @@
+= Security
+:jbake-date: 2016-03-16
+:jbake-type: page
+:jbake-status: published
+:jbake-tomeepdf:
+
+=== Security updates
+
+Please note that, except in rare circumstances, binary patches are not 
produced for individual vulnerabilities. To obtain the binary fix for a 
particular vulnerability you should upgrade to an Apache TomEE version where 
that vulnerability has been fixed.
+
+Source patches, usually in the form of references to SVN commits, may be 
provided in either in a vulnerability announcement and/or the vulnerability 
details listed on these pages. These source patches may be used by users 
wishing to build their own local version of TomEE with just that security patch 
rather than upgrade.
+
+The Apache Software Foundation takes a very active stance in eliminating 
security problems and denial of service attacks against Apache projects.
+
+We strongly encourage folks to report such problems to the private security 
mailing list first, before disclosing them in a public forum.
+
+Please note that the security mailing list should only be used for reporting 
undisclosed security vulnerabilities in Apache projects and managing the 
process of fixing such vulnerabilities. We cannot accept regular bug reports or 
other queries at this address. All mail sent to this address that does not 
relate to an undisclosed security problem will be ignored.
+
+If you need to report a bug that isn't an undisclosed security vulnerability, 
please use the bug reporting system.
+
+Questions about:
+
+- how to configure TomEE securely
+- if a vulnerability applies to your particular application
+- obtaining further information on a published vulnerability
+- availability of patches and/or new releases
+
+should be addressed to the link:support.html[users mailing list].
+
+The private security mailing address is: security (at) apache (dot) org
+
+Note that all networked servers are subject to denial of service attacks, and 
we cannot promise magic workarounds to generic problems (such as a client 
streaming lots of data to your server, or re-requesting the same URL 
repeatedly). In general our philosophy is to avoid any attacks which can cause 
the server to consume resources in a non-linear relationship to the size of 
inputs.
+
+=== Third-party projects
+
+Apache is built with the following components. Please see the security 
advisories information for each component for more information on the security 
vulnerabilities and issues that may affect that component.
+
+- Apache Tomcat 7.x: Tomcat 7 security advisories
+- Apache OpenJPA
+- Apache CXF: CXF Security Advisories
+- Apache OpenWebBeans
+- Apache MyFaces
+- Apache Bean Validation
+
+By default any regular TomEE releases uses latest sub project releases, so 
that we can follow all security fixes as much as possible.
+
+=== Apache TomEE versioning details
+
+As security is a key concern in many companies, TomEE team also considers to 
deliver specific security fixes for those external projects being fixed. For 
instance, if Tomcat fixes a security issue in Tomcat x.y.z, used in TomEE 
a.b.c, we will consider packaging a new security update release using the new 
Tomcat release.
+
+In order to achieve a smoothly migration patch between a TomEE version and a 
security update, the TomEE team has decided to adopt the following versioning 
major.minor.patch[.security update]
+
+- major ([0-9]+): it refers mainly to the Java EE version we implement. 1.x 
for Java EE 6 for example.
+- minor ([0-9]+): contains features, bugfixes and security fixes (internal or 
third-party)
+- patch ([0-9]+): only bugfixes applied
+
+Optionally we can concatenate a security update to the version if TomEE source 
base if not impacted but only a dependency. Note this didn't happen yet.
+
+=== Additional information
+
+==== Secunia
+
+Secunia is an international IT security company specialising in vulnerability 
management based in Copenhagen, Denmark.
+
+There is an Apache Software Foundation vendor declared so you can follow all 
vulnerabilities related to Apache products. Of course, a Apache TomEE product 
is also available so you can search for know advisories.
+
+=== Links
+
+- http://apache.org/security/
+- http://apache.org/security/projects.html
+- http://apache.org/security/committers.html
+- http://cve.mitre.org/[Common Vulnerabilities and Exposures database]

http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/security/support.adoc
----------------------------------------------------------------------
diff --git a/src/main/jbake/content/security/support.adoc 
b/src/main/jbake/content/security/support.adoc
new file mode 100755
index 0000000..af5d330
--- /dev/null
+++ b/src/main/jbake/content/security/support.adoc
@@ -0,0 +1,34 @@
+= Support
+:jbake-date: 2016-03-16
+:jbake-type: page
+:jbake-status: published
+:jbake-tomeepdf:
+
+
+Support for Apache TomEE is given freely by the community.
+Please be aware when asking questions that the Apache Software Foundation does 
not have paid developers or dedicated support staff.
+All community support comes from volunteers on a volunteer basis.
+Joining the link:../community/index.html[Community] as a volunteer and helping 
your fellow users is highly encouraged!
+
+=== Mailing Lists
+
+- mailto:us...@tomee.apache.org[User Mailing List] 
(mailto:users-subscr...@tomee.apache.org[Subscribe now] | 
mailto:users-unsubscr...@tomee.apache.org[Unsubscribe]): for all your questions 
or to share the issues you can meet
+- mailto:d...@tomee.apache.org[Dev Mailing List] 
(mailto:dev-subscr...@tomee.apache.org[Subscribe now] | 
mailto:dev-unsubscr...@tomee.apache.org[Unsubscribe]): to speak about the 
project and developments
+- mailto:commits@tomee.apache.org[Commits Mailing List] 
(mailto:commits-subscr...@tomee.apache.org[Subscribe now] | 
mailto:commits-unsubscr...@tomee.apache.org[Unsubscribe]): receive commits by 
mail
+
+
+=== IRC
+
+http://webchat.freenode.net/?channels=openejb[openejb @ freenode] is the 
channel most of us use.
+
+=== Forums
+
+Our forum (mailing lists archives) can be accessed through 
http://tomee-openejb.979440.n4.nabble.com/[Nabble].
+
+=== Bugtracker/JIRA
+
+If you encounter a bug or want to submit a patch just go on our 
https://issues.apache.org/jira/browse/TOMEE[JIRA].
+
+=== Commercial Support
+
+If you need advanced support with SLA please have a look to our 
link:../community/commercial.html[Commercial] page.

http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/jbake.properties
----------------------------------------------------------------------
diff --git a/src/main/jbake/jbake.properties b/src/main/jbake/jbake.properties
new file mode 100755
index 0000000..ef3f1d0
--- /dev/null
+++ b/src/main/jbake/jbake.properties
@@ -0,0 +1,19 @@
+default.status=published
+render.encoding=UTF-8
+render.tags = true
+render.archive = false
+render.feed = false
+render.sitemap = true
+template.folder = templates
+template.index.file = index.gsp
+template.sitemap.file = sitemap.gsp
+template.page.file = page.gsp
+template.post.file = post.gsp
+template.contributors.file = contributors.gsp
+template.examples.file = examples.gsp
+template.blog.file = blog.gsp
+# template.archive.file = archive.gsp
+# template.tag.file = tags.gsp
+# template.feed.file = feed.gsp
+
+

http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/templates/archive.gsp
----------------------------------------------------------------------
diff --git a/src/main/jbake/templates/archive.gsp 
b/src/main/jbake/templates/archive.gsp
new file mode 100755
index 0000000..5b8d6a6
--- /dev/null
+++ b/src/main/jbake/templates/archive.gsp
@@ -0,0 +1,33 @@
+<%include 'header.gsp'%>
+
+       <%include 'menu.gsp'%>
+
+<div id="main-block">
+       <div class="page-header">
+               <div class="container">
+                       <h1>Blog Archive</h1>
+               </div>
+       </div>
+       <div class="container">
+               <!--<ul>-->
+                       <%def last_month=null;%>
+                       <%published_posts.each {post ->%>
+                               <%if (last_month) {%>
+                                       <%if (post.date.format("MMMM yyyy") != 
last_month) {%>
+                                               </ul>
+                                               <h4>${post.date.format("MMMM 
yyyy")}</h4>
+                                               <ul>
+                                       <%}%>
+                               <% } else { %>
+                                       <h4>${post.date.format("MMMM 
yyyy")}</h4>
+                                       <ul>
+                               <% }%>
+
+                               <li>${post.date.format("dd")} - <a 
href="${post.uri}">${post.title}</a></li>
+                               <%last_month = post.date.format("MMMM yyyy")%>
+                       <%}%>
+               </ul>
+       </div>
+</div>
+       
+<%include "footer.gsp"%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/templates/blog.gsp
----------------------------------------------------------------------
diff --git a/src/main/jbake/templates/blog.gsp 
b/src/main/jbake/templates/blog.gsp
new file mode 100755
index 0000000..70d94b4
--- /dev/null
+++ b/src/main/jbake/templates/blog.gsp
@@ -0,0 +1,28 @@
+<%include "header.gsp"%>
+
+       <%include "menu.gsp"%>
+
+    <div id="main-block" class="container section-padded">
+        <div class="row title">
+            <div class='page-header'>
+              <h2>Last posts</h2>
+            </div>
+        </div>
+        <div class="row">
+            <div class="col-md-12">
+                <%
+                last = published_posts.size() - 1
+                published_posts.eachWithIndex {post, idx ->
+                %>
+                    <a href="<%if (content.rootpath) {%>${content.rootpath}<% 
} else { %><% }%>${post.uri}"><h1>${post.title}</h1></a>
+                    <%if (post.date) {%><p><small>${post.date}</small></p><% } 
%>
+                    <p>${post.body}</p>
+                    <% if (idx != last) { %><hr /><% } %>
+                <%}%>
+
+                <!--p>Older posts are available in the <a 
href="/${config.archive_file}">archive</a>.</p>-->
+            </div>
+        </div>
+    </div>
+
+<%include "footer.gsp"%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/templates/contributors.gsp
----------------------------------------------------------------------
diff --git a/src/main/jbake/templates/contributors.gsp 
b/src/main/jbake/templates/contributors.gsp
new file mode 100755
index 0000000..2e13667
--- /dev/null
+++ b/src/main/jbake/templates/contributors.gsp
@@ -0,0 +1,43 @@
+<%include "header.gsp"%>
+       <%include "menu.gsp"%>
+
+    <div id="main-block" class="container section-padded">
+        <div class="row title">
+            <div class='page-header'>
+              <%if (content.containsKey('tomeepdf')) {%>
+              <div class='btn-toolbar pull-right'>
+                <div class='btn-group'>
+                    <a class="btn" href="<%if (content.rootpath) 
{%>${content.rootpath}<% } else { %><% }%>${content.uri.replace('html', 
'pdf')}"><i class="fa fa-file-pdf-o"></i> Download as PDF</a>
+                </div>
+              </div>
+              <% } %>
+              <h2>${content.title}</h2>
+            </div>
+        </div>
+        <div class="row">
+            <div class="col-md-12 contributors">
+              <div class="text-center" style="padding-bottom: 2em;">A <i 
class="fa fa-star-o" style="color:#F38F24;"></i> means the contributor is also 
a committer.</div>
+              <ul>
+                <%
+                    
org.apache.tomee.website.Contributors.load(content.body).each {contributor ->
+                %>
+                  <div class="col-sm-4">
+                    <div class="photo col-sm-5">
+                      <img alt="${contributor.name}" 
src="${contributor.gravatar}" style="width:140px">
+                      <% if (contributor.committer){ %><i class="pull-right fa 
fa-star-o" style="color:#F38F24;"></i><% } %>
+                    </div>
+                    <div class="col-sm-7">
+                      <h3 class="contributor-name" 
style="font-size:1.4em;">${contributor.name}</h3>
+                      <p></p>
+                      <ul class="list-inline">
+                      <%contributor.link.each {l ->%>
+                      <li><a href="${l.url}">${l.name}</a></li>
+                      <%}%>
+                    </div>
+                  </div>
+              <% } %>
+              </ul>
+            </div>
+        </div>
+    </div>
+<%include "footer.gsp"%>

http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/templates/examples.gsp
----------------------------------------------------------------------
diff --git a/src/main/jbake/templates/examples.gsp 
b/src/main/jbake/templates/examples.gsp
new file mode 100755
index 0000000..5258358
--- /dev/null
+++ b/src/main/jbake/templates/examples.gsp
@@ -0,0 +1,202 @@
+<%include "header.gsp"%>
+<%include "menu.gsp"%>
+
+<div id="main-block" class="container section-padded">
+<div class="row title">
+  <div class='page-header'>
+    <% if (content.containsKey('tomeepdf')) { %>
+    <div class='btn-toolbar pull-right'>
+      <div class='btn-group'>
+        <a class="btn" href="<%if (content.rootpath) {%>${content.rootpath}<% 
} else { %><% }%>${content.uri.replace('html', 'pdf')}">
+          <i class="fa fa-file-pdf-o"></i> Download as PDF
+        </a>
+      </div>
+    </div>
+    <% } %>
+    <h2>${content.title}</h2>
+  </div>
+</div>
+<div class="row">
+  <div class="col-md-12">
+    <input id="example-search" placeholder="Search an example and click on it 
to browse it..." class="typeahead"/>
+  </div>
+  <div class="vspace">&nbsp;</div>
+  <div class="col-md-12 examples text-center">
+    <%
+    def all = org.apache.tomee.website.Examples.loadAll()
+    def keys = []
+    keys.addAll(all.all.keySet())
+
+    [keys.subList(0, (int) keys.size() / 2), keys.subList((int) keys.size() / 
2, keys.size())].each { list ->
+      keys.subList(0, (int) keys.size() / 2).each { tag ->
+      examples = all.all[tag]
+    %>
+    <div class="col-sm-6">
+      <h3>${tag}</h3>
+      <ul class="list-unstyled">
+        <% examples.each {example -> %>
+        <li><a href="${example.name}.html">${example.name}</a></li>
+        <% } %>
+      </ul>
+    </div>
+    <% }} %>
+  </div>
+</div>
+</div>
+
+<style>
+.typeahead {
+    padding-left: 43px;
+    padding-right: 43px;
+    border-radius: 23px;
+    border:1px #ccc solid;
+    height: 46px;
+    width: 100%;
+    outline: none;
+}
+.typeahead:focus {
+    border-color: #66afe9;
+    outline: 0;
+    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 
0.6);
+}
+
+
+/* typeahead styling*/
+.tt-menu hr {
+    margin-bottom: 5px;
+    margin-top: 5px;
+}
+.tt-menu h3 {
+    margin-bottom: 2px;
+    margin-top: 2px;
+    padding-bottom: 2px;
+    padding-top: 2px;
+    font-size: 18px;
+    font-weight: bolder;
+}
+.tt-menu h2 {
+    font-weight: bold;
+}
+span.twitter-typeahead .tt-menu,
+span.twitter-typeahead .tt-dropdown-menu {
+  z-index: 1000;
+  display: none;
+  width: 100%;
+  min-width: 160px;
+  padding: 5px 0;
+  margin: 2px 0 0;
+  list-style: none;
+  text-align: left;
+  background-color: #ffffff;
+  border: 1px solid #cccccc;
+  border: 1px solid rgba(0, 0, 0, 0.15);
+  border-radius: 4px;
+  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+  background-clip: padding-box;
+}
+span.twitter-typeahead h3 {
+  padding-left: 15px;
+  clear: both;
+}
+span.twitter-typeahead .tt-suggestion {
+  display: block;
+  padding: 3px 15px;
+  clear: both;
+  font-weight: normal;
+  line-height: 1.42857143;
+  color: #333333;
+}
+span.twitter-typeahead .tt-suggestion.tt-cursor,
+span.twitter-typeahead .tt-suggestion:hover,
+span.twitter-typeahead .tt-suggestion:focus {
+  color: #ffffff;
+  text-decoration: none;
+  outline: 0;
+  background-color: #337ab7;
+}
+.input-group.input-group-lg span.twitter-typeahead .form-control {
+  height: 46px;
+  padding: 10px 16px;
+  line-height: 1.3333333;
+  border-radius: 6px;
+}
+.input-group.input-group-sm span.twitter-typeahead .form-control {
+  height: 30px;
+  padding: 5px 10px;
+  line-height: 1.5;
+  border-radius: 3px;
+}
+span.twitter-typeahead {
+  width: 100%;
+}
+.input-group span.twitter-typeahead {
+  display: block !important;
+  height: 34px;
+}
+.input-group span.twitter-typeahead .tt-menu,
+.input-group span.twitter-typeahead .tt-dropdown-menu {
+  top: 32px !important;
+}
+.input-group span.twitter-typeahead:not(:first-child):not(:last-child) 
.form-control {
+  border-radius: 0;
+}
+.input-group span.twitter-typeahead:first-child .form-control {
+  border-top-left-radius: 4px;
+  border-bottom-left-radius: 4px;
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 0;
+}
+.input-group span.twitter-typeahead:last-child .form-control {
+  border-top-left-radius: 0;
+  border-bottom-left-radius: 0;
+  border-top-right-radius: 4px;
+  border-bottom-right-radius: 4px;
+}
+.input-group.input-group-sm span.twitter-typeahead {
+  height: 30px;
+}
+.input-group.input-group-sm span.twitter-typeahead .tt-menu,
+.input-group.input-group-sm span.twitter-typeahead .tt-dropdown-menu {
+  top: 30px !important;
+}
+.input-group.input-group-lg span.twitter-typeahead {
+  height: 46px;
+}
+.input-group.input-group-lg span.twitter-typeahead .tt-menu,
+.input-group.input-group-lg span.twitter-typeahead .tt-dropdown-menu {
+  top: 46px !important;
+}
+</style>
+<script src="<%if (content.rootpath) {%>${content.rootpath}<% } else { %><% 
}%>js/jquery-1.11.1.min.js"></script>
+<script src="<%if (content.rootpath) {%>${content.rootpath}<% } else { %><% 
}%>js/typeahead.bundle.min.js"></script>
+<script>
+(function () {
+  var names = [];
+  document.querySelectorAll('.examples li > a').forEach(function (s) {
+    names.push(s.innerHTML);
+  });
+  var engine = new Bloodhound({
+    datumTokenizer: Bloodhound.tokenizers.nonword,
+    queryTokenizer: Bloodhound.tokenizers.nonword,
+    local: names
+  });
+  var input = jQuery('#example-search');
+  input.typeahead({ minLength: 1, highlight: true }, {
+    name: 'Examples',
+    source: engine,
+    templates: {
+      suggestion: function (item) {
+        return '<a href="' + item + '.html">' + item + '</a>';
+      }
+    }
+  });
+  input.bind('typeahead:select', function (evt, item) {
+    jQuery('li > a[href="' + item + '.html"]').click();
+  });
+})();
+
+</script>
+
+<%include "footer.gsp"%>
+

http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/templates/feed.gsp
----------------------------------------------------------------------
diff --git a/src/main/jbake/templates/feed.gsp 
b/src/main/jbake/templates/feed.gsp
new file mode 100755
index 0000000..5b71c59
--- /dev/null
+++ b/src/main/jbake/templates/feed.gsp
@@ -0,0 +1,25 @@
+<% import static groovy.xml.XmlUtil.escapeXml %><?xml version="1.0"?>
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom";>
+  <channel>
+    <title>JBake</title>
+    <link>${config.site_host}</link>
+    <atom:link href="${config.site_host}/${config.feed_file}" rel="self" 
type="application/rss+xml" />
+    <description>JBake Bootstrap Template</description>
+    <language>en-gb</language>
+    <pubDate>${published_date.format("EEE, d MMM yyyy HH:mm:ss Z")}</pubDate>
+    <lastBuildDate>${published_date.format("EEE, d MMM yyyy HH:mm:ss 
Z")}</lastBuildDate>
+
+    <%published_posts.each {post -> %>
+    <item>
+      <title>${post.title}</title>
+      <link>${config.site_host}/${post.uri}</link>
+      <pubDate>${post.date.format("EEE, d MMM yyyy HH:mm:ss Z")}</pubDate>
+      <guid isPermaLink="false">${post.uri}</guid>
+      <description>
+      ${escapeXml(post.body)}
+         </description>
+    </item>
+    <%}%>
+
+  </channel> 
+</rss>

Reply via email to