01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */package org.apache.hello_world_doc_lit;
19:
20: import javax.jws.WebService;
21:
22: import org.apache.hello_world_doc_lit.types.FaultDetail;
23:
24: @WebService(serviceName="SOAPService",portName="SoapPort",endpointInterface="org.apache.hello_world_doc_lit.Greeter",targetNamespace="http://apache.org/hello_world_doc_lit",wsdlLocation="testutils/hello_world_doc_lit.wsdl")
25: public class GreeterImplDoc implements Greeter {
26:
27: public String sayHi() {
28: System.out.println("Call sayHi here ");
29: return "Bonjour";
30: }
31:
32: public String greetMe(String requestType) {
33: System.out.println("Reached here :" + requestType);
34: return "Hello " + requestType;
35: }
36:
37: public void greetMeOneWay(String requestType) {
38: System.out.println("********* greetMeOneWay: " + requestType);
39: }
40:
41: public void pingMe() throws PingMeFault {
42: FaultDetail faultDetail = new FaultDetail();
43: faultDetail.setMajor((short) 2);
44: faultDetail.setMinor((short) 1);
45: throw new PingMeFault("PingMeFault raised by server",
46: faultDetail);
47:
48: }
49:
50: }
|