From 7a5b350a93990956106d91679240b6e8326cb110 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 5 Nov 2014 08:07:15 +0100 Subject: change more client implementations to APACHE CXF --- .../gv/util/wsdl/GetAuthenticationDataService.java | 78 ++++++++++++++-------- 1 file changed, 50 insertions(+), 28 deletions(-) (limited to 'src/main/java/at/gv/util/wsdl/GetAuthenticationDataService.java') diff --git a/src/main/java/at/gv/util/wsdl/GetAuthenticationDataService.java b/src/main/java/at/gv/util/wsdl/GetAuthenticationDataService.java index 4fa21e7..ad635ac 100644 --- a/src/main/java/at/gv/util/wsdl/GetAuthenticationDataService.java +++ b/src/main/java/at/gv/util/wsdl/GetAuthenticationDataService.java @@ -1,41 +1,42 @@ - package at.gv.util.wsdl; -import java.net.MalformedURLException; import java.net.URL; -import java.util.logging.Logger; import javax.xml.namespace.QName; -import javax.xml.ws.Service; import javax.xml.ws.WebEndpoint; import javax.xml.ws.WebServiceClient; import javax.xml.ws.WebServiceFeature; - +import javax.xml.ws.Service; /** - * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.1.6 in JDK 6 - * Generated source version: 2.1 + * This class was generated by Apache CXF 3.0.1 + * 2014-10-28T17:46:23.751+01:00 + * Generated source version: 3.0.1 * */ -@WebServiceClient(name = "GetAuthenticationDataService", targetNamespace = "http://reference.e-government.gv.at/namespace/moa/20020822#", wsdlLocation = "file:/D:/eclipse/development/openzuse/trunk/zuseutil/src/main/resources/wsdl/MOA-ID-1.x.wsdl") -public class GetAuthenticationDataService - extends Service -{ +@WebServiceClient(name = "GetAuthenticationDataService", + wsdlLocation = "./src/main/resources/wsdl/MOA-ID-1.x.wsdl", + targetNamespace = "http://reference.e-government.gv.at/namespace/moa/20020822#") +public class GetAuthenticationDataService extends Service { - private final static URL GETAUTHENTICATIONDATASERVICE_WSDL_LOCATION; - private final static Logger logger = Logger.getLogger(at.gv.util.wsdl.GetAuthenticationDataService.class.getName()); + public final static URL WSDL_LOCATION; + public final static QName SERVICE = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "GetAuthenticationDataService"); + public final static QName IdentificationPort = new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "IdentificationPort"); static { - URL url = null; - try { - URL baseUrl; - baseUrl = at.gv.util.wsdl.GetAuthenticationDataService.class.getResource("."); - url = new URL(baseUrl, "file:/D:/eclipse/development/openzuse/trunk/zuseutil/src/main/resources/wsdl/MOA-ID-1.x.wsdl"); - } catch (MalformedURLException e) { - logger.warning("Failed to create URL for the wsdl Location: 'file:/D:/eclipse/development/openzuse/trunk/zuseutil/src/main/resources/wsdl/MOA-ID-1.x.wsdl', retrying as a local file"); - logger.warning(e.getMessage()); - } - GETAUTHENTICATIONDATASERVICE_WSDL_LOCATION = url; + URL url = GetAuthenticationDataService.class.getResource("./src/main/resources/wsdl/MOA-ID-1.x.wsdl"); + if (url == null) { + url = GetAuthenticationDataService.class.getClassLoader().getResource("./src/main/resources/wsdl/MOA-ID-1.x.wsdl"); + } + if (url == null) { + java.util.logging.Logger.getLogger(GetAuthenticationDataService.class.getName()) + .log(java.util.logging.Level.INFO, + "Can not initialize the default wsdl from {0}", "./src/main/resources/wsdl/MOA-ID-1.x.wsdl"); + } + WSDL_LOCATION = url; + } + + public GetAuthenticationDataService(URL wsdlLocation) { + super(wsdlLocation, SERVICE); } public GetAuthenticationDataService(URL wsdlLocation, QName serviceName) { @@ -43,17 +44,38 @@ public class GetAuthenticationDataService } public GetAuthenticationDataService() { - super(GETAUTHENTICATIONDATASERVICE_WSDL_LOCATION, new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "GetAuthenticationDataService")); + super(WSDL_LOCATION, SERVICE); + } + + //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 + //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 + //compliant code instead. + public GetAuthenticationDataService(WebServiceFeature ... features) { + super(WSDL_LOCATION, SERVICE, features); + } + + //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 + //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 + //compliant code instead. + public GetAuthenticationDataService(URL wsdlLocation, WebServiceFeature ... features) { + super(wsdlLocation, SERVICE, features); } + //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 + //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 + //compliant code instead. + public GetAuthenticationDataService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) { + super(wsdlLocation, serviceName, features); + } + /** - * + * * @return * returns IdentificationPortType */ @WebEndpoint(name = "IdentificationPort") public IdentificationPortType getIdentificationPort() { - return super.getPort(new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "IdentificationPort"), IdentificationPortType.class); + return super.getPort(IdentificationPort, IdentificationPortType.class); } /** @@ -65,7 +87,7 @@ public class GetAuthenticationDataService */ @WebEndpoint(name = "IdentificationPort") public IdentificationPortType getIdentificationPort(WebServiceFeature... features) { - return super.getPort(new QName("http://reference.e-government.gv.at/namespace/moa/20020822#", "IdentificationPort"), IdentificationPortType.class, features); + return super.getPort(IdentificationPort, IdentificationPortType.class, features); } } -- cgit v1.2.3