Skip to main content

How to use "@WebServiceRefs" in Servlet?

1 reply [Last post]
corba
Offline
Joined: 2007-12-01
Points: 0

I want to use JAVAEE Annotation @WebServiceRefs to call multiple Webservices in one Servlet class. These Webservices are with different WSDL locations. According to the javadoc i have written the following Codes:

@WebServiceRefs({
//service1
@WebServiceRef(wsdlLocation = "http://xxx?wsdl"),
//service2
@WebServiceRef(wsdlLocation = "http://xxx?wsdl")
})

public class ....extends HttpServlet{

....
port1 = service1.getxxxPort();
port2 = service2.getxxxPort()
}

I have already used different services and getPorts to initialize the different webservices in this class. But the services can not find the relevant webserviceref. With only one webserviceref inside the class it runs ok.

Could anybody tell me how to use webservicerefs correctly? or any other ways to call multiple webservices from one client?

Message was edited by: corba

Message was edited by: corba

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bhaktimehta
Offline
Joined: 2004-03-18
Points: 0

I posted a tip on how to use it http://blogs.sun.com/enterprisetechtips/entry/referencing_multiple_web_s...
Regards,
Bhakti