I generated a client from a WSDL using the CFX 2.7.4 library. The service I am 
consuming requires a replyTo for responses to be sent to. This is being used as 
a standalone client with no Spring. The snippit that I am trying is below, but 
TCPMon does not show any content to the header. Any assistance would be 
appreciated.

        DMSCCSMProcess_Service ss = new DMSCCSMProcess_Service(wsdlURL, 
SERVICE_NAME);
        DMSCCSMProcess servicePort = ss.getDMSCCSMProcessPort();

AddressingBuilder builder =
                AddressingBuilder.getAddressingBuilder();
        AddressingProperties maps = builder.newAddressingProperties();
        AttributedURIType to = new AttributedURIType();
        to.setValue("http://www.reply-address-here.com/service";);
        EndpointReferenceType toRef = new EndpointReferenceType();
        toRef.setAddress(to);
        maps.setTo(toRef);
        maps.setReplyTo(toRef);
        //associate MAPs with request context
        Map<String, Object> requestContext =
                ((BindingProvider)servicePort).getRequestContext();
        requestContext.put(CLIENT_ADDRESSING_PROPERTIES, maps);


Thanks,
Steve

Reply via email to