• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic