Examples of URLEndpoint


Examples of javax.xml.messaging.URLEndpoint

        Name name = envelope.createName("symbol");
        SOAPElement symbol = gltp.addChildElement(name);
        symbol.addTextNode(tickerSymbol);

        URLEndpoint endpoint = new URLEndpoint("http://66.28.98.121:9090/soap");
        SOAPMessage response = con.call(message, endpoint);
        con.close();

        SOAPPart sp = response.getSOAPPart();
        SOAPEnvelope se = sp.getEnvelope();
View Full Code Here

Examples of javax.xml.messaging.URLEndpoint

      // Save changes to the message we just populated
      msg.saveChanges();

      // Get ready for the invocation
      URLEndpoint endpoint = new URLEndpoint(operation.getTargetURL());

      // Show the URL endpoint message in the log
      ByteArrayOutputStream msgStream = new ByteArrayOutputStream();
      msg.writeTo(msgStream);

      log.debug("SOAP Message MeasurementTarget URL: " + endpoint.getURL());
      log.debug("SOAP Request: " + msgStream.toString());

      // Make the call
      SOAPMessage response = connection.call(msg, endpoint);
View Full Code Here

Examples of javax.xml.messaging.URLEndpoint

      // Save changes to the message we just populated
      msg.saveChanges();

      // Get ready for the invocation
      URLEndpoint endpoint = new URLEndpoint(operation.getTargetURL());

      // Show the URL endpoint message in the log
      ByteArrayOutputStream msgStream = new ByteArrayOutputStream();
      msg.writeTo(msgStream);

      log.debug("SOAP Message MeasurementTarget URL: " + endpoint.getURL());
      log.debug("SOAP Request: " + msgStream.toString());

      // Make the call
      SOAPMessage response = connection.call(msg, endpoint);
View Full Code Here

Examples of javax.xml.messaging.URLEndpoint

        Name name = envelope.createName("arg0");
        SOAPElement symbol = bodyElement.addChildElement(name);
        symbol.addTextNode("Hello");

        URLEndpoint endpoint = new URLEndpoint("http://localhost:5678/axis/EchoHeaders.jws");
        SOAPMessage response = con.call(message, endpoint);
        String responseEncoding = (String) response.getProperty(SOAPMessage.CHARACTER_SET_ENCODING);
        assertEquals(requestEncoding.toLowerCase(), responseEncoding.toLowerCase());
    }
View Full Code Here

Examples of javax.xml.messaging.URLEndpoint

        Name name = envelope.createName("arg0");
        SOAPElement symbol = bodyElement.addChildElement(name);
        symbol.addTextNode("Hello");

        URLEndpoint endpoint = new URLEndpoint("http://localhost:8080/jws/FaultTest.jws");
        SOAPMessage response = con.call(message, endpoint);
        SOAPBody respBody = response.getSOAPPart().getEnvelope().getBody();
        assertTrue(respBody.hasFault());
    }
View Full Code Here

Examples of org.apache.axis2.transport.base.endpoint.URLEndpoint

            String charSetEncoding = BuilderUtil.getCharSetEncoding(contentTypeStr);
            msgContext.setProperty(
                    Constants.Configuration.CHARACTER_SET_ENCODING, charSetEncoding);
            boolean eprFound = false;
            if (endpointsConfiguration != null) {
                URLEndpoint epr = endpointsConfiguration.getEndpoint(request.getRequestLine().getUri());
                if (epr != null) {
                    eprFound = true;
                    String type = TransportUtils.getContentType(contentTypeStr, msgContext);
                    msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, type);
                    epr.setParameters(msgContext);

                    Builder builder = epr.getBuilder(type);
                    if (HTTPTransportUtils.isRESTRequest(contentTypeStr)) {
                        RESTUtil.processPOSTRequest(msgContext, is, os,
                                request.getRequestLine().getUri(), contentType, builder, isRestDispatching);
                    } else {
View Full Code Here

Examples of org.apache.axis2.transport.base.endpoint.URLEndpoint

            String contentTypeStr = contentType != null ?
                    contentType.getValue() : inferContentType();

            boolean eprFound = false;
            if (endpointsConfiguration != null) {
                URLEndpoint epr = endpointsConfiguration.getEndpoint(request.getRequestLine().getUri());
                if (epr != null) {
                    eprFound = true;
                    String type = TransportUtils.getContentType(contentTypeStr, msgContext);
                    msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, type);

                    epr.setParameters(msgContext);

                    Builder builder = epr.getBuilder(type);
                    RESTUtil.processGetAndDeleteRequest(
                            msgContext, os, request.getRequestLine().getUri(),
                            request.getFirstHeader(HTTP.CONTENT_TYPE), builder,
                            method, isRestDispatching);
                }
View Full Code Here

Examples of org.apache.axis2.transport.base.endpoint.URLEndpoint

                    " attribute is mandory for an URLEndpoint configuration");
            return null;
        }

        String pattern = urlPatternAttr.getAttributeValue();
        URLEndpoint endpoint = new URLEndpoint(Pattern.compile(pattern));

        OMElement messageBuilders = xml.getFirstChildWithName(
                new QName(URLEndpointsConfiguration.MESSAGE_BUILDERS));

        if (messageBuilders != null) {
            OMAttribute defaultBuilderAttr = messageBuilders.getAttribute(
                    new QName("defaultBuilder"));
            if (defaultBuilderAttr != null) {
                Builder builder = loadBuilder(defaultBuilderAttr.getAttributeValue());
                if (builder != null) {
                    endpoint.setDefaultBuilder(builder);
                }
            }

            Iterator it = messageBuilders.getChildrenWithName(
                    new QName(URLEndpointsConfiguration.MESSAGE_BUILDER));
            while(it.hasNext()) {
                OMElement builderElement = (OMElement) it.next();

                OMAttribute contentTypeAttr = builderElement.getAttribute(
                        new QName(URLEndpointsConfiguration.CONTENT_TYPE));
                if (contentTypeAttr == null) {
                    handleException(URLEndpointsConfiguration.CONTENT_TYPE +
                            " attribute cannot be null for URLEndpoint " +
                            "with the " + URLEndpointsConfiguration.URL_PATTERN + " : " + pattern);
                }

                OMAttribute classAttr = builderElement.getAttribute(
                        new QName(URLEndpointsConfiguration.CLASS));
                if (classAttr == null) {
                    handleException(URLEndpointsConfiguration.CLASS +
                            " attribute cannot be null for URLEndpoint " +
                            "with the " + URLEndpointsConfiguration.URL_PATTERN + " : " + pattern);
                }

                if (classAttr != null && contentTypeAttr != null) {
                    Builder builder = loadBuilder(classAttr.getAttributeValue());
                    if (builder != null) {
                        endpoint.addBuilder(contentTypeAttr.getAttributeValue(), builder);
                    }
                }
            }
        }

        Iterator paramItr = xml.getChildrenWithName(
                new QName(URLEndpointsConfiguration.PARAMETER));
        while (paramItr.hasNext()) {
            OMElement p = (OMElement) paramItr.next();
            OMAttribute paramNameAttr = p.getAttribute(new QName(URLEndpointsConfiguration.NAME));
            if (paramNameAttr == null) {
                handleException("Parameter " + URLEndpointsConfiguration.NAME + " cannot be null");
            } else {
                endpoint.addParameter(new Parameter(paramNameAttr.getAttributeValue(), p.getText()));
            }
        }

        return endpoint;
    }
View Full Code Here

Examples of org.apache.axis2.transport.base.endpoint.URLEndpoint

        URLEndpointsConfiguration configuration = new URLEndpointsConfiguration();
        URLEndpointFactory fac = new URLEndpointFactory();
        while (iterator.hasNext()) {
            OMElement endpoint = (OMElement) iterator.next();

            URLEndpoint epr = fac.create(endpoint);
            configuration.addEndpoint(epr);
        }

        return configuration;
    }
View Full Code Here

Examples of org.apache.axis2.transport.base.endpoint.URLEndpoint

        URLEndpointsConfiguration configuration = new URLEndpointsConfiguration();
        URLEndpointFactory fac = new URLEndpointFactory();
        while (iterator.hasNext()) {
            OMElement endpoint = (OMElement) iterator.next();

            URLEndpoint epr = fac.create(endpoint);
            configuration.addEndpoint(epr);
        }

        return configuration;
    }
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.