Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Not A Problem
-
2.3.1, 2.3.2, 2.3.3
-
N/A
Description
The existing code in org.apache.cxf.binding.soap.interceptor.RPCOutInterceptor appends "Response" as a suffix to a request message element name for the response name, ignoring the defined name in the associated WSDL. I've implemented the following fix for our environment:
protected String addOperationNode(NSStack nsStack, Message message, XMLStreamWriter xmlWriter, boolean output, BindingOperationInfo boi) throws XMLStreamException {
String ns = boi.getName().getNamespaceURI();
SoapBody body = null;
if (output)
else
{ body = boi.getInput().getExtensor(SoapBody.class); }if (body != null && !StringUtils.isEmpty(body.getNamespaceURI()))
{ ns = body.getNamespaceURI(); } nsStack.add(ns);
String prefix = nsStack.getPrefix(ns);
// Fixes the name problem
String name = getName(boi, output);
StaxUtils.writeStartElement(xmlWriter, prefix, name, ns);
return ns;
}
private String getName(BindingOperationInfo boi, boolean output) {
if (!output)
return boi.getOutput().getMessageInfo().getName().getLocalPart();
}