Hi Dan, I have created a jira for this and have attached a testcase which demonstrates the issue.
https://issues.apache.org/jira/browse/CXF-4130 Let me know if you need other details or if I can be of help in any way. Ultimately I would like this merged to the 2.3.x branch. Seumas On Tue, Feb 21, 2012 at 5:23 PM, Daniel Kulp <[email protected]> wrote: > On Sunday, February 19, 2012 10:05:01 PM Seumas Soltysik wrote: > > As stated in previous posts, the presence of SOAP headers in WSDLs used > in > > conjunction with Provider implementations causes body parts to be > processed > > as header parts. > > The key seems to be matching up the index of the part/parts which define > the > > outbound SOAP body with location of the SOAP body in the > > MessageContentList. Therefore I suggest adding code to the > > MessageModeOutInterceptor that finds the index of the first SOAP body > part > > and then inserts the SOAP body payload into the MessageContentList at the > > same index as the part. The code for doing this might look something like > > the code below. If these seems appropriate, i can submit a patch > containing > > this fix: > > Can you log a JIRA for this? A test case would be great. > > There may be another way to handle this by registering an interceptor just > prior to the write phase that flips out the OperationInfo with the > synthetic > "invoke" operation, but I'd have to play with that a bit more. > > Dan > > > > > > MessageModeOutInterceptorInternal.handleMessage() > > > > list.remove(0); > > DocumentFragment frag = > > soapMessage.getSOAPPart().createDocumentFragment(); > > try { > > Node body = soapMessage.getSOAPBody(); > > Node nd = body.getFirstChild(); > > while (nd != null) { > > body.removeChild(nd); > > frag.appendChild(nd); > > nd = soapMessage.getSOAPBody().getFirstChild(); > > } > > > > int index = 0; > > > > Exchange exchange = message.getExchange(); > > BindingOperationInfo operation = > > (BindingOperationInfo)exchange.get(BindingOperationInfo.class > > .getName()); > > > > List<MessagePartInfo> parts = null; > > BindingMessageInfo bmsg = null; > > boolean client = isRequestor(message); > > > > if (!client) { > > if (operation.getOutput() != null) { > > bmsg = operation.getOutput(); > > parts = bmsg.getMessageParts(); > > } > > } else { > > bmsg = operation.getInput(); > > parts = bmsg.getMessageParts(); > > } > > > > if (parts != null && parts.size() > 0) { > > index = parts.get(0).getIndex(); > > } > > > > list.set(index, frag); > > > > -- > > View this message in context: > > > http://cxf.547215.n5.nabble.com/Response-SOAP-Headers-with-Provider-impleme > > ntation-tp5485785p5498265.html Sent from the cxf-dev mailing list > archive at > > Nabble.com. > -- > Daniel Kulp > [email protected] - http://dankulp.com/blog > Talend Community Coder - http://coders.talend.com >
