Group,
I've been banging my head for two days on a replacement for a PHP web service. The current service posts data from a Java web server and the PHP takes the string, parses the xml, builds the xml response, and sends it back. I'm trying to do it with the (highly recommended) CXF library, Java 1.5, and tomcat. I have looked at the users guide, but I kept getting tripped up on the fact that I'm using Tomcat and the examples are not for tomcat. Instead, I implemented a service using this tutorial http://www.benmccann.com/dev-blog/web-services-tutorial-with-apache-cxf/ only to realize that now (think) I've got a soap-based web service, not a RESTful one. I have a couple questions: 1. What is the best way to do this replacement? If there is a good, simple example that includes setting it up for tomcat I'd appreciate it. 2. When I post to the web service wget --post-data="<searchQuery xmlns='http://xml.envysion.com'>copl</searchQuery>" --no-check-certificate http://localhost/video-copy-agent/services/VideoCopyServiceAddress/copyR equest I get back ERROR 500: Internal Server Error. And the logs say org.apache.cxf.binding.soap.SoapFault: "http://xml.envysion.com", the namespace on the "searchQuery" element, is not a valid SOAP version. I can change the request to include a name space, but can't I get around it? I don't really need it. 3. Does this look like the right idea: csf.xml : ... <jaxws:endpoint id="videoCopyService" implementor="com.envysion.nakika.videocopy.service.impl.VideoCopyAgentSe rviceImpl" address="/VideoCopyServiceAddress"/> ... VideoCopyAgentServiceImpl.java ... @WebService(endpointInterface = "com.envysion.nakika.videocopy.service.VideoCopyAgentService", serviceName = "publicVideoCopyAgentService") public class VideoCopyAgentServiceImpl implements VideoCopyAgentService { ... public String copyRequest(String searchQuery) { } } VideoCopyAgentService.java ... @WebService(targetNamespace = "http://xml.envysion.com") public interface VideoCopyAgentService { ... public String copyRequest(@WebParam(name="searchQuery") String searchQuery); }
