You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by mm...@apache.org on 2005/02/23 18:56:09 UTC

svn commit: r155035 - in incubator/beehive/trunk/samples/wsm-samples/WEB-INF: ./ src/web/common/ src/web/complex/ src/web/oneway/

Author: mmerz
Date: Wed Feb 23 09:56:04 2005
New Revision: 155035

URL: http://svn.apache.org/viewcvs?view=rev&rev=155035
Log:
More samples for annotations (@Oneway, @SOAPBinding).
Samples for use of complex types.


Added:
    incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/ComplexException.java
    incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/ComplexObject.java
    incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/ComplexObjectHolder.java
    incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/Value.java
    incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/complex/
    incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/complex/DocumentLiteralBareSample.jws
    incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/complex/DocumentLiteralWrappedSample.jws
    incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/complex/RpcLiteralSample.jws
    incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/oneway/
    incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/oneway/OnewaySample.jws
Modified:
    incubator/beehive/trunk/samples/wsm-samples/WEB-INF/build-dist.xml

Modified: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/build-dist.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/build-dist.xml?view=diff&r1=155034&r2=155035
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/build-dist.xml (original)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/build-dist.xml Wed Feb 23 09:56:04 2005
@@ -18,11 +18,11 @@
    $Header:$
  -->
 
-<project name="Blank Sample" default="build" basedir=".">
+<project name="Beehive/WSM Sample Web Services" default="build" basedir=".">
 
   <import file="../../../beehive-imports.xml" />
 
-  <property name="service.name" value="blank" />
+  <property name="service.name" value="wsm-samples" />
 
   <property name="webapp.dir" location=".." />
   <property name="web.inf.dir" location="${webapp.dir}/WEB-INF" />
@@ -132,4 +132,4 @@
         debug="true" />
   </target>
 
-</project>
+</project>
\ No newline at end of file

Added: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/ComplexException.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/ComplexException.java?view=auto&rev=155035
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/ComplexException.java (added)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/ComplexException.java Wed Feb 23 09:56:04 2005
@@ -0,0 +1,32 @@
+package web.common;
+
+/*
+ * Copyright 2004, 2005 The Apache Software Foundation
+ *
+ * Licensed 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.
+ *
+ * $Header:$Factory
+ */
+
+public class ComplexException extends Exception {
+
+    private Object field;
+
+    public ComplexException() { }
+
+    public ComplexException(String msg) { super(msg); }
+
+    public Object getField() { return field; }
+
+    public void setField(Object field) { this.field = field; }    
+}
\ No newline at end of file

Added: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/ComplexObject.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/ComplexObject.java?view=auto&rev=155035
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/ComplexObject.java (added)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/ComplexObject.java Wed Feb 23 09:56:04 2005
@@ -0,0 +1,30 @@
+package web.common;
+
+/*
+ * Copyright 2004, 2005 The Apache Software Foundation
+ *
+ * Licensed 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.
+ *
+ * $Header:$Factory
+ */
+
+public class ComplexObject {
+
+    private Value value;
+
+    public ComplexObject(Value value) { this.value = value; }
+
+    public Value getValue() { return value; }
+
+    public void setValue(Value value) { this.value = value; }    
+}
\ No newline at end of file

Added: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/ComplexObjectHolder.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/ComplexObjectHolder.java?view=auto&rev=155035
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/ComplexObjectHolder.java (added)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/ComplexObjectHolder.java Wed Feb 23 09:56:04 2005
@@ -0,0 +1,24 @@
+package web.common;
+
+/*
+ * Copyright 2004, 2005 The Apache Software Foundation
+ *
+ * Licensed 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.
+ *
+ * $Header:$Factory
+ */
+
+public class ComplexObjectHolder implements javax.xml.rpc.holders.Holder {
+
+    public ComplexObject value;
+}
\ No newline at end of file

