enableOpMime = true;
if (bopBinding.getJaxwsPara() != null) {
jaxwsBinding.setJaxwsPara(bopBinding.getJaxwsPara());
}
}
JavaInterface jf = null;
for (JavaInterface jf2 : model.getInterfaces().values()) {
if (binding.getInterface().getName().getLocalPart()
.equals(jf2.getWebServiceName())) {
jf = jf2;
}
}
if (isSoapBinding()) {
SoapBinding soapBinding = (SoapBinding)bindingObj;
if (SOAPBindingUtil.getSoapStyle(soapBinding.getStyle()) == null) {
jf.setSOAPStyle(javax.jws.soap.SOAPBinding.Style.DOCUMENT);
} else {
jf.setSOAPStyle(SOAPBindingUtil.getSoapStyle(soapBinding.getStyle()));
}
} else {
// REVISIT: fix for xml binding
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");
}