Examples of ServiceNameType


Examples of org.apache.cxf.ws.addressing.wsdl.ServiceNameType

            mt.getAny().add(jaxbElement);
        }
    }
   
    public static JAXBElement<ServiceNameType> getServiceNameType(QName serviceName, String portName) {
        ServiceNameType serviceNameType = WSA_WSDL_OBJECT_FACTORY.createServiceNameType();
        serviceNameType.setValue(serviceName);
        serviceNameType.setEndpointName(portName);
        serviceNameType.getOtherAttributes().put(WSA_WSDL_NAMESPACE_NS, JAXWSAConstants.NS_WSAW);
        serviceNameType.getOtherAttributes().put(XSI_TYPE,
                                                 JAXWSAConstants.WSAW_PREFIX + ":"
                                                 + serviceNameType.getClass().getSimpleName());
        return WSA_WSDL_OBJECT_FACTORY.createServiceName(serviceNameType);
    }
View Full Code Here

Examples of org.apache.cxf.ws.addressing.wsdl.ServiceNameType

            if (obj instanceof JAXBElement) {
                Object jaxbVal = ((JAXBElement)obj).getValue();

                if (jaxbVal instanceof ServiceNameType) {
                    Port port = null;
                    ServiceNameType snt = (ServiceNameType)jaxbVal;
                    LOG.log(Level.FINEST, "found service name " + snt.getValue().getLocalPart());
                    Service service = def.getService(snt.getValue());
                    if (service == null) {
                        LOG.log(Level.WARNING, "can't find the service name ["
                                + snt.getValue()
                                + "], using the default service name in wsdl");
                        service = (Service)def.getServices().values().iterator().next();
                        if (service == null) {
                            return null;
                        }
                    }
                    String endpoint = snt.getEndpointName();
                    if ("".equals(endpoint) && service.getPorts().size() == 1) {
                        port = (Port)service.getPorts().values().iterator().next();
                    } else {
                        port = service.getPort(endpoint);
                    }
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.v200408.ServiceNameType

        exposed.setAddress(convert(internal.getAddress()));
        exposed.setReferenceParameters(
                            convert(internal.getReferenceParameters()));
        QName serviceQName = EndpointReferenceUtils.getServiceName(internal);
        if (serviceQName != null) {
            ServiceNameType serviceName =
                Names200408.WSA_OBJECT_FACTORY.createServiceNameType();
            serviceName.setValue(serviceQName);
            exposed.setServiceName(serviceName);
        }
        String portLocalName = EndpointReferenceUtils.getPortName(internal);
        if (portLocalName != null) {
            String namespace = serviceQName.getNamespaceURI() != null
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.v200408.ServiceNameType

        EndpointReferenceType internal =
            ContextUtils.WSA_OBJECT_FACTORY.createEndpointReferenceType();
        internal.setAddress(convert(exposed.getAddress()));
        internal.setReferenceParameters(
                            convert(exposed.getReferenceParameters()));
        ServiceNameType serviceName = exposed.getServiceName();
        AttributedQName portName = exposed.getPortType();
        if (serviceName != null && portName != null) {
            EndpointReferenceUtils.setServiceAndPortName(internal,
                                                  serviceName.getValue(),
                                                  portName.getValue().getLocalPart());
        }

        // no direct analogue for ReferenceProperties
        addAll(internal.getAny(), exposed.getAny());
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.wsdl.ServiceNameType

        assertTrue(obj instanceof JAXBElement);
        obj = ((JAXBElement)obj).getValue();
        assertNotNull(obj);
        assertTrue(obj instanceof ServiceNameType);
       
        ServiceNameType snt = (ServiceNameType) obj;
        assertEquals(serviceName1, snt.getValue());
        assertEquals(portName1.getLocalPart(), snt.getEndpointName());
    }
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.wsdl.ServiceNameType

    public static void setServiceAndPortName(EndpointReferenceType ref,
                                             QName serviceName,
                                             String portName)
        throws WebServiceException {
        if (null != serviceName) {
            ServiceNameType serviceNameType = new ServiceNameType();
            serviceNameType.setValue(serviceName);
            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();
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.wsdl.ServiceNameType

            if (obj instanceof JAXBElement) {
                Object jaxbVal = ((JAXBElement)obj).getValue();

                if (jaxbVal instanceof ServiceNameType) {
                    Port port = null;
                    ServiceNameType snt = (ServiceNameType)jaxbVal;
                    LOG.log(Level.FINEST, "found service name ", snt.getEndpointName());
                    Service service = def.getService(snt.getValue());
                    if (service == null) {
                        service = (Service)def.getServices().values().iterator().next();
                        if (service == null) {
                            return null;
                        }
                    }
                    String endpoint = snt.getEndpointName();
                    if ("".equals(endpoint) && service.getPorts().size() == 1) {
                        port = (Port)service.getPorts().values().iterator().next();
                    } else {
                        port = service.getPort(endpoint);
                    }
View Full Code Here

Examples of org.xmlsoap.schemas.ws._2003._03.addressing.ServiceNameType

            @WebParam(name = "SubscriptionPolicy", targetNamespace = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd")
            Object subscriptionPolicy,
            @WebParam(name = "InitialTerminationTime", targetNamespace = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd")
            XMLGregorianCalendar terminationTime) throws ResourceUnknownFault, SubscribeCreationFailedFault {
      EndpointReferenceType ref = new EndpointReferenceType();
      ServiceNameType sn = new ServiceNameType();
      sn.setPortName("myPort");
      ref.setServiceName(sn);
      return ref;
    }
View Full Code Here

Examples of org.xmlsoap.schemas.ws._2003._03.addressing.ServiceNameType

    protected ServiceEndpoint findSubscriberEndpoint(ActiveMQSubscription subscribe) {
        EndpointReferenceType consumerReference = subscribe.getConsumerReference();
        if (consumerReference == null) {
            throw new NotificationException("No consumerReference specified for subscription: " + subscribe);
        }
        ServiceNameType serviceNameType = consumerReference.getServiceName();
        if (serviceNameType == null) {
            log.warn("No service name available for subscription: " + subscribe);
        }
        else {
            QName serviceName = serviceNameType.getValue();
            ServiceEndpoint[] endpoints = context.getEndpointsForService(serviceName);
            if (endpoints != null && endpoints.length > 0) {
                // lets just return the first
                return endpoints[0];
            }
View Full Code Here

Examples of org.xmlsoap.schemas.ws.x2003.x03.addressing.ServiceNameType

        AttributedQName attributedQName = endpointReferenceType.addNewPortType();
        attributedQName.setQNameValue(m_portTypeQName);
        }
        if(m_servicePortName != null)
        {
        ServiceNameType serviceNameType = endpointReferenceType.addNewServiceName();
        serviceNameType.setPortName(m_servicePortName);
        }

        ReferencePropertiesType referencePropertiesType = endpointReferenceType.addNewReferenceProperties();

        if(m_referenceProps != null)
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.