Samples JDK
SOAPService.java
1 package org.apache.hello_world_soap_http;
2 
3 import java.net.MalformedURLException;
4 import java.net.URL;
5 import javax.xml.namespace.QName;
6 import javax.xml.ws.WebEndpoint;
7 import javax.xml.ws.WebServiceClient;
8 import javax.xml.ws.WebServiceFeature;
9 import javax.xml.ws.Service;
10 
11 /**
12  * This class was generated by Apache CXF 2.3.6
13  * 2016-02-18T23:36:32.500+05:30
14  * Generated source version: 2.3.6
15  *
16  */
17 @WebServiceClient(name = "SOAPService",
18  wsdlLocation = "classpath:/com/freeminscafe/apache/commons/cxf/wsdl/sample1/helloworld.wsdl",
19  targetNamespace = "http://apache.org/hello_world_soap_http")
20 public class SOAPService extends Service {
21 
22  public final static URL WSDL_LOCATION;
23 
24  public final static QName SERVICE = new QName("http://apache.org/hello_world_soap_http", "SOAPService");
25  public final static QName SoapPort = new QName("http://apache.org/hello_world_soap_http", "SoapPort");
26  static {
27  URL url = null;
28  try {
29  url = new URL("classpath:/com/freeminscafe/apache/commons/cxf/wsdl/sample1/helloworld.wsdl");
30  } catch (MalformedURLException e) {
31  java.util.logging.Logger.getLogger(SOAPService.class.getName())
32  .log(java.util.logging.Level.INFO,
33  "Can not initialize the default wsdl from {0}", "classpath:/com/freeminscafe/apache/commons/cxf/wsdl/sample1/helloworld.wsdl");
34  }
35  WSDL_LOCATION = url;
36  }
37 
38  public SOAPService(URL wsdlLocation) {
39  super(wsdlLocation, SERVICE);
40  }
41 
42  public SOAPService(URL wsdlLocation, QName serviceName) {
43  super(wsdlLocation, serviceName);
44  }
45 
46  public SOAPService() {
47  super(WSDL_LOCATION, SERVICE);
48  }
49 
50  //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
51  //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
52  //compliant code instead.
53  public SOAPService(WebServiceFeature ... features) {
54  super(WSDL_LOCATION, SERVICE, features);
55  }
56 
57  //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
58  //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
59  //compliant code instead.
60  public SOAPService(URL wsdlLocation, WebServiceFeature ... features) {
61  super(wsdlLocation, SERVICE, features);
62  }
63 
64  //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
65  //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
66  //compliant code instead.
67  public SOAPService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
68  super(wsdlLocation, serviceName, features);
69  }
70 
71  /**
72  *
73  * @return
74  * returns Greeter
75  */
76  @WebEndpoint(name = "SoapPort")
77  public Greeter getSoapPort() {
78  return super.getPort(SoapPort, Greeter.class);
79  }
80 
81  /**
82  *
83  * @param features
84  * 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.
85  * @return
86  * returns Greeter
87  */
88  @WebEndpoint(name = "SoapPort")
89  public Greeter getSoapPort(WebServiceFeature... features) {
90  return super.getPort(SoapPort, Greeter.class, features);
91  }
92 
93 }