[
https://issues.apache.org/jira/browse/CXF-2766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Friar updated CXF-2766:
----------------------------
I have found the code that is causing the problem. It's in the method
createBareMessage(ServiceInfo serviceInfo, OperationInfo opInfo, boolean isOut)
in org.apache.cxf.service.factory.ReflectionServiceFactoryBean.
...
if (message.getMessageParts().size() == 1) {
qname = qname == null && !isOut ? getInParameterName(opInfo,
method, -1) : qname;
qname = qname == null && isOut ? getOutParameterName(opInfo,
method, -1) : qname;
if (qname.getLocalPart().startsWith("arg") ||
qname.getLocalPart().startsWith("return")) {
qname = isOut
? new QName(qname.getNamespaceURI(), method.getName() +
"Response") : new QName(qname
.getNamespaceURI(), method.getName());
}
...
I'm not sure why the check for "return" is there. Also, not sure why this is
done at all...if there's more that one parameter then the inner if is not
executed.
The work around for me is to add an additional parameter (say Object o) to the
WebMethod of the client WebService interface and always pass null for that
parameter when calling the method.
> @Webparam name not honoured
> ---------------------------
>
> Key: CXF-2766
> URL: https://issues.apache.org/jira/browse/CXF-2766
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding
> Affects Versions: 2.2.6, 2.2.7
> Environment: Mac OS-X, Windows XP, Spring Configured CXF Client
> Reporter: John Friar
>
> I have imported a wsdl (using the wsdl2java tool) from a service provider. A
> snippet of the generated webservice interface is:
> @WebResult(name = "return-response", targetNamespace =
> "http://sp.com/service.wsdl/types", partName = "returnResponse")
> @WebMethod(action = "http://sp.com/doReturn")
> public ReturnResponseType doReturn(
> @WebParam(partName = "returnTrx", name = "return-request",
> targetNamespace = "http://sp.com/service.wsdl/types")
> ReturnRequestType returnTrx
> ) throws ErrorMessages;
> However, the soap message that is created does not honour the name of the
> @WebParam (return-request) and instead uses doReturn as the name of the
> method and parameter. If any other name is used then behaviour is as
> expected. I cannot find anything in the spec. that specifies that 'return'
> should not be used at the start of a @WebParam name but that appears to be
> the issue.
> Thanks,
> John
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.