• 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

How to find Document style or RPC from SOAP

Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In SOAP message, I believe its not possible to mention whether its a Document style or RPC..

Is it Possible to figure out whether it is a Document style or RPC style of messaging only by looking at the SOAP message?
Ranch Hand
Posts: 2198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a document style SOAP message that follows the WS-I Basic Profile, the SOAP body may only contain one XML fragment.
This XML fragment can be validated in its entirety, which means that the root element of the fragment belongs to some namespace.
With RPC style, the root element will be an element which corresponds to the name of the operation invoked and parameters to the operation, which are sub-elements of the root element, will thus be inside this element.
The root element in an RPC request is not described in the WSDL and need thus not belong to the same namespace as the parameters to the RPC operation.
So, at least in theory, it should be possible to tell the difference between a Document style and a RPC style SOAP message by looking at the namespace of the root element of the payload of the SOAP message.
Hope this helps and that I got this message right, writing it in a hurry!
There is no greater crime than stealing somebody's best friend. I miss you tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic