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.cxf.systest.handlers;
19:
20: import javax.jws.HandlerChain;
21: import javax.jws.WebService;
22:
23: import org.apache.handlers.AddNumbers;
24: import org.apache.handlers.AddNumbersFault;
25:
26: //import org.apache.handlers.types.FaultDetail;
27:
28: @WebService(name="AddNumbers",targetNamespace="http://apache.org/handlers",portName="AddNumbersPort",endpointInterface="org.apache.handlers.AddNumbers",serviceName="AddNumbersService")
29: @HandlerChain(file="./handlers.xml",name="TestHandlerChain")
30: public class AddNumbersImpl implements AddNumbers {
31:
32: /**
33: * @param number1
34: * @param number2
35: * @return The sum
36: * @throws AddNumbersException
37: * if any of the numbers to be added is negative.
38: */
39: public int addNumbers(int number1, int number2)
40: throws AddNumbersFault {
41: System.out.println("addNumbers called....., number1: "
42: + number1 + " number2: " + number2);
43: return number1 * number2;
44: }
45:
46: }
|