Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2011 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
 * 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.
 */
package org.openehealth.ipf.platform.camel.ihe.hl7v3.iti55.deferredresponse;
import static org.apache.cxf.ws.addressing.JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES;

Author(s):
Dmytro Rud
    public Iti55DeferredResponseProducer(AbstractWsEndpoint endpointJaxWsClientFactory clientFactory) {
        super(endpointclientFactoryString.classString.class);
    }
    @Override
    protected void enrichRequestContext(Exchange exchangeWrappedMessageContext requestContext) {
        // NB: Camel message headers used here are set in Iti55Service's intern Callable.
        // propagate WS-Addressing request message ID
        String requestMessageId = exchange.getIn().getHeader("iti55.deferred.requestMessageId"String.class);
        if (requestMessageId != null) {
            RelatesToType relatesToHolder = new RelatesToType();
            relatesToHolder.setValue(requestMessageId);
            AddressingProperties apropos = new AddressingProperties();
            apropos.setRelatesTo(relatesToHolder);
            requestContext.put(apropos);
        }
        // inject audit dataset
        WsAuditDataset auditDataset = exchange.getIn().getHeader("iti55.deferred.auditDataset"WsAuditDataset.class);
        if (auditDataset != null) {
            requestContext.put(.auditDataset);
        }
    }
    @Override
    protected String callService(Object clientString responseStringthrows Exception {
        return ((Iti55DeferredResponsePortTypeclient).receiveDeferredResponse(responseString);
    }
New to GrepCode? Check out our FAQ X