return wsa;
}
private SOAPBindingAnnotation getSOAPBindingAnnotation(Port port) {
SOAPBindingAnnotation soapBindingAnn = null;
isDocStyle = port.getStyle() == null || port.getStyle().equals(SOAPStyle.DOCUMENT);
if(!isDocStyle){
soapBindingAnn = new SOAPBindingAnnotation();
soapBindingAnn.setStyle("SOAPBinding.Style.RPC");
port.setWrapped(true);
}
if(isDocStyle){
boolean first = true;
boolean isWrapper = true;
for(Operation operation:port.getOperations()){
if(first){
isWrapper = operation.isWrapped();
first = false;
continue;
}
sameParamStyle = (isWrapper == operation.isWrapped());
if(!sameParamStyle)
break;
}
if(sameParamStyle)
port.setWrapped(isWrapper);
}
if(sameParamStyle && !port.isWrapped()){
if(soapBindingAnn == null)
soapBindingAnn = new SOAPBindingAnnotation();
soapBindingAnn.setParameterStyle("SOAPBinding.ParameterStyle.BARE");
}
return soapBindingAnn;
}