cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcs <tah...@hotmail.com>
Subject Re: XML elements does not belong to the namespace
Date Mon, 10 Dec 2007 17:40:23 GMT

I found the JIRA issue related to my problem:
https://issues.apache.org/jira/browse/CXF-897

I'm trying to follow the workarounds listed in the bug report.

a)  I tried workaround #4, (i.e. renamed the argument in the implementation
class on the server to 'arg0') but unfortunately that didn't help. Is there
anything else that needs to be done besides renaming the argument.

b)  I'd like to try workaround #1 (Have the client use the WSDL generated
from the servers ?wsdl call. Would need to set the wsdl url, the service
name, port name, etc...), but am not sure where to set these properties on
the client.  

I currently do the following on the client:

    	ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
    	factory.setServiceClass(DemoServiceIFace.class);
    	factory.setAddress(webServiceUrl); 
    	DemoServiceIFace demoService = (DemoServiceIFace) factory.create();    	
        demoService.getObjectById(new BigDecimal("5530916"));

Where do I set those properties?

thanks,






tcs wrote:
> 
> I created a spring CXF web service and deployed it on tomcat.  
> 
> I wrote a web service client (using jdk 1.4) using the
> ClientFactoryProxyBean.  When I execute a web service method from the
> client, I see that the parameter to the method argument is null on the
> server even though the client sent it in the request.  
> 
> But upon closer look, I noticed that the element name for the method
> argument in the request SOAP message is incorrect.  
> 
> The message sent to the server is:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body><ns1:getObjecttById
> xmlns:ns1="http://demo.webservice/"><arg0>5530916</arg0></ns1:getActByPid></soap:Body></soap:Envelope>
> 
> 
> It really should be (notice that arg0 should be namespaced 'id'):
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body><ns1:getObjecttById xmlns:ns1="http://demo.webservice/"><ns2:id
> xmlns:ns2="http://model.webservice/">5530916</ns2:id></ns1:getObjectById></soap:Body></soap:Envelope>
> 
> How can I either
> 1. make the server understand the argument correctly
> 2. send the right XML from the client so that its understood by the
> server.
> 
> thanks,
> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/XML-elements-does-not-belong-to-the-namespace-tp14247019p14257475.html
Sent from the cxf-user mailing list archive at Nabble.com.


Mime
View raw message