jf.setSOAPStyle(javax.jws.soap.SOAPBinding.Style.DOCUMENT);
}
Object[] methods = jf.getMethods().toArray();
for (int i = 0; i < methods.length; i++) {
JavaMethod jm = (JavaMethod)methods[i];
if (jm.getOperationName() != null && jm.getOperationName().equals(bop.getName().getLocalPart())) {
if (isSoapBinding()) {
// TODO: add customize here
//doCustomizeOperation(jf, jm, bop);
Map prop = getSoapOperationProp(bop);
String soapAction = prop.get(soapOPAction) == null ? "" : (String)prop.get(soapOPAction);
String soapStyle = prop.get(soapOPStyle) == null ? "" : (String)prop.get(soapOPStyle);
jm.setSoapAction(soapAction);
if (SOAPBindingUtil.getSoapStyle(soapStyle) == null && this.bindingObj == null) {
org.apache.cxf.common.i18n.Message msg =
new org.apache.cxf.common.i18n.Message("BINDING_STYLE_NOT_DEFINED",
LOG);
throw new ToolException(msg);
}
if (SOAPBindingUtil.getSoapStyle(soapStyle) == null) {
jm.setSoapStyle(jf.getSOAPStyle());
} else {
jm.setSoapStyle(SOAPBindingUtil.getSoapStyle(soapStyle));
}
} else {
// REVISIT: fix for xml binding
jm.setSoapStyle(jf.getSOAPStyle());
}
if (jm.getSoapStyle().equals(javax.jws.soap.SOAPBinding.Style.RPC)) {
jm.getAnnotationMap().remove("SOAPBinding");
}
OperationProcessor processor = new OperationProcessor(context);
int headerType = isNonWrappable(bop);
OperationInfo opinfo = bop.getOperationInfo();
JAXWSBinding opBinding = (JAXWSBinding)opinfo.getExtensor(JAXWSBinding.class);
if (opBinding != null) {
if (opBinding.isEnableWrapperStyle()) {
jaxwsBinding.setEnableWrapperStyle(true);
} else {
jaxwsBinding.setEnableWrapperStyle(false);
if (!opBinding.isEnableAsyncMapping()) {
jaxwsBinding.setEnableAsyncMapping(false);
}
}
if (opBinding.isEnableMime()) {
enableOpMime = true;
}
}
if (jaxwsBinding.isEnableMime() || enableOpMime) {
jm.setMimeEnable(true);
}
if (jm.isWrapperStyle() && headerType > this.noHEADER
|| !jaxwsBinding.isEnableWrapperStyle()
|| jm.enableMime() && jm.isWrapperStyle()) {
// changed wrapper style
jm.setWrapperStyle(false);
processor.processMethod(jm, bop.getOperationInfo(), jaxwsBinding);
jm.getAnnotationMap().remove("ResponseWrapper");
jm.getAnnotationMap().remove("RequestWrapper");
} else {
processor.processMethod(jm, bop.getOperationInfo(), jaxwsBinding);
}
if (headerType == this.resultHeader) {
JAnnotation resultAnno = jm.getAnnotationMap().get("WebResult");
if (resultAnno != null) {
resultAnno.addElement(new JAnnotationElement("header", true, true));
}
}
processParameter(jm, bop);