tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andygumbre...@apache.org
Subject [02/33] tomee git commit: Align SNAPSHOT versions & reformat examples
Date Fri, 25 Sep 2015 10:42:37 GMT
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-handlerchain/src/test/java/org/superbiz/calculator/wsh/CalculatorTest.java
----------------------------------------------------------------------
diff --git a/examples/webservice-handlerchain/src/test/java/org/superbiz/calculator/wsh/CalculatorTest.java b/examples/webservice-handlerchain/src/test/java/org/superbiz/calculator/wsh/CalculatorTest.java
index 87cb5bc..b874047 100644
--- a/examples/webservice-handlerchain/src/test/java/org/superbiz/calculator/wsh/CalculatorTest.java
+++ b/examples/webservice-handlerchain/src/test/java/org/superbiz/calculator/wsh/CalculatorTest.java
@@ -1,63 +1,63 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.superbiz.calculator.wsh;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import javax.ejb.embeddable.EJBContainer;
-import javax.xml.namespace.QName;
-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 {
-
-	//Random port to avoid test conflicts
-    private static final int port = Integer.parseInt(System.getProperty("httpejbd.port", "" + org.apache.openejb.util.NetworkUtil.getNextAvailablePort()));
-
-    @BeforeClass
-    public static void setUp() throws Exception {
-        Properties properties = new Properties();
-        properties.setProperty("openejb.embedded.remotable", "true");
-		
-		//Just for this test we change the default port from 4204 to avoid conflicts
-		properties.setProperty("httpejbd.port", "" + port);
-		
-        //properties.setProperty("httpejbd.print", "true");
-        //properties.setProperty("httpejbd.indent.xml", "true");
-        EJBContainer.createEJBContainer(properties);
-    }
-
-    @Test
-    public void testCalculatorViaWsInterface() throws Exception {
-        final Service calculatorService = Service.create(
-                                                            new URL("http://localhost:" + port + "/webservice-handlerchain/Calculator?wsdl"),
-                                                            new QName("http://superbiz.org/wsdl", "CalculatorService"));
-
-        assertNotNull(calculatorService);
-
-        final CalculatorWs calculator = calculatorService.getPort(CalculatorWs.class);
-
-        // we expect our answers to come back 1000 times better, plus one!
-        assertEquals(10001, calculator.sum(4, 6));
-        assertEquals(12001, calculator.multiply(3, 4));
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.calculator.wsh;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import javax.ejb.embeddable.EJBContainer;
+import javax.xml.namespace.QName;
+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 {
+
+    //Random port to avoid test conflicts
+    private static final int port = Integer.parseInt(System.getProperty("httpejbd.port", "" + org.apache.openejb.util.NetworkUtil.getNextAvailablePort()));
+
+    @BeforeClass
+    public static void setUp() throws Exception {
+        Properties properties = new Properties();
+        properties.setProperty("openejb.embedded.remotable", "true");
+
+        //Just for this test we change the default port from 4204 to avoid conflicts
+        properties.setProperty("httpejbd.port", "" + port);
+
+        //properties.setProperty("httpejbd.print", "true");
+        //properties.setProperty("httpejbd.indent.xml", "true");
+        EJBContainer.createEJBContainer(properties);
+    }
+
+    @Test
+    public void testCalculatorViaWsInterface() throws Exception {
+        final Service calculatorService = Service.create(
+                new URL("http://localhost:" + port + "/webservice-handlerchain/Calculator?wsdl"),
+                new QName("http://superbiz.org/wsdl", "CalculatorService"));
+
+        assertNotNull(calculatorService);
+
+        final CalculatorWs calculator = calculatorService.getPort(CalculatorWs.class);
+
+        // we expect our answers to come back 1000 times better, plus one!
+        assertEquals(10001, calculator.sum(4, 6));
+        assertEquals(12001, calculator.multiply(3, 4));
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-holder/src/main/java/org/superbiz/ws/out/Calculator.java
----------------------------------------------------------------------
diff --git a/examples/webservice-holder/src/main/java/org/superbiz/ws/out/Calculator.java b/examples/webservice-holder/src/main/java/org/superbiz/ws/out/Calculator.java
index 706d04d..8638367 100644
--- a/examples/webservice-holder/src/main/java/org/superbiz/ws/out/Calculator.java
+++ b/examples/webservice-holder/src/main/java/org/superbiz/ws/out/Calculator.java
@@ -1,38 +1,38 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.superbiz.ws.out;
-
-import javax.ejb.Stateless;
-import javax.jws.WebParam;
-import javax.jws.WebService;
-import javax.xml.ws.Holder;
-
-@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;
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.ws.out;
+
+import javax.ejb.Stateless;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+
+@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;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-holder/src/main/java/org/superbiz/ws/out/CalculatorWs.java
----------------------------------------------------------------------
diff --git a/examples/webservice-holder/src/main/java/org/superbiz/ws/out/CalculatorWs.java b/examples/webservice-holder/src/main/java/org/superbiz/ws/out/CalculatorWs.java
index 9d81913..3f2f3ae 100644
--- a/examples/webservice-holder/src/main/java/org/superbiz/ws/out/CalculatorWs.java
+++ b/examples/webservice-holder/src/main/java/org/superbiz/ws/out/CalculatorWs.java
@@ -1,26 +1,26 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.superbiz.ws.out;
-
-import javax.jws.WebService;
-import javax.xml.ws.Holder;
-
-@WebService(targetNamespace = "http://superbiz.org/wsdl")
-public interface CalculatorWs {
-
-    public void sumAndMultiply(int a, int b, Holder<Integer> sum, Holder<Integer> multiply);
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.ws.out;
+
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+
+@WebService(targetNamespace = "http://superbiz.org/wsdl")
+public interface CalculatorWs {
+
+    public void sumAndMultiply(int a, int b, Holder<Integer> sum, Holder<Integer> multiply);
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-holder/src/test/java/org/superbiz/ws/out/CalculatorTest.java
----------------------------------------------------------------------
diff --git a/examples/webservice-holder/src/test/java/org/superbiz/ws/out/CalculatorTest.java b/examples/webservice-holder/src/test/java/org/superbiz/ws/out/CalculatorTest.java
index 49a182e..edc441f 100644
--- a/examples/webservice-holder/src/test/java/org/superbiz/ws/out/CalculatorTest.java
+++ b/examples/webservice-holder/src/test/java/org/superbiz/ws/out/CalculatorTest.java
@@ -1,68 +1,68 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.superbiz.ws.out;
-
-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 {
-
-	//Random port to avoid test conflicts
-    private static final int port = Integer.parseInt(System.getProperty("httpejbd.port", "" + org.apache.openejb.util.NetworkUtil.getNextAvailablePort()));
-
-    @BeforeClass
-    public static void setUp() throws Exception {
-        Properties properties = new Properties();
-        properties.setProperty("openejb.embedded.remotable", "true");
-		
-		//Just for this test we change the default port from 4204 to avoid conflicts
-		properties.setProperty("httpejbd.port", "" + port);
-		
-        // 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://localhost:" + port + "/webservice-holder/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);
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.ws.out;
+
+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 {
+
+    //Random port to avoid test conflicts
+    private static final int port = Integer.parseInt(System.getProperty("httpejbd.port", "" + org.apache.openejb.util.NetworkUtil.getNextAvailablePort()));
+
+    @BeforeClass
+    public static void setUp() throws Exception {
+        Properties properties = new Properties();
+        properties.setProperty("openejb.embedded.remotable", "true");
+
+        //Just for this test we change the default port from 4204 to avoid conflicts
+        properties.setProperty("httpejbd.port", "" + port);
+
+        // 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://localhost:" + port + "/webservice-holder/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);
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Item.java
----------------------------------------------------------------------
diff --git a/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Item.java b/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Item.java
index 919ea20..c89e4aa 100644
--- a/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Item.java
+++ b/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Item.java
@@ -1,69 +1,69 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-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;
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Tower.java
----------------------------------------------------------------------
diff --git a/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Tower.java b/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Tower.java
index 427f3c7..5f68117 100644
--- a/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Tower.java
+++ b/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Tower.java
@@ -1,50 +1,50 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-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;
-    }
-
-    ;
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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;
+    }
+
+    ;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/WakeRiderImpl.java
----------------------------------------------------------------------
diff --git a/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/WakeRiderImpl.java b/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/WakeRiderImpl.java
index 0c76eb1..dd813b7 100644
--- a/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/WakeRiderImpl.java
+++ b/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/WakeRiderImpl.java
@@ -1,56 +1,56 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-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;
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/WakeRiderWs.java
----------------------------------------------------------------------
diff --git a/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/WakeRiderWs.java b/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/WakeRiderWs.java
index 372caa4..34aaa51 100644
--- a/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/WakeRiderWs.java
+++ b/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/WakeRiderWs.java
@@ -1,35 +1,35 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-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;
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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;
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Wakeboard.java
----------------------------------------------------------------------
diff --git a/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Wakeboard.java b/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Wakeboard.java
index 231115d..2929acf 100644
--- a/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Wakeboard.java
+++ b/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Wakeboard.java
@@ -1,24 +1,24 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.superbiz.inheritance;
-
-import javax.persistence.Entity;
-
-@Entity
-public class Wakeboard extends Wearable {
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.inheritance;
+
+import javax.persistence.Entity;
+
+@Entity
+public class Wakeboard extends Wearable {
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/WakeboardBinding.java
----------------------------------------------------------------------
diff --git a/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/WakeboardBinding.java b/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/WakeboardBinding.java
index def1c0e..fb60976 100644
--- a/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/WakeboardBinding.java
+++ b/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/WakeboardBinding.java
@@ -1,24 +1,24 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.superbiz.inheritance;
-
-import javax.persistence.Entity;
-
-@Entity
-public class WakeboardBinding extends Wearable {
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.inheritance;
+
+import javax.persistence.Entity;
+
+@Entity
+public class WakeboardBinding extends Wearable {
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Wearable.java
----------------------------------------------------------------------
diff --git a/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Wearable.java b/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Wearable.java
index 6db5073..aa22d09 100644
--- a/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Wearable.java
+++ b/examples/webservice-inheritance/src/main/java/org/superbiz/inheritance/Wearable.java
@@ -1,33 +1,33 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-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;
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-inheritance/src/test/java/org/superbiz/inheritance/InheritanceTest.java
----------------------------------------------------------------------
diff --git a/examples/webservice-inheritance/src/test/java/org/superbiz/inheritance/InheritanceTest.java b/examples/webservice-inheritance/src/test/java/org/superbiz/inheritance/InheritanceTest.java
index 0adb975..e63c4da 100644
--- a/examples/webservice-inheritance/src/test/java/org/superbiz/inheritance/InheritanceTest.java
+++ b/examples/webservice-inheritance/src/test/java/org/superbiz/inheritance/InheritanceTest.java
@@ -1,157 +1,157 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-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;
-	
-	//Random port to avoid test conflicts
-    private static final int port = Integer.parseInt(System.getProperty("httpejbd.port", "" + org.apache.openejb.util.NetworkUtil.getNextAvailablePort()));
-
-    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");
-		
-		//Just for this test we change the default port from 4204 to avoid conflicts
-		p.put("httpejbd.port", "" + port);
-
-        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://localhost:" + port + "/webservice-inheritance/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;
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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;
+
+    //Random port to avoid test conflicts
+    private static final int port = Integer.parseInt(System.getProperty("httpejbd.port", "" + org.apache.openejb.util.NetworkUtil.getNextAvailablePort()));
+
+    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");
+
+        //Just for this test we change the default port from 4204 to avoid conflicts
+        p.put("httpejbd.port", "" + port);
+
+        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://localhost:" + port + "/webservice-inheritance/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;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorImpl.java
----------------------------------------------------------------------
diff --git a/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorImpl.java b/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorImpl.java
index cab94a1..6004523 100644
--- a/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorImpl.java
+++ b/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorImpl.java
@@ -1,51 +1,51 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-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;
-    }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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;
+    }
+
+}
 //END SNIPPET: code
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java
----------------------------------------------------------------------
diff --git a/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java b/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java
index 31149f2..66e9eb3 100644
--- a/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java
+++ b/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java
@@ -1,28 +1,28 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-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);
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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);
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorWs.java
----------------------------------------------------------------------
diff --git a/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorWs.java b/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorWs.java
index 8feb08f..02521b9 100644
--- a/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorWs.java
+++ b/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorWs.java
@@ -1,36 +1,36 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-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);
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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);
+}
 //END SNIPPET: code
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-security/src/test/java/org/superbiz/calculator/CalculatorTest.java
----------------------------------------------------------------------
diff --git a/examples/webservice-security/src/test/java/org/superbiz/calculator/CalculatorTest.java b/examples/webservice-security/src/test/java/org/superbiz/calculator/CalculatorTest.java
index ef226e7..14cf1a3 100644
--- a/examples/webservice-security/src/test/java/org/superbiz/calculator/CalculatorTest.java
+++ b/examples/webservice-security/src/test/java/org/superbiz/calculator/CalculatorTest.java
@@ -1,69 +1,69 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-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;
-	
-	//Random port to avoid test conflicts
-    private static final int port = Integer.parseInt(System.getProperty("httpejbd.port", "" + org.apache.openejb.util.NetworkUtil.getNextAvailablePort()));
-
-    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");
-		
-		//Just for this test we change the default port from 4204 to avoid conflicts
-		properties.setProperty("httpejbd.port", "" + port);
-
-        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://localhost:" + port + "/webservice-security/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
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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;
+
+    //Random port to avoid test conflicts
+    private static final int port = Integer.parseInt(System.getProperty("httpejbd.port", "" + org.apache.openejb.util.NetworkUtil.getNextAvailablePort()));
+
+    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");
+
+        //Just for this test we change the default port from 4204 to avoid conflicts
+        properties.setProperty("httpejbd.port", "" + port);
+
+        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://localhost:" + port + "/webservice-security/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
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorImpl.java
----------------------------------------------------------------------
diff --git a/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorImpl.java b/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorImpl.java
index fa5e800..8a12afa 100644
--- a/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorImpl.java
+++ b/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorImpl.java
@@ -1,52 +1,52 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-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 {
-
-    @Override
-    @RolesAllowed(value = {"Administrator"})
-    public int sum(final int add1, final int add2) {
-        return add1 + add2;
-    }
-
-    @Override
-    public int multiply(final int mul1, final int mul2) {
-        return mul1 * mul2;
-    }
-
-}
-//END SNIPPET: code
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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 {
+
+    @Override
+    @RolesAllowed(value = {"Administrator"})
+    public int sum(final int add1, final int add2) {
+        return add1 + add2;
+    }
+
+    @Override
+    public int multiply(final int mul1, final int mul2) {
+        return mul1 * mul2;
+    }
+
+}
+//END SNIPPET: code

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java
----------------------------------------------------------------------
diff --git a/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java b/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java
index 68fed28..66e9eb3 100644
--- a/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java
+++ b/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java
@@ -1,28 +1,28 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-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);
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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);
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorWs.java
----------------------------------------------------------------------
diff --git a/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorWs.java b/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorWs.java
index 8feb08f..02521b9 100644
--- a/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorWs.java
+++ b/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorWs.java
@@ -1,36 +1,36 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-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);
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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);
+}
 //END SNIPPET: code
\ No newline at end of file


Mime
View raw message