• 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

How to determine if it is Document style or RPC looking at SOAP request ?

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have my class defined as



For this the SOAP request and SOAP Response taken from Glassfish testing facility is as follows


I repeated the test by changing the style to RPC in @SOAPBinding annotation and the when I looked into SOAP request and response, they look exactly the same as above.

In such case, is it actually possible to determine the style being used by looking solely at SOAP request/response. I have this question as I actually saw a similar question in one of the mock tests.

How to determine, if a SOAP request and response belongs to RPC or Document style, when WSDL or @SOAPBinding annotation is not given in a question ?
 
Bartender
Posts: 3908
43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
  • The document-wrapped adds one "wrapper" element around parameters (so request looks like valid XML and can be valiadted against schemas). RPC-style also has operation name as parent element (i.e. wrapping element) for method parameters elements. So, you won't notice any difference looking at SOAP request for document-wrapped and RPC style web service.
  • You can notice difference if you compare RPS style with bare document style. In this case document style won't have operation name in SOAP message.
  • You can find out difference between document-wrapped and RPC by looking at WSDL

  •  
    Rajani Gummadi
    Ranch Hand
    Posts: 48
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Mikalai Zaikin wrote:


  • [list]You can notice difference if you compare RPS style with bare document style. In this case document style won't have operation name in SOAP message.



  • Thanks Mikalai,

    What is RPS style. Is this same as RPC. For testing this RPS with Bare, I need to have only one parameter for the method call. Am I right?
     
    Mikalai Zaikin
    Bartender
    Posts: 3908
    43
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Rajani Gummadi wrote:

    Mikalai Zaikin wrote:


  • [list]You can notice difference if you compare RPS style with bare document style. In this case document style won't have operation name in SOAP message.



  • Thanks Mikalai,

    What is RPS style. Is this same as RPC. For testing this RPS with Bare, I need to have only one parameter for the method call. Am I right?



    Your assumption is correct - RPC (I mistyped).
    Method for PRC web service may have as many parameters as required, not only one.
     
    Ranch Hand
    Posts: 1183
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Looking at Which style of WSDL should I use?, you can see, as Mikalai pointed out to, that your SOAP request is either RPC/literal or Document/literal wrapped.

    Regards,
    Dan
     
    Oh the stink of it! Smell my tiny ad!
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic