Hello folks,

currently I'm trying to setup a restful web service using cxf and spring.
The service itself is working smoothly, but the client is only working
for methods with 1 argument.

Here come's the interesting stuff:

@WebService
public interface ITestService {
                 @Get @HttpResource(location="/two/{first}/{second}")
                 String two(@WebParam(name = "first") String name,
                                    @WebParam(name = "second") String 
name2) throws Exception;


}


<jaxws:endpoint implementor="com.ibm.ors.services.test.TestService"
                 address="http://localhost:8090/test";
                 bindingUri="http://apache.org/cxf/binding/http";>
                 <jaxws:serviceFactory>
                                 <bean 
class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" />
                 </jaxws:serviceFactory>
</jaxws:endpoint>



JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(ITestService.class);
factory.setBindingId(HttpBindingFactory.HTTP_BINDING_ID); 
factory.setAddress("http://localhost:8090/test/";);
ITestService client = (ITestService) factory.create();
System.out.println(client.two("1", "2"));


org.apache.cxf.binding.xml.XMLFault: Invalid URL/Verb combination. Verb: 
GET Path: /two/
                 at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:142)
                 at $Proxy18.two(Unknown Source)
                 at 
com.ibm.ors.test.RestClientTest.runClient(RestClientTest.java:46)
                 at 
com.ibm.ors.test.RestClientTest.main(RestClientTest.java:21)
Throwable thrown: Invalid URL/Verb combination. Verb: GET Path: /two/

Invoking two(...) directly using the url is working just fine.
I guess (hope) somebody is using a method with more than one argument ...

mit freundlichen Grüßen | kind regards

Erik Nijkamp 




Erik Nijkamp
Business Computing
Mobile: +49-(0)160 2153796
Kst: 6807 | GBS: 10178-80 

IBM Ausbildung Berlin
Karl-Liebknecht-Straße 29
D-10178 Berlin
University Education Berlin / IBM Germany 
Human Resources, IBM Sales & Distribution 

IBM Deutschland GmbH
Vorsitzender des Aufsichtsrats: Hans Ulrich Maerki
Geschäftsführung: Martin Jetter (Vorsitzender), Rudolf Bauer, Christian 
Diedrich,
Christoph Grandpierre, Matthias Hartmann, Andreas Kerstan
Sitz der Gesellschaft: Stuttgart
Registergericht: Amtsgericht Stuttgart, HRB 14562
WEEE-Reg.-Nr. DE 99369940 


Reply via email to