Giter Site home page Giter Site logo

products's Introduction

Spring Boot and Camel REST Demo

This example demonstrates how to use Camel's REST DSL to expose a RESTful API which calls 2 SOAP web services: SapService and StartrackService. It i;;ustrates the use of EIPs including Content-Based Router and Composed Message Processor.

Building

The example can be built with

mvn clean install

Running the example in OpenShift

It is assumed that:

The example can then be built and deployed using a single goal:

$ mvn fabric8:deploy

To list all the running pods:

oc get pods

Then find the name of the pod that runs this quickstart, and output the logs from the running pods with:

oc logs <name of pod>

You can also use the OpenShift web console to manage the running pods, and view logs and much more.

Running via an S2I Application Template

Application templates allow you deploy applications to OpenShift by filling out a form in the OpenShift console that allows you to adjust deployment parameters. This template uses an S2I source build so that it handle building and deploying the application for you.

First, import the Fuse image streams:

oc create -f https://raw.githubusercontent.com/jboss-fuse/application-templates/GA/fis-image-streams.json

Then create the quickstart template:

oc create -f https://raw.githubusercontent.com/jboss-fuse/application-templates/GA/quickstarts/spring-boot-camel-rest-sql-template.json

Now when you use "Add to Project" button in the OpenShift console, you should see a template for this quickstart.

Accessing the REST service

When the example is running, a REST service is available to get shipping product info and filtering of responses eg,

More 28 of 8,801

Print all In new window Fwd: AusPost Demo on https://master.openshift.megatron.world Inbox x

Andy Yuen [email protected] 4:18 PM (17 hours ago)

to Mike, Jason, Stefano Mike,

Could you have a look at this issue? Is it a simple thing to fix? We need the Java Console to show the Camel route diagram in the demo.

FYI, I've seen this happening using the Red Hat Development Suite env (Vagrant) but 'oc cluster up' is ok. Different version?!

Thanks Andy ---------- Forwarded message ---------- From: Andy Yuen [email protected] Date: Mon, Apr 10, 2017 at 11:00 AM Subject: RE: AusPost Demo on https://master.openshift.megatron.world To: Jason Bodsworth [email protected], Daniel Soffner [email protected], Kunal Limaye [email protected] Cc: Wayne Dovey [email protected], Mike Hepburn [email protected], "Yuen, Andy" [email protected]

Hey Guys,

The demo is all working except when trying to access the Openshift Java Console which gives the following error: Inline image 1

Thanks to Wayne who suggested deleting and re-creating the FIS image streams. Once I've done that, I can use binary S2I to deploy on megatron.world.

Here are the details:

SapService: http://sapem-sapem.apps.openshift.megatron.world/service/SapService?wsdl

StartrackService http://startrack-startrack.apps.openshift.megatron.world/service/StartrackService?wsdl

products REST Service (Daniel, this is the one you need to bring out to 3Scale): http://products-products.apps.openshift.megatron.world/shipping/v1/products

The REST service calls the abovr SOAP services and aggregates the results as per Auspost use case.

With lots of query parameters eg, http://{hostname}/shipping/v1/products?product_ids=STR-ON,STR-ARL,EPARCEL-REG&features=ATL,COLLECT&from_postcode=3000&to_postcode=2000&arrival_date=2016-06-30

products's People

Contributors

mrdreambot avatar

Watchers

James Cloos avatar Marcelo Daniel Silva Sales avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.