• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java UnknownExtensibilityElement类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中javax.wsdl.extensions.UnknownExtensibilityElement的典型用法代码示例。如果您正苦于以下问题:Java UnknownExtensibilityElement类的具体用法?Java UnknownExtensibilityElement怎么用?Java UnknownExtensibilityElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



UnknownExtensibilityElement类属于javax.wsdl.extensions包,在下文中一共展示了UnknownExtensibilityElement类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getRequiredElement

import javax.wsdl.extensions.UnknownExtensibilityElement; //导入依赖的package包/类
private Element getRequiredElement(final List<?> extElements, final QName elementQName)
{
   assertNotNull("No extensibility elements found", extElements);
   assertTrue("No extensibility elements found", extElements.size() > 0);

   Element retVal = null;
   for (int i = 0; i < extElements.size(); i++)
   {
      Object extElement = extElements.get(i);
      if (extElement instanceof UnknownExtensibilityElement)
      {
         Element candidate = ((UnknownExtensibilityElement)extElements.get(i)).getElement();
         boolean namespaceMatch = candidate.getNamespaceURI().equals(elementQName.getNamespaceURI());
         boolean nameMatch = candidate.getLocalName().equals(elementQName.getLocalPart());

         if (namespaceMatch && nameMatch)
         {
            retVal = candidate;
            break;
         }
      }
   }

   assertNotNull("Required element '" + elementQName + " ' not found", retVal);
   return retVal;
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:27,代码来源:JBWS2960TestCase.java


示例2: isExistsPolicy

import javax.wsdl.extensions.UnknownExtensibilityElement; //导入依赖的package包/类
private boolean isExistsPolicy(ServiceInfo service, String uri)
{
   Object exts[] = service.getDescription().getExtensors().get();
   exts = exts == null ? new Object[0] : exts;
   for (Object o : exts)
   {
      if (o instanceof UnknownExtensibilityElement)
      {
         UnknownExtensibilityElement uee = (UnknownExtensibilityElement) o;
         String uri2 = getPolicyId(uee.getElement());
         if (uri.equals(uri2))
         {
            return true;
         }
      }
   }
   return false;
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:19,代码来源:PolicySetsAnnotationListener.java


示例3: populatePort

import javax.wsdl.extensions.UnknownExtensibilityElement; //导入依赖的package包/类
@Override
protected void populatePort(Definition definition, Port port) throws WSDLException {
  super.populatePort(definition, port);
  ExtensionRegistry extensionRegistry = definition.getExtensionRegistry();
  extensionRegistry.mapExtensionTypes(Port.class,
                                      new QName(XTeeWsdlDefinition.XROAD_NAMESPACE,
                                                "address",
                                                XTeeWsdlDefinition.XROAD_PREFIX),
                                      UnknownExtensibilityElement.class);
  UnknownExtensibilityElement element =
      (UnknownExtensibilityElement) extensionRegistry.createExtension(Port.class,
                                                                      new QName(XTeeWsdlDefinition.XROAD_NAMESPACE,
                                                                                "address",
                                                                                XTeeWsdlDefinition.XROAD_NAMESPACE));
  Document doc;
  try {
    doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  } catch (ParserConfigurationException e) {
    throw new RuntimeException(e);
  }
  Element xRoadAddr = doc.createElementNS(XTeeWsdlDefinition.XROAD_NAMESPACE, "address");
  xRoadAddr.setPrefix(XTeeWsdlDefinition.XROAD_PREFIX);
  xRoadAddr.setAttribute("producer", xRoadDatabase);
  element.setElement(xRoadAddr);
  port.addExtensibilityElement(element);
}
 
开发者ID:nortal,项目名称:j-road,代码行数:27,代码来源:XTeeSoapProvider.java


示例4: processEmbeddedEPR

import javax.wsdl.extensions.UnknownExtensibilityElement; //导入依赖的package包/类
private void processEmbeddedEPR(List extensibilityElements, AxisEndpoint axisEndpoint) {
	Iterator eelts = extensibilityElements.iterator();
	while(eelts.hasNext()){
		ExtensibilityElement ee = (ExtensibilityElement)eelts.next();
		if(AddressingConstants.Final.WSA_ENDPOINT_REFERENCE.equals(ee.getElementType())){
			try {
				Element elt = ((UnknownExtensibilityElement)ee).getElement();
				OMElement eprOMElement = XMLUtils.toOM(elt);
				EndpointReference epr = EndpointReferenceHelper.fromOM(eprOMElement);
				Map referenceParameters = epr.getAllReferenceParameters();
				if(referenceParameters != null){
					axisEndpoint.addParameter(AddressingConstants.REFERENCE_PARAMETER_PARAMETER, new ArrayList(referenceParameters.values()));
				}
			} catch (Exception e) {
				if(log.isDebugEnabled()){
					log.debug("Exception encountered processing embedded wsa:EndpointReference", e);
				}
			}
		}
	}
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:22,代码来源:WSDL11ToAxisServiceBuilder.java


示例5: createSchemaFromTypes

import javax.wsdl.extensions.UnknownExtensibilityElement; //导入依赖的package包/类
protected Vector createSchemaFromTypes(Definition wsdlDefinition) {
	System.out.println("*****************");
	System.out.println("进入createSchemaFromTypes()方法");
	System.out.println("开始从Types中产生Schema,Definition下types元素的Schema元素个数可以多个,传进来的参数是一个Definition对象:");
	Vector schemas=new Vector();
	org.w3c.dom.Element schemaElementt=null;
	if (wsdlDefinition.getTypes()!= null) {
		Vector schemaExtElem=findExtensibilityElement(wsdlDefinition
				.getTypes().getExtensibilityElements(), "schema");
		for (int i = 0; i < schemaExtElem.size(); i++) {
			ExtensibilityElement schemaElement = (ExtensibilityElement) schemaExtElem
					.elementAt(i);
			if (schemaElement != null
					&& schemaElement instanceof UnknownExtensibilityElement) {
				schemaElementt = ((UnknownExtensibilityElement) schemaElement)
						.getElement();
				Schema schema = createschemafromtype(schemaElementt,
						wsdlDefinition);
				schemas.add(schema);
			}
		}

	}
	System.out.println("*****************");
	return schemas;
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:27,代码来源:ComponentBuilder.java


示例6: extractTypesSchema

import javax.wsdl.extensions.UnknownExtensibilityElement; //导入依赖的package包/类
public static org.jdom.Element extractTypesSchema(Definition wsdlDefinition) {
	org.jdom.Element typesSchemaElm = null;
	if (wsdlDefinition != null) {
		Types types = wsdlDefinition.getTypes();
		if (types != null) {
		    List extensibilityElements = types.getExtensibilityElements();
			for (int i = 0; i < extensibilityElements.size(); i++) {
				ExtensibilityElement schemaExtElem = (ExtensibilityElement) extensibilityElements.get(i);
				if (schemaExtElem != null) {
					QName elementType = schemaExtElem.getElementType();
					if (elementType.getLocalPart().equals("schema")
						&& (schemaExtElem instanceof UnknownExtensibilityElement)) {
						Element element = ((UnknownExtensibilityElement) schemaExtElem).getElement();
						DOMBuilder domBuilder = new DOMBuilder();
						typesSchemaElm = domBuilder.build(element);
					}
				}
			}
		}
	}
	return typesSchemaElm;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:23,代码来源:WSDLUtils.java


示例7: addPolicy

import javax.wsdl.extensions.UnknownExtensibilityElement; //导入依赖的package包/类
private void addPolicy(AbstractPropertiesHolder place, ServiceInfo service, PolicyAttachment pa, Class<?> cls, String defName)
{
   Element el = addPolicy(service, pa, cls, defName);
   UnknownExtensibilityElement uee = new UnknownExtensibilityElement();
   uee.setElement(el);
   uee.setRequired(true);
   uee.setElementType(DOMUtils.getElementQName(el));
   place.addExtensor(uee);
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:10,代码来源:PolicySetsAnnotationListener.java


示例8: genEPRfromWSDL

import javax.wsdl.extensions.UnknownExtensibilityElement; //导入依赖的package包/类
/**
 * Get the EPR of this service from the WSDL.
 *
 * @param wsdlDef     WSDL Definition
 * @param serviceName service name
 * @param portName    port name
 * @return XML representation of the EPR
 */
public static Element genEPRfromWSDL(
        final Definition wsdlDef,
        final QName serviceName,
        final String portName) {

    Service serviceDef = wsdlDef.getService(serviceName);
    if (serviceDef != null) {
        Port portDef = serviceDef.getPort(portName);
        if (portDef != null) {
            Document doc = DOMUtils.newDocument();
            Element service = doc.createElementNS(Namespaces.WSDL_11, "service");
            service.setAttribute("name", serviceDef.getQName().getLocalPart());
            service.setAttribute("targetNamespace", serviceDef.getQName().getNamespaceURI());
            Element port = doc.createElementNS(Namespaces.WSDL_11, "port");
            service.appendChild(port);
            port.setAttribute("name", portDef.getName());
            port.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:bindns",
                    portDef.getBinding().getQName().getNamespaceURI());
            port.setAttribute("bindns:binding", portDef.getName());
            for (Object extElmt : portDef.getExtensibilityElements()) {
                if (extElmt instanceof SOAPAddress) {
                    Element soapAddr = doc.createElementNS(Namespaces.SOAP_NS, "address");
                    port.appendChild(soapAddr);
                    soapAddr.setAttribute("location", ((SOAPAddress) extElmt).getLocationURI());
                } else if (extElmt instanceof HTTPAddress) {
                    Element httpAddr = doc.createElementNS(Namespaces.HTTP_NS, "address");
                    port.appendChild(httpAddr);
                    httpAddr.setAttribute("location", ((HTTPAddress) extElmt).getLocationURI());
                } else if (extElmt instanceof SOAP12Address) {
                    Element soap12Addr = doc.createElementNS(Namespaces.SOAP12_NS, "address");
                    port.appendChild(soap12Addr);
                    soap12Addr.setAttribute("location", ((SOAP12Address) extElmt).getLocationURI());
                } else {
                    port.appendChild(
                            doc.importNode(((UnknownExtensibilityElement) extElmt).getElement(),
                                    true));
                }
            }
            return service;
        }
    }
    return null;
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:52,代码来源:BPELProcessProxy.java


示例9: processWSDLElement

import javax.wsdl.extensions.UnknownExtensibilityElement; //导入依赖的package包/类
private static void processWSDLElement(WSDLElement wsdlElement, Set<WSDLValidatorElement> set, List<QName> unusedExtensions){
    if(log.isDebugEnabled()){
        log.debug("Start processWSDLElement");
    }
    List list = wsdlElement.getExtensibilityElements();
    if (list == null || list.size() == 0) {
        return;
    }
    Iterator iter = list.iterator();
    while (iter.hasNext()) {
        ExtensibilityElement e = (ExtensibilityElement) iter.next();
        //TODO in JAX-WS 2.1 Respect Binding implementation we are ignoring
        //SOAPBinding, review the reason behind this.
        if (e instanceof SOAPBinding || e instanceof SOAP12Binding)
            continue;

        if (e instanceof UnknownExtensibilityElement) {              
            UnknownExtensibilityElement ue = (UnknownExtensibilityElement) e;
            String reqd = ue.getElement().getAttribute("required");
            //check if extension element is required.
            //one can set extension as required two different ways in wsdl
            //lets check both ways here
            boolean wsdl_required = e.getRequired() != null && e.getRequired();
            boolean wsdl_attribute = reqd!=null && reqd.equalsIgnoreCase("true");
            
            if (wsdl_attribute || wsdl_required) {
                if (log.isDebugEnabled()) {
                    log.debug("Found a required element: " + e.getElementType());
                }
                WSDLValidatorElement element = new WSDLValidatorElement();
                element.setExtensionElement(e);
                element.setState(State.NOT_RECOGNIZED);
                set.add(element);
            }
            else {
                if (log.isDebugEnabled()) {
                    log.debug("Found a NOT required element: " + e.getElementType());
                }
                unusedExtensions.add(e.getElementType());
            }
        }
    }
    if(log.isDebugEnabled()){
        log.debug("Exit processWSDLElement");
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:47,代码来源:WSDLExtensionUtils.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java OperationOptions类代码示例发布时间:2022-05-23
下一篇:
Java RecipesMapCloning类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap