Hi All, Jenkins reported a build failure[1]. I dig into the issue and found that this is related to Axiom SOAPHeaderBlock. If you see the messages check equal in the tests you will see that the role is missing for To EPR reference information. It was due to the following reason. When executing the header.setRole(addressingRole) in AddressingOutHandler, it only added the role if and only if the addressing namespace is there.
In To EPR reference information it try to add the role to the header. <myRef:Reference4 xmlns:myRef="http://reference.org">Value 400</myRef:Reference4> But after execution of the following part header.setRole(addressingRole); <myRef:Reference4 xmlns:myRef="http://reference.org">Value 400</myRef:Reference4> Which is as same as before adding setting the role. Then I added the addressing namespace and modified the execution as follows header.setNamespace(factory.createOMNamespace("wsa", " http://schemas.xmlsoap.org/ws/2004/08/addressing")); header.setRole(addressingRole); Where you can see that I added the addressing namespace manually and then it succeeded. <http://schemas.xmlsoap.org/ws/2004/08/addressing:Reference3 xmlns: http://schemas.xmlsoap.org/ws/2004/08/addressing="wsa" xmlns:myRef=" http://reference.org" xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" soapenv:actor="urn:test:role">Value 300</ http://schemas.xmlsoap.org/ws/2004/08/addressing:Reference3> So my question is is this the correct behavior of header.setRole( addressingRole) If that is the case I can provide a patch for this if it is not then we may have to patch Axiom. thanks Eranda [1]. https://builds.apache.org/job/Axis2/org.apache.axis2$addressing/2917/console Real message <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"> <myRef:Reference4 xmlns:myRef="http://reference.org">Value 400</myRef:Reference4> <myRef:Reference3 xmlns:myRef="http://reference.org">Value 300</myRef:Reference3> <wsa:To soapenv:actor="urn:test:role">http://www.to.org/service/</wsa:To> <wsa:ReplyTo soapenv:actor="urn:test:role"> <wsa:Address>http://www.replyTo.org/service/</wsa:Address> </wsa:ReplyTo> <wsa:From soapenv:actor="urn:test:role"> <wsa:Address>http://www.from.org/service/</wsa:Address> <wsa:ReferenceParameters> <Reference2>Value 200</Reference2> </wsa:ReferenceParameters> </wsa:From> <wsa:MessageID soapenv:actor="urn:test:role">123456-7890</wsa:MessageID> <wsa:Action soapenv:actor="urn:test:role">http://www.actions.org/action</wsa:Action> <wsa:RelatesTo soapenv:actor="urn:test:role" RelationshipType="TestRelation">http://www.relatesTo.org/service/ </wsa:RelatesTo> </soapenv:Header> <soapenv:Body/> </soapenv:Envelope> Expected message <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:myRef="http://reference.org"> <wsa:From soapenv:actor="urn:test:role"> <wsa:Address>http://www.from.org/service/</wsa:Address> <wsa:ReferenceParameters> <Reference2>Value 200</Reference2> </wsa:ReferenceParameters> </wsa:From> <wsa:To soapenv:actor="urn:test:role">http://www.to.org/service/</wsa:To> <wsa:MessageID soapenv:actor="urn:test:role">123456-7890</wsa:MessageID> <myRef:Reference4 soapenv:actor="urn:test:role">Value 400</myRef:Reference4> <myRef:Reference3 soapenv:actor="urn:test:role">Value 300</myRef:Reference3> <wsa:Action soapenv:actor="urn:test:role">http://www.actions.org/action</wsa:Action> <wsa:ReplyTo soapenv:actor="urn:test:role"> <wsa:Address>http://www.replyTo.org/service/</wsa:Address> </wsa:ReplyTo> <wsa:RelatesTo soapenv:actor="urn:test:role" RelationshipType="TestRelation">http://www.relatesTo.org/service/</wsa:RelatesTo> </soapenv:Header> <soapenv:Body></soapenv:Body> </soapenv:Envelope> -- *Eranda Sooriyabandara* E-mail: eranda.sooriyabandara AT gmail.com Mobile: +94 716 472 816 Linked-In: http://www.linkedin.com/in/erandasooriyabandara Blog: http://emsooriyabandara.blogspot.com/
