001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements. See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership. The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License. You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied. See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019
020 package javax.xml.ws.spi;
021
022 import org.w3c.dom.Element;
023
024 import javax.xml.namespace.QName;
025 import javax.xml.transform.Source;
026 import javax.xml.ws.Endpoint;
027 import javax.xml.ws.EndpointReference;
028 import javax.xml.ws.WebServiceFeature;
029 import javax.xml.ws.wsaddressing.W3CEndpointReference;
030 import java.net.URL;
031 import java.util.List;
032
033 public abstract class Provider {
034
035 protected Provider() {
036 }
037
038 public static Provider provider() {
039 return (Provider) FactoryFinder.find(JAXWSPROVIDER_PROPERTY, DEFAULT_JAXWSPROVIDER);
040 }
041
042 public abstract ServiceDelegate createServiceDelegate(URL url, QName qname, Class class1);
043
044 public abstract Endpoint createEndpoint(String s, Object obj);
045
046 public abstract Endpoint createAndPublishEndpoint(String s, Object obj);
047
048 public abstract EndpointReference readEndpointReference(Source eprInfoset);
049
050 public abstract <T> T getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features);
051
052 public abstract W3CEndpointReference createW3CEndpointReference(String address,
053 QName serviceName,
054 QName portName,
055 List<Element> metadata,
056 String wsdlDocumentLocation,
057 List<Element> referenceParameters);
058
059 public static final String JAXWSPROVIDER_PROPERTY = "javax.xml.ws.spi.Provider";
060 private static final String DEFAULT_JAXWSPROVIDER = "org.apache.axis2.jaxws.spi.Provider";
061 }