Author: mmerz
Date: Thu Feb 24 12:03:17 2005
New Revision: 155230
URL: http://svn.apache.org/viewcvs?view=rev&rev=155230
Log:
Added samples for @WebService, @WebResult.
Added:
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webresult/
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webresult/WebResultDocumentLiteralSample.jws
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webresult/WebResultRpcLiteralSample.jws
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceCustomSample.jws
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceEndpointInterfaceSample.jws
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceImplementationBeanSample.jws
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceSample.jws
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceWsdlLocation.wsdl
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceWsdlLocationSample.java
Added:
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webresult/WebResultDocumentLiteralSample.jws
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webresult/WebResultDocumentLiteralSample.jws?view=auto&rev=155230
==============================================================================
---
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webresult/WebResultDocumentLiteralSample.jws
(added)
+++
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webresult/WebResultDocumentLiteralSample.jws
Thu Feb 24 12:03:17 2005
@@ -0,0 +1,44 @@
+package web.webresult;
+
+/*
+ * 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:$
+ */
+
+import javax.jws.WebMethod;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * This web service shows the use of @WebResult (with style/use
DOCUMENT/LITERAL).
+ */
[EMAIL PROTECTED]
[EMAIL PROTECTED](style = SOAPBinding.Style.DOCUMENT,
use=SOAPBinding.Use.LITERAL)
+public class WebResultDocumentLiteralSample {
+
+ @WebMethod
+ @WebResult
+ public String sayHello(String name) {
+ return "Hello, " + name + "!";
+ }
+
+ @WebMethod
+ @WebResult(name="SayHelloResult")
+ public String sayHello(String name, int i) {
+ return "Hello, " + name + "!";
+ }
+}
\ No newline at end of file
Added:
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webresult/WebResultRpcLiteralSample.jws
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webresult/WebResultRpcLiteralSample.jws?view=auto&rev=155230
==============================================================================
---
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webresult/WebResultRpcLiteralSample.jws
(added)
+++
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webresult/WebResultRpcLiteralSample.jws
Thu Feb 24 12:03:17 2005
@@ -0,0 +1,44 @@
+package web.webresult;
+
+/*
+ * 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:$
+ */
+
+import javax.jws.WebMethod;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * This web service shows the use of @WebResult (with style/use RPC/LITERAL).
+ */
[EMAIL PROTECTED]
[EMAIL PROTECTED](style = SOAPBinding.Style.RPC, use=SOAPBinding.Use.LITERAL)
+public class WebResultRpcLiteralSample {
+
+ @WebMethod
+ @WebResult
+ public String sayHello(String name) {
+ return "Hello, " + name + "!";
+ }
+
+ @WebMethod
+ @WebResult(name="SayHelloResult")
+ public String sayHello(String name, int i) {
+ return "Hello, " + name + "!";
+ }
+}
\ No newline at end of file
Added:
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceCustomSample.jws
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceCustomSample.jws?view=auto&rev=155230
==============================================================================
---
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceCustomSample.jws
(added)
+++
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceCustomSample.jws
Thu Feb 24 12:03:17 2005
@@ -0,0 +1,35 @@
+package web.webservice;
+
+/*
+ * 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.WebService;
+
+/**
+ * This web service customizes the service's configuration by using
+ * @WebService.name, @WebService.serviceName and @WebService.targetNamespace.
+ */
[EMAIL PROTECTED](name="WebServiceCustomSampleName",
serviceName="WebServiceCustomSampleServiceName",
targetNamespace="http://beehive.apache.org/web/webservice/custom")
+public class WebServiceCustomSample {
+
+ @WebMethod
+ public String sayHello(String name) {
+ return "Hello, " + name + "!";
+ }
+}
\ No newline at end of file
Added:
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceEndpointInterfaceSample.jws
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceEndpointInterfaceSample.jws?view=auto&rev=155230
==============================================================================
---
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceEndpointInterfaceSample.jws
(added)
+++
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceEndpointInterfaceSample.jws
Thu Feb 24 12:03:17 2005
@@ -0,0 +1,34 @@
+package web.webservice;
+
+/*
+ * 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.WebService;
+
+/**
+ * This web service is a sample for an endpoint interface definition, which
+ * can be referred to by implementation beans as a contract.
+ * @see web.webservice.WebServiceEndpointInterfaceSample
+ */
[EMAIL PROTECTED]
+public interface WebServiceEndpointInterfaceSample {
+
+ @WebMethod
+ public String sayHello(String name);
+}
Added:
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceImplementationBeanSample.jws
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceImplementationBeanSample.jws?view=auto&rev=155230
==============================================================================
---
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceImplementationBeanSample.jws
(added)
+++
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceImplementationBeanSample.jws
Thu Feb 24 12:03:17 2005
@@ -0,0 +1,35 @@
+package web.webservice;
+
+/*
+ * 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.WebService;
+
+/**
+ * This web service shows how to refer to a contract in form of an endpoint
+ * interface.
+ * @see web.webservice.WebServiceEndpointInterfaceSample
+ */
[EMAIL
PROTECTED](endpointInterface="web.webservice.WebServiceEndpointInterfaceSample")
+public class WebServiceImplementationBeanSample {
+
+ public String sayHello(String name) {
+ return "Hello, " + name + "!";
+ }
+}
\ No newline at end of file
Added:
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceSample.jws
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceSample.jws?view=auto&rev=155230
==============================================================================
---
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceSample.jws
(added)
+++
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceSample.jws
Thu Feb 24 12:03:17 2005
@@ -0,0 +1,35 @@
+package web.webservice;
+
+/*
+ * 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.WebService;
+
+/**
+ * This web service is a sample for a minimalistic web service definition with
+ * default values used for all settings.
+ */
[EMAIL PROTECTED]
+public class WebServiceSample {
+
+ @WebMethod
+ public String sayHello(String name) {
+ return "Hello, " + name + "!";
+ }
+}
\ No newline at end of file
Added:
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceWsdlLocation.wsdl
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceWsdlLocation.wsdl?view=auto&rev=155230
==============================================================================
---
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceWsdlLocation.wsdl
(added)
+++
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceWsdlLocation.wsdl
Thu Feb 24 12:03:17 2005
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="http://webservice.web"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://webservice.web" xmlns:intf="http://webservice.web"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+<!--WSDL created by Apache Axis version: 1.2RC2
+Built on Nov 16, 2004 (12:19:44 EST)-->
+ <wsdl:types>
+ <schema elementFormDefault="qualified"
targetNamespace="http://webservice.web"
xmlns="http://www.w3.org/2001/XMLSchema">
+ <element name="sayHello">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="sayHelloResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="sayHelloRequest">
+
+ <wsdl:part element="impl:sayHello" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="sayHelloResponse">
+
+ <wsdl:part element="impl:sayHelloResponse" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:portType name="WebServiceWsdlLocationSample">
+
+ <wsdl:operation name="sayHello">
+
+ <wsdl:input message="impl:sayHelloRequest" name="sayHelloRequest"/>
+
+ <wsdl:output message="impl:sayHelloResponse" name="sayHelloResponse"/>
+
+ </wsdl:operation>
+
+ </wsdl:portType>
+
+ <wsdl:binding name="WebServiceWsdlLocationSampleSoapBinding"
type="impl:WebServiceWsdlLocationSample">
+
+ <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <wsdl:operation name="sayHello">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="sayHelloRequest">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="sayHelloResponse">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="WebServiceWsdlLocationSampleService">
+
+ <wsdl:port binding="impl:WebServiceWsdlLocationSampleSoapBinding"
name="WebServiceWsdlLocationSample">
+
+ <wsdlsoap:address
location="http://localhost:7070/wsm-samplesWS/WebServiceWsdlLocationSample.jws"/>
+
+ </wsdl:port>
+
+ </wsdl:service>
+
+</wsdl:definitions>
Added:
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceWsdlLocationSample.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceWsdlLocationSample.java?view=auto&rev=155230
==============================================================================
---
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceWsdlLocationSample.java
(added)
+++
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src/web/webservice/WebServiceWsdlLocationSample.java
Thu Feb 24 12:03:17 2005
@@ -0,0 +1,34 @@
+package web.webservice;
+
+/*
+ * 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.WebService;
+
+/**
+ * This web service shows the use of @WebService.wsdlLocation.
+ */
[EMAIL PROTECTED](wsdlLocation="WebServiceWsdlLocation.wsdl")
+public class WebServiceWsdlLocationSample {
+
+ @WebMethod
+ public String sayHello(String name) {
+ return "Hello, " + name + "!";
+ }
+}
\ No newline at end of file