Examples of MetadataType


Examples of org.apache.cxf.ws.addressing.MetadataType

    public static void setServiceAndPortName(EndpointReferenceType ref,
                                             QName serviceName,
                                             String portName) {
        if (null != serviceName) {
            JAXBElement<ServiceNameType> jaxbElement = getServiceNameType(serviceName, portName);
            MetadataType mt = ref.getMetadata();
            if (null == mt) {
                mt = new MetadataType();
                ref.setMetadata(mt);
            }

            mt.getAny().add(jaxbElement);
        }
    }
View Full Code Here

Examples of org.apache.cxf.ws.addressing.MetadataType

     * Gets the service name of the provided endpoint reference.
     * @param ref the endpoint reference.
     * @return the service name.
     */
    public static QName getServiceName(EndpointReferenceType ref) {
        MetadataType metadata = ref.getMetadata();
        if (metadata != null) {
            for (Object obj : metadata.getAny()) {
                if (obj instanceof Element) {
                    Node node = (Element)obj;
                    if (node.getNamespaceURI().equals(WSA_WSDL_NAMESPACE)
                        && node.getLocalName().equals("ServiceName")) {
                        String content = node.getTextContent();
View Full Code Here

Examples of org.apache.cxf.ws.addressing.MetadataType

     * Gets the port name of the provided endpoint reference.
     * @param ref the endpoint reference.
     * @return the port name.
     */
    public static String getPortName(EndpointReferenceType ref) {
        MetadataType metadata = ref.getMetadata();
        if (metadata != null) {
            for (Object obj : metadata.getAny()) {
                if (obj instanceof Element) {
                    Node node = (Element)obj;
                    if (node.getNamespaceURI().equals(WSA_WSDL_NAMESPACE)
                        && node.getNodeName().contains("ServiceName")) {
                        return node.getAttributes().getNamedItem("EndpointName").getTextContent();
View Full Code Here

Examples of org.apache.cxf.ws.addressing.MetadataType

        }
        return null;
    }
   
    public static void setPortName(EndpointReferenceType ref, String portName) {
        MetadataType metadata = ref.getMetadata();
        if (metadata != null) {
            for (Object obj : metadata.getAny()) {
                if (obj instanceof JAXBElement) {
                    Object val = ((JAXBElement)obj).getValue();
                    if (val instanceof ServiceNameType) {
                        ((ServiceNameType)val).setEndpointName(portName);
                    }
View Full Code Here

Examples of org.fao.geonet.domain.MetadataType

    DataManager dataMan = gc.getBean(DataManager.class);

    String data       = Util.getParam(params, Params.DATA);
    String group      = Util.getParam(params, Params.GROUP);
        MetadataType metadataType = MetadataType.lookup(Util.getParam(params, Params.TEMPLATE, "n"));
    String style      = Util.getParam(params, Params.STYLESHEET, "_none_");

    boolean validate = Util.getParam(params, Params.VALIDATE, "off").equals("on");

//    Sub template does not need a title.
View Full Code Here

Examples of org.fao.geonet.kernel.schema.MetadataType

    String typeName = mdSchema.getElementType(el.getQualifiedName(),parentName);

        if(Log.isDebugEnabled(Geonet.EDITORADDELEMENT))
            Log.debug(Geonet.EDITORADDELEMENT,"#### - type name = " + typeName);

     MetadataType type = mdSchema.getTypeInfo(typeName);

        if(Log.isDebugEnabled(Geonet.EDITORADDELEMENT))
            Log.debug(Geonet.EDITORADDELEMENT,"#### - metadata tpe = " + type);

    //--- collect all children, adding the new one at the end of the others

    Vector<Element> children = new Vector<Element>();

    for(int i=0; i<type.getElementCount(); i++) {
      List<Element> list = getChildren(el, type.getElementAt(i));

            if(Log.isDebugEnabled(Geonet.EDITORADDELEMENT))
                Log.debug(Geonet.EDITORADDELEMENT,"####   - child of type " + type.getElementAt(i) + " list size = " + list.size());
            for (Element aChild : list) {
                children.add(aChild);
                if(Log.isDebugEnabled(Geonet.EDITORADDELEMENT))
                    Log.debug(Geonet.EDITORADDELEMENT, "####    - add child " + aChild.toString());
            }

      if (qname.equals(type.getElementAt(i)))
        children.add(child);
    }
    //--- remove everything and then add all collected children to the element to assure a correct position for the
    // new one
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.MetadataType

        EndpointReferenceType ref = new EndpointReferenceType();
       
        EndpointReferenceUtils.setServiceAndPortName(ref, serviceName1, portName1.getLocalPart());
       
        MetadataType metadata = ref.getMetadata();
        List<Object> anyList = metadata.getAny();
        Object obj = anyList.get(0);
        assertTrue(obj instanceof JAXBElement);
        obj = ((JAXBElement)obj).getValue();
        assertNotNull(obj);
        assertTrue(obj instanceof ServiceNameType);
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.MetadataType

        QName portTypeName1 = new QName("http://objectweb.org/soap_http1", "SOAPPortType");

        EndpointReferenceType ref = new EndpointReferenceType();
       
        EndpointReferenceUtils.setInterfaceName(ref, portTypeName1);
        MetadataType metadata = ref.getMetadata();
        List<Object> anyList = metadata.getAny();
        Object obj = anyList.get(0);
        assertTrue(obj instanceof JAXBElement);
        obj = ((JAXBElement)obj).getValue();
        assertNotNull(obj);
        assertTrue(obj instanceof AttributedQNameType);
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.MetadataType

            serviceNameType.setEndpointName(portName);
            org.objectweb.celtix.ws.addressing.wsdl.ObjectFactory objectFactory =
                new org.objectweb.celtix.ws.addressing.wsdl.ObjectFactory();
            JAXBElement<ServiceNameType> jaxbElement = objectFactory.createServiceName(serviceNameType);

            MetadataType mt = ref.getMetadata();
            if (null == mt) {
                mt = new MetadataType();
                ref.setMetadata(mt);
            }

            mt.getAny().add(jaxbElement);
        }
    }
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.MetadataType

     * Gets the service name of the provided endpoint reference.
     * @param ref the endpoint reference.
     * @return the service name.
     */
    public static QName getServiceName(EndpointReferenceType ref) {
        MetadataType metadata = ref.getMetadata();
        if (metadata != null) {
            for (Object obj : metadata.getAny()) {
                if (obj instanceof Element) {
                    Node node = (Element)obj;
                    if (node.getNamespaceURI().equals("http://www.w3.org/2005/08/addressing/wsdl")
                        && node.getLocalName().equals("ServiceName")) {
                        String content = node.getTextContent();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.