[wise-dev] [Wise Development] - Re: Kick off Wise 1.3 (perhaps 2.0...?) development

Alessio Soldano do-not-reply at jboss.com
Wed Feb 20 05:58:09 EST 2013


Alessio Soldano [https://community.jboss.org/people/asoldano] created the discussion

"Re: Kick off Wise 1.3 (perhaps 2.0...?) development"

To view the discussion, visit: https://community.jboss.org/message/798541#798541

--------------------------------------------------------------
Hi Paolo,
first of all thanks a lot for the feedback / followup.
I've been reading the post from Duncan and thinking about this topic a bit. The sample mentioned there is interesting, I can ofcourse see few "issues" from a WS point of view that could be possibly addressed using Wise, as you noticed. Among them, I would probably mention the direct usage of JAXB, the need of compile time defined mappers for the request/response and the need for in advance generation of stubs (the request / response type classes). Moreover such an approach would probably work for DOC/Lit contracts only. Using Wise you could avoid manually generating / writing the req/res classes (the tool would internally do that) and you could navigate the Wise model (see  http://anonsvn.jboss.org/repos/wise/core/tags/wise-core-2.0.0.Final/core/src/main/java/org/jboss/wise/core/client/WSMethod.java WSMethod,  http://anonsvn.jboss.org/repos/wise/core/tags/wise-core-2.0.0.Final/core/src/main/java/org/jboss/wise/core/client/WSEndpoint.java WSEndpoint,  http://anonsvn.jboss.org/repos/wise/core/tags/wise-core-2.0.0.Final/core/src/main/java/org/jboss/wise/core/client/WSService.java WSService,  http://anonsvn.jboss.org/repos/wise/core/tags/wise-core-2.0.0.Final/core/src/main/java/org/jboss/wise/core/client/WebParameter.java WebParameter) and finally use reflection on the Type linked in WebParameter instances to dynamically build up request parameter map to perform the invocation with.
That might not be super-easy for complex scenarios though (while it would definitely be quite easy for the simple example mentioned in the Duncan's example, it's just a string parameter there). So, you might want to use a Smooks based approach. The Wise core testsuite comes with an example ( http://anonsvn.jboss.org/repos/wise/core/tags/wise-core-2.0.0.Final/integration-testsuite/common/src/test/java/org/jboss/wise/test/integration/smooks/ [1],  http://anonsvn.jboss.org/repos/wise/core/tags/wise-core-2.0.0.Final/integration-testsuite/common/src/test/resources/META-INF/smooks/ [2]) of Smooks transformation applied on both request parameters and response results. In the example Smooks transformations are defined to map a user model to the WS generated types.
It might be interesting to try writing up an example using mapping files dynamically generated by inspecting the Wise model, perhaps using <String key, primitive value> maps as parameter input and result output; I'll probably try spending some time on this sooner or later, if it's doable that would further lower the complexity of ws invocation.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798541#798541]

Start a new discussion in Wise Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2049]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wise-dev/attachments/20130220/c59eda6e/attachment.html 


More information about the wise-dev mailing list