Added: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/Value.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/Value.java?view=auto&rev=155035
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/Value.java (added)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/common/Value.java Wed Feb 23 09:56:04 2005
@@ -0,0 +1,30 @@
+package web.common;
+
+/*
+ * Copyright 2004, 2005 The Apache Software Foundation
+ *
+ * Licensed 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.
+ *
+ * $Header:$Factory
+ */
+
+public class Value {
+
+    private Object field;
+
+    public Value(Object field) { this.field = field; }
+
+    public Object getField() { return field; }
+
+    public void setField(Object field) { this.field = field; }    
+}
\ No newline at end of file

Added: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/complex/DocumentLiteralBareSample.jws
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/complex/DocumentLiteralBareSample.jws?view=auto&rev=155035
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/complex/DocumentLiteralBareSample.jws (added)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/complex/DocumentLiteralBareSample.jws Wed Feb 23 09:56:04 2005
@@ -0,0 +1,134 @@
+package web.complex;
+
+/*
+ * Copyright 2004, 2005 The Apache Software Foundation
+ *
+ * Licensed 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.
+ *
+ * $Header:$Factory
+ */
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import web.common.ComplexObject;
+import web.common.ComplexException;
+import web.common.ComplexObjectHolder;
+import web.common.Value;
+
+/**
+ * This class illustrates the use of complex types with style/use "DOC/LITERAL" (bare).
+ */
+@WebService
+@SOAPBinding(
+    style=SOAPBinding.Style.DOCUMENT,
+    use=SOAPBinding.Use.LITERAL,
+    parameterStyle=SOAPBinding.ParameterStyle.BARE
+)        
+public class DocumentLiteralBareSample {
+
+    /**
+     * Returns a complex object that was passed in as IN parameter in the message body.
+     * @param object The object to be returned.
+     * @return The complex object that was passed in as an IN parameter.
+     */
+    @WebMethod
+    @WebResult(name="ReturnComplexObjectResult")
+    public ComplexObject returnComplexObjectBody(@WebParam(name="in-param-body", mode=WebParam.Mode.IN) ComplexObject object) {
+        return object;
+    }
+
+    /**
+     * Returns a complex object that was passed in as IN parameter in the message header.
+     * @param object The object to be modified.
+     * @return The complex object that was passed in as an IN parameter.
+     */
+    @WebMethod
+    @WebResult(name="ReturnComplexObjectResult")
+    public ComplexObject returnComplexObjectHeader(@WebParam(name="in-param-header", header=true, mode=WebParam.Mode.IN) ComplexObject object) {
+        return object;
+    }
+
+    /**
+     * Creates a new complex object and returns that object as an OUT parameter that is encoded in the message body.
+     * @param objectHolder The holder of the object to be returned.
+     * @return A operational result (always "0").
+     */
+    @WebMethod
+    @WebResult(name="ReturnCreateComplexObjectResult")
+    public int createComplexObjectBody(@WebParam(name="out-param-body", mode=WebParam.Mode.OUT) ComplexObjectHolder objectHolder) {
+        Value value = new Value("TESTVALUE");
+        ComplexObject object = new ComplexObject(value);
+        objectHolder.value = object;
+        return 0;
+    }
+
+    /**
+     * Creates a new complex object and returns that object as an OUT parameter that is encoded in the message header.
+     * @param objectHolder The holder of the object to be returned.
+     * @return A operational result (always "0").
+     */
+    @WebMethod
+    @WebResult(name="ReturnCreateComplexObjectResult")
+    public int createComplexObjectHeader(@WebParam(name="out-param-header", header=true, mode=WebParam.Mode.OUT) ComplexObjectHolder objectHolder) {
+        Value value = new Value("TESTVALUE");
+        ComplexObject object = new ComplexObject(value);
+        objectHolder.value = object;
+        return 0;
+    }
+
+    /**
+     * Modifies a complex INOUT parameter that is encoded in the message body.
+     * @param complexObjectHolder The object to be modified.
+     * @return A operational result (always "0").
+     */
+    @WebMethod
+    @WebResult(name="ChangeComplexObjectResult")
+    public int changeComplexObjectBody(@WebParam(name="inout-param-body", mode=WebParam.Mode.INOUT) ComplexObjectHolder complexObjectHolder) {
+        ComplexObject complexObject = complexObjectHolder.value;
+        Value oldValue = complexObject.getValue();
+        Value newValue = new Value(oldValue.getField());
+        complexObject.setValue(newValue);
+        return 0;
+    }
+
+    /**
+     * Modifies a complex INOUT parameter that is encoded in the message header.
+     * @param complexObjectHolder The object to be modified.
+     * @return A operational result (always "0").
+     */
+    @WebMethod
+    @WebResult(name="ChangeComplexObjectResult")
+    public int changeComplexObjectHeader(@WebParam(name="inout-param-header", header=true, mode=WebParam.Mode.INOUT) ComplexObjectHolder complexObjectHolder) {
+        ComplexObject complexObject = complexObjectHolder.value;
+        Value oldValue = complexObject.getValue();
+        Value newValue = new Value(oldValue.getField());
+        complexObject.setValue(newValue);
+        return 0;
+    }
+
+    /**
+     * Throws a ComplexException.
+     * @param value Ignored.
+     * @return A operational result (never returned).
+     * @throws ComplexException Always thrown.
+     */
+    @WebMethod
+    @WebResult(name="ThrowComplexExceptionResult")
+    public int throwComplexException(@WebParam(name="in-param") int value) throws ComplexException {
+        throw new ComplexException("This is a sample message for:\n\tComplexException with value=\"" + value + "\"");
+    }
+}
\ No newline at end of file

Added: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/complex/DocumentLiteralWrappedSample.jws
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/complex/DocumentLiteralWrappedSample.jws?view=auto&rev=155035
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/complex/DocumentLiteralWrappedSample.jws (added)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/complex/DocumentLiteralWrappedSample.jws Wed Feb 23 09:56:04 2005
@@ -0,0 +1,134 @@
+package web.complex;
+
+/*
+ * Copyright 2004, 2005 The Apache Software Foundation
+ *
+ * Licensed 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.
+ *
+ * $Header:$Factory
+ */
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import web.common.ComplexObject;
+import web.common.ComplexException;
+import web.common.ComplexObjectHolder;
+import web.common.Value;
+
+/**
+ * This class illustrates the use of complex types with style/use "DOC/LITERAL" (wrapped).
+ */
+@WebService
+@SOAPBinding(
+    style=SOAPBinding.Style.DOCUMENT,
+    use=SOAPBinding.Use.LITERAL,
+    parameterStyle=SOAPBinding.ParameterStyle.WRAPPED
+)        
+public class DocumentLiteralWrappedSample {
+
+    /**
+     * Returns a complex object that was passed in as IN parameter in the message body.
+     * @param object The object to be returned.
+     * @return The complex object that was passed in as an IN parameter.
+     */
+    @WebMethod
+    @WebResult(name="ReturnComplexObjectResult")
+    public ComplexObject returnComplexObjectBody(@WebParam(name="in-param-body", mode=WebParam.Mode.IN) ComplexObject object) {
+        return object;
+    }
+
+    /**
+     * Returns a complex object that was passed in as IN parameter in the message header.
+     * @param object The object to be modified.
+     * @return The complex object that was passed in as an IN parameter.
+     */
+    @WebMethod
+    @WebResult(name="ReturnComplexObjectResult")
+    public ComplexObject returnComplexObjectHeader(@WebParam(name="in-param-header", header=true, mode=WebParam.Mode.IN) ComplexObject object) {
+        return object;
+    }
+
+    /**
+     * Creates a new complex object and returns that object as an OUT parameter that is encoded in the message body.
+     * @param objectHolder The holder of the object to be returned.
+     * @return A operational result (always "0").
+     */
+    @WebMethod
+    @WebResult(name="ReturnCreateComplexObjectResult")
+    public int createComplexObjectBody(@WebParam(name="out-param-body", mode=WebParam.Mode.OUT) ComplexObjectHolder objectHolder) {
+        Value value = new Value("TESTVALUE");
+        ComplexObject object = new ComplexObject(value);
+        objectHolder.value = object;
+        return 0;
+    }
+
+    /**
+     * Creates a new complex object and returns that object as an OUT parameter that is encoded in the message header.
+     * @param objectHolder The holder of the object to be returned.
+     * @return A operational result (always "0").
+     */
+    @WebMethod
+    @WebResult(name="ReturnCreateComplexObjectResult")
+    public int createComplexObjectHeader(@WebParam(name="out-param-header", header=true, mode=WebParam.Mode.OUT) ComplexObjectHolder objectHolder) {
+        Value value = new Value("TESTVALUE");
+        ComplexObject object = new ComplexObject(value);
+        objectHolder.value = object;
+        return 0;
+    }
+
+    /**
+     * Modifies a complex INOUT parameter that is encoded in the message body.
+     * @param complexObjectHolder The object to be modified.
+     * @return A operational result (always "0").
+     */
+    @WebMethod
+    @WebResult(name="ChangeComplexObjectResult")
+    public int changeComplexObjectBody(@WebParam(name="inout-param-body", mode=WebParam.Mode.INOUT) ComplexObjectHolder complexObjectHolder) {
+        ComplexObject complexObject = complexObjectHolder.value;
+        Value oldValue = complexObject.getValue();
+        Value newValue = new Value(oldValue.getField());
+        complexObject.setValue(newValue);
+        return 0;
+    }
+
+    /**
+     * Modifies a complex INOUT parameter that is encoded in the message header.
+     * @param complexObjectHolder The object to be modified.
+     * @return A operational result (always "0").
+     */
+    @WebMethod
+    @WebResult(name="ChangeComplexObjectResult")
+    public int changeComplexObjectHeader(@WebParam(name="inout-param-header", header=true, mode=WebParam.Mode.INOUT) ComplexObjectHolder complexObjectHolder) {
+        ComplexObject complexObject = complexObjectHolder.value;
+        Value oldValue = complexObject.getValue();
+        Value newValue = new Value(oldValue.getField());
+        complexObject.setValue(newValue);
+        return 0;
+    }
+
+    /**
+     * Throws a ComplexException.
+     * @param value Ignored.
+     * @return A operational result (never returned).
+     * @throws ComplexException Always thrown.
+     */
+    @WebMethod
+    @WebResult(name="ThrowComplexExceptionResult")
+    public int throwComplexException(@WebParam(name="in-param") int value) throws ComplexException {
+        throw new ComplexException("This is a sample message for:\n\tComplexException with value=\"" + value + "\"");
+    }
+}
\ No newline at end of file

