• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Rajani Gummadi
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • 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 ?
 
Mikalai Zaikin
Ranch Hand
Posts: 3365
11
  • Mark post as helpful
  • send pies
  • 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
    • 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
    Ranch Hand
    Posts: 3365
    11
    • Mark post as helpful
    • send pies
    • 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.
     
    Dan Drillich
    Ranch Hand
    Posts: 1183
    • Mark post as helpful
    • send pies
    • 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
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic