You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/06/14 23:14:49 UTC
svn commit: r190657 [23/23] - in /incubator/beehive/trunk/system-controls:
./ ant/ samples/ejb/
samples/ejb/client/org/apache/beehive/controls/system/ejb/sample/client/
samples/ejb/control/org/apache/beehive/controls/system/ejb/sample/control/
samples/ejb/ejb/META-INF/
samples/ejb/ejb/org/apache/beehive/controls/system/ejb/sample/bean/
samples/jdbc/jdbcControlSample/ samples/jdbc/jdbcControlSample/META-INF/
samples/jdbc/jdbcControlSample/WEB-INF/
samples/jdbc/jdbcControlSample/WEB-INF/src/
samples/jdbc/jdbcControlSample/WEB-INF/src/controls/
samples/jdbc/jdbcControlSample/WEB-INF/src/servlet/
samples/jdbc/jdbcControlSample/WEB-INF/src/shared/ samples/jms/
samples/jms/src/org/apache/beehive/controls/system/jms/samples/
samples/webservice/amazon/ samples/webservice/amazon/junit/
samples/webservice/amazon/schemas/ samples/webservice/common/src/test/
samples/webservice/google/ samples/webservice/google/junit/model/
samples/webservice/google/rpc_schemas/ samples/webservice/google/servlet/
samples/webservice/wsm_samples_client/
samples/webservice/wsm_samples_client/junit/
samples/webservice/wsm_samples_client/junit/org/wsm/samples/client/header/
samples/webservice/wsm_samples_client/junit/org/wsm/samples/client/webparam/
samples/webservice/xmlbeans/ samples/webservice/xmlbeans/junit/ src/ejb/
src/ejb/org/apache/beehive/controls/system/ejb/ src/ejb/schema/ src/jdbc/
src/jdbc/org/apache/beehive/controls/system/jdbc/
src/jdbc/org/apache/beehive/controls/system/jdbc/parser/ src/jms/
src/jms/org/apache/beehive/controls/system/jms/
src/jms/org/apache/beehive/controls/system/jms/impl/
src/jms/org/apache/beehive/controls/system/jndi/
src/jms/org/apache/beehive/controls/system/jndi/impl/ src/webservice/
src/webservice/org/apache/beehive/controls/system/webservice/
src/webservice/org/apache/beehive/controls/system/webservice/generator/
src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/
src/webservice/org/apache/beehive/controls/system/webservice/utils/
test/ant/ test/conf/ test/src/jdbc/controls/
test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/dbconnection/
test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/errors/
test/src/jdbc/controls/org/apache/beehive/controls/system/jdbc/test/results/
test/src/jdbc/controls/schemas/badusers/
test/src/jdbc/controls/schemas/users/ test/src/jdbc/jdbc-container/
test/src/jdbc/jdbc-container/application/
test/src/jdbc/jdbc-container/src/org/apache/beehive/controls/system/jdbc/containertest/
test/src/jdbc/jdbc-container/webapp/WEB-INF/
test/src/jdbc/jdbc-container/webapp/conf/Catalina/localhost/
test/src/jdbc/junitTests/
test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/dbconnection/
test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/errors/
test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/results/
test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/sqlparser/
test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/utils/
test/src/webservice/ test/src/webservice/jcxgen-tests/
test/src/webservice/jcxgen-tests/tests/org/apache/beehive/controls/system/webservice/units/jcxgen/
test/src/webservice/schemas/ test/src/webservice/servers/webapp/WEB-INF/
test/src/webservice/servers/webapp/WEB-INF/src/org/apache/beehive/doclitwrap/
test/src/webservice/servers/webapp/WEB-INF/src/web/
test/src/webservice/servers/webapp/WEB-INF/webservices/web/complex/
test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/dlwservice/
Modified: incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/src/web/Service.jws
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/src/web/Service.jws?rev=190657&r1=190656&r2=190657&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/src/web/Service.jws (original)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/src/web/Service.jws Tue Jun 14 14:14:42 2005
@@ -1,138 +1,138 @@
-/*
- * Copyright 2004 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:$
- */
-package web;
-
-import java.rmi.RemoteException;
-
-import javax.jws.Oneway;
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-import javax.naming.InvalidNameException;
-import javax.xml.rpc.holders.StringHolder;
-
-import org.apache.beehive.sample.Address;
-import org.apache.beehive.sample.AddressBook;
-import org.apache.beehive.sample.AddressBookImpl;
-
-@WebService(targetNamespace="http://controlhaus.org/ServiceControlTestServer", serviceName="ServiceControlTest")
-//@SOAPBinding( style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.ENCODED)
-public class Service {
-
- AddressBook addressBook;
-
- /**
- * Constructor.
- */
- public Service() {
- addressBook = new AddressBookImpl();
- }
-
- /**
- * Web method that adds an entry to the AddressBook.
- * @param name
- * @param address
- */
- @WebMethod
- public void addEntry(String name, Address address) throws RemoteException {
- try {
- addressBook.addEntry(name, address);
- } catch (InvalidNameException e) {
- throw new RemoteException("Invalid name: " +name , e);
- }
- }
-
- /**
- * Web method that queries the AddressBook.
- * @param name
- * @return
- */
- @WebMethod
- public Address getAddressFromName(String name) throws RemoteException {
- try {
- System.out.println("Get Address for: " + name);
- if(name == null) return null;
- if( 0 == "Jack".compareTo(name)) {
- Address result = new Address();
- result.setCity("Seattle");
- result.setZip(98119);
- return result;
- }
- if(0 == "bob".compareTo(name)) throw new RemoteException( "Invalid name", new InvalidNameException("Bob is invalid name!"));
- return addressBook.getAddressFromName(name);
- } catch (InvalidNameException e) {
- throw new RemoteException("Invalid name: " +name , e);
- }
- }
-
- @WebMethod
- public Address[] getAddressFromNames(String[] name) throws RemoteException {
- try {
- if(null == name) return null;
- Address[] result = new Address[name.length];
- for(int i=0; i< name.length; i++) {
- result[i] = addressBook.getAddressFromName(name[i]);
- }
- return result;
- } catch (InvalidNameException e) {
- throw new RemoteException("Invalid name: " +name , e);
- }
- }
-
- @WebMethod
- public int FindClosestName(@WebParam( mode=WebParam.Mode.INOUT) StringHolder name) {
- System.out.println("Find the closest name for: " + name.value);
- int res = 0;
- if(name == null) {
- name.value = "Invalid name";
- res =0;
- }
- if(name.value.startsWith("Ja")) {
- name.value = "Jack";
- res =1;
- }
- return res;
- }
-
-
- @WebMethod
- @Oneway
- public void oneWayWithNoParam() {
- return;
- }
-
-
-
- @WebMethod
- public String simpleNoParamMethod () {
- return "No Param method";
- }
-
- /**
- * This method is not exposed by the Web Service and can only be used
- * locally.
- * @return A random string.
- */
- public String notWebService() {
- return "Not available through Web service";
- }
-
-
-}
+/*
+ * Copyright 2004 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:$
+ */
+package web;
+
+import java.rmi.RemoteException;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.naming.InvalidNameException;
+import javax.xml.rpc.holders.StringHolder;
+
+import org.apache.beehive.sample.Address;
+import org.apache.beehive.sample.AddressBook;
+import org.apache.beehive.sample.AddressBookImpl;
+
+@WebService(targetNamespace="http://controlhaus.org/ServiceControlTestServer", serviceName="ServiceControlTest")
+//@SOAPBinding( style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.ENCODED)
+public class Service {
+
+ AddressBook addressBook;
+
+ /**
+ * Constructor.
+ */
+ public Service() {
+ addressBook = new AddressBookImpl();
+ }
+
+ /**
+ * Web method that adds an entry to the AddressBook.
+ * @param name
+ * @param address
+ */
+ @WebMethod
+ public void addEntry(String name, Address address) throws RemoteException {
+ try {
+ addressBook.addEntry(name, address);
+ } catch (InvalidNameException e) {
+ throw new RemoteException("Invalid name: " +name , e);
+ }
+ }
+
+ /**
+ * Web method that queries the AddressBook.
+ * @param name
+ * @return
+ */
+ @WebMethod
+ public Address getAddressFromName(String name) throws RemoteException {
+ try {
+ System.out.println("Get Address for: " + name);
+ if(name == null) return null;
+ if( 0 == "Jack".compareTo(name)) {
+ Address result = new Address();
+ result.setCity("Seattle");
+ result.setZip(98119);
+ return result;
+ }
+ if(0 == "bob".compareTo(name)) throw new RemoteException( "Invalid name", new InvalidNameException("Bob is invalid name!"));
+ return addressBook.getAddressFromName(name);
+ } catch (InvalidNameException e) {
+ throw new RemoteException("Invalid name: " +name , e);
+ }
+ }
+
+ @WebMethod
+ public Address[] getAddressFromNames(String[] name) throws RemoteException {
+ try {
+ if(null == name) return null;
+ Address[] result = new Address[name.length];
+ for(int i=0; i< name.length; i++) {
+ result[i] = addressBook.getAddressFromName(name[i]);
+ }
+ return result;
+ } catch (InvalidNameException e) {
+ throw new RemoteException("Invalid name: " +name , e);
+ }
+ }
+
+ @WebMethod
+ public int FindClosestName(@WebParam( mode=WebParam.Mode.INOUT) StringHolder name) {
+ System.out.println("Find the closest name for: " + name.value);
+ int res = 0;
+ if(name == null) {
+ name.value = "Invalid name";
+ res =0;
+ }
+ if(name.value.startsWith("Ja")) {
+ name.value = "Jack";
+ res =1;
+ }
+ return res;
+ }
+
+
+ @WebMethod
+ @Oneway
+ public void oneWayWithNoParam() {
+ return;
+ }
+
+
+
+ @WebMethod
+ public String simpleNoParamMethod () {
+ return "No Param method";
+ }
+
+ /**
+ * This method is not exposed by the Web Service and can only be used
+ * locally.
+ * @return A random string.
+ */
+ public String notWebService() {
+ return "Not available through Web service";
+ }
+
+
+}
Propchange: incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/src/web/Service.jws
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/webservices/web/complex/DocumentLiteralWrappedSample.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/webservices/web/complex/DocumentLiteralWrappedSample.java?rev=190657&r1=190656&r2=190657&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/webservices/web/complex/DocumentLiteralWrappedSample.java (original)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/webservices/web/complex/DocumentLiteralWrappedSample.java Tue Jun 14 14:14:42 2005
@@ -1,133 +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 org.apache.beehive.doclitwrap.Address;
-import org.apache.beehive.doclitwrap.AddressHolder;
-import org.apache.beehive.doclitwrap.AddressException;
-import org.apache.beehive.doclitwrap.Phone;
-import org.apache.beehive.doclitwrap.StateType;
-
-/**
- * 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 (address) object that was passed in as IN parameter in the message body.
- * @param address The complex object to be returned.
- * @return The complex object that was passed in as an IN parameter.
- */
- @WebMethod
- @WebResult(name="ReturnAddressFromBodyResult")
- public Address returnAddressFromBody(@WebParam(name="in_param_body", mode=WebParam.Mode.IN) Address address) {
- return address;
- }
-
- /**
- * Returns a complex (address) object that was passed in as IN parameter in the message header.
- * @param object The complex object to be modified.
- * @return The complex object that was passed in as an IN parameter.
- */
- @WebMethod
- @WebResult(name="ReturnAddressFromHeaderResult")
- public Address returnAddressFromHeader(@WebParam(name="in_param_header", header=true, mode=WebParam.Mode.IN) Address address) {
- return address;
- }
-
- /**
- * Creates a new complex (address) object and returns that object as an OUT parameter that is encoded in the message body.
- * @param addressHolder The holder of the complex object to be returned.
- * @return An operational result (always 0).
- */
- @WebMethod
- @WebResult(name="ReturnCreateAddressInBodyResult")
- public int createAddressInBody(@WebParam(name="out_param_body", mode=WebParam.Mode.OUT) AddressHolder addressHolder) {
- StateType state = new StateType("WA");
- Phone phoneNumber = new Phone(425, "555", "1234");
- Address address = new Address(10230, "NE Points Drive", "Kirkland", state, 98008, phoneNumber);
- addressHolder.value = address;
- return 0;
- }
-
- /**
- * Creates a new complex (address) object and returns that object as an OUT parameter that is encoded in the message header.
- * @param addressHolder The holder of the complex object to be returned.
- * @return An operational result (always 0).
- */
- @WebMethod
- @WebResult(name="ReturnCreateAddressInHeaderResult")
- public int createAddressInHeader(@WebParam(name="out_param_header", header=true, mode=WebParam.Mode.OUT) AddressHolder addressHolder) {
- StateType state = new StateType("WA");
- Phone phoneNumber = new Phone(425, "555", "1234");
- Address address = new Address(10230, "NE Points Drive", "Kirkland", state, 98008, phoneNumber);
- addressHolder.value = address;
- return 0;
- }
-
- /**
- * Modifies a complex (address) INOUT parameter that is encoded in the message body.
- * @param addressHolder The object to be modified.
- * @return An operational result (always 0).
- */
- @WebMethod
- @WebResult(name="ChangeAddressInBodyResult")
- public int changeAddressInBody(@WebParam(name="inout_param_body", mode=WebParam.Mode.INOUT) AddressHolder addressHolder) {
- Address address = addressHolder.value;
- address.setZip(address.getZip() + 1);
- return 0;
- }
-
- /**
- * Modifies a complex (address) INOUT parameter that is encoded in the message header.
- * @param addressHolder The object to be modified.
- * @return An operational result (always 0).
- */
- @WebMethod
- @WebResult(name="ChangeAddressInHeaderResult")
- public int changeAddressInHeader(@WebParam(name="inout_param_header", header=true, mode=WebParam.Mode.INOUT) AddressHolder addressHolder) {
- Address address = addressHolder.value;
- address.setZip(address.getZip() + 1);
- return 0;
- }
-
- /**
- * Throws an AddressException.
- * @param value Ignored (only printed in message).
- * @return An operational result (never returned).
- * @throws AddressException Always thrown.
- */
- @WebMethod
- @WebResult(name="ThrowAddressExceptionResult")
- public int throwAddressException(@WebParam(name="in_param") int value) throws AddressException {
- throw new AddressException("This is a sample message for:\n\tAddressException; input value=\"" + value + "\"");
- }
-}
+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 org.apache.beehive.doclitwrap.Address;
+import org.apache.beehive.doclitwrap.AddressHolder;
+import org.apache.beehive.doclitwrap.AddressException;
+import org.apache.beehive.doclitwrap.Phone;
+import org.apache.beehive.doclitwrap.StateType;
+
+/**
+ * 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 (address) object that was passed in as IN parameter in the message body.
+ * @param address The complex object to be returned.
+ * @return The complex object that was passed in as an IN parameter.
+ */
+ @WebMethod
+ @WebResult(name="ReturnAddressFromBodyResult")
+ public Address returnAddressFromBody(@WebParam(name="in_param_body", mode=WebParam.Mode.IN) Address address) {
+ return address;
+ }
+
+ /**
+ * Returns a complex (address) object that was passed in as IN parameter in the message header.
+ * @param object The complex object to be modified.
+ * @return The complex object that was passed in as an IN parameter.
+ */
+ @WebMethod
+ @WebResult(name="ReturnAddressFromHeaderResult")
+ public Address returnAddressFromHeader(@WebParam(name="in_param_header", header=true, mode=WebParam.Mode.IN) Address address) {
+ return address;
+ }
+
+ /**
+ * Creates a new complex (address) object and returns that object as an OUT parameter that is encoded in the message body.
+ * @param addressHolder The holder of the complex object to be returned.
+ * @return An operational result (always 0).
+ */
+ @WebMethod
+ @WebResult(name="ReturnCreateAddressInBodyResult")
+ public int createAddressInBody(@WebParam(name="out_param_body", mode=WebParam.Mode.OUT) AddressHolder addressHolder) {
+ StateType state = new StateType("WA");
+ Phone phoneNumber = new Phone(425, "555", "1234");
+ Address address = new Address(10230, "NE Points Drive", "Kirkland", state, 98008, phoneNumber);
+ addressHolder.value = address;
+ return 0;
+ }
+
+ /**
+ * Creates a new complex (address) object and returns that object as an OUT parameter that is encoded in the message header.
+ * @param addressHolder The holder of the complex object to be returned.
+ * @return An operational result (always 0).
+ */
+ @WebMethod
+ @WebResult(name="ReturnCreateAddressInHeaderResult")
+ public int createAddressInHeader(@WebParam(name="out_param_header", header=true, mode=WebParam.Mode.OUT) AddressHolder addressHolder) {
+ StateType state = new StateType("WA");
+ Phone phoneNumber = new Phone(425, "555", "1234");
+ Address address = new Address(10230, "NE Points Drive", "Kirkland", state, 98008, phoneNumber);
+ addressHolder.value = address;
+ return 0;
+ }
+
+ /**
+ * Modifies a complex (address) INOUT parameter that is encoded in the message body.
+ * @param addressHolder The object to be modified.
+ * @return An operational result (always 0).
+ */
+ @WebMethod
+ @WebResult(name="ChangeAddressInBodyResult")
+ public int changeAddressInBody(@WebParam(name="inout_param_body", mode=WebParam.Mode.INOUT) AddressHolder addressHolder) {
+ Address address = addressHolder.value;
+ address.setZip(address.getZip() + 1);
+ return 0;
+ }
+
+ /**
+ * Modifies a complex (address) INOUT parameter that is encoded in the message header.
+ * @param addressHolder The object to be modified.
+ * @return An operational result (always 0).
+ */
+ @WebMethod
+ @WebResult(name="ChangeAddressInHeaderResult")
+ public int changeAddressInHeader(@WebParam(name="inout_param_header", header=true, mode=WebParam.Mode.INOUT) AddressHolder addressHolder) {
+ Address address = addressHolder.value;
+ address.setZip(address.getZip() + 1);
+ return 0;
+ }
+
+ /**
+ * Throws an AddressException.
+ * @param value Ignored (only printed in message).
+ * @return An operational result (never returned).
+ * @throws AddressException Always thrown.
+ */
+ @WebMethod
+ @WebResult(name="ThrowAddressExceptionResult")
+ public int throwAddressException(@WebParam(name="in_param") int value) throws AddressException {
+ throw new AddressException("This is a sample message for:\n\tAddressException; input value=\"" + value + "\"");
+ }
+}
Propchange: incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/webservices/web/complex/DocumentLiteralWrappedSample.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/apache/beehive/controls/system/webservice/units/dlwservice/DocLitWrapWebServiceTest.java
------------------------------------------------------------------------------
svn:eol-style = native