Package org.objectweb.celtix.ws.addressing

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


        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

            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

     * 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

     * 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("http://www.w3.org/2005/08/addressing/wsdl")
                        && node.getNodeName().contains("ServiceName")) {
                        return node.getAttributes().getNamedItem("EndpointName").getTextContent();
View Full Code Here

            org.objectweb.celtix.ws.addressing.wsdl.ObjectFactory objectFactory =
                new org.objectweb.celtix.ws.addressing.wsdl.ObjectFactory();
            JAXBElement<AttributedQNameType> jaxbElement =
                objectFactory.createInterfaceName(interfaceNameType);

            MetadataType mt = ref.getMetadata();
            if (null == mt) {
                mt = new MetadataType();
                ref.setMetadata(mt);
            }
            mt.getAny().add(jaxbElement);
        }
    }
View Full Code Here

            mt.getAny().add(jaxbElement);
        }
    }
 
    public static QName getInterfaceName(EndpointReferenceType ref) {
        MetadataType metadata = ref.getMetadata();
        if (metadata != null) {
            for (Object obj : metadata.getAny()) {
                if (obj instanceof Element) {
                    Node node = (Element)obj;
                    System.out.println(node.getNamespaceURI() + ":" + node.getNodeName());
                    if (node.getNamespaceURI().equals("http://www.w3.org/2005/08/addressing/wsdl")
                        && node.getNodeName().contains("InterfaceName")) {
View Full Code Here

        return null;
    }
   
    private static void setWSDLLocation(EndpointReferenceType ref, String... wsdlLocation) {
       
        MetadataType metadata = ref.getMetadata();
        if (null == metadata) {
            metadata = new MetadataType();
            ref.setMetadata(metadata);
        }

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

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

        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 (null == wsdlLocation) {
            return null;
        }
View Full Code Here

     * @param ref the endpoint reference.
     * @param the list of metadata source.
     */
    public static void setMetadata(EndpointReferenceType ref, List<Source> metadata) {
        if (null != ref) {
            MetadataType mt = ref.getMetadata();
            if (null == mt) {
                mt = new MetadataType();
                ref.setMetadata(mt);
            }
            List<Object> anyList = mt.getAny();
            try {
                for (Source source : metadata) {
                    Node node = null;
                    boolean doTransform = true;
                    if (source instanceof StreamSource) {
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.ws.addressing.MetadataType

Copyright © 2018 www.massapicom. 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.