private void processOperation(JavaModel model, BindingOperation bop, Binding binding)
throws ToolException {
String portType = ProcessorUtil
.mangleNameToClassName(binding.getPortType().getQName().getLocalPart());
JavaInterface jf = model.getInterfaces().get(portType);
// TODO: extend other bindings
doCustomizeBinding(model, jf, binding);
if (isSoapBinding()) {
SOAPBinding soapBinding = (SOAPBinding)bindingObj;
if (getSoapStyle(soapBinding.getStyle()) == null) {
jf.setSOAPStyle(javax.jws.soap.SOAPBinding.Style.DOCUMENT);
} else {
jf.setSOAPStyle(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())) {
if (isSoapBinding()) {
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 (getSoapStyle(soapStyle) == null && this.bindingObj == null) {
org.objectweb.celtix.common.i18n.Message msg =
new org.objectweb.celtix.common.i18n.Message("BINDING_STYLE_NOT_DEFINED",
LOG);
throw new ToolException(msg);
}
if (getSoapStyle(soapStyle) == null) {
jm.setSoapStyle(jf.getSOAPStyle());
} else {
jm.setSoapStyle(getSoapStyle(soapStyle));
}
} else {
// REVISIT: fix for xml binding
jm.setSoapStyle(jf.getSOAPStyle());
}
OperationProcessor processor = new OperationProcessor(env);
int headerType = isNonWrappable(bop);