This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Procedure-style Web Services Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Procedure-style Web Services " Watch "Procedure-style Web Services " New topic
Author

Procedure-style Web Services

Vic Pezzolla
Greenhorn

Joined: Nov 08, 2009
Posts: 9
Hello,

I think that I understand document/rpc style web services.

Now, I came across procedure-style web services that return java objects.

How would I make a document/rpc web service procedure-style using annotations?

Am I mixing different concepts?

Thanks
Vic
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
RPC stands for Remote Procedure Call, so a RPC web service is usually procedure-oriented.
Personally I have only come across Document and RPC style web services, can you please provide an example of what you refer to as "procedure-style" web service?

For a description of RPC and Document style web services, please refer to section 2.1 of my SCDJWS study notes.

If you are doing Java-first development of a web service, you can use the @SOAPBinding annotation to specify the style of the web service, like in this example:

Best wishes!
Vic Pezzolla
Greenhorn

Joined: Nov 08, 2009
Posts: 9
Thanks for the quick response.

I'm referring to the Procedure-style referenced in section 12.1 (Procedure or Document Style) of your SCDJWS study notes.

It talks about the reasons to use Procedure-style and Document-style web services.

How would I select one style over the other using annotations?

Vic
G Mannerheim
Greenhorn

Joined: Feb 15, 2010
Posts: 3
Vic Pezzolla wrote:Thanks for the quick response.

I'm referring to the Procedure-style referenced in section 12.1 (Procedure or Document Style) of your SCDJWS study notes.

It talks about the reasons to use Procedure-style and Document-style web services.

How would I select one style over the other using annotations?

Vic


I think "procedure-style" and "RPC-style" are interchangeable. As Ivan stated, RPC stands for Remote Procedure Call, so perhaps "Procedure-style" is just short-hand for RPC. Ivan, please correct me if I'm wrong.
Vic Pezzolla
Greenhorn

Joined: Nov 08, 2009
Posts: 9
I didn't get the java objects back with the web service defined as:

style = Style.RPC
use = Use.Literal
ParameterStyle = ParameterStyle.WRAPPED

Perhaps, its the Use.Encoded that returns the java objects described in Procedure-Style.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Hehe, so "procedure style" web services appears in my own document. Well, I guess it was too long since I wrote that section.
Actually, if you look at the syllabus for 12.1 it says:
Given a scenario, design Web Service applications using information models that are either procedure-style or document-style.

Thus I have been a little sloppy and started talking about "procedure-style web services", when it about the information model.
Thanks to Mannerheim for pointing out that RPC and "procedure style" are interchangeable.

Vic, if you have problems with a web service, please post some code and I will have a look.
You should not use Use.Encoded, as this is the RPC encoding, which is not allowed by the WS-I Basic Profile.
Best wishes!
Vic Pezzolla
Greenhorn

Joined: Nov 08, 2009
Posts: 9
Thank you both for replying back. Its clarified the issue.

I can return a Java Object in an XML payload using either RPC or Document Style.

I just got confused thinking their was a Procedure-Style concept that was different.
 
 
subject: Procedure-style Web Services