This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Consuming SOAP webservices

2 replies
Jeppe Nejsum Madsen
Joined: 2009-05-19,
User offline. Last seen 42 years 45 weeks ago.

Hi,

I'm currently stuck in a huge JEE Portal project. One of the things
that takes quite a while is to map SOAP web services. We have a lot of
services that we need to interface to.

We're currently using Axis2 to generate clients from the WSDL and
XMLBeans to generate mappers for the documents.

Is there a better way to do this in Scala? What are your experiences
consuming (doc-style) SOAP web services in Scala?

/Jeppe

Alex Cruise
Joined: 2008-12-17,
User offline. Last seen 2 years 26 weeks ago.
Re: Consuming SOAP webservices
On Thu, Jul 8, 2010 at 1:14 PM, Jeppe Nejsum Madsen <jeppe [at] ingolfs [dot] dk> wrote:
We're currently using Axis2 to generate clients from the WSDL and
XMLBeans to generate mappers for the documents.

Is there a better way to do this in Scala? What are your experiences
consuming (doc-style) SOAP web services in Scala?

It's not really Scala-related, but I've had good results with CXF (mostly using its JAXB/JAX-WS support), which is especially nice when the service interface class is available on the consumer side, so whatever code generation is needed can be done at runtime.
-0xe1a
Tim Perrett 2
Joined: 2009-04-06,
User offline. Last seen 42 years 45 weeks ago.
Re: Consuming SOAP webservices

Firstly, Jeppe, you have my condolences! SOAP is a truly awful technology.

We use a hell of a lot of SOAP at work and I've not found any "nice"
way to deal with it in Scala natively, so what I ended up doing, is
using JAX-WS under the hood then building a high level abstraction on
the whole calling chain so that i'm not dealing with instantiating
drivers and boilerplate like that. Its working really nicely for me at
the moment :-)

"datacenter" cluster ~> job ~> args*

That basically does the soap call on a particular cluster (as we have
multiple installs of the same thing around the world) and "job" is the
endpoint interface for the soap driver. This is the top level DSL, but
then under the hood I have a whole heap of other stuff wired into it
so you can do parallel calls etc.

I'd recommend using one of the known Java libs for the base SOAP
component, then, depending upon how much you are going to be
interacting with this service, writing abstractions. If its a one-time
usage thing, probably just write a thin wrapper. If however (like me)
you are going to be using it daily, i would write a pretty good
abstraction so it feels more scala like.

Cheers, Tim

On 8 July 2010 21:14, Jeppe Nejsum Madsen wrote:
> Hi,
>
>
> I'm currently stuck in a huge JEE Portal project. One of the things
> that takes quite a while is to map SOAP web services. We have a lot of
> services that we need to interface to.
>
> We're currently using Axis2 to generate clients from the WSDL and
> XMLBeans to generate mappers for the documents.
>
> Is there a better way to do this in Scala? What are your experiences
> consuming (doc-style) SOAP web services in Scala?
>
> /Jeppe
>

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland