001    /*
002     * Copyright 2011 The Kuali Foundation.
003     * 
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     * 
008     * http://www.opensource.org/licenses/ecl2.php
009     * 
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.kfs.module.external.kc.webService;
017    
018    import java.net.MalformedURLException;
019    import java.net.URL;
020    
021    import javax.xml.namespace.QName;
022    import javax.xml.ws.WebEndpoint;
023    import javax.xml.ws.WebServiceClient;
024    import javax.xml.ws.WebServiceFeature;
025    
026    import org.kuali.kfs.module.external.kc.KcConstants;
027    import org.kuali.kfs.module.external.kc.service.KfsService;
028    
029    @WebServiceClient(name = KcConstants.AwardAccount.SOAP_SERVICE_NAME, 
030                      wsdlLocation = "http://test.kc.kuali.org/kc-trunk/remoting/awardAccountSoapService?wsdl",
031                      targetNamespace = KcConstants.KC_NAMESPACE_URI) 
032    public class AwardAccountSoapService extends KfsService {
033    
034        public final static QName awardAccountServicePort = new QName(KcConstants.KC_NAMESPACE_URI, KcConstants.AwardAccount.SERVICE_PORT);
035        static {
036            try {
037               getWsdl(KcConstants.AwardAccount.SERVICE); 
038             } catch (MalformedURLException e) {
039                 LOG.warn("Can not initialize the wsdl");
040             }
041        }
042    
043        public AwardAccountSoapService() throws MalformedURLException {
044            super(getWsdl(KcConstants.AwardAccount.SERVICE), KcConstants.AwardAccount.SERVICE);
045        }
046        
047    
048        /**
049         * 
050         * @return
051         *     returns AwardAccountService
052         */
053        @WebEndpoint(name = "awardAccountServicePort")
054        public AwardAccountService getAwardAccountServicePort() {
055            return super.getPort(awardAccountServicePort, AwardAccountService.class);
056        }
057    
058        /**
059         * 
060         * @param features
061         *     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.
062         * @return
063         *     returns AwardAccountService
064         */
065        @WebEndpoint(name = "awardAccountServicePort")
066        public AwardAccountService getAwardAccountServicePort(WebServiceFeature... features) {
067            return super.getPort(awardAccountServicePort, AwardAccountService.class, features);
068        }
069    
070        public URL getWsdl() throws MalformedURLException {
071            return super.getWsdl(KcConstants.AwardAccount.SERVICE);
072        }
073    
074    }