I made wsdl file in Eclipse using WSDL Editor. I made server using CXF (maven plugin way). There is simple function getCities() which I sucessfully called from C#. However I am not able to call it from Java client.
@WebResult(name = "out", targetNamespace = "")
@RequestWrapper(localName = "getCities", targetNamespace = "http://www.example.org/BookingServer/", className = "org.example.bookingserver.GetCities")
@ResponseWrapper(localName = "getCitiesResponse", targetNamespace = "http://www.example.org/BookingServer/", className = "org.example.bookingserver.GetCitiesResponse")
@WebMethod(action = "http://www.example.org/BookingServer/getCities")
public java.util.List<org.example.bookingserver.Cities> getCities();
This is way how I call that service (again using Apache-cxf):
QName SERVICE_NAME = new QName("http://www.example.org/BookingServer/", "BookingServer");
URL wsdlURL = BookingServer_Service.WSDL_LOCATION;
BookingServer_Service ss = new BookingServer_Service(wsdlURL, SERVICE_NAME);
BookingServer port = ss.getBookingServerSOAP();
java.util.List<org.example.bookingserver.Cities> result = port.getCities();
But I get javax.ejb.EJBException ... Caused by: com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code 200: OK
I couldnt google anything relevant to this exception.
I tried also using NetBeans webservice client GUI but the exception was same. When I put breakpoint in the server it never breaks. So the problem is in the client.
Anyone knows what am I doing wrong?
I had to change soap:address and then the main problem was that I overwrote @WebService annotation of interface generated by CXF by @WebService annotation generated for Webservice when using GUI Wizard. Therefore the location of webservice was different.