Examples of SOAPConnection


Examples of com.sforce.soap.apex.SoapConnection

        connectorConfig.setPrettyPrintXml(true);
        connectorConfig.setSessionId(connection.getSessionId());
        connectorConfig.setServiceEndpoint(connection.getApexServiceEndpoint(connection.getServiceEndpoint()));
        connectorConfig.setReadTimeout(readTimeout);
       
        SoapConnection apex = null;
        try {
            apex = Connector.newConnection(connectorConfig);
            apex.setDebuggingHeader(logInfo, LogType.None);
            return new ExecuteAnonymousResultExt(apex.executeAnonymous(code), apex.getDebuggingInfo());
        } catch (ConnectionException e) {
            ExecuteAnonymousResult er = errorExecuteAnonymousResult(connectorConfig, e);
            ExecuteAnonymousResultExt erx = new ExecuteAnonymousResultExt(er, apex.getDebuggingInfo());
            DebuggingInfo_element dbi = new DebuggingInfo_element();
            dbi.setDebugLog(e.getMessage());
            erx.setDebugInfo(dbi);
            return erx;
        } finally {
View Full Code Here

Examples of com.sforce.soap.tooling.SoapConnection

        }

        this.connection = connection;

        try {
            this.toolingConnection = new SoapConnection(connection.getToolingConnectorConfig());
        } catch (ConnectionException e) {
            if (logger.isDebugEnabled()) {
                logger.debug("Could not set tooling connection with connection:  " + connection.getLogDisplay());
            }
            ForceExceptionUtils.handleRemoteException(connection, e);
View Full Code Here

Examples of javax.xml.soap.SOAPConnection

    {
        logger.info("\nSOAP request to " + url);
        logMessage(soapMessage);

     
        final SOAPConnection soapConnection = getSoapConnectionInstance();
        final SOAPMessage soapMessageReply =
            soapConnection.call(soapMessage, url);
        logger.info("\nSOAP response");
        logMessage(soapMessageReply);
        soapConnection.close();
       
        return soapMessageReply.getSOAPBody();
    }
View Full Code Here

Examples of javax.xml.soap.SOAPConnection

        SOAPException
    {

        final SOAPConnectionFactory soapConnectionFactory =
            SOAPConnectionFactory.newInstance();
        final SOAPConnection soapConnection =
            soapConnectionFactory.createConnection();

        return soapConnection;
    }
View Full Code Here

Examples of javax.xml.soap.SOAPConnection

        msg.addAttachmentPart(ap1);
        AttachmentPart ap2 = msg.createAttachmentPart();
        ap2.setContent("Attachment content - Part 2", "text/plain");
        msg.addAttachmentPart(ap2);
       
        SOAPConnection con = conFac.createConnection();
        URL endpoint = new URL("http://localhost:9008/SOAPServiceProviderRPCLit/SoapPortProviderRPCLit1");
        SOAPMessage response = con.call(msg, endpoint);
        QName sayHiResp = new QName("http://apache.org/hello_world_rpclit", "sayHiResponse");
        assertNotNull(response.getSOAPBody().getChildElements(sayHiResp));
        assertEquals(2, response.countAttachments());
    }
View Full Code Here

Examples of javax.xml.soap.SOAPConnection

        try
        {
           SOAPMessage message = this.createSOAPMessage(request);
           //Make the SAAJ Call now
           SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.newInstance();
           SOAPConnection connection = soapConnectionFactory.createConnection();
           SOAPMessage soapResponse = connection.call(message, endpointURL);
          
           SOAPBody soapBody = soapResponse.getSOAPBody();
           boolean hasFault = soapBody.hasFault();
           if(hasFault)
           {
View Full Code Here

Examples of javax.xml.soap.SOAPConnection

        try
        {
           SOAPMessage message = this.createSOAPMessage(request);
           //Make the SAAJ Call now
           SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.newInstance();
           SOAPConnection connection = soapConnectionFactory.createConnection();
           SOAPMessage soapResponse = connection.call(message, endpointURL);
          
           SOAPBody soapBody = soapResponse.getSOAPBody();
           boolean hasFault = soapBody.hasFault();
           if(hasFault)
           {
View Full Code Here

Examples of javax.xml.soap.SOAPConnection

            SOAPConnectionFactory connectionFactory = SOAPConnectionFactory.newInstance();

            /**
             * Get SOAP connection.
             */
            SOAPConnection soapConnection = connectionFactory.createConnection();

            /**
             * Construct endpoint object.
             */
            URLEndpoint endpoint = new URLEndpoint (url);

            /**
             * Send SOAP message.
             */
            SOAPMessage resp = soapConnection.call(soapMessage, endpoint);

            /**
             * Print response to the std output.
             */
            resp.writeTo( System.out );

            /**
             * close the connection
             */
            soapConnection.close();

        } catch (java.io.IOException ioe) {
            ioe.printStackTrace();
        } catch (SOAPException soape) {
            soape.printStackTrace();
View Full Code Here

Examples of javax.xml.soap.SOAPConnection

        super(name);
    }

    private SOAPEnvelope getSOAPEnvelope() throws Exception {
        SOAPConnectionFactory scFactory = SOAPConnectionFactory.newInstance();
        SOAPConnection con = scFactory.createConnection();

        MessageFactory factory = MessageFactory.newInstance();
        SOAPMessage message = factory.createMessage();
        SOAPEnvelope envelope = message.getSOAPPart().getEnvelope();
        return envelope;
View Full Code Here

Examples of javax.xml.soap.SOAPConnection

    public void echo() throws SOAPException {
        SOAPMessage request = messageFactory.createMessage();
        SOAPElement element = request.getSOAPBody().addChildElement(new QName(EchoPayloadEndpoint.NAMESPACE, EchoPayloadEndpoint.LOCAL_PART));
        element.setTextContent("Hello World");

        SOAPConnection connection = connectionFactory.createConnection();

        SOAPMessage response = connection.call(request, url);

        assertXMLEqual(request.getSOAPPart(), response.getSOAPPart());
    }
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.