Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 80ff7f6e authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

Adapt to new DynamicDiscoveryClient API changes

parent 954ecef2
No related branches found
No related tags found
No related merge requests found
Pipeline #159263 passed with warnings
......@@ -106,7 +106,7 @@ public class OasisSMPSubresource10Handler extends AbstractOasisSMPHandler {
serviceInformationType.getDocumentIdentifier().setScheme(subresourceIdentifier.getScheme());
try {
reader.serializeNative(subresource, responseData.getOutputStream(), true);
reader.serializeNativeAny(subresource, responseData.getOutputStream(), true);
} catch (TechnicalException e) {
throw new ResourceException(PARSE_ERROR, "Can not marshal extension for service group: [" + identifier + "]. Error: " + ExceptionUtils.getRootCauseMessage(e), e);
}
......@@ -187,7 +187,8 @@ public class OasisSMPSubresource10Handler extends AbstractOasisSMPHandler {
ServiceMetadata subresource;
try {
subresource = (ServiceMetadata) reader.parseNative(new ByteArrayInputStream(bytearray));
subresource = (ServiceMetadata) reader.parseNativeAny(new ByteArrayInputStream(bytearray));
} catch (TechnicalException e) {
throw new ResourceException(INVALID_RESOURCE, "Error occurred while validation Oasis SMP 1.0 ServiceMetadata: [" + identifier + "] with error: " + ExceptionUtils.getRootCauseMessage(e), e);
}
......
......@@ -55,7 +55,7 @@ class SubresourceConverterTest {
byte[] inputDoc = XmlTestUtils.loadDocumentAsByteArray(RES_PATH + "SubresourceWithServiceOk.xml");
//when
ServiceMetadata subresource = (ServiceMetadata) testInstance.parseNative(new ByteArrayInputStream(inputDoc));
ServiceMetadata subresource = (ServiceMetadata) testInstance.parseNativeAny(new ByteArrayInputStream(inputDoc));
//then
assertNotNull(subresource);
......@@ -75,7 +75,7 @@ class SubresourceConverterTest {
byte[] inputDoc = XmlTestUtils.loadDocumentAsByteArray(RES_PATH + "SubresourceWithServiceInformationUtf8.xml");
//when
ServiceMetadata subresource = (ServiceMetadata) testInstance.parseNative(new ByteArrayInputStream(inputDoc));
ServiceMetadata subresource = (ServiceMetadata) testInstance.parseNativeAny(new ByteArrayInputStream(inputDoc));
//then
String serviceDescription = subresource.getServiceInformation().getProcessList().getProcesses().get(0).getServiceEndpointList().getEndpoints().get(0).getServiceDescription();
......@@ -89,7 +89,7 @@ class SubresourceConverterTest {
byte[] inputDoc = XmlTestUtils.loadDocumentAsByteArray(RES_PATH + "SubresourceWithRedirect.xml");
//when
ServiceMetadata subresource = (ServiceMetadata) testInstance.parseNative(new ByteArrayInputStream(inputDoc));
ServiceMetadata subresource = (ServiceMetadata) testInstance.parseNativeAny(new ByteArrayInputStream(inputDoc));
//then
assertNotNull(subresource);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment