-
1. Re: Trying a very simple WebService
peterj Jun 9, 2010 6:25 PM (in response to breako)Use this URL: http://localhost:8080/jbossws/
That brings up a page that gives you link to get to the various deployed web services. Each of those will have a link for the wsdl. Beats trying to figure out the context and path by hand.
-
2. Re: Trying a very simple WebService
breako Jun 10, 2010 3:33 PM (in response to peterj)That is absolutely class. Thank you my friend.
-
3. Re: Trying a very simple WebService
breako Jun 10, 2010 6:14 PM (in response to breako)If I may follow up on this - it is beginners corner after all :-)
I am trying to write the simpliest possible standalone to invoke this service. I try:
@WebServiceClient(name="TravelAgentWSBeanService",
targetNamespace="http://travelagent.titan.com",
wsdlLocation="http://127.0.0.1:8080/TitanEJBProject/TravelAgentWSBean?wsdl")
public class JAXWSClient extends Service{
public JAXWSClient() throws Exception{
super(new URL("http://127.0.0.1:8080/TitanEJBProject/TravelAgentWSBean?wsdl"),
new QName("http://travelagent.titan.com/", "TravelAgentWSBeanService"));
}
public static void main(String args[]) throws Exception {
JAXWSClient jaxWSClient = new JAXWSClient();
TravelAgentWSBean wsBean = jaxWSClient.getTravelAgentWSBeanPort();
wsBean.makeReservation(0, 0, 0, 0d);
}
@WebEndpoint(name = "TravelAgentWSBeanPort")
public TravelAgentWSBean getTravelAgentWSBeanPort() {
return super.getPort(new QName("http://travelagent.titan.com/", "TravelAgentWSBeanPort"), TravelAgentWSBean.class);
}}
whenI run I get:
Exception in thread "main" java.lang.IllegalArgumentException: com.titan.travelagent.TravelAgentWSBean is not an interface
at java.lang.reflect.Proxy.getProxyClass(Unknown Source)
at java.lang.reflect.Proxy.newProxyInstance(Unknown Source)Do I have to use wsimport on the wsdl and generate some proxy classes?
-
4. Re: Trying a very simple WebService
peterj Jun 12, 2010 5:32 PM (in response to breako)>>Do I have to use wsimport on the wsdl and generate some proxy classes?
That is what I always do.