Adding WS-Addressing to client messages

5 views
Skip to first unread message

Sergio Juan Membiela

unread,
Aug 9, 2022, 6:56:36 AMAug 9
to ipf-user
Hello.

I am new to XDS and Camel. From the tutorial at https://github.com/oehf/ipf/tree/master/tutorials/iheclient/src/main/java/org/openehealth/ipf/tutorials/iheclient I have worked out a client that seems to work, but when I connect to the server I get an error message that it is expecting WS-Addressing

I have found a "Open eHealth Integration Platform version 2.2-m1 Reference manual" (date unknown) that states that the XDS components implements WS-Addressing, but with no further info.

How could I add WS-Addressing? Is there any example there?

This is my code:

    public void query(final String patientId) {
        var query = new FindDocumentsQuery();
        query.setPatientId(new Identifiable(patientId));
        var queryRegistry = new QueryRegistry(query);
        var exchange = new DefaultExchange(camelContext);
        exchange.getIn().setBody(queryRegistry);
        var endpoint = this.environment.getRequiredProperty("bdac.endpoint.iti18");
        try (var template = camelContext.createProducerTemplate()) {
            var result = template.send(endpoint, exchange);

            if (result.getException() != null) {
                throw result.getException();
            }
            var response = result.getMessage().getBody(QueryResponse.class);
        } catch (Exception e) {
            LOG.error("Excepción buscando informes", e);
            throw new RuntimeException("Excepción buscando informes en BDAC", e);
        }
    }

Thanks

Dmytro Rud

unread,
Aug 9, 2022, 6:59:07 AMAug 9
to ipf-...@googlegroups.com
Hello Sergio

First of all, IPF 2.2 is very old, you may consider using 4.4 instead, see https://oehf.github.io/ipf-docs/
WS-Addressing is automatically activated for all SOAP transactions, you do not have to add it manually.

Best regards 
Dmytro



--
You received this message because you are subscribed to the Google Groups "ipf-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ipf-user+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ipf-user/8cac6da5-3879-4a80-9b9b-4dc7ef441b44n%40googlegroups.com.

Sergio Juan Membiela

unread,
Aug 10, 2022, 9:52:09 AMAug 10
to ipf-user
Hi!

You were right, I did misread a warning message about, apparently, the server not sending back the WS-Addressing headers. After that there was the actual error message I was getting, which was not related to WS-Addressing and has already been solved.

Thank you.
Reply all
Reply to author
Forward
0 new messages