Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is still ws-import the best to create consumer of the Web service?  RSS feed

 
Mimmo Ludovico
Ranch Hand
Posts: 49
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,


like in the object my question is: to follow what are the best practice advised by Oracle, is still ws-import the best thing to use in our application to call external web service?

Is this an example of use of the Proxy design pattern?


Thanks in advance,
Angelo
 
Simon Roberts
Author
Ranch Hand
Posts: 176
9
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Best" is such a weasel word Best depends on so many things. If your company is in the habit of using some other toolkit for creating clients, then probably not; conformance to standards and conventions is a lot more important in big organizations than most of us "do it my own way" mavericks would like to believe ;)

That said, if you want the "core Java SE" way, then I believe wsimport is still it in Java SE 8.

And yes, essentially anything that does remote computation is almost unavoidably going to show a remote-proxy pattern. Even if it's just conceptual (which one could argue it always is if you have heterogeneous languages on the two ends) it's still almost surely a proxy. The exception might be when using raw HTTP (a la REST stuff), since the behaviors you import are often just a small subset of the exposed behaviors, and maybe that "breaks the pattern". I think one is unlikely to care though

HTH
Simon
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!