diff --git a/smp-server-library/src/main/java/eu/europa/ec/cipa/smp/server/hook/RegistrationServiceRegistrationHook.java b/smp-server-library/src/main/java/eu/europa/ec/cipa/smp/server/hook/RegistrationServiceRegistrationHook.java index 2dddedc519073e65a35f16cb2bba8ddd9f555ab6..6ef1647d9890a858e4cf5e3c9f8b663af364bf63 100644 --- a/smp-server-library/src/main/java/eu/europa/ec/cipa/smp/server/hook/RegistrationServiceRegistrationHook.java +++ b/smp-server-library/src/main/java/eu/europa/ec/cipa/smp/server/hook/RegistrationServiceRegistrationHook.java @@ -20,11 +20,10 @@ import eu.europa.ec.bdmsl.ws.soap.IManageParticipantIdentifierWS; import eu.europa.ec.bdmsl.ws.soap.ManageBusinessIdentifierService; import eu.europa.ec.bdmsl.ws.soap.NotFoundFault; import eu.europa.ec.bdmsl.ws.soap.UnauthorizedFault; - import eu.europa.ec.cipa.smp.server.security.DoNothingTrustManager; import eu.europa.ec.cipa.smp.server.security.HostnameVerifierAlwaysTrue; -import eu.europa.ec.cipa.smp.server.util.ConfigFile; import eu.europa.ec.cipa.smp.server.security.KeyStoreUtils; +import eu.europa.ec.cipa.smp.server.util.ConfigFile; import org.busdox.servicemetadata.locator._1.ServiceMetadataPublisherServiceForParticipantType; import org.oasis_open.docs.bdxr.ns.smp._2016._05.ParticipantIdentifierType; import org.slf4j.Logger; @@ -67,6 +66,7 @@ public final class RegistrationServiceRegistrationHook extends AbstractRegistrat private static final URL s_aSMLEndpointURL; private static final String s_sSMPID; private static final String s_sSMPClientCertificate; + private static final URL wsdlUrl = RegistrationServiceRegistrationHook.class.getResource("/ManageBusinessIdentifierService-1.0.wsdl"); private static ConfigFile configFile; @@ -113,7 +113,7 @@ public final class RegistrationServiceRegistrationHook extends AbstractRegistrat Map<String, List<String>> customHeaders = new HashMap<>(); customHeaders.put(CLIENT_CERT_HEADER_KEY, Arrays.asList(s_sSMPClientCertificate)); - final ManageBusinessIdentifierService aService = new ManageBusinessIdentifierService((URL) null); + final ManageBusinessIdentifierService aService = new ManageBusinessIdentifierService(wsdlUrl); final IManageParticipantIdentifierWS aPort = aService.getManageBusinessIdentifierServicePort (); Map<String, Object> requestContext = ((BindingProvider) aPort).getRequestContext(); requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, s_aSMLEndpointURL.toString()); diff --git a/smp-server-library/src/main/resources/ManageBusinessIdentifierService-1.0.wsdl b/smp-server-library/src/main/resources/ManageBusinessIdentifierService-1.0.wsdl new file mode 100644 index 0000000000000000000000000000000000000000..b1b2de180ff79a96e2d85e6c3086de69a6630118 --- /dev/null +++ b/smp-server-library/src/main/resources/ManageBusinessIdentifierService-1.0.wsdl @@ -0,0 +1,332 @@ +<!-- +(C) Copyright 2017 - European Commission | CEF eDelivery + +Licensed under the EUPL, Version 1.1 (the "License"); +You may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://ec.europa.eu/idabc/servlets/Docbb6d.pdf?id=31979 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--> +<wsdl:definitions + xmlns:tns="http://busdox.org/serviceMetadata/ManageBusinessIdentifierService/1.0/" + xmlns:soap11="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:lrs="http://busdox.org/serviceMetadata/locator/1.0/" + xmlns:s="http://www.w3.org/2001/XMLSchema" + xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" + name="ManageBusinessIdentifierService" + targetNamespace= + "http://busdox.org/serviceMetadata/ManageBusinessIdentifierService/1.0/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> + <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> + <wsdl:types> + <s:schema elementFormDefault="qualified" + targetNamespace= + "http://busdox.org/serviceMetadata/ManageBusinessIdentifierService/1.0/Schema/"> + <s:import namespace="http://busdox.org/serviceMetadata/locator/1.0/" schemaLocation="ServiceMetadataLocatorTypes-1.0.xsd"/> + </s:schema> + </wsdl:types> + <wsdl:message name="createIn"> + <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> + <wsdl:part name="messagePart" element="lrs:CreateParticipantIdentifier" /> + </wsdl:message> + <wsdl:message name="createOut"> + <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> + </wsdl:message> + <wsdl:message name="deleteIn"> + <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> + <wsdl:part name="messagePart" element="lrs:DeleteParticipantIdentifier" /> + </wsdl:message> + <wsdl:message name="deleteOut"> + <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> + </wsdl:message> + <wsdl:message name="listIn"> + <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> + <wsdl:part name="messagePart" element="lrs:PageRequest" /> + </wsdl:message> + <wsdl:message name="listOut"> + <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> + <wsdl:part name="messagePart" element="lrs:ParticipantIdentifierPage" /> + </wsdl:message> + <wsdl:message name="prepareMigrateIn"> + <wsdl:part name="prepareMigrateIn" element="lrs:PrepareMigrationRecord"/> + </wsdl:message> + <wsdl:message name="prepareMigrateOut"> + <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> + </wsdl:message> + <wsdl:message name="migrateIn"> + <wsdl:part name="migrateIn" element="lrs:CompleteMigrationRecord"/> + </wsdl:message> + <wsdl:message name="migrateOut"> + <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> + </wsdl:message> + <wsdl:message name="createListIn"> + <wsdl:part name="createListIn" element="lrs:CreateList"/> + </wsdl:message> + <wsdl:message name="createListOut"> + <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> + </wsdl:message> + <wsdl:message name="deleteListIn"> + <wsdl:part name="deleteListIn" element="lrs:DeleteList"/> + </wsdl:message> + <wsdl:message name="deleteListOut"> + <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> + </wsdl:message> + <wsdl:message name="badRequestFault"> + <wsdl:part name="fault" element="lrs:BadRequestFault"/> + </wsdl:message> + <wsdl:message name="internalErrorFault"> + <wsdl:part name="fault" element="lrs:InternalErrorFault"/> + </wsdl:message> + <wsdl:message name="notFoundFault"> + <wsdl:part name="fault" element="lrs:NotFoundFault"/> + </wsdl:message> + <wsdl:message name="unauthorizedFault"> + <wsdl:part name="fault" element="lrs:UnauthorizedFault"/> + </wsdl:message> + <wsdl:portType name="ManageBusinessIdentifierServiceSoap"> + <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> + <wsdl:operation name="Create"> + <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> + <wsdl:input message="tns:createIn" /> + <wsdl:output message="tns:createOut" /> + <wsdl:fault message="tns:notFoundFault" name="NotFoundFault"/> + <wsdl:fault message="tns:unauthorizedFault" name="UnauthorizedFault"/> + <wsdl:fault message="tns:internalErrorFault" name="InternalErrorFault"/> + <wsdl:fault message="tns:badRequestFault" name="BadRequestFault"/> + </wsdl:operation> + <wsdl:operation name="Delete"> + <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> + <wsdl:input message="tns:deleteIn" /> + <wsdl:output message="tns:deleteOut" /> + <wsdl:fault message="tns:notFoundFault" name="NotFoundFault"/> + <wsdl:fault message="tns:unauthorizedFault" name="UnauthorizedFault"/> + <wsdl:fault message="tns:internalErrorFault" name="InternalErrorFault"/> + <wsdl:fault message="tns:badRequestFault" name="BadRequestFault"/> + </wsdl:operation> + <wsdl:operation name="List"> + <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> + <wsdl:input message="tns:listIn" /> + <wsdl:output message="tns:listOut" /> + <wsdl:fault message="tns:notFoundFault" name="NotFoundFault"/> + <wsdl:fault message="tns:unauthorizedFault" name="UnauthorizedFault"/> + <wsdl:fault message="tns:internalErrorFault" name="InternalErrorFault"/> + <wsdl:fault message="tns:badRequestFault" name="BadRequestFault"/> + </wsdl:operation> + <wsdl:operation name="PrepareToMigrate"> + <wsdl:input message="tns:prepareMigrateIn"/> + <wsdl:output message="tns:prepareMigrateOut" /> + <wsdl:fault message="tns:notFoundFault" name="NotFoundFault"/> + <wsdl:fault message="tns:unauthorizedFault" name="UnauthorizedFault"/> + <wsdl:fault message="tns:internalErrorFault" name="InternalErrorFault"/> + <wsdl:fault message="tns:badRequestFault" name="BadRequestFault"/> + </wsdl:operation> + <wsdl:operation name="Migrate"> + <wsdl:input message="tns:migrateIn"/> + <wsdl:output message="tns:migrateOut"/> + <wsdl:fault message="tns:notFoundFault" name="NotFoundFault"/> + <wsdl:fault message="tns:unauthorizedFault" name="UnauthorizedFault"/> + <wsdl:fault message="tns:internalErrorFault" name="InternalErrorFault"/> + <wsdl:fault message="tns:badRequestFault" name="BadRequestFault"/> + </wsdl:operation> + <wsdl:operation name="CreateList"> + <wsdl:input message="tns:createListIn"/> + <wsdl:output message="tns:createListOut" /> + <wsdl:fault message="tns:notFoundFault" name="NotFoundFault"/> + <wsdl:fault message="tns:unauthorizedFault" name="UnauthorizedFault"/> + <wsdl:fault message="tns:internalErrorFault" name="InternalErrorFault"/> + <wsdl:fault message="tns:badRequestFault" name="BadRequestFault"/> + </wsdl:operation> + <wsdl:operation name="DeleteList"> + <wsdl:input message="tns:deleteListIn"/> + <wsdl:output message="tns:deleteListOut" /> + <wsdl:fault message="tns:notFoundFault" name="NotFoundFault"/> + <wsdl:fault message="tns:unauthorizedFault" name="UnauthorizedFault"/> + <wsdl:fault message="tns:internalErrorFault" name="InternalErrorFault"/> + <wsdl:fault message="tns:badRequestFault" name="BadRequestFault"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="ManageBusinessIdentifierServiceSoap" + type="tns:ManageBusinessIdentifierServiceSoap"> + <soap11:binding transport="http://schemas.xmlsoap.org/soap/http" /> + <wsdl:operation name="Create"> + <soap11:operation soapAction= + "http://busdox.org/serviceMetadata/ManageBusinessIdentifierService/1.0/ + :createIn" + style="document" /> + <wsdl:input> + <soap11:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap11:body use="literal" /> + </wsdl:output> + <wsdl:fault name="NotFoundFault"> + <soap:fault name="NotFoundFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="UnauthorizedFault"> + <soap:fault name="UnauthorizedFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="InternalErrorFault"> + <soap:fault name="InternalErrorFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="BadRequestFault"> + <soap:fault name="BadRequestFault" use="literal"/> + </wsdl:fault> + </wsdl:operation> + <wsdl:operation name="CreateList"> + <soap11:operation soapAction= + "http://busdox.org/serviceMetadata/ManageBusinessIdentifierService/1.0/ + :createListIn" + style="document" /> + <wsdl:input> + <soap11:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap11:body use="literal" /> + </wsdl:output> + <wsdl:fault name="NotFoundFault"> + <soap:fault name="NotFoundFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="UnauthorizedFault"> + <soap:fault name="UnauthorizedFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="InternalErrorFault"> + <soap:fault name="InternalErrorFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="BadRequestFault"> + <soap:fault name="BadRequestFault" use="literal"/> + </wsdl:fault> + </wsdl:operation> + <wsdl:operation name="Delete"> + <soap11:operation soapAction= + "http://busdox.org/serviceMetadata/ManageBusinessIdentifierService/1.0/ + :deleteIn" + style="document" /> + <wsdl:input> + <soap11:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap11:body use="literal" /> + </wsdl:output> + <wsdl:fault name="NotFoundFault"> + <soap:fault name="NotFoundFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="UnauthorizedFault"> + <soap:fault name="UnauthorizedFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="InternalErrorFault"> + <soap:fault name="InternalErrorFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="BadRequestFault"> + <soap:fault name="BadRequestFault" use="literal"/> + </wsdl:fault> + </wsdl:operation> + <wsdl:operation name="DeleteList"> + <soap11:operation soapAction= + "http://busdox.org/serviceMetadata/ManageBusinessIdentifierService/1.0/ + :deleteListIn" + style="document" /> + <wsdl:input> + <soap11:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap11:body use="literal" /> + </wsdl:output> + <wsdl:fault name="NotFoundFault"> + <soap:fault name="NotFoundFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="UnauthorizedFault"> + <soap:fault name="UnauthorizedFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="InternalErrorFault"> + <soap:fault name="InternalErrorFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="BadRequestFault"> + <soap:fault name="BadRequestFault" use="literal"/> + </wsdl:fault> + </wsdl:operation> + <wsdl:operation name="List"> + <soap11:operation soapAction= + "http://busdox.org/serviceMetadata/ManageBusinessIdentifierService/1.0/ + :listIn" + style="document" /> + <wsdl:input> + <soap11:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap11:body use="literal" /> + </wsdl:output> + <wsdl:fault name="NotFoundFault"> + <soap:fault name="NotFoundFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="UnauthorizedFault"> + <soap:fault name="UnauthorizedFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="InternalErrorFault"> + <soap:fault name="InternalErrorFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="BadRequestFault"> + <soap:fault name="BadRequestFault" use="literal"/> + </wsdl:fault> + </wsdl:operation> + <wsdl:operation name="PrepareToMigrate"> + <soap11:operation soapAction= + "http://busdox.org/serviceMetadata/ManageBusinessIdentifierService/1.0/ + :prepareMigrateIn" + style="document" /> + <wsdl:input> + <soap11:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap11:body use="literal" /> + </wsdl:output> + <wsdl:fault name="NotFoundFault"> + <soap:fault name="NotFoundFault" use="literal" /> + </wsdl:fault> + <wsdl:fault name="UnauthorizedFault"> + <soap:fault name="UnauthorizedFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="InternalErrorFault"> + <soap:fault name="InternalErrorFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="BadRequestFault"> + <soap:fault name="BadRequestFault" use="literal"/> + </wsdl:fault> + </wsdl:operation> + <wsdl:operation name="Migrate"> + <soap11:operation soapAction= + "http://busdox.org/serviceMetadata/ManageBusinessIdentifierService/1.0/ + :migrateIn" + style="document" /> + <wsdl:input> + <soap11:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap11:body use="literal" /> + </wsdl:output> + <wsdl:fault name="NotFoundFault"> + <soap:fault name="NotFoundFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="UnauthorizedFault"> + <soap:fault name="UnauthorizedFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="InternalErrorFault"> + <soap:fault name="InternalErrorFault" use="literal"/> + </wsdl:fault> + <wsdl:fault name="BadRequestFault"> + <soap:fault name="BadRequestFault" use="literal"/> + </wsdl:fault> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="ManageBusinessIdentifierService"> + <wsdl:port name="ManageBusinessIdentifierServicePort" binding="tns:ManageBusinessIdentifierServiceSoap"> + <soap:address location="unknown"/> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> \ No newline at end of file diff --git a/smp-webapp/src/main/resources/META-INF/services/javax.xml.ws.spi.Provider b/smp-webapp/src/main/resources/META-INF/services/javax.xml.ws.spi.Provider new file mode 100644 index 0000000000000000000000000000000000000000..25b4a427aad06e813cec6633f7a6ddfe7f5f56ca --- /dev/null +++ b/smp-webapp/src/main/resources/META-INF/services/javax.xml.ws.spi.Provider @@ -0,0 +1 @@ +com.sun.xml.internal.ws.spi.ProviderImpl \ No newline at end of file