Examples of MetadataType


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(JAXWSAConstants.NS_WSAW)
                        || node.getNamespaceURI().equals(NS_WSAW_2005)
                        || node.getNamespaceURI().equals(JAXWSAConstants.NS_WSAM))
View Full Code Here

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

        QName serviceName = getServiceName(ref, bus);
        return new QName(serviceName.getNamespaceURI(), getPortName(ref));
    }
   
    public static void setPortName(EndpointReferenceType ref, String portName) {
        MetadataType metadata = ref.getMetadata();
        if (metadata != null) {
            for (Object obj : metadata.getAny()) {
                if (obj instanceof Element) {
                    Element node = (Element)obj;
                    if (node.getNodeName().contains("ServiceName")
                        && (node.getNamespaceURI().equals(JAXWSAConstants.NS_WSAW)
                        || node.getNamespaceURI().equals(NS_WSAW_2005)
View Full Code Here

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

                                                       + portTypeName.getClass().getSimpleName());
           
            JAXBElement<AttributedQNameType> jaxbElement =
                WSA_WSDL_OBJECT_FACTORY.createInterfaceName(interfaceNameType);

            MetadataType mt = WSAEndpointReferenceUtils.getSetMetadata(ref);
            mt.getAny().add(jaxbElement);
        }
    }
View Full Code Here

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

            mt.getAny().add(jaxbElement);
        }
    }
 
    public static QName getInterfaceName(EndpointReferenceType ref, Bus bus) {
        MetadataType metadata = ref.getMetadata();
        if (metadata == null) {
            return null;
        }
        for (Object obj : metadata.getAny()) {
            if (obj instanceof Element) {
                Node node = (Element)obj;
                if ((node.getNamespaceURI().equals(JAXWSAConstants.NS_WSAW)
                    || node.getNamespaceURI().equals(JAXWSAConstants.NS_WSAM))
                    && node.getNodeName().contains("InterfaceName")) {
View Full Code Here

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

        return "";
    }

    public static void setWSDLLocation(EndpointReferenceType ref, String... wsdlLocation) {
       
        MetadataType metadata = WSAEndpointReferenceUtils.getSetMetadata(ref);

        //wsdlLocation attribute is a list of anyURI.
        StringBuilder strBuf = new StringBuilder();
        for (String str : wsdlLocation) {
            strBuf.append(str);
            strBuf.append(" ");
        }

        metadata.getOtherAttributes().put(WSDL_LOCATION, strBuf.toString().trim());
    }
View Full Code Here

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

        metadata.getOtherAttributes().put(WSDL_LOCATION, strBuf.toString().trim());
    }
   
    public static String getWSDLLocation(EndpointReferenceType ref) {
        String wsdlLocation = null;
        MetadataType metadata = ref.getMetadata();

        if (metadata != null) {
            wsdlLocation = metadata.getOtherAttributes().get(WSDL_LOCATION);
            if (wsdlLocation == null) {
                wsdlLocation = metadata.getOtherAttributes().get(WSDL_LOCATION2);
            }
        }

        if (null == wsdlLocation) {
            return null;
View Full Code Here

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

     */
    public static void setMetadata(EndpointReferenceType ref, List<Source> metadata)
        throws EndpointUtilsException {
       
        if (null != ref) {
            MetadataType mt = WSAEndpointReferenceUtils.getSetMetadata(ref);
            List<Object> anyList = mt.getAny();
            try {
                for (Source source : metadata) {
                    Node node = null;
                    boolean doTransform = true;
                    if (source instanceof StreamSource) {
View Full Code Here

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

        if (null == manager) {
            return null;
        }

        MetadataType metadata = ref.getMetadata();
        String location = getWSDLLocation(ref);

        if (null != location) {
            //Pick up the first url to obtain the wsdl defintion
            return manager.getDefinition(location);
        }

        for (Object obj : metadata.getAny()) {
            if (obj instanceof Element) {
                Element el = (Element)obj;
                if (StringUtils.isEqualUri(el.getNamespaceURI(), WSDLConstants.NS_WSDL11)
                    && "definitions".equals(el.getLocalName())) {
                    return manager.getDefinition(el);
View Full Code Here

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

        Definition def = getWSDLDefinition(manager, ref);
        if (def == null) {
            throw new WSDLException(WSDLException.OTHER_ERROR, "unable to find definition for reference");
        }

        MetadataType metadata = ref.getMetadata();
        for (Object obj : metadata.getAny()) {
           
            if (obj instanceof JAXBElement) {
                Object jaxbVal = ((JAXBElement<?>)obj).getValue();

                if (jaxbVal instanceof ServiceNameType) {
View Full Code Here

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
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.