View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements. See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership. The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License. You may obtain a copy of the License at
9    *
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  
20  package javax.xml.ws.spi;
21  
22  import org.w3c.dom.Element;
23  
24  import javax.xml.namespace.QName;
25  import javax.xml.transform.Source;
26  import javax.xml.ws.Endpoint;
27  import javax.xml.ws.EndpointReference;
28  import javax.xml.ws.WebServiceFeature;
29  import javax.xml.ws.wsaddressing.W3CEndpointReference;
30  import java.net.URL;
31  import java.util.List;
32  
33  public abstract class Provider {
34  
35      protected Provider() {
36      }
37  
38      public static Provider provider() {
39          return (Provider) FactoryFinder.find(JAXWSPROVIDER_PROPERTY, DEFAULT_JAXWSPROVIDER);
40      }
41  
42      public abstract ServiceDelegate createServiceDelegate(URL url, QName qname, Class class1);
43  
44      public abstract Endpoint createEndpoint(String s, Object obj);
45  
46      public abstract Endpoint createAndPublishEndpoint(String s, Object obj);
47  
48      public abstract EndpointReference readEndpointReference(Source eprInfoset);
49      
50      public abstract <T> T getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features);
51      
52      public abstract W3CEndpointReference createW3CEndpointReference(String address,
53              QName serviceName,
54              QName portName,
55              List<Element> metadata,
56              String wsdlDocumentLocation,
57              List<Element> referenceParameters);
58      
59      public static final String JAXWSPROVIDER_PROPERTY = "javax.xml.ws.spi.Provider";
60      private static final String DEFAULT_JAXWSPROVIDER = "org.apache.axis2.jaxws.spi.Provider";
61  }