本文整理汇总了Java中javax.xml.ws.soap.AddressingFeature.isEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java AddressingFeature.isEnabled方法的具体用法?Java AddressingFeature.isEnabled怎么用?Java AddressingFeature.isEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.xml.ws.soap.AddressingFeature
的用法示例。
在下文中一共展示了AddressingFeature.isEnabled方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: update
import javax.xml.ws.soap.AddressingFeature; //导入方法依赖的package包/类
/**
* Puts an addressing policy into the PolicyMap if the addressing feature was set.
*/
public Collection<PolicySubject> update(final PolicyMap policyMap, final SEIModel model, final WSBinding wsBinding)
throws PolicyException {
LOGGER.entering(policyMap, model, wsBinding);
Collection<PolicySubject> subjects = new ArrayList<PolicySubject>();
if (policyMap != null) {
final AddressingFeature addressingFeature = wsBinding.getFeature(AddressingFeature.class);
if (LOGGER.isLoggable(Level.FINEST)) {
LOGGER.finest("addressingFeature = " + addressingFeature);
}
if ((addressingFeature != null) && addressingFeature.isEnabled()) {
//add wsam:Addrressing assertion if not exists.
addWsamAddressing(subjects, policyMap, model, addressingFeature);
}
} // endif policy map not null
LOGGER.exiting(subjects);
return subjects;
}
示例2: createDispatch
import javax.xml.ws.soap.AddressingFeature; //导入方法依赖的package包/类
public <T> Dispatch<T> createDispatch(QName portName, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) {
WSEndpointReference wsepr = null;
boolean isAddressingEnabled = false;
AddressingFeature af = features.get(AddressingFeature.class);
if (af == null) {
af = this.features.get(AddressingFeature.class);
}
if (af != null && af.isEnabled())
isAddressingEnabled = true;
MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class);
if (msa == null) {
msa = this.features.get(MemberSubmissionAddressingFeature.class);
}
if (msa != null && msa.isEnabled())
isAddressingEnabled = true;
if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) {
wsepr = wsdlService.get(portName).getEPR();
}
return createDispatch(portName, wsepr, aClass, mode, features);
}
示例3: publish
import javax.xml.ws.soap.AddressingFeature; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
public synchronized Endpoint publish(ServiceDomain domain, final SOAPBindingModel config, final String bindingId, final InboundHandler handler, WebServiceFeature... features) {
JBossWSEndpoint wsEndpoint = null;
try {
initialize(config);
Map<String,String> map = new HashMap<String, String>();
map.put("/" + config.getPort().getServiceName(), SEI);
Boolean addressingEnabled = false;
Boolean addressingRequired = false;
Boolean mtomEnabled = false;
Integer mtomThreshold = -1;
for (WebServiceFeature feature : features) {
if (feature instanceof AddressingFeature) {
AddressingFeature addrFeature = (AddressingFeature)feature;
addressingEnabled = addrFeature.isEnabled();
addressingRequired = addrFeature.isRequired();
LOGGER.info("Addressing [enabled = " + addrFeature.isEnabled() + ", required = " + addrFeature.isRequired() + "]");
} else if (feature instanceof MTOMFeature) {
MTOMFeature mtom = (MTOMFeature)feature;
mtomEnabled = mtom.isEnabled();
mtomThreshold = mtom.getThreshold();
LOGGER.info("MTOM [enabled = " + mtom.isEnabled() + ", threshold = " + mtom.getThreshold() + "]");
}
}
PortComponentMetaData portComponent = new PortComponentMetaData(config.getServiceName()
+ ":" + config.getPort().getServiceQName().getLocalPart()
+ ":" + config.getPort().getPortQName().getLocalPart(),
config.getPort().getPortQName(),
SEI, null, config.getPort().getServiceQName().getLocalPart(),
null, "/" + config.getPort().getServiceName(),
addressingEnabled, addressingRequired, "ALL", mtomEnabled, mtomThreshold,
false, config.getPort().getServiceQName(), null, null);
WebserviceDescriptionMetaData wsDescMetaData = new WebserviceDescriptionMetaData(config.getServiceName().getLocalPart(), getWsdlLocation(), null, new PortComponentMetaData[]{portComponent});
WebservicesMetaData wsMetadata = new WebservicesMetaData(null, new WebserviceDescriptionMetaData[]{wsDescMetaData});
wsEndpoint = new JBossWSEndpoint();
if (config.getContextPath() != null) {
wsEndpoint.publish(domain, getContextRoot(), map, wsMetadata, config, handler);
} else {
wsEndpoint.publish(domain, getContextPath(), map, wsMetadata, config, handler);
}
} catch (Exception e) {
throw new WebServicePublishException(e);
}
return wsEndpoint;
}
示例4: publish
import javax.xml.ws.soap.AddressingFeature; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
public synchronized Endpoint publish(ServiceDomain domain, final SOAPBindingModel config, final String bindingId, final InboundHandler handler, WebServiceFeature... features) {
JBossWSEndpoint wsEndpoint = null;
try {
initialize(config);
Map<String,String> map = new HashMap<String, String>();
map.put("/" + config.getPort().getServiceName(), SEI);
Boolean addressingEnabled = false;
Boolean addressingRequired = false;
Boolean mtomEnabled = false;
Integer mtomThreshold = -1;
for (WebServiceFeature feature : features) {
if (feature instanceof AddressingFeature) {
AddressingFeature addrFeature = (AddressingFeature)feature;
addressingEnabled = addrFeature.isEnabled();
addressingRequired = addrFeature.isRequired();
LOGGER.info("Addressing [enabled = " + addressingEnabled + ", required = " + addressingRequired + "]");
} else if (feature instanceof MTOMFeature) {
MTOMFeature mtom = (MTOMFeature)feature;
mtomEnabled = mtom.isEnabled();
mtomThreshold = mtom.getThreshold();
LOGGER.info("MTOM [enabled = " + mtomEnabled + ", threshold = " + mtomThreshold + "]");
}
}
PortComponentMetaData portComponent = new PortComponentMetaData(config.getServiceName()
+ ":" + config.getPort().getServiceQName().getLocalPart()
+ ":" + config.getPort().getPortQName().getLocalPart(),
config.getPort().getPortQName(),
SEI, null, config.getPort().getServiceQName().getLocalPart(),
null, "/" + config.getPort().getServiceName(),
addressingEnabled, addressingRequired, "ALL", mtomEnabled, mtomThreshold,
false, config.getPort().getServiceQName(), null, null);
WebserviceDescriptionMetaData wsDescMetaData = new WebserviceDescriptionMetaData(config.getServiceName().getLocalPart(), getWsdlLocation(), null, new PortComponentMetaData[]{portComponent});
WebservicesMetaData wsMetadata = new WebservicesMetaData(null, new WebserviceDescriptionMetaData[]{wsDescMetaData});
wsEndpoint = new JBossWSEndpoint();
if (config.getContextPath() != null) {
wsEndpoint.publish(domain, getContextRoot(), map, wsMetadata, config, handler);
} else {
wsEndpoint.publish(domain, getContextPath(), map, wsMetadata, config, handler);
}
} catch (Exception e) {
throw new WebServicePublishException(e);
}
return wsEndpoint;
}