Code Monkey home page Code Monkey logo

soap-async's Introduction

Non-blocking SOAP client using Scala, Play and CXF

You can read more about this problem in a blog post at czechscala.com via web.archive.org (in English) or at dev.etnetera.cz (in Czech).

ws-server

An implementation of a trivial SOAP web service using JAX-WS and the built-in HTTP server in JRE.

The folder contains an SBT project.

> sbt run

This will start the web service endpoint at http://localhost:8080/ws-server/AddNumbers.

play-client

A Play application that consumes the SOAP web service.

It uses the CXF to implement a non-blocking SOAP client. Without CXF in classpath, the code will still work, but JAXWS will revert to the default implementation (JAXWS-RI - at least in Oracle Java) that uses blocking HTTP client.

The client expects the web service to be running at: http://localhost:8080/ws-server/AddNumbers.

See play-client/app/controllers/AsyncSoapController.scala for the details.

Start Play server in dev mode:

> sbt run

The Play's default HTTP port is 9000 so to access the controller just point your browser to http://localhost:9000/add?a=10&b=50 (for sum of 10 + 50).

soap-async's People

Contributors

vmencik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

soap-async's Issues

play-client - sbt compile - cannot find symbol

I clone dyour project and ran sbt compile, but I got the following compilation errors:

sbt compile
[info] Loading project definition from /home/vagrant/code/soap-async/play-client/project
[info] Set current project to soap-async (in build file:/home/vagrant/code/soap-async/play-client/)
[info] Compiling 3 Scala sources and 7 Java sources to /home/vagrant/code/soap-async/play-client/target/scala-2.10/classes...
[error] /home/vagrant/code/soap-async/play-client/app/async/client/AddNumbersService.java:46: cannot find symbol
[error] symbol  : constructor Service(java.net.URL,javax.xml.namespace.QName,javax.xml.ws.WebServiceFeature[])
[error] location: class javax.xml.ws.Service
[error]         super(__getWsdlLocation(), ADDNUMBERSSERVICE_QNAME, features);
[error]         ^
[error] /home/vagrant/code/soap-async/play-client/app/async/client/AddNumbersService.java:54: cannot find symbol
[error] symbol  : constructor Service(java.net.URL,javax.xml.namespace.QName,javax.xml.ws.WebServiceFeature[])
[error] location: class javax.xml.ws.Service
[error]         super(wsdlLocation, ADDNUMBERSSERVICE_QNAME, features);
[error]         ^
[error] /home/vagrant/code/soap-async/play-client/app/async/client/AddNumbersService.java:62: cannot find symbol
[error] symbol  : constructor Service(java.net.URL,javax.xml.namespace.QName,javax.xml.ws.WebServiceFeature[])
[error] location: class javax.xml.ws.Service
[error]         super(wsdlLocation, serviceName, features);
[error]         ^
[error] 3 errors
[error] (compile:compile) javac returned nonzero exit code
[error] Total time: 9 s, completed Jan 23, 2014 8:56:54 AM

I assume the playframework classpath is missing the required jax-ws libraries; but I'm unsure how to add them?

Thanks.

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.