Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • 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

to Richard--Question about Listing 15-47 and 15-48 in RMH book

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Listing 15-47:
...
<message name="fooRequest">
<part name="book" type="mh:Book"/>
</message>
<message name="fooResponse">
<part name="book" type="mh:Book"/>
</message>
<portType name="FooBar">
<operation name="foo">
<input message="mh:fooRequest"/>
<output message="mh:fooResponse"/>
</operation>
</portType>

Listing 15-48:
public interface FooBar extends java.rmi.Remote{
public void foo(BookHolder book) throws java.rmi.RemoteException;
}

My Question:
Because there is <output..>, shouldn't the foo method return "Book" type instead of "void"?
Thanks,
Nancy
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The top of page 465 contains your answer. Both fooRequest and fooResponse have a part with the name "book". Since book is declared by both the input and output message it is a INOUT parameter and requires a holder. If fooResponse part on the other hand had a different name (such as "book2") then I believe that the generated interface would of had a return value of type Book and an input parameter of type Book. I hope this helps. Be sure to read section 15.3.4.2.

-russ
 
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic