Giter Site home page Giter Site logo

event-processor's Introduction

Spring Integration WS Sample

Spring's ws-inbound-gateway sample is a good start, but somewhat unsatisfying. The message is constructed by hand as a string, and the web service is not self describing.

This one generates JAXB classes and bindings, and WSDL, from an XSD describing the message. You'll probably want to take the generated WSDL and serve it up statically before you go to prod (to avoid inadvertent interface changes when in BAU), but this sample is to get you going in dev.

I had to hunt around in both the Integration and Web Services doco to find out the info I needed, so thought this may be worth sharing.

A couple of notes on the XSD:

  • Spring Web Services looks for messages with a suffix of 'Request' or 'Response' and creates operations for them when generating WSDL. You should be able to define your own suffix with requestSuffix and responseSuffix parameters, but that didn't work for me.
  • The only message element that I actually wanted was txnId. The others all seem to be required by the framework.

This sample is meant for running Spring Integration inside a servlet container.

Deploy

You can run the application from:

  • within eclipse (Right-click on the WAR project --> Run As --> Run on Server)
  • the command line:
    • mvn tomcat7:run
  • or alternatively:
    • mvn package
    • deploy the created war file (under /target/*.war) to a servlet container such as Tomcat

Usage

With the event processor deployed and running, point your favourite ws testing tool (like [soapUI] (http://www.soapui.org/)) at http://localhost:8080/event-processor/events/eventService.wsdl and it should do the rest for you. Note that there is no response from this ws, it is a fire and forget notification. Check the container logs for what went on.

License

Copyright 2013 Peter Svehla

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

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.