Package chapter02.s05

Examples of chapter02.s05.Body


  // ======================================

  @Test
  public void shouldCheckNumberIsThirteenDigits() {
    BookService14 bookService = container.instance().select(BookService14.class).get();
    Book14 book = bookService.createBook("H2G2", 12.5f, "Geeky scifi Book");
    assertTrue(book.getIsbn().startsWith("MOCK"));
  }
View Full Code Here


  // =              Methods               =
  // ======================================

  @Test
  public void shouldCheckNumberIsThirteenDigits() {
    BookService14 bookService = container.instance().select(BookService14.class).get();
    Book14 book = bookService.createBook("H2G2", 12.5f, "Geeky scifi Book");
    assertTrue(book.getIsbn().startsWith("MOCK"));
  }
View Full Code Here

  // ======================================

  @Test
  public void shouldSeeInterceptor() throws Exception {
    CustomerService25 customerService = container.instance().select(CustomerService25.class).get();
    customerService.createCustomer(new Customer25());
  }
View Full Code Here

  // =              Methods               =
  // ======================================

  @Test
  public void shouldSeeInterceptor() throws Exception {
    CustomerService25 customerService = container.instance().select(CustomerService25.class).get();
    customerService.createCustomer(new Customer25());
  }
View Full Code Here

  // ======================================

  @Test
  public void shouldSeeInterceptor() throws Exception {
    CustomerService27 customerService = container.instance().select(CustomerService27.class).get();
    customerService.createCustomer(new Customer27());
  }
View Full Code Here

  // =              Methods               =
  // ======================================

  @Test
  public void shouldSeeInterceptor() throws Exception {
    CustomerService27 customerService = container.instance().select(CustomerService27.class).get();
    customerService.createCustomer(new Customer27());
  }
View Full Code Here

  // ======================================

  @Test
  public void shouldCheckNumberIsThirteenDigits() {
    BookService36 bookService = container.instance().select(BookService36.class).get();
    Book36 book = bookService.createBook("H2G2", 12.5f, "Geeky scifi Book");
    assertTrue(book.getIsbn().startsWith("8"));
    bookService.deleteBook(book);
  }
View Full Code Here

  // =              Methods               =
  // ======================================

  @Test
  public void shouldCheckNumberIsThirteenDigits() {
    BookService36 bookService = container.instance().select(BookService36.class).get();
    Book36 book = bookService.createBook("H2G2", 12.5f, "Geeky scifi Book");
    assertTrue(book.getIsbn().startsWith("8"));
    bookService.deleteBook(book);
  }
View Full Code Here

    @SuppressWarnings("unchecked")
    protected Envelope buildSOAPMessage(SAMLMessageContext samlMsgCtx, SAMLObject samlMessage) {
        Envelope envelope = null;
        if (samlMsgCtx.getOutboundMessage() != null && samlMsgCtx.getOutboundMessage() instanceof Envelope) {
            envelope = (Envelope) samlMsgCtx.getOutboundMessage();
            Body body = envelope.getBody();
            if (body == null) {
                XMLObjectBuilderFactory builderFactory = Configuration.getBuilderFactory();
                SOAPObjectBuilder<Body> bodyBuilder = (SOAPObjectBuilder<Body>) builderFactory
                        .getBuilder(Body.DEFAULT_ELEMENT_NAME);
                body = bodyBuilder.buildObject();
                envelope.setBody(body);
            } else if (!body.getUnknownXMLObjects().isEmpty()) {
                log.warn("Supplied SOAP Envelope Body was not empty. Existing contents will be removed.");
                body.getUnknownXMLObjects().clear();
            }
            body.getUnknownXMLObjects().add(samlMessage);
        } else {
            envelope = buildSOAPMessage(samlMessage);
            samlMsgCtx.setOutboundMessage(envelope);
        }
        return envelope;
View Full Code Here

        Envelope envelope = envBuilder.buildObject();

        log.debug("Adding SAML message to the SOAP message's body");
        SOAPObjectBuilder<Body> bodyBuilder = (SOAPObjectBuilder<Body>) builderFactory
                .getBuilder(Body.DEFAULT_ELEMENT_NAME);
        Body body = bodyBuilder.buildObject();
        body.getUnknownXMLObjects().add(samlMessage);
        envelope.setBody(body);

        return envelope;
    }
View Full Code Here

TOP

Related Classes of chapter02.s05.Body

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.