ref = svcRef;
}
public void postCreateProxy(WSBindingProvider bp, Class<?> serviceEndpointInterface) {
ServiceRefPortInfo portInfo = ref.getPortInfoBySEI(serviceEndpointInterface.getName());
if (portInfo!=null) {
// Set MTOM for this port
boolean mtomEnabled = false;
if(portInfo.getMtomEnabled() != null &&
(new Boolean(portInfo.getMtomEnabled())).booleanValue()) {
mtomEnabled = true;
}
if (mtomEnabled) {
Binding bType = bp.getBinding();
// enable mtom valid only for SOAPBindings
if(SOAPBinding.class.isAssignableFrom(bType.getClass())) {
((SOAPBinding)bType).setMTOMEnabled(true);
} else {
logger.log(Level.SEVERE,
"serviceref.invalidmtom");
}
}
// Set stub properties
Set properties = portInfo.getStubProperties();
for(Iterator iter = properties.iterator(); iter.hasNext();) {
NameValuePairDescriptor next = (NameValuePairDescriptor)
iter.next();
bp.getRequestContext().put(next.getName(), next.getValue());