• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Service.getPort(Class)

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If we have more than one bindings ( document/literal and RPC/literal) for a single portType.

Then by using the method Service.getPort(Class), is it possible to get a stub that is for a particular message/mode. And if yes where we keep that mapping.

also, what is the use of <port-comonent-ref> element. Is this useful only when the J2EE web service is deployed in the same J2EE application.
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This material is only relevant if you are accessing a web service through a dynamic proxy (RMH p338), rather than a static stub or DII.

With a dynamic proxy there is no <service-interface> inside <service-ref> (dynamic proxies implement javax.xml.rpc.Service) which would also define the endpoint interface - so <service-endpoint-interface> is defined inside <port-component-ref> for dynamic proxies. If your application accesses multiple web service endpoints then the endpoint interface is the only distinguishing feature between them - so when you use java.rmi.Remote javax.xml.rpc.Service.getPort(Class) you have to specify the interface to be implemented which in turn identifies the web service endpoint.
 
That new kid is a freak. Show him this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic