Package javax.wsdl.extensions.soap

Examples of javax.wsdl.extensions.soap.SOAPAddress


        portType.addOperation(bindingOperation.getOperation());
        binding.setPortType(portType);
        Port port = definition.createPort();
        port.setName("MockPort");
        //add soap:address
        SOAPAddress soapAddress = (SOAPAddress) extensionRegistry.createExtension(Port.class, new QName("http://schemas.xmlsoap.org/wsdl/soap/", "address"));
        soapAddress.setLocationURI("http://127.0.0.1:8080/foo");
        port.addExtensibilityElement(soapAddress);
        port.setBinding(binding);
        javax.wsdl.Service service = definition.createService();
        service.setQName(new QName(NAMESPACE, "MockService"));
        service.addPort(port);
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

            setEndpoint(port.getName());
        } else {
            throw new DeploymentException("If endpoint is not set, the WSDL service '" + getService() + "' "
                                             + "must contain a single port definition");
        }
        SOAPAddress sa11 = WSDLUtils.getExtension(port, SOAPAddress.class);
        SOAP12Address sa12 = WSDLUtils.getExtension(port, SOAP12Address.class);
        if (sa11 != null) {
            marshaler.setBaseUrl(sa11.getLocationURI());
        } else if (sa12 != null) {
            marshaler.setBaseUrl(sa12.getLocationURI());
        } else {
            throw new DeploymentException("No SOAP address defined on port '" + port.getName() + "'");
        }
View Full Code Here

                if (description instanceof AxisEndpoint) {
                  setEndpointURL((AxisEndpoint) description, soapAddress.getLocationURI());
                }

            } else if (wsdl4jExtensibilityElement instanceof SOAPAddress) {
                SOAPAddress soapAddress = (SOAPAddress) wsdl4jExtensibilityElement;
                if (description instanceof AxisEndpoint) {
                  setEndpointURL((AxisEndpoint) description, soapAddress.getLocationURI());
                }
            } else if (wsdl4jExtensibilityElement instanceof HTTPAddress) {
                HTTPAddress httpAddress = (HTTPAddress) wsdl4jExtensibilityElement;
                if (description instanceof AxisEndpoint) {
                  setEndpointURL((AxisEndpoint) description, httpAddress.getLocationURI());
View Full Code Here

            }
            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/newservice/newport")) {
                        found = true;
                        break;
                    }
                }
            }
View Full Code Here

            }
            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

                HTTPAddress add = (HTTPAddress) WsdlUtils.getAddressExtension(port);
                assertNotNull("Address expected", add);
                assertNotNull("Non-null Location expected", add.getLocationURI());
                assertTrue("Non-empty Location expected", add.getLocationURI().length() > 0);
            } else if (WsdlUtils.useHTTPBinding(port)) {
                SOAPAddress add = (SOAPAddress) WsdlUtils.getAddressExtension(port);
                assertNotNull("Address expected", add);
                assertNotNull("Non-null Location expected", add.getLocationURI());
                assertTrue("Non-empty Location expected", add.getLocationURI().length() > 0);
            }
        }
    }
View Full Code Here

            if (port != null) {
                List ext = port.getExtensibilityElements();
                for (int i = 0; i < ext.size(); i++) {
                    Object o = ext.get(i);
                    if (o instanceof SOAPAddress) {
                        SOAPAddress address = (SOAPAddress) o;
                        serviceURL = address.getLocationURI();
                        break;
                    } else if (o instanceof SOAP12Address) {
                        SOAP12Address address = (SOAP12Address) o;
                        serviceURL = address.getLocationURI();
                        break;
                    }
                }
            }
        }
View Full Code Here

                service.getPorts().values().clear();

                for (int i = 0; i < serviceURL.length; i++) {
                    String url = serviceURL[i];
                    Port port = new PortImpl();
                    SOAPAddress soapAddress = new SOAPAddressImpl();

                    soapAddress.setElementType(SOAPConstants.Q_ELEM_SOAP_ADDRESS);
                    soapAddress.setLocationURI(url);
                    port.addExtensibilityElement(soapAddress);
                    port.setName(getName() + "Port" + i);
                    port.setBinding(binding);
                    service.addPort(port);
                }
View Full Code Here

        if (exteElemts != null) {
            Iterator extItr = exteElemts.iterator();
            while (extItr.hasNext()) {
                Object extensibilityElement = extItr.next();
                if (extensibilityElement instanceof SOAPAddress) {
                    SOAPAddress address = (SOAPAddress) extensibilityElement;
                    options.setTo(new EndpointReference(address.getLocationURI()));
                }
            }
        }

        Binding binding = port.getBinding();
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.