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: */
19: package org.apache.axis2.jaxws.sample.addnumbers;
20:
21: import java.io.File;
22: import java.net.MalformedURLException;
23: import java.net.URL;
24:
25: import javax.xml.namespace.QName;
26: import javax.xml.ws.Service;
27: import javax.xml.ws.WebEndpoint;
28: import javax.xml.ws.WebServiceClient;
29:
30: /**
31: * This class was generated by the JAXWS SI.
32: * JAX-WS RI 2.0_01-b15-fcs
33: * Generated source version: 2.0
34: *
35: */
36: @WebServiceClient(name="AddNumbersService",targetNamespace="http://org/test/addnumbers",wsdlLocation="AddNumbers1.wsdl")
37: public class AddNumbersService extends Service {
38:
39: private final static URL ADDNUMBERSSERVICE_WSDL_LOCATION;
40: private static String wsdlLocation = "/test/org/apache/axis2/jaxws/sample/addnumbers/META-INF/AddNumbers.wsdl";
41: static {
42: URL url = null;
43: try {
44: try {
45: String baseDir = new File(System.getProperty("basedir",
46: ".")).getCanonicalPath();
47: wsdlLocation = new File(baseDir + wsdlLocation)
48: .getAbsolutePath();
49: } catch (Exception e) {
50: e.printStackTrace();
51: }
52: File file = new File(wsdlLocation);
53: url = file.toURL();
54: } catch (MalformedURLException e) {
55: e.printStackTrace();
56: }
57: ADDNUMBERSSERVICE_WSDL_LOCATION = url;
58: }
59:
60: public AddNumbersService(URL wsdlLocation, QName serviceName) {
61: super (wsdlLocation, serviceName);
62: }
63:
64: public AddNumbersService() {
65: super (ADDNUMBERSSERVICE_WSDL_LOCATION, new QName(
66: "http://org/test/addnumbers", "AddNumbersService"));
67: }
68:
69: /**
70: *
71: * @return
72: * returns AddNumbersPortType
73: */
74: @WebEndpoint(name="AddNumbersPort")
75: public AddNumbersPortType getAddNumbersPort() {
76: return (AddNumbersPortType) super .getPort(new QName(
77: "http://org/test/addnumbers", "AddNumbersPort"),
78: AddNumbersPortType.class);
79: }
80:
81: }
|