You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Karol Goik (JIRA)" <ji...@apache.org> on 2016/08/17 15:11:21 UTC

[jira] [Created] (CXF-7014) FaultTo is not send with message

Karol Goik created CXF-7014:
-------------------------------

             Summary: FaultTo is not send with message
                 Key: CXF-7014
                 URL: https://issues.apache.org/jira/browse/CXF-7014
             Project: CXF
          Issue Type: Bug
          Components: WS-* Components
    Affects Versions: 2.2.12
         Environment: Windows 7 64bit 
JDK 1.6
            Reporter: Karol Goik


FaultTo addressing is not send along with message. Here's a code which adds faultTo address:

	public static void setupWsAddressing(String from, String to, String replyTo,
	    String faultTo, BindingProvider service) {

	AttributedURIType fromAttr = new AttributedURIType();
	fromAttr.setValue(from);

	AttributedURIType toAttr = null;
	if (to != null) {
	    toAttr = new AttributedURIType();
	    toAttr.setValue(to);
	}

	AttributedURIType replyToAttr = null;
	if (replyTo != null) {
	    replyToAttr = new AttributedURIType();
	    replyToAttr.setValue(replyTo);
	}
	
	AttributedURIType faultToAttr = null;
	if (faultTo != null) {
		faultToAttr = new AttributedURIType();
		faultToAttr.setValue(faultTo);
	}

	setupWsAddressing(toAttr, fromAttr, replyToAttr, faultToAttr, null, null, service);
    }
   
    private static void setupWsAddressing(AttributedURIType to, AttributedURIType from,
    	    AttributedURIType replyTo, AttributedURIType faultTo, AttributedURIType msgId,
    	    AttributedURIType relatesTo, BindingProvider service) {

    	AddressingProperties maps = new AddressingProperties();

    	maps.setTo(to);

    	if (msgId != null) {
    	    maps.setMessageID(msgId);
    	}

    	EndpointReferenceType fromRef = new EndpointReferenceType();
    	fromRef.setAddress(from);
    	maps.setFrom(fromRef);

    	EndpointReferenceType replyToRef = new EndpointReferenceType();
    	replyToRef.setAddress(replyTo);
    	maps.setReplyTo(replyToRef);
    	
    	EndpointReferenceType faultToRef = new EndpointReferenceType();
    	faultToRef.setAddress(faultTo);
    	maps.setFaultTo(faultToRef);

    	if (relatesTo != null) {
    	    RelatesToType relType = new RelatesToType();
    	    relType.setValue(relatesTo.getValue());
    	    maps.setRelatesTo(relType);
    	}
    	service.getRequestContext().put("javax.xml.ws.addressing.context", maps); 

        }


While debugging everything seams to be fine, proper address is placed into AddressingProperties to faultTo, yet when message is send there is no FaultTo in headers.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)