JBoss Wise: breaking barriers to WS testing
Alessio Soldano

alessio.soldano@jboss.com
Principal Software Eng.
JBoss - Red...
Let's invoke a WS in Java...
●

You've been given a WSDL (reference)...

●

...so you start by generating the stubs (JAXWS...
Let's invoke a WS in Java...
●

Then you import the sources in your IDE...

●

... finally you code against them an invoke...
Perhaps you automate the process a bit...
●

Maven plugins for generating the stubs automatically

... but ...
Pros / Cons
●

Your code is actually bound to the generated classes
(client – server coupling)

●

Good solution for clien...
JBoss Wise
●

Java library for easily invoking webservices

●

Built on top of JBossWS stack

●

Goals
‣Effective
‣Easy

c...
Dynamic client API
●

Get a dynamic client for a WSDL operation and invoke...
Dynamic client API
●

or browse the model to choose the method to call

●

What about parameters?
‣

non-trivial endpoints...
WebParameter inspection + reflection
●

Get Java type from WebParameter instances

●

Use reflection to build up the desir...
Wise mappers
●

Allow users to invoke endpoints using their own model

●

Map user model to internally generated client cl...
Smooks mapper
●

“Smooks is an extensible framework for building
applications for processing XML and non XML data (CSV,
Ja...
Smooks mapper
●

Define the request and response mappings..

●

... and invoke providing the user model
Tree model
So the request / response model is really the core
concept here... what about something very simple yet
generic...
Tree model usage
●

Get tree view model and populate it...

●

Invoke the endpoint and convert the result in another tree....
Tree model advantages
●

Detyped model... but still compliant to the WSDL/schema

●

Simple and generic...
enough to build...
Wise GUI
●

Web based
‣
‣

usable everywhere (even on mobile...)

‣
●

no need for Eclipse / IDE
deployed on JBoss (even o...
Wise Invokes Services Easily
●

Wise is built on top of a JavaEE certified stack (JBossWS)
... this ensures core correctne...
Future features (maybe...)
●

GUI user management

●

Import / export GUI environment

●

Multiple authentication options
...
Links
●

Project homepage: www.jboss.org/wise

●

Blog: jbosswise.blogspot.com

●

Code for this presentation: https://git...
Upcoming SlideShare
Loading in …5
×

JBoss Wise: breaking barriers to WS testing

529 views

Published on

Alessio Soldano - Principal Sw Eng. @ Red Hat
JBug Milano October 2013

JBoss Wise [1] is a library for simplifying webservices invocation and testing. It provides solutions for easy browsing of WSDL models, zero-code invocation of WS operations and for lowering the technical entry level to WS testing. The presentation will go through the recently added functionalities; the focus will then shift to WS testing, with a demo of the available GUI and an overview of the future enhancement efforts.

[1] http://www.jboss.org/wise

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
529
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

JBoss Wise: breaking barriers to WS testing

  1. 1. JBoss Wise: breaking barriers to WS testing Alessio Soldano alessio.soldano@jboss.com Principal Software Eng. JBoss - Red Hat October 22nd, 2013 Milan JBoss User Group
  2. 2. Let's invoke a WS in Java... ● You've been given a WSDL (reference)... ● ...so you start by generating the stubs (JAXWS tools)
  3. 3. Let's invoke a WS in Java... ● Then you import the sources in your IDE... ● ... finally you code against them an invoke the endpoint
  4. 4. Perhaps you automate the process a bit... ● Maven plugins for generating the stubs automatically ... but ...
  5. 5. Pros / Cons ● Your code is actually bound to the generated classes (client – server coupling) ● Good solution for clients of stable endpoints ● Not suitable to quick testing of multiple/different endpoints
  6. 6. JBoss Wise ● Java library for easily invoking webservices ● Built on top of JBossWS stack ● Goals ‣Effective ‣Easy client/server decoupling browsing of WSDL models ‣(nearly)zero-code ‣Lowering invocation of WS operations the technical entry level to WS testing
  7. 7. Dynamic client API ● Get a dynamic client for a WSDL operation and invoke...
  8. 8. Dynamic client API ● or browse the model to choose the method to call ● What about parameters? ‣ non-trivial endpoints get and return structured data... ‣ we need Object instances to put in the invocation Map...
  9. 9. WebParameter inspection + reflection ● Get Java type from WebParameter instances ● Use reflection to build up the desired data ● ... working on classes generated on-the-fly by Wise ... ● ugly, unpractical, etc.
  10. 10. Wise mappers ● Allow users to invoke endpoints using their own model ● Map user model to internally generated client classes ● Any custom mapper can be implemented ● ... moving the problem to defining the proper vehicle and transformation of user data into target endpoint parameters
  11. 11. Smooks mapper ● “Smooks is an extensible framework for building applications for processing XML and non XML data (CSV, Java, ...) using Java” with proper Smooks mappers, Wise can invoke a WS endpoint given any model (even in different formats) !
  12. 12. Smooks mapper ● Define the request and response mappings.. ● ... and invoke providing the user model
  13. 13. Tree model So the request / response model is really the core concept here... what about something very simple yet generic, with String only values? ● Tree-like view model ● kind of a DOM tree built on the valid WS req/res space
  14. 14. Tree model usage ● Get tree view model and populate it... ● Invoke the endpoint and convert the result in another tree...
  15. 15. Tree model advantages ● Detyped model... but still compliant to the WSDL/schema ● Simple and generic... enough to build a GUI ! Demo Time :-)
  16. 16. Wise GUI ● Web based ‣ ‣ usable everywhere (even on mobile...) ‣ ● no need for Eclipse / IDE deployed on JBoss (even on Openshift...) Focus on the data, not on the technology ‣ No WS, XML or Java knowledge required ‣ Fast / agile WS testing ‣ Enable business acceptance tests from analysts
  17. 17. Wise Invokes Services Easily ● Wise is built on top of a JavaEE certified stack (JBossWS) ... this ensures core correctness and interoperability. ● You're consuming WS services (based on WSDL / XSD) ‣ you're granted compliance with the contract ‣ ... but you don't get your hands dirty with SOAP ;-) Is it really that complex and inconvenient to call one of those dreaded WSDL based WS services? ;-)
  18. 18. Future features (maybe...) ● GUI user management ● Import / export GUI environment ● Multiple authentication options ● Explicit WS-Policy support ● Smooks Eclipse plugin for Wise mappers generation? ● ... ... but we need help from YOU !
  19. 19. Links ● Project homepage: www.jboss.org/wise ● Blog: jbosswise.blogspot.com ● Code for this presentation: https://github.com/asoldano/demo Write us! Contribution is more the welcome!

×