Package javax.wsdl.extensions.soap

Examples of javax.wsdl.extensions.soap.SOAPAddress


            }
            boolean found = false;
            while (it.hasNext()) {
                Object obj = it.next();
                if (obj instanceof SOAPAddress) {
                    SOAPAddress soapAddress = (SOAPAddress)obj;
                    if (soapAddress.getLocationURI() != null
                        && soapAddress.getLocationURI().equals("http://localhost:9000/serviceins/portins")) {
                        found = true;
                        break;
                    }
                }
            }
View Full Code Here


    {
      QName elementType = extElement.getElementType();

      if ( extElement instanceof SOAPAddress )
      {
        SOAPAddress  addr = (SOAPAddress)extElement;
        soapAddress  = addr.getLocationURI();
        break;
      }
      else if ( extElement instanceof  SOAP12Address )
      {
        SOAP12Address addr = (SOAP12Address)extElement;
        soapAddress  = addr.getLocationURI();
        break;
      }
      else if ("address".equals(elementType.getLocalPart()))
      {
        logger.warn("Unprocessed extension element: " + elementType);
View Full Code Here

        if (service != null) {
            Port port = service.getPort(portName);
            if (port != null) {
                for (Object obj : port.getExtensibilityElements()) {
                    if (obj instanceof SOAPAddress) {
                        SOAPAddress address = (SOAPAddress) obj;
                        serviceURL = address.getLocationURI();
                        format = SynapseConstants.FORMAT_SOAP11;
                        break;
                    } else if (obj instanceof SOAP12Address) {
                        SOAP12Address address = (SOAP12Address) obj;
                        serviceURL = address.getLocationURI();
                        format = SynapseConstants.FORMAT_SOAP12;
                        break;
                    } else if (obj instanceof HTTPAddress) {
                        HTTPAddress address = (HTTPAddress) obj;
                        serviceURL = address.getLocationURI();
                        format = SynapseConstants.FORMAT_REST;
                        Binding binding = port.getBinding();
                        if (binding == null) {
                            continue;
                        }
View Full Code Here

        Port port = def.createPort();
        port.setBinding(binding);
        port.setName(this.name + "Port");

        if (locationURI != null) {
            SOAPAddress soapAddress = new SOAPAddressImpl();
            soapAddress.setLocationURI(locationURI);
            port.addExtensibilityElement(soapAddress);
        }

        Service service = def.createService();
        service.setQName(new QName(TNS, this.name));
View Full Code Here

            Port port = service.getPort(portComponent.getWsdlPort().getLocalPart());
            if (port == null) return null;

            for (Object element : port.getExtensibilityElements()) {
                if (element instanceof SOAPAddress) {
                    SOAPAddress soapAddress = (SOAPAddress) element;
                    URI uri = new URI(soapAddress.getLocationURI());
                    return uri.getPath();
                } else if (element instanceof HTTPAddress) {
                    HTTPAddress httpAddress = (HTTPAddress) element;
                    URI uri = new URI(httpAddress.getLocationURI());
                    return uri.getPath();
View Full Code Here

        JMSAddress ja =
            (JMSAddress) getExtElem(port,
                JMSAddress.class,
                port.getExtensibilityElements());
        SOAPAddress sa =
            (SOAPAddress) getExtElem(port,
                SOAPAddress.class,
                port.getExtensibilityElements());

        if (sa != null && ja != null)
            throw new WSIFException(
                "Both soap:address and jms:address cannot be specified for port "
                    + port.getName());

        if (sa == null && ja == null)
            throw new WSIFException(
                "Either soap:address or jms:address must be specified for port "
                    + port.getName());

        if (ja != null) {
            // Port jms:address binding element
            jmsAddressPropVals = ja.getJMSPropertyValues();
            st = new SOAPJMSConnection(ja, port.getName());
        } else {
            // Port soap:address bindng element
            st = new SOAPHTTPConnection();
            // call.getSOAPTransport() is null...

            String s = sa.getLocationURI();
            try {
                url = new URL(s);
            } catch (MalformedURLException meu) {
            Trc.exception(meu);
                throw new WSIFException(
View Full Code Here

        // be set again
        JMSAddress ja =
            (JMSAddress) getExtElem(port,
                JMSAddress.class,
                port.getExtensibilityElements());
        SOAPAddress sa =
            (SOAPAddress) getExtElem(port,
                SOAPAddress.class,
                port.getExtensibilityElements());

        if (sa != null && ja != null)
View Full Code Here

        throws WSIFException {
        setDefinition(def);
        setPort(port);

        // find Port soap:address bindng element
        SOAPAddress sa =
            (SOAPAddress) getExtElem(port,
                SOAPAddress.class,
                port.getExtensibilityElements());
        if (sa != null) {
            location = sa.getLocationURI();
        }
        if (location == null) {
            throw new WSIFException(
                "soap:address with location URI is required for " + port);
        }
View Full Code Here

        List<ExtensibilityElement> extensions = port.getExtensibilityElements();
        for (Iterator<ExtensibilityElement> i = extensions.iterator();
                i.hasNext();) {
            ExtensibilityElement ext = i.next();
            if (ext instanceof SOAPAddress) {
                SOAPAddress addr = (SOAPAddress) ext;
                endpoint = addr.getLocationURI();
            }
        }
        return endpoint;
    }
View Full Code Here

        String portStyleString = soapBinding.getStyle();
        return Style.getStyle(portStyleString);
    }

    private URL getAddressLocation(Port port) throws DeploymentException {
        SOAPAddress soapAddress;
        try {
            soapAddress = (SOAPAddress) SchemaInfoBuilder.getExtensibilityElement(SOAPAddress.class, port.getExtensibilityElements());
        } catch (DeploymentException e) {
            //a http: protocol REST service.  Skip it.
            return null;
        }
        String locationURIString = soapAddress.getLocationURI();
        URL location;
        try {
            location = new URL(locationURIString);
        } catch (MalformedURLException e) {
            throw new DeploymentException("Could not construct web service location URL from " + locationURIString, e);
View Full Code Here

TOP

Related Classes of javax.wsdl.extensions.soap.SOAPAddress

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.