if (outputWrapElement.size() == 1 && inputWrapElement != null) {
QName outElement = outputWrapElement.iterator().next();
boolean sameWrapperChild = false;
for (QName inElement : inputWrapElement) {
if (isSameWrapperChild(inElement, outElement)) {
JavaParameter jpIn = null;
for (JavaParameter j : method.getParameters()) {
if (inElement.equals(j.getQName())) {
jpIn = j;
}
}
JavaParameter jp = getParameterFromQName(outputPart.getElementQName(), outElement,
JavaType.Style.INOUT, outputPart);
if (!qualified) {
jp.setTargetNamespace("");
}
if (!jpIn.getClassName().equals(jp.getClassName())) {
jp.setStyle(JavaType.Style.OUT);
}
addParameter(method, jp);
sameWrapperChild = true;
if (method.getReturn() == null) {
addVoidReturn(method);
}
break;
}
}
if (!sameWrapperChild) {
JavaReturn jreturn = getReturnFromQName(outElement, outputPart);
if (!qualified) {
jreturn.setTargetNamespace("");
}
method.setReturn(jreturn);
return;
}
}
for (QName outElement : outputWrapElement) {
if ("return".equals(outElement.getLocalPart())) {
if (method.getReturn() != null) {
org.apache.cxf.common.i18n.Message msg =
new org.apache.cxf.common.i18n.Message("WRAPPER_STYLE_TWO_RETURN_TYPES", LOG);
throw new ToolException(msg);
}
JavaReturn jreturn = getReturnFromQName(outElement, outputPart);
if (!qualified) {
jreturn.setTargetNamespace("");
}
method.setReturn(jreturn);
continue;
}
boolean sameWrapperChild = false;
if (inputWrapElement != null) {
for (QName inElement : inputWrapElement) {
if (isSameWrapperChild(inElement, outElement)) {
JavaParameter jpIn = null;
for (JavaParameter j : method.getParameters()) {
if (inElement.equals(j.getQName())) {
jpIn = j;
}
}
JavaParameter jp = getParameterFromQName(outputPart.getElementQName(), outElement,
JavaType.Style.INOUT, outputPart);
if (!qualified) {
jp.setTargetNamespace("");
}
if (!jpIn.getClassName().equals(jp.getClassName())) {
jp.setStyle(JavaType.Style.OUT);
}
addParameter(method, jp);
sameWrapperChild = true;
break;
}
}
}
if (!sameWrapperChild) {
JavaParameter jp = getParameterFromQName(outputPart.getElementQName(), outElement,
JavaType.Style.OUT, outputPart);
if (!qualified) {
jp.setTargetNamespace("");
}
JAXWSBinding mBinding = outputMessage.getOperation().getExtensor(JAXWSBinding.class);
if (mBinding != null && mBinding.getJaxwsParas() != null) {
for (JAXWSParameter jwsp : mBinding.getJaxwsParas()) {
if (outElement.equals(jwsp.getElementName())) {
jp.setName(jwsp.getName());
}
}
}
addParameter(method, jp);