This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Service.getPort(Class) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Service.getPort(Class)" Watch "Service.getPort(Class)" New topic
Author

Service.getPort(Class)

vikas jain
Ranch Hand

Joined: Apr 21, 2006
Posts: 37
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.
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2921
    
    5
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Service.getPort(Class)
 
Similar Threads
The .class property
boundry classes
Garbage collection..
JAX-RPC clients
class primitive