Added: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/complex/RpcLiteralSample.jws
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/complex/RpcLiteralSample.jws?view=auto&rev=155035
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/complex/RpcLiteralSample.jws (added)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/complex/RpcLiteralSample.jws Wed Feb 23 09:56:04 2005
@@ -0,0 +1,133 @@
+package web.complex;
+
+/*
+ * Copyright 2004, 2005 The Apache Software Foundation
+ *
+ * Licensed 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.
+ *
+ * $Header:$Factory
+ */
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import web.common.ComplexObject;
+import web.common.ComplexException;
+import web.common.ComplexObjectHolder;
+import web.common.Value;
+
+/**
+ * This class illustrates the use of complex types with style/use "RPC/LITERAL".
+ */
+@WebService
+@SOAPBinding(
+    style=SOAPBinding.Style.RPC,
+    use=SOAPBinding.Use.LITERAL
+)        
+public class RpcLiteralSample {
+
+    /**
+     * Returns a complex object that was passed in as IN parameter in the message body.
+     * @param object The object to be returned.
+     * @return The complex object that was passed in as an IN parameter.
+     */
+    @WebMethod
+    @WebResult(name="ReturnComplexObjectResult")
+    public ComplexObject returnComplexObjectBody(@WebParam(name="in-param-body", mode=WebParam.Mode.IN) ComplexObject object) {
+        return object;
+    }
+
+    /**
+     * Returns a complex object that was passed in as IN parameter in the message header.
+     * @param object The object to be modified.
+     * @return The complex object that was passed in as an IN parameter.
+     */
+    @WebMethod
+    @WebResult(name="ReturnComplexObjectResult")
+    public ComplexObject returnComplexObjectHeader(@WebParam(name="in-param-header", header=true, mode=WebParam.Mode.IN) ComplexObject object) {
+        return object;
+    }
+
+    /**
+     * Creates a new complex object and returns that object as an OUT parameter that is encoded in the message body.
+     * @param objectHolder The holder of the object to be returned.
+     * @return A operational result (always "0").
+     */
+    @WebMethod
+    @WebResult(name="ReturnCreateComplexObjectResult")
+    public int createComplexObjectBody(@WebParam(name="out-param-body", mode=WebParam.Mode.OUT) ComplexObjectHolder objectHolder) {
+        Value value = new Value("TESTVALUE");
+        ComplexObject object = new ComplexObject(value);
+        objectHolder.value = object;
+        return 0;
+    }
+
+    /**
+     * Creates a new complex object and returns that object as an OUT parameter that is encoded in the message header.
+     * @param objectHolder The holder of the object to be returned.
+     * @return A operational result (always "0").
+     */
+    @WebMethod
+    @WebResult(name="ReturnCreateComplexObjectResult")
+    public int createComplexObjectHeader(@WebParam(name="out-param-header", header=true, mode=WebParam.Mode.OUT) ComplexObjectHolder objectHolder) {
+        Value value = new Value("TESTVALUE");
+        ComplexObject object = new ComplexObject(value);
+        objectHolder.value = object;
+        return 0;
+    }
+
+    /**
+     * Modifies a complex INOUT parameter that is encoded in the message body.
+     * @param complexObjectHolder The object to be modified.
+     * @return A operational result (always "0").
+     */
+    @WebMethod
+    @WebResult(name="ChangeComplexObjectResult")
+    public int changeComplexObjectBody(@WebParam(name="inout-param-body", mode=WebParam.Mode.INOUT) ComplexObjectHolder complexObjectHolder) {
+        ComplexObject complexObject = complexObjectHolder.value;
+        Value oldValue = complexObject.getValue();
+        Value newValue = new Value(oldValue.getField());
+        complexObject.setValue(newValue);
+        return 0;
+    }
+
+    /**
+     * Modifies a complex INOUT parameter that is encoded in the message header.
+     * @param complexObjectHolder The object to be modified.
+     * @return A operational result (always "0").
+     */
+    @WebMethod
+    @WebResult(name="ChangeComplexObjectResult")
+    public int changeComplexObjectHeader(@WebParam(name="inout-param-header", header=true, mode=WebParam.Mode.INOUT) ComplexObjectHolder complexObjectHolder) {
+        ComplexObject complexObject = complexObjectHolder.value;
+        Value oldValue = complexObject.getValue();
+        Value newValue = new Value(oldValue.getField());
+        complexObject.setValue(newValue);
+        return 0;
+    }
+
+    /**
+     * Throws a ComplexException.
+     * @param value Ignored.
+     * @return A operational result (never returned).
+     * @throws ComplexException Always thrown.
+     */
+    @WebMethod
+    @WebResult(name="ThrowComplexExceptionResult")
+    public int throwComplexException(@WebParam(name="in-param") int value) throws ComplexException {
+        throw new ComplexException("This is a sample message for:\n\tComplexException with value=\"" + value + "\"");
+    }
+}
\ No newline at end of file

Added: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/oneway/OnewaySample.jws
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/oneway/OnewaySample.jws?view=auto&rev=155035
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/oneway/OnewaySample.jws (added)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/oneway/OnewaySample.jws Wed Feb 23 09:56:04 2005
@@ -0,0 +1,36 @@
+package web.oneway;
+
+/*
+ * Copyright 2004, 2005 The Apache Software Foundation
+ *
+ * Licensed 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.
+ *
+ * $Header:$Factory
+ */
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService
+public class OnewaySample {
+
+    /**
+     * This method does not allow return types, exceptions, or INOUT/OUT parameters.
+     */
+    @WebMethod
+    @Oneway
+    public void hello(String name) {
+         System.out.println("Hello, " + name + "!");
+    }
+}