Examples of ProbeMatchesType


Examples of org.apache.cxf.ws.discovery.wsdl.ProbeMatchesType

        c.setAddress("soap.udp://239.255.255.250:" + PORT);

        ProbeType pt = new ProbeType();
        ScopesType scopes = new ScopesType();
        pt.setScopes(scopes);
        ProbeMatchesType pmts = c.probe(pt, 1000);

        Assert.assertEquals(2, pmts.getProbeMatch().size());
        c.close();
        bus.shutdown(true);       
    }
View Full Code Here

Examples of org.apache.cxf.ws.discovery.wsdl.ProbeMatchesType

           
            System.out.println("1");
            ProbeType pt = new ProbeType();
            ScopesType scopes = new ScopesType();
            pt.setScopes(scopes);
            ProbeMatchesType pmts = c.probe(pt, 1000);
            System.out.println("2");
            if  (pmts != null) {
                for (ProbeMatchType pmt : pmts.getProbeMatch()) {
                    System.out.println("Found " + pmt.getEndpointReference());
                    System.out.println(pmt.getTypes());
                    System.out.println(pmt.getXAddrs());
                }
            }
            if (pmts.getProbeMatch().size() == 0) {
                System.exit(0);
            }
            pmts = c.probe(pt);
           
            System.out.println("Size:" + pmts.getProbeMatch().size());
           
            System.out.println("3");

            W3CEndpointReference ref = null;
            if  (pmts != null) {
                for (ProbeMatchType pmt : pmts.getProbeMatch()) {
                    ref = pmt.getEndpointReference();
                    System.out.println("Found " + pmt.getEndpointReference());
                    System.out.println(pmt.getTypes());
                    System.out.println(pmt.getXAddrs());
                }
View Full Code Here

Examples of org.apache.cxf.ws.discovery.wsdl.ProbeMatchesType

    public List<EndpointReference> probe(QName type) {
        ProbeType p = new ProbeType();
        if (type != null) {
            p.getTypes().add(type);
        }
        ProbeMatchesType pmt = probe(p, defaultProbeTimeout);
        List<EndpointReference> er = new ArrayList<EndpointReference>();
        for (ProbeMatchType pm : pmt.getProbeMatch()) {
            for (String add : pm.getXAddrs()) {
                W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
                builder.address(add);
                //builder.serviceName(type);
                //builder.endpointName(type);
View Full Code Here

Examples of org.apache.cxf.ws.discovery.wsdl.ProbeMatchesType

    }   
    public ProbeMatchesType probe(ProbeType params, int timeout) {
        Dispatch<Object> disp = this.getDispatchInternal(false, version.getProbeAction());
        if (adHoc) {
            disp.getRequestContext().put("udp.multi.response.timeout", timeout);
            final ProbeMatchesType response = new ProbeMatchesType();
            AsyncHandler<Object> handler = new AsyncHandler<Object>() {
                public void handleResponse(Response<Object> res) {
                    try {
                        Object o = res.get();
                        while (o instanceof JAXBElement) {
                            o = ((JAXBElement)o).getValue();
                        }
                        if (o instanceof ProbeMatchesType) {
                            response.getProbeMatch().addAll(((ProbeMatchesType)o).getProbeMatch());
                        } else if (o instanceof HelloType) {
                            HelloType h = (HelloType)o;
                            QName sn = version.getServiceName();
                            if (h.getTypes().contains(sn)
                                || h.getTypes().contains(new QName("", sn.getLocalPart()))) {
View Full Code Here

Examples of org.apache.cxf.ws.discovery.wsdl.ProbeMatchesType

        matchScopes(pt, consider);

        if (consider.isEmpty()) {
            return null;
        }
        ProbeMatchesType pmt = new ProbeMatchesType();
        for (HelloType ht : consider) {
            ProbeMatchType m = new ProbeMatchType();
            m.setEndpointReference(ht.getEndpointReference());
            m.setScopes(ht.getScopes());
            m.setMetadataVersion(ht.getMetadataVersion());
            m.getTypes().addAll(ht.getTypes());
            m.getXAddrs().addAll(ht.getXAddrs());
            pmt.getProbeMatch().add(m);
        }
        return pmt;
    }
View Full Code Here

Examples of org.apache.cxf.ws.discovery.wsdl.ProbeMatchesType

                Object obj = context.createUnmarshaller().unmarshal(doc.getDocumentElement());
                if (obj instanceof JAXBElement) {
                    obj = ((JAXBElement)obj).getValue();
                }
                if (obj instanceof ProbeType) {
                    ProbeMatchesType pmt = handleProbe((ProbeType)obj);
                    if (pmt == null) {
                        return null;
                    }
                    updateOutputAction("Matches");
                    if (mapToOld) {
View Full Code Here

Examples of org.apache.cxf.ws.discovery.wsdl.ProbeMatchesType

        matchScopes(pt, consider);

        if (consider.isEmpty()) {
            return null;
        }
        ProbeMatchesType pmt = new ProbeMatchesType();
        for (HelloType ht : consider) {
            ProbeMatchType m = new ProbeMatchType();
            m.setEndpointReference(ht.getEndpointReference());
            m.setScopes(ht.getScopes());
            m.setMetadataVersion(ht.getMetadataVersion());
            m.getTypes().addAll(ht.getTypes());
            m.getXAddrs().addAll(ht.getXAddrs());
            pmt.getProbeMatch().add(m);
        }
        return pmt;
    }
View Full Code Here

Examples of org.apache.cxf.ws.discovery.wsdl.ProbeMatchesType

                Object obj = context.createUnmarshaller().unmarshal(doc.getDocumentElement());
                if (obj instanceof JAXBElement) {
                    obj = ((JAXBElement)obj).getValue();
                }
                if (obj instanceof ProbeType) {
                    ProbeMatchesType pmt = handleProbe((ProbeType)obj);
                    if (pmt == null) {
                        return null;
                    }
                    updateOutputAction("Matches");
                    if (mapToOld) {
View Full Code Here

Examples of org.apache.cxf.ws.discovery.wsdl.ProbeMatchesType

    public List<EndpointReference> probe(QName type) {
        ProbeType p = new ProbeType();
        if (type != null) {
            p.getTypes().add(type);
        }
        ProbeMatchesType pmt = probe(p, defaultProbeTimeout);
        List<EndpointReference> er = new ArrayList<EndpointReference>();
        for (ProbeMatchType pm : pmt.getProbeMatch()) {
            for (String add : pm.getXAddrs()) {
                W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
                builder.address(add);
                //builder.serviceName(type);
                //builder.endpointName(type);
View Full Code Here

Examples of org.apache.cxf.ws.discovery.wsdl.ProbeMatchesType

    }   
    public ProbeMatchesType probe(ProbeType params, int timeout) {
        Dispatch<Object> disp = this.getDispatchInternal(false);
        if (adHoc) {
            disp.getRequestContext().put("udp.multi.response.timeout", timeout);
            final ProbeMatchesType response = new ProbeMatchesType();
            AsyncHandler<Object> handler = new AsyncHandler<Object>() {
                public void handleResponse(Response<Object> res) {
                    try {
                        Object o = res.get();
                        while (o instanceof JAXBElement) {
                            o = ((JAXBElement)o).getValue();
                        }
                        if (o instanceof ProbeMatchesType) {
                            response.getProbeMatch().addAll(((ProbeMatchesType)o).getProbeMatch());
                        } else if (o instanceof HelloType) {
                            HelloType h = (HelloType)o;
                            if (h.getTypes().contains(SERVICE_QNAME)
                                || h.getTypes().contains(new QName("", SERVICE_QNAME.getLocalPart()))) {
                                // A DiscoveryProxy wants us to flip to managed mode
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.