no.digipost.api.handlers.TransportKvitteringReceiver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdp-api-client Show documentation
Show all versions of sdp-api-client Show documentation
Klientfunksjonaltet for Sikker Digital Post
package no.digipost.api.handlers;
import no.digipost.api.representations.TransportKvittering;
import no.digipost.org.oasis_open.docs.ebxml_msg.ebms.v3_0.ns.core._200704.MessageInfo;
import org.springframework.ws.WebServiceMessage;
import org.springframework.ws.client.core.WebServiceMessageExtractor;
import javax.xml.transform.TransformerException;
import java.io.IOException;
public class TransportKvitteringReceiver extends EbmsContextAware implements WebServiceMessageExtractor {
@Override
public TransportKvittering extractData(final WebServiceMessage message) throws IOException, TransformerException {
MessageInfo messageInfo = ebmsContext.receipts.get(0).getMessageInfo();
return new TransportKvittering(messageInfo.getMessageId(), messageInfo.getRefToMessageId());
}
}