Package com.alexgilleran.icesoap.envelope

Examples of com.alexgilleran.icesoap.envelope.SOAPEnvelope


  public void testRequestBlocking() throws SOAPException, IOException {
    // Set up a parser for the response
    SOAP11Request<Response> request = getRequestFactory().buildRequest(DUMMY_URL, getDummyEnvelope(), SOAP_ACTION,
        Response.class);

    SOAPEnvelope envelope = getDummyEnvelope();
    expect(mockRequester.doSoapRequest(envelope, DUMMY_URL, SOAP_ACTION)).andReturn(
        new com.alexgilleran.icesoap.request.impl.Response(SampleResponse.getSingleResponse(), 200));
    replay(mockRequester);

    // Verify the parsed object was correct.
View Full Code Here


    SOAP11Request<Response> request = getRequestFactory().buildRequest(DUMMY_URL, getDummyEnvelope(), SOAP_ACTION,
        Response.class);

    IOException ioException = new IOException("Test");

    SOAPEnvelope envelope = getDummyEnvelope();

    expect(mockRequester.doSoapRequest(envelope, DUMMY_URL, SOAP_ACTION)).andThrow(ioException);
    replay(mockRequester);

    try {
View Full Code Here

    SOAPRequester requester = new TestApacheSOAPRequester();
    requester.doSoapRequest(expectedEnvelope, "http://target.com");
  }

  private SOAPEnvelope buildDifficultEnvelope() {
    SOAPEnvelope env = new BaseSOAP11Envelope();
    env.setEncoding(expectedEncoding);
    env.getBody().addTextNode(null, "ÀÁÂÃÄÅÆÇÈÉýÿĂĄ", "ɑɔʥʣʨʪɯ");
    env.getBody().addTextNode(null, "ѨѫѯРсшНЌЄЏ", "ڝڠڥکۛ٢شظڧ۞۸");
    return env;
  }
View Full Code Here

    return requestFactory;
  }

  protected SOAPEnvelope getDummyEnvelope() {
    // Set up an envelope to send
    SOAPEnvelope envelope = new PasswordSOAP11Envelope("username", "password");
    envelope.getBody().addNode("http://testns.com", "testname").addTextNode(null, "textelement", "value");
    return envelope;
  }
View Full Code Here

    doFailedRequest(request, inputStream, HTTP_ERROR_500);
  }

  protected <FaultType> void doFailedRequest(Request<E, FaultType> request, InputStream inputStream, int errorCode)
      throws IOException, XMLParsingException {
    SOAPEnvelope envelope = getDummyEnvelope();

    expect(mockRequester.doSoapRequest(envelope, DUMMY_URL, SOAP_ACTION)).andReturn(
        new com.alexgilleran.icesoap.request.impl.Response(inputStream, errorCode));
    replay(mockRequester);
View Full Code Here

  protected void doExceptionRequest(Request<E, ?> request, InputStream inputStream) throws IOException,
      XMLParsingException {
    IOException ioException = new IOException("Test");

    SOAPEnvelope envelope = getDummyEnvelope();

    expect(mockRequester.doSoapRequest(envelope, DUMMY_URL, SOAP_ACTION)).andThrow(ioException);

    replay(mockRequester);
View Full Code Here

TOP

Related Classes of com.alexgilleran.icesoap.envelope.SOAPEnvelope

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.