当前位置: 首页>>代码示例>>Java>>正文


Java WebservicesMetaData类代码示例

本文整理汇总了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;
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:26,代码来源:EndpointPublishServlet.java

示例2: parse

import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData; //导入依赖的package包/类
@Override
public WebservicesMetaData parse(URL url)
{
   return new WebservicesFactory(url).load(url);
}
 
开发者ID:jbossws,项目名称:jbossws-common,代码行数:6,代码来源:WebservicesDescriptorParserImpl.java

示例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);
            }
         }
      }
   }
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:60,代码来源:MetadataBuilder.java

示例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;
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:49,代码来源:JBossWSEndpointPublisher.java

示例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;
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:51,代码来源:JBossWSEndpointPublisher.java


注:本文中的org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。