Package epcglobal.epcis_query.xsd._1

Examples of epcglobal.epcis_query.xsd._1.QueryResults


        // Test for an unknown Customer name and expect the NoSuchCustomerException
        System.out.println("***************************************************************");
        System.out.println("*** Request-Response operation with Business Fault ************");
        System.out.println("***************************************************************");
        try {
            SearchFor request = new SearchFor();
            System.out.println("\nSending request for authors named Grizzlybear");
            request.getAuthorLastName().add("Grizzlybear");
            ListOfBooks response = libraryHttp.seekBook(request);

            System.out.println("FAIL: We should get a SeekBookError here");

        } catch (SeekBookError e) {
View Full Code Here


        // a list of books
        System.out.println("***************************************************************");
        System.out.println("*** Request-Callback operation ********************************");
        System.out.println("***************************************************************");
        System.out.println("\nSending request(callback) for authors named Stripycat");
        SearchInBasementFor request = new SearchInBasementFor();
        request.getAuthorLastName().add("Stripycat");
        Map<String, Object> rctx = ((BindingProvider) libraryJms).getRequestContext();
        Map<String, Object> correlationInfo = new HashMap<String, Object>();
        rctx.put(RequestCallbackFeature.CALL_INFO_PROPERTY_NAME, correlationInfo);
        libraryJms.seekBookInBasement(request);
        String correlationId = (String) correlationInfo.get(
View Full Code Here

    private SeekBookError prepareException(String message) {
        ExceptionType exception = new ExceptionType();
        exception.setOperation("seekBook");
        exception.setServiceName("LibraryService");
        exception.setExceptionText(message);
        ExceptionFrame frame = new ExceptionFrame();
        frame.getException().add(exception);
        SeekBookError e = new SeekBookError("Book not found", frame);
        return e;
    }
View Full Code Here

    private void showSeekBookResponse(final ListOfBooks response ){

    }

    private SeekBookError prepareException(String message) {
        ExceptionType exception = new ExceptionType();
        exception.setOperation("seekBook");
        exception.setServiceName("LibraryService");
        exception.setExceptionText(message);
        ExceptionFrame frame = new ExceptionFrame();
        frame.getException().add(exception);
        SeekBookError e = new SeekBookError("Book not found", frame);
        return e;
    }
View Full Code Here

                throw e;
            }
        }
        ListOfBooks result = new ListOfBooks();
        BookType book = new BookType();
        result.getBook().add(book);
        PersonType author = new PersonType();
        book.getAuthor().add(author);
        author.setFirstName("Jack");
        author.setLastName("Icebear");
        Calendar dateOfBirth = new GregorianCalendar(101, Calendar.JANUARY, 2);
        author.setDateOfBirth(dateOfBirth.getTime());
        book.getTitle().add("Survival in the Arctic");
        book.getPublisher().add("Frosty Edition");
        book.setYearPublished("2010");

        System.out.println("Book(s) is found:");

        showSeekBookResponse(result);
View Full Code Here

        serviceContext = startProvider(dir);

        Library client = (Library)serviceContext.getBean("libraryHttp");

        ListOfBooks response = null;

        try {
            response = searchFor(searchFor, client);
        } catch (SeekBookError e) {
            fail("Exception during service call");
View Full Code Here

        System.out.println("*** Request-Response operation ********************************");
        System.out.println("***************************************************************");
        System.out.println("\nSending request for authors named Icebear");
        SearchFor request = new SearchFor();
        request.getAuthorLastName().add("Icebear");
        ListOfBooks response = libraryHttp.seekBook(request);
        System.out.println("\nResponse received:");


        if (response.getBook().size() != 1) {
            System.out.println("An error occured: number of books found is not equal to 1");
        }

        if (!"Icebear".equals(response.getBook().get(0).getAuthor().get(0).getLastName())) {
            System.out.println("An error occured: the author of the found book is not Icebear");
        }
    }
View Full Code Here

        System.out.println("***************************************************************");
        try {
            SearchFor request = new SearchFor();
            System.out.println("\nSending request for authors named Grizzlybear");
            request.getAuthorLastName().add("Grizzlybear");
            ListOfBooks response = libraryHttp.seekBook(request);

            System.out.println("FAIL: We should get a SeekBookError here");

        } catch (SeekBookError e) {
            if (e.getFaultInfo() == null) {
View Full Code Here

        serviceContext = startParticipants(dir);

        Library client = (Library)serviceContext.getBean("libraryHttp");

        ListOfBooks response = null;

        try {
            response = searchFor(searchFor, client);
        } catch (SeekBookError e) {
            fail("Exception during service call");
View Full Code Here

                System.out.println("\nSending business fault (SeekBook error) with parameters:");

                throw e;
            }
        }
        ListOfBooks result = new ListOfBooks();
        BookType book = new BookType();
        result.getBook().add(book);
        PersonType author = new PersonType();
        book.getAuthor().add(author);
        author.setFirstName("Jack");
        author.setLastName("Icebear");
        Calendar dateOfBirth = new GregorianCalendar(101, Calendar.JANUARY, 2);
View Full Code Here

TOP

Related Classes of epcglobal.epcis_query.xsd._1.QueryResults

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.