Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Overloaded operations

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I started to build my web service using the document/literal wrapped pattern but I realised that this was not a good choice for me after I tried to add an overloaded method (I found this excellent page that explains the different wsdl styles Which style of WSDL should I use?).

I was thinking to use the document/literal non-wrapped style but wsimport is not happy because it seems to encourage the use of WS-I Basic profile wich disallows the use of miltiple children in the body element.
When trying to execute wsimport I recieve the following output: "[WARNING] Ingoring operation "myOperation": more than one part bound to body".

Does someone knows how to deal with overloaded operations while being WS-I Basic profile compliant ?

Thank you for any ideas :-)
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Esteban Puertas:
Does someone knows how to deal with overloaded operations while being WS-I Basic profile compliant ?



As the article you reference points out WSDL 2.0 disallows overloaded operations completely - so forget about overloading your web operations. If you do Java-to-WSDL on overloaded methods the code generation will have to create mangled names for the operations (RPC/literal) or document type (document/literal) in the WSDL.

According to XML schema each type (and ultimately document) can only have one definition - so overloading makes no sense for document/literal - wrapped or not - and if you are thinking of using the XML schema union element - don't; it will just create grief for your clients.

SOA in Practice: The Art of Distributed System Design (p44):

Based on my own experience (and others), I recommend that you have a basic set of fundamental types that you can compose to other types (structures, records) and sequences (arrays). Be careful with enumerations (an anachronism from the time when each byte did count - use strings instead), inheritance and polymorphism (even when XML supports it).



And whenever you feel the urge to force OO (or RPC) concepts onto XML data remind yourself about the object-hierarchical impedance mismatch (See also contract first).
[ March 31, 2008: Message edited by: Peer Reynders ]
 
They worship nothing. They say it's because nothing lasts forever. Like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic