Search in sources :

Example 1 with JaxWsRequestClientFactory

use of org.openehealth.ipf.commons.ihe.ws.JaxWsRequestClientFactory in project ipf by oehf.

the class CxfFeatureTest method testFeatureEndpointWithoutPolicy.

@Test
public void testFeatureEndpointWithoutPolicy() {
    JaxWsClientFactory<? extends XdsAuditDataset> clientFactory = new JaxWsRequestClientFactory<>(ITI_42.getWsTransactionConfiguration(), "http://localhost:" + getPort() + "/xds-iti42", null, null, null, null, null, null, null, null);
    var client = (Iti42PortType) clientFactory.getClient();
    try {
        client.documentRegistryRegisterDocumentSetB(new SubmitObjectsRequest());
        fail("This line must be not reachable");
    } catch (SOAPFaultException ex) {
        assertTrue(ex.getMessage().contains("These policy alternatives can not be satisfied"));
    }
}
Also used : Iti42PortType(org.openehealth.ipf.commons.ihe.xds.iti42.Iti42PortType) SOAPFaultException(javax.xml.ws.soap.SOAPFaultException) JaxWsRequestClientFactory(org.openehealth.ipf.commons.ihe.ws.JaxWsRequestClientFactory) SubmitObjectsRequest(org.openehealth.ipf.commons.ihe.xds.core.stub.ebrs30.lcm.SubmitObjectsRequest) Test(org.junit.jupiter.api.Test)

Aggregations

SOAPFaultException (javax.xml.ws.soap.SOAPFaultException)1 Test (org.junit.jupiter.api.Test)1 JaxWsRequestClientFactory (org.openehealth.ipf.commons.ihe.ws.JaxWsRequestClientFactory)1 SubmitObjectsRequest (org.openehealth.ipf.commons.ihe.xds.core.stub.ebrs30.lcm.SubmitObjectsRequest)1 Iti42PortType (org.openehealth.ipf.commons.ihe.xds.iti42.Iti42PortType)1