Examples of HTTPAddress


Examples of javax.wsdl.extensions.http.HTTPAddress

                    || "DummyService_port_with_no_binding".equals(port.getName())) {
                continue;
            }

            if (WsdlUtils.useHTTPBinding(port)) {
                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

Examples of javax.wsdl.extensions.http.HTTPAddress

                if (description instanceof AxisEndpoint) {
                    ((AxisEndpoint) description)
                            .setEndpointURL(soapAddress.getLocationURI());
                }
            } else if (wsdl4jExtensibilityElement instanceof HTTPAddress) {
                HTTPAddress httpAddress = (HTTPAddress) wsdl4jExtensibilityElement;
                if (description instanceof AxisEndpoint) {
                    ((AxisEndpoint) description)
                            .setEndpointURL(httpAddress.getLocationURI());
                }

            } else if (wsdl4jExtensibilityElement instanceof Schema) {
                Schema schema = (Schema) wsdl4jExtensibilityElement;
                // just add this schema - no need to worry about the imported
View Full Code Here

Examples of javax.wsdl.extensions.http.HTTPAddress

            List ees = port.getExtensibilityElements();
            for (Iterator itr = ees.iterator(); itr.hasNext();) {
                Object extensor = itr.next();
   
                if (extensor instanceof HTTPAddress) {
                    final HTTPAddress httpAdd = (HTTPAddress)extensor;
   
                    EndpointInfo info = new HttpEndpointInfo(serviceInfo,
                                "http://schemas.xmlsoap.org/wsdl/http/");
                    info.setAddress(httpAdd.getLocationURI());
                    info.addExtensor(httpAdd);
                    return info;
                } else if (extensor instanceof AddressType) {
                    final AddressType httpAdd = (AddressType)extensor;
   
                    EndpointInfo info =
                        new HttpEndpointInfo(serviceInfo,
                                "http://schemas.xmlsoap.org/wsdl/http/");
                    info.setAddress(httpAdd.getLocation());
                    info.addExtensor(httpAdd);
                    return info;
                }
            }
        }
View Full Code Here

Examples of javax.wsdl.extensions.http.HTTPAddress

                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();
                }
            }
        } catch (Exception e) {
        }
View Full Code Here

Examples of javax.wsdl.extensions.http.HTTPAddress

                if (element instanceof SOAPAddress) {
                    final SOAPAddress soapAddress = (SOAPAddress) element;
                    final URI uri = URLs.uri(soapAddress.getLocationURI());
                    return uri.getPath();
                } else if (element instanceof HTTPAddress) {
                    final HTTPAddress httpAddress = (HTTPAddress) element;
                    final URI uri = URLs.uri(httpAddress.getLocationURI());
                    return uri.getPath();
                }
            }
        } catch (final Exception e) {
            // no-op
View Full Code Here

Examples of javax.wsdl.extensions.http.HTTPAddress

        if (ees != null) {
            for (Iterator<?> itr = ees.iterator(); itr.hasNext();) {
                Object extensor = itr.next();
   
                if (extensor instanceof HTTPAddress) {
                    final HTTPAddress httpAdd = (HTTPAddress)extensor;
   
                    EndpointInfo info = new HttpEndpointInfo(serviceInfo,
                                "http://schemas.xmlsoap.org/wsdl/http/");
                    info.setAddress(httpAdd.getLocationURI());
                    info.addExtensor(httpAdd);
                    return info;
                } else if (extensor instanceof AddressType) {
                    final AddressType httpAdd = (AddressType)extensor;
   
                    EndpointInfo info =
                        new HttpEndpointInfo(serviceInfo,
                                "http://schemas.xmlsoap.org/wsdl/http/");
                    info.setAddress(httpAdd.getLocation());
                    info.addExtensor(httpAdd);
                    return info;
                }
            }
        }
View Full Code Here

Examples of javax.wsdl.extensions.http.HTTPAddress

        List ees = port.getExtensibilityElements();
        for (Iterator itr = ees.iterator(); itr.hasNext();) {
            Object extensor = itr.next();

            if (extensor instanceof HTTPAddress) {
                final HTTPAddress httpAdd = (HTTPAddress)extensor;

                EndpointInfo info =
                    new EndpointInfo(serviceInfo,
                            "http://schemas.xmlsoap.org/wsdl/http/") {
                        public void setAddress(String a) {
                            super.setAddress(a);
                            httpAdd.setLocationURI(a);
                        }
                    };
                info.setAddress(httpAdd.getLocationURI());
                return info;
            } else if (extensor instanceof AddressType) {
                final AddressType httpAdd = (AddressType)extensor;

                EndpointInfo info =
                    new EndpointInfo(serviceInfo,
                            "http://schemas.xmlsoap.org/wsdl/http/") {
                        public void setAddress(String a) {
                            super.setAddress(a);
                            httpAdd.setLocation(a);
                        }
                    };
                info.setAddress(httpAdd.getLocation());
                return info;
            }
        }

        return null;
View Full Code Here

Examples of javax.wsdl.extensions.http.HTTPAddress

            it = service.getPort("Greeter_XMLPort").getExtensibilityElements().iterator();
            found = false;
            while (it.hasNext()) {
                Object obj = it.next();
                if (obj instanceof HTTPAddress) {
                    HTTPAddress xmlHttpAddress = (HTTPAddress)obj;
                    if (xmlHttpAddress.getLocationURI() != null) {
                        found = true;
                        break;
                    }
                }
            }
View Full Code Here

Examples of javax.wsdl.extensions.http.HTTPAddress

    private void setAddrElement() throws ToolException {
        extReg = this.wsdlReader.getExtensionRegistry();
        if (extReg == null) {
            extReg = wsdlFactory.newPopulatedExtensionRegistry();
        }
        HTTPAddress xmlHttpAddress = null;
        try {
            xmlHttpAddress = (HTTPAddress)extReg.createExtension(Port.class,
                                                                 WSDLConstants.NS_XMLHTTP_BINDING_ADDRESS);
        } catch (WSDLException wse) {
            Message msg = new Message("FAIL_TO_CREATE_SOAPADDRESS", LOG);
            throw new ToolException(msg);
        }
        if (env.get(ToolConstants.CFG_ADDRESS) != null) {
            xmlHttpAddress.setLocationURI((String)env.get(ToolConstants.CFG_ADDRESS));
        } else {
            xmlHttpAddress.setLocationURI(HTTP_PREFIX + "/" + env.get(ToolConstants.CFG_SERVICE) + "/"
                                          + env.get(ToolConstants.CFG_PORT));
        }
        port.addExtensibilityElement(xmlHttpAddress);
    }
View Full Code Here

Examples of javax.wsdl.extensions.http.HTTPAddress

                    bnd.setUndefined(false);
                    def.addBinding(bnd);
                    Port port = def.createPort();
                    port.setName(endpoint);
                    port.setBinding(bnd);
                    HTTPAddress address = new HTTPAddressImpl();
                    address.setLocationURI(location);
                    port.addExtensibilityElement(address);
                    def.addNamespace("http", "http://schemas.xmlsoap.org/wsdl/http/");
                    Service svc = def.createService();
                    svc.setQName(service);
                    svc.addPort(port);
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.