001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.modules.deployment.deviceanywhere.service;
043:
044: import java.net.MalformedURLException;
045: import java.net.URL;
046: import java.util.ResourceBundle;
047: import javax.xml.namespace.QName;
048: import javax.xml.ws.Service;
049: import javax.xml.ws.WebEndpoint;
050: import javax.xml.ws.WebServiceClient;
051: import javax.xml.ws.WebServiceFeature;
052: import org.openide.util.Exceptions;
053:
054: /**
055: * This class was generated by the JAX-WS RI.
056: * JAX-WS RI 2.1.1-04/12/2007 02:26 PM(vivekp)-RC1
057: * Generated source version: 2.1
058: *
059: */
060: @WebServiceClient(name="ApplicationAPIService",targetNamespace="http://services.mc.com")
061: public class ApplicationAPIService extends Service {
062: private static URL url;
063:
064: static {
065: try {
066: String urlKey = "http://www.deviceanywhere.com/axis/services/ApplicationAPI";
067: try {
068: ResourceBundle bundle = ResourceBundle
069: .getBundle("org/netbeans/modules/deployment/deviceanywhere/service/Bundle"); //NOI18N
070: urlKey = bundle.getString("service_url");
071: } catch (Exception exception) {
072: //ignore
073: }
074:
075: //lookup for replacement
076: String newUrl = System
077: .getProperty("deviceanywhere.service.url");
078: if (newUrl != null) {
079: urlKey = newUrl;
080: }
081: url = new URL(urlKey + "?wsdl");
082: } catch (MalformedURLException ex) {
083: Exceptions.printStackTrace(ex);
084: }
085: }
086:
087: // private static String[] SERVICES = new String[]{
088: // "http://www.deviceanywhere.com/axis/services/ApplicationAPI", //default
089: // "http://www.deviceanywhere.com/vdl/sprint/axis/services/ApplicationAPI", //vdl
090: // "http://mcdemo5.mobilecomplete.com/axis/services/ApplicationAPI" //test
091: // };
092:
093: public ApplicationAPIService() throws MalformedURLException {
094: super (url, new QName("http://services.mc.com",
095: "ApplicationAPIService")); //NOI18N
096: }
097:
098: /**
099: *
100: * @return
101: * returns ApplicationAPI
102: */
103: @WebEndpoint(name="ApplicationAPI")
104: public ApplicationAPI getApplicationAPI() {
105: return (ApplicationAPI) super .getPort(new QName(
106: "http://services.mc.com", "ApplicationAPI"),
107: ApplicationAPI.class);
108: }
109:
110: /**
111: *
112: * @param features
113: * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
114: * @return
115: * returns ApplicationAPI
116: */
117: @WebEndpoint(name="ApplicationAPI")
118: public ApplicationAPI getApplicationAPI(
119: WebServiceFeature... features) {
120: return (ApplicationAPI) super .getPort(new QName(
121: "http://services.mc.com", "ApplicationAPI"),
122: ApplicationAPI.class, features);
123: }
124:
125: }
|