• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

ParameterStyle.WRAPPED vs ParameterStyle.BARE

 
Ranch Foreman
Posts: 1903
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone explain to me the difference between ParameterStyle.WRAPPED vs ParameterStyle.RPC in this case ?
The SOAP request is the same in both cases.


vs
 
Ranch Hand
Posts: 38
Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Himai Minh wrote:Can someone explain to me the difference between ParameterStyle.WRAPPED vs ParameterStyle.RPC in this case ?]



You mean ParameterStyle.WRAPPED vs ParameterStyle.BARE?
 
Himai Minh
Ranch Foreman
Posts: 1903
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From MZ's notes, I used the example and create three cases:
Case 1:


Case 2:


Case 3:
 
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

//Why rpc/wrapped generated the same SOAP as doc/wrapped ?



It is because we have asked it to do so.
Using Parameter style as WRAPPED has wrapped parameter with operation name tag.

Normally in text books, we show Parameter Style as WRAPPED or BARE with Document type only.
document/literal wrapped combination is same as document/literal, but wraps the contents of the body in an element with the same name as
the web service method (just like RPC-style messages). This is what web services implemented in Java use by default.

Point to understand that RPC binding can also have WRAPPED parameter style. Infact, WRAPPED parameter is the default and only allowed
parameter style that we can use with RPC. Parameter style BARE is not allowed with RPC. That's way, in text books, RPC style is not shown associated to WRAPPED style.

For example -


We get error as




There are 3 attribute that you can specify with SOAPBinding.
a. style - this attribute defines the binding type - RPC or Document
b. use - Specifies how the data of the SOAP message is streamed and recognised/validated. For example- Literal means that the SOAP body follows an XML schema
, which is included in the web service's WSDL document. As long as the client has access to the WSDL, it knows exactly how each message is formatted.
This paramter can be LITERAL or ENCODED.
c. parameterStyle - Specifies how the method parameters, which correspond to message parts in a WSDL contract, are placed into the SOAP message body.
A parameter style of BARE means that each parameter is placed into the message body as a child element of the message root.
A parameter style of WRAPPED means that all of the input parameters are wrapped into a single element on a request message and that all of
the output parameters are wrapped into a single element in the response message.
 
Clowns were never meant to be THAT big! We must destroy it with this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic