本文整理汇总了Java中org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData类的典型用法代码示例。如果您正苦于以下问题:Java WebservicesMetaData类的具体用法?Java WebservicesMetaData怎么用?Java WebservicesMetaData使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
WebservicesMetaData类属于org.jboss.wsf.spi.metadata.webservices包,在下文中一共展示了WebservicesMetaData类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createMetaData
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData; //导入依赖的package包/类
private WebservicesMetaData createMetaData() {
PortComponentMetaData portComponent = new PortComponentMetaData("PortComponent4", //unique ID
new QName("http://publish.ws.test.jboss.org/","EndpointPort4"),
"org.jboss.test.ws.publish.EndpointImpl4",
null, // if endpoint ^ was an EJB, user would have to use this parameter to set ejbLink
"pattern4", // mandatory servlet link (because endpoint is POJO) - needed for proper matching of endpoint with WebservicesMD
null, null,
new QName("http://publish.ws.test.jboss.org/", "EndpointService4"),
null, null);
WebserviceDescriptionMetaData webserviceDescription = new WebserviceDescriptionMetaData(null, "WEB-INF/wsdl/EndpointImpl4.xml", null, portComponent);
PortComponentMetaData portComponent2 = new PortComponentMetaData("PortComponent5", //unique ID
new QName("http://publish.ws.test.jboss.org/","EndpointPort5"),
"org.jboss.test.ws.publish.EndpointImpl5",
null, // if endpoint ^ was an EJB, user would have to use this parameter to set ejbLink
"pattern5", // mandatory servlet link (because endpoint is POJO) - needed for proper matching of endpoint with WebservicesMD
null, null,
new QName("http://publish.ws.test.jboss.org/", "EndpointService5"),
null, null);
WebserviceDescriptionMetaData webserviceDescription2 = new WebserviceDescriptionMetaData(null, "org/jboss/test/ws/publish/EndpointImpl5.xml", //test JBWS-3540
null, portComponent2);
WebservicesMetaData metadata = new WebservicesMetaData(null, new WebserviceDescriptionMetaData[]{webserviceDescription, webserviceDescription2});
return metadata;
}
示例2: parse
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData; //导入依赖的package包/类
@Override
public WebservicesMetaData parse(URL url)
{
return new WebservicesFactory(url).load(url);
}
示例3: processWSDDContribution
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData; //导入依赖的package包/类
private void processWSDDContribution(DDEndpoint endpoint, ArchiveDeployment dep)
{
WebservicesMetaData webservices = dep.getAttachment(WebservicesMetaData.class);
if (webservices != null)
{
for (WebserviceDescriptionMetaData wsDesc : webservices.getWebserviceDescriptions())
{
for (PortComponentMetaData portComp : wsDesc.getPortComponents())
{
final String linkedId = portComp.getEjbLink() != null ? portComp.getEjbLink() : portComp.getServletLink();
final String id = endpoint.getId();
if (!id.equals(linkedId)) continue;
// PortQName overrides
if (portComp.getWsdlPort() != null) {
METADATA_LOGGER.overridePortName(id, endpoint.getPortName(), portComp.getWsdlPort());
endpoint.setPortName(portComp.getWsdlPort());
}
// ServiceQName overrides
if (portComp.getWsdlService() != null) {
METADATA_LOGGER.overrideServiceName(id, endpoint.getServiceName(), portComp.getWsdlService());
endpoint.setServiceName(portComp.getWsdlService());
}
// HandlerChain contributions
UnifiedHandlerChainsMetaData chainWrapper = portComp.getHandlerChains();
if (chainWrapper != null) {
endpoint.setHandlers(convertEndpointHandlers(chainWrapper.getHandlerChains()));
}
// MTOM settings
if (portComp.isMtomEnabled()) {
METADATA_LOGGER.enableMTOM(id);
endpoint.setMtomEnabled(true);
endpoint.setMtomThreshold(portComp.getMtomThreshold());
}
// Addressing
if (portComp.isAddressingEnabled()) {
METADATA_LOGGER.enableAddressing(id);
endpoint.setAddressingEnabled(true);
endpoint.setAddressingRequired(portComp.isAddressingRequired());
endpoint.setAddressingResponses(portComp.getAddressingResponses());
}
// RespectBinding
if (portComp.isRespectBindingEnabled()) {
METADATA_LOGGER.enableRespectBinding(id);
endpoint.setRespectBindingEnabled(true);
}
// wsdlLocation override
String wsdlFile = portComp.getWebserviceDescription().getWsdlFile();
if (wsdlFile != null) {
METADATA_LOGGER.overridingWsdlFileLocation(id, wsdlFile);
endpoint.setWsdlLocation(wsdlFile);
}
}
}
}
}
示例4: publish
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData; //导入依赖的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;
}
示例5: publish
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData; //导入依赖的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;
}