You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by tcs <ta...@hotmail.com> on 2007/12/10 05:05:02 UTC

XML elements does not belong to the namespace

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-tp14247019p14247019.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: XML elements does not belong to the namespace

Posted by tcs <ta...@hotmail.com>.
Any thoughts on why the Java object fields are not set?


tcs wrote:
> 
> The fix works!   The server now returns a SOAP response for the request.  
> 
> But I do have another issue.  On the client side, based on the SOAP
> response body, the return type Java object is constructed for the invoked
> operation,  but its fields are not set. All fields of this object are null
> even though the sub-elements are present in the SOAP response body.  
> 
> thanks
> 
> 

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


SV: xs:date?

Posted by Häggkvist, Lennart <Le...@ppm.nu>.
Hi,

I found what the problem was when generating the server classes from the wsdl. 
We got two wsdl files and two xjb files. One service uses Date and the the other uses 
DateTime. The problem here is that the generated class Adapter1 is overwritten the second 
time (only one adapter is created btw) - that means that only the last xjb file is used. 
This bug is already reported in CXF-1307 - which also seems to affect 2.0.3... 
I can work around this problem by using XMLGregorianCalendar in the one of the two services.
(I tried to use the same XJB file for both services, but it didnt work because? the xjb file
has the location of the wsdl file..)


I still have a problem though - and that is how I can generate an WSDL file from an Java class
with the xs:date and not xs:dateTime directly? Can I use some form of annotation or configuration?

Thanks,
 Lennart 

-----Ursprungligt meddelande-----
Från: James Mao [mailto:james.mao@iona.com] 
Skickat: den 19 december 2007 06:36
Till: cxf-user@incubator.apache.org
Ämne: Re: xs:date?

The server is a JaxWs server, right?
Have you generate the code with the .xjb as a binding file  at the server side?

If not, please try it

James

> Hi,
>
> I have two questions regarding how to use the xs:date type (not xs:dateTime).
>
> How we can generate an wsdl file with the date type and not the dateTime? Eg. 
> in my DTO object I have just used:
> 	public Date myDate;
> But it translates into the DateTime format in the wsdl - how should I do to generate a date?
>
> If I change(hardcode) the xs:dateTime to xs:date, eg:
> 	<xs:element minOccurs="0" name="myDate" type="xs:date"/>
>
> And also add the following to the .xjb file:
>    <jxb:javaType name="java.util.Date" xmlType="xs:date"
>    		parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDate"
>             
> printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDate"/>
>
> I still get the dateTime format in the return from the server:
>    <myDate>2002-01-29T00:00:00+01:00</myDate>
>
> Have I done something wrong? Any suggestions? CXF 2.0.2 is used btw.
>
> Thanks,
>  Lennart
>
>   

Re: xs:date?

Posted by James Mao <ja...@iona.com>.
The server is a JaxWs server, right?
Have you generate the code with the .xjb as a binding file  at the 
server side?

If not, please try it

James

> Hi,
>
> I have two questions regarding how to use the xs:date type (not xs:dateTime).
>
> How we can generate an wsdl file with the date type and not the dateTime? Eg. 
> in my DTO object I have just used:
> 	public Date myDate;
> But it translates into the DateTime format in the wsdl - how should I do to generate a date?
>
> If I change(hardcode) the xs:dateTime to xs:date, eg:
> 	<xs:element minOccurs="0" name="myDate" type="xs:date"/>
>
> And also add the following to the .xjb file:
>    <jxb:javaType name="java.util.Date" xmlType="xs:date"
>    		parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDate"
>             printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDate"/>
>
> I still get the dateTime format in the return from the server:
>    <myDate>2002-01-29T00:00:00+01:00</myDate>  
>
> Have I done something wrong? Any suggestions? CXF 2.0.2 is used btw.
>
> Thanks,
>  Lennart
>
>   

xs:date?

Posted by Häggkvist, Lennart <Le...@ppm.nu>.
Hi,

I have two questions regarding how to use the xs:date type (not xs:dateTime).

How we can generate an wsdl file with the date type and not the dateTime? Eg. 
in my DTO object I have just used:
	public Date myDate;
But it translates into the DateTime format in the wsdl - how should I do to generate a date?

If I change(hardcode) the xs:dateTime to xs:date, eg:
	<xs:element minOccurs="0" name="myDate" type="xs:date"/>

And also add the following to the .xjb file:
   <jxb:javaType name="java.util.Date" xmlType="xs:date"
   		parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDate"
            printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDate"/>

I still get the dateTime format in the return from the server:
   <myDate>2002-01-29T00:00:00+01:00</myDate>  

Have I done something wrong? Any suggestions? CXF 2.0.2 is used btw.

Thanks,
 Lennart

Re: XML elements does not belong to the namespace

Posted by tcs <ta...@hotmail.com>.
The fix works!   The server now returns a SOAP response for the request.  

But I do have another issue.  On the client side, based on the SOAP response
body, the return type Java object is constructed for the invoked operation, 
but its fields are not set. All fields of this object are null even though
the sub-elements are present in the SOAP response body.  

thanks


The client is able to receive the response marshalled as 


dkulp wrote:
> 
> 
> 1) the endpoint interface - this is pretty much never going to work with 
> the simple frontend client without writing some custom subclass of 
> AbstractServiceConfiguration to map the arg0 names to the real names.   
> I wouldn't bother pursuing this one.
> 
> 2) That error just means you specified the wrong qname for something.  
> The StartClient.java you sent has:
> 
> QName END_POINT_NAME = new 
> QName("http://service.webservice", "ActServiceEndPoint");
> 
> However, the port name in the wsdl you sent is:
> ActServicePortBinding
> 
> 
> Dan
> 
> 
> 
> On Friday 14 December 2007, tcs wrote:
>> I tried the 2.0.4 SNAPSHOT version with the SampleWebService server
>> and client code that I sent to you.
>>
>> I replaced the older 'cxf-2.0.3-incubator.jar' in my web-service and
>> web-service client classpath with the updated
>> 'cxf-2.0.4-incubator-SNAPSHOT.jar'
>>
>> I deployed my webservice on tomcat.  The behaviour is the same as the
>> older version of CXF.
>>
>> I tested the client by building the ClientProxyFactoryBean using:
>>
>> 1) the endpoint interface
>> The marshalled SOAP request contained the 'arg0' element which were
>> not understood by the server.   The  server returned a fault.
>>
>> Exception in thread "main" org.apache.cxf.binding.soap.SoapFault:
>> webservice.service.InvalidArgumentException: getActByPid(), method
>> parameter 'theActPid' cannot be null
>> 	at
>> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handl
>>eMessage(Soap11FaultInInterceptor.java:70) at
>> ...
>>
>> 2) the server WSDL url
>> This exception is same as before.
>>
>> Exception in thread "main"
>> org.apache.cxf.service.factory.ServiceConstructionException: Could not
>> find portType named
>> {http://service.webservice}ActServiceEndPointPortType at
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getInterfa
>>ceInfo(ReflectionServiceFactoryBean.java:442) at
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initialize
>>WSDLOperations(ReflectionServiceFactoryBean.java:450) at
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServi
>>ceFromWSDL(ReflectionServiceFactoryBean.java:274) at
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initialize
>>ServiceModel(ReflectionServiceFactoryBean.java:360) at
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Ref
>>lectionServiceFactoryBean.java:156) at
>> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoin
>>t(AbstractWSDLBasedEndpointFactory.java:74) at
>> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.jav
>>a:51) at
>> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFacto
>>ryBean.java:92) at
>> client.StartClient.useServerWsdl(StartClient.java:74)
>> 	at client.StartClient.main(StartClient.java:25)
>>
>> dkulp wrote:
>> > I'm deploying a new 2.0.4 snapshot now that SHOULD fix it.  (I'd
>> > appreciate it if that could be verified)   We'll probably shoot for
>> > a 2.0.4 release mid January sometime.
>> >
>> > Dan
>> >
>> > On Thursday 13 December 2007, tcs wrote:
>> >> Thanks very much for looking into this.
>> >>
>> >> I'm working on fixing this now, but it's definitely a fairly large
>> >> change Any ideas as to when this will be working?
>> >>
>> >> Knowing when this feature would be available will be me plan my
>> >> projects.
>> >>
>> >> thanks!
>> >
>> > --
>> > J. Daniel Kulp
>> > Principal Engineer
>> > IONA
>> > P: 781-902-8727    C: 508-380-7194
>> > daniel.kulp@iona.com
>> > http://www.dankulp.com/blog
> 
> 
> 
> -- 
> J. Daniel Kulp
> Principal Engineer, IONA
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

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


Re: XML elements does not belong to the namespace

Posted by Daniel Kulp <dk...@apache.org>.
1) the endpoint interface - this is pretty much never going to work with 
the simple frontend client without writing some custom subclass of 
AbstractServiceConfiguration to map the arg0 names to the real names.   
I wouldn't bother pursuing this one.

2) That error just means you specified the wrong qname for something.  
The StartClient.java you sent has:

QName END_POINT_NAME = new 
QName("http://service.webservice", "ActServiceEndPoint");

However, the port name in the wsdl you sent is:
ActServicePortBinding


Dan



On Friday 14 December 2007, tcs wrote:
> I tried the 2.0.4 SNAPSHOT version with the SampleWebService server
> and client code that I sent to you.
>
> I replaced the older 'cxf-2.0.3-incubator.jar' in my web-service and
> web-service client classpath with the updated
> 'cxf-2.0.4-incubator-SNAPSHOT.jar'
>
> I deployed my webservice on tomcat.  The behaviour is the same as the
> older version of CXF.
>
> I tested the client by building the ClientProxyFactoryBean using:
>
> 1) the endpoint interface
> The marshalled SOAP request contained the 'arg0' element which were
> not understood by the server.   The  server returned a fault.
>
> Exception in thread "main" org.apache.cxf.binding.soap.SoapFault:
> webservice.service.InvalidArgumentException: getActByPid(), method
> parameter 'theActPid' cannot be null
> 	at
> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handl
>eMessage(Soap11FaultInInterceptor.java:70) at
> ...
>
> 2) the server WSDL url
> This exception is same as before.
>
> Exception in thread "main"
> org.apache.cxf.service.factory.ServiceConstructionException: Could not
> find portType named
> {http://service.webservice}ActServiceEndPointPortType at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getInterfa
>ceInfo(ReflectionServiceFactoryBean.java:442) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initialize
>WSDLOperations(ReflectionServiceFactoryBean.java:450) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServi
>ceFromWSDL(ReflectionServiceFactoryBean.java:274) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initialize
>ServiceModel(ReflectionServiceFactoryBean.java:360) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Ref
>lectionServiceFactoryBean.java:156) at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoin
>t(AbstractWSDLBasedEndpointFactory.java:74) at
> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.jav
>a:51) at
> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFacto
>ryBean.java:92) at
> client.StartClient.useServerWsdl(StartClient.java:74)
> 	at client.StartClient.main(StartClient.java:25)
>
> dkulp wrote:
> > I'm deploying a new 2.0.4 snapshot now that SHOULD fix it.  (I'd
> > appreciate it if that could be verified)   We'll probably shoot for
> > a 2.0.4 release mid January sometime.
> >
> > Dan
> >
> > On Thursday 13 December 2007, tcs wrote:
> >> Thanks very much for looking into this.
> >>
> >> I'm working on fixing this now, but it's definitely a fairly large
> >> change Any ideas as to when this will be working?
> >>
> >> Knowing when this feature would be available will be me plan my
> >> projects.
> >>
> >> thanks!
> >
> > --
> > J. Daniel Kulp
> > Principal Engineer
> > IONA
> > P: 781-902-8727    C: 508-380-7194
> > daniel.kulp@iona.com
> > http://www.dankulp.com/blog



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog

Re: XML elements does not belong to the namespace

Posted by tcs <ta...@hotmail.com>.
I tried the 2.0.4 SNAPSHOT version with the SampleWebService server and
client code that I sent to you.  

I replaced the older 'cxf-2.0.3-incubator.jar' in my web-service and
web-service client classpath with the updated
'cxf-2.0.4-incubator-SNAPSHOT.jar'

I deployed my webservice on tomcat.  The behaviour is the same as the older
version of CXF.

I tested the client by building the ClientProxyFactoryBean using:

1) the endpoint interface
The marshalled SOAP request contained the 'arg0' element which were not
understood by the server.   The  server returned a fault.

Exception in thread "main" org.apache.cxf.binding.soap.SoapFault:
webservice.service.InvalidArgumentException: getActByPid(), method parameter
'theActPid' cannot be null
	at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:70)
	at 
...

2) the server WSDL url
This exception is same as before.

Exception in thread "main"
org.apache.cxf.service.factory.ServiceConstructionException: Could not find
portType named {http://service.webservice}ActServiceEndPointPortType
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getInterfaceInfo(ReflectionServiceFactoryBean.java:442)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSDLOperations(ReflectionServiceFactoryBean.java:450)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:274)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:360)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:156)
	at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:74)
	at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:51)
	at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:92)
	at client.StartClient.useServerWsdl(StartClient.java:74)
	at client.StartClient.main(StartClient.java:25)
 


dkulp wrote:
> 
> 
> I'm deploying a new 2.0.4 snapshot now that SHOULD fix it.  (I'd 
> appreciate it if that could be verified)   We'll probably shoot for a 
> 2.0.4 release mid January sometime.
> 
> Dan
> 
> On Thursday 13 December 2007, tcs wrote:
>> Thanks very much for looking into this.
>>
>> I'm working on fixing this now, but it's definitely a fairly large
>> change Any ideas as to when this will be working?
>>
>> Knowing when this feature would be available will be me plan my
>> projects.
>>
>> thanks!
> 
> 
> 
> -- 
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> daniel.kulp@iona.com
> http://www.dankulp.com/blog
> 
> 

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


Re: XML elements does not belong to the namespace

Posted by Daniel Kulp <dk...@apache.org>.
I'm deploying a new 2.0.4 snapshot now that SHOULD fix it.  (I'd 
appreciate it if that could be verified)   We'll probably shoot for a 
2.0.4 release mid January sometime.

Dan

On Thursday 13 December 2007, tcs wrote:
> Thanks very much for looking into this.
>
> I'm working on fixing this now, but it's definitely a fairly large
> change Any ideas as to when this will be working?
>
> Knowing when this feature would be available will be me plan my
> projects.
>
> thanks!



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Re: XML elements does not belong to the namespace

Posted by tcs <ta...@hotmail.com>.
Thanks very much for looking into this.

I'm working on fixing this now, but it's definitely a fairly large change
Any ideas as to when this will be working?  

Knowing when this feature would be available will be me plan my projects.

thanks!

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


Re: XML elements does not belong to the namespace

Posted by Daniel Kulp <dk...@apache.org>.
Just to give you an update.....

I got your test case fine and have it up and running.   The server side 
part seems fine to me.   It's using straight JAX-WS schemantics which 
are well tested, TCK compliant, etc.....   The soap messages match the 
schema/wsdl, etc....

The client side I'm having all kinds of issues with.   The client side 
simple frontend stuff seems to be nearly useless right now.   Without a 
WSDL, it requires all the parts be names arg0, arg1, etc... Your server 
isn't set that way.   You would need to reset the name in the @WebParam 
annotions, change your wsdl, etc...   Not fun and results in a pretty 
crappy service.

With the wsdl, the simple frontend just plain doesn't work at all.   It's 
not able to match up the operations in the wsdl with the methods on the 
interface.  None of the parameter "Class" objects is set into the 
service model so JAXB cannot know what to do.   Thus, nothing is 
invokable.    I'm working on fixing this now, but it's definitely a 
fairly large change.

My only suggestion at this point is to change the client to use the 
JAX-WS frontend and use a properly annotated interface (preferrably code 
generate the interface from the wsdl with the wsdl2java tool).   The 
simple frontend is definitely more for the server side, java first, 
development.    It's client side equivilent is definitely not working 
very well right now.

Sorry about that.  :-(

Dan


On Tuesday 11 December 2007, tcs wrote:
> I have sent the zipped source for the server and client via email.
> Please let me know if you do not receive it.
>
> thanks,
> tcs
>
> dkulp wrote:
> > Any chance you could send the wsdl?
> >
> > Also, I assume you're using CXF 2.0.3?
> >
> > Actually, if you could zip up and send me (private, off the mail
> > list to not clutter everyones inbox) the full server and client, I
> > could look into it easier.
> >
> > Thanks!
> > Dan
> >
> > On Tuesday 11 December 2007, tcs wrote:
> >> I updated my client code to do the following :
> >>
> >>         ClientProxyFactoryBean factory = new
> >> ClientProxyFactoryBean(); factory.setAddress(myServiceUrl);
> >>
> >>     	QName SERVICE_NAME = new QName("http://demo.webservice/",
> >> "DemoService");
> >>     	factory.setServiceName(SERVICE_NAME);
> >>
> >>     	QName END_POINT_NAME = new QName("http://demo.webservice/",
> >> "DemoServiceEndPoint");
> >>     	factory.setEndpointName(END_POINT_NAME);
> >>
> >>     	factory.setServiceClass(DemoServiceEndPoint.class);
> >>
> >>     	DemoService demoService = (DemoService) factory.create();
> >>         demoService.getObjectById(new BigDecimal("5530916"));
> >>
> >> The marshalled SOAP request still contains the 'arg0' element:
> >>
> >> <soap:Envelope
> >> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body>
> >>
> >> <ns1:getObjecttById xmlns:ns1="http://demo.webservice/">
> >> <arg0>5530916</arg0>
> >> </ns1:getObjectById>
> >>
> >> </soap:Body>
> >> </soap:Envelope>
> >>
> >> dkulp wrote:
> >> > The ClientProxyFactoryBean has a
> >> > setServiceName(QName serviceName)
> >> > and
> >> > setEndpointName(QName endpointName)
> >> > calls.    You would probably need to do a ?wsdl thing on the
> >> > endpoint once with your browser or similar to figure out what
> >> > they are.   Just call those methods on the factory before calling
> >> > create() and it should work for you.
> >> >
> >> > Dan
> >> >
> >> > On Monday 10 December 2007, tcs wrote:
> >> >> 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:
> >> >> >get Act ByPid></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:get
> >> >> >Obj ect ById></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,
> >> >
> >> > --
> >> > J. Daniel Kulp
> >> > Principal Engineer
> >> > IONA
> >> > P: 781-902-8727    C: 508-380-7194
> >> > daniel.kulp@iona.com
> >> > http://www.dankulp.com/blog
> >
> > --
> > J. Daniel Kulp
> > Principal Engineer
> > IONA
> > P: 781-902-8727    C: 508-380-7194
> > daniel.kulp@iona.com
> > http://www.dankulp.com/blog



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Re: XML elements does not belong to the namespace

Posted by tcs <ta...@hotmail.com>.
I have sent the zipped source for the server and client via email. Please let
me know if you do not receive it. 

thanks,
tcs


dkulp wrote:
> 
> 
> Any chance you could send the wsdl?
> 
> Also, I assume you're using CXF 2.0.3?
> 
> Actually, if you could zip up and send me (private, off the mail list to 
> not clutter everyones inbox) the full server and client, I could look 
> into it easier.
> 
> Thanks!
> Dan
> 
> 
> 
> On Tuesday 11 December 2007, tcs wrote:
>> I updated my client code to do the following :
>>
>>         ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
>>     	factory.setAddress(myServiceUrl);
>>
>>     	QName SERVICE_NAME = new QName("http://demo.webservice/",
>> "DemoService");
>>     	factory.setServiceName(SERVICE_NAME);
>>
>>     	QName END_POINT_NAME = new QName("http://demo.webservice/",
>> "DemoServiceEndPoint");
>>     	factory.setEndpointName(END_POINT_NAME);
>>
>>     	factory.setServiceClass(DemoServiceEndPoint.class);
>>
>>     	DemoService demoService = (DemoService) factory.create();
>>         demoService.getObjectById(new BigDecimal("5530916"));
>>
>> The marshalled SOAP request still contains the 'arg0' element:
>>
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>> <soap:Body>
>>
>> <ns1:getObjecttById xmlns:ns1="http://demo.webservice/">
>> <arg0>5530916</arg0>
>> </ns1:getObjectById>
>>
>> </soap:Body>
>> </soap:Envelope>
>>
>> dkulp wrote:
>> > The ClientProxyFactoryBean has a
>> > setServiceName(QName serviceName)
>> > and
>> > setEndpointName(QName endpointName)
>> > calls.    You would probably need to do a ?wsdl thing on the
>> > endpoint once with your browser or similar to figure out what they
>> > are.   Just call those methods on the factory before calling
>> > create() and it should work for you.
>> >
>> > Dan
>> >
>> > On Monday 10 December 2007, tcs wrote:
>> >> 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:get
>> >> >Act ByPid></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:getObj
>> >> >ect ById></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,
>> >
>> > --
>> > J. Daniel Kulp
>> > Principal Engineer
>> > IONA
>> > P: 781-902-8727    C: 508-380-7194
>> > daniel.kulp@iona.com
>> > http://www.dankulp.com/blog
> 
> 
> 
> -- 
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> daniel.kulp@iona.com
> http://www.dankulp.com/blog
> 
> 

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


Re: XML elements does not belong to the namespace

Posted by Daniel Kulp <dk...@apache.org>.
Any chance you could send the wsdl?

Also, I assume you're using CXF 2.0.3?

Actually, if you could zip up and send me (private, off the mail list to 
not clutter everyones inbox) the full server and client, I could look 
into it easier.

Thanks!
Dan



On Tuesday 11 December 2007, tcs wrote:
> I updated my client code to do the following :
>
>         ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
>     	factory.setAddress(myServiceUrl);
>
>     	QName SERVICE_NAME = new QName("http://demo.webservice/",
> "DemoService");
>     	factory.setServiceName(SERVICE_NAME);
>
>     	QName END_POINT_NAME = new QName("http://demo.webservice/",
> "DemoServiceEndPoint");
>     	factory.setEndpointName(END_POINT_NAME);
>
>     	factory.setServiceClass(DemoServiceEndPoint.class);
>
>     	DemoService demoService = (DemoService) factory.create();
>         demoService.getObjectById(new BigDecimal("5530916"));
>
> The marshalled SOAP request still contains the 'arg0' element:
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
>
> <ns1:getObjecttById xmlns:ns1="http://demo.webservice/">
> <arg0>5530916</arg0>
> </ns1:getObjectById>
>
> </soap:Body>
> </soap:Envelope>
>
> dkulp wrote:
> > The ClientProxyFactoryBean has a
> > setServiceName(QName serviceName)
> > and
> > setEndpointName(QName endpointName)
> > calls.    You would probably need to do a ?wsdl thing on the
> > endpoint once with your browser or similar to figure out what they
> > are.   Just call those methods on the factory before calling
> > create() and it should work for you.
> >
> > Dan
> >
> > On Monday 10 December 2007, tcs wrote:
> >> 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:get
> >> >Act ByPid></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:getObj
> >> >ect ById></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,
> >
> > --
> > J. Daniel Kulp
> > Principal Engineer
> > IONA
> > P: 781-902-8727    C: 508-380-7194
> > daniel.kulp@iona.com
> > http://www.dankulp.com/blog



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Re: XML elements does not belong to the namespace

Posted by tcs <ta...@hotmail.com>.
I updated my client code to do the following :

        ClientProxyFactoryBean factory = new ClientProxyFactoryBean();    	
    	factory.setAddress(myServiceUrl); 
    	
    	QName SERVICE_NAME = new QName("http://demo.webservice/",
"DemoService");
    	factory.setServiceName(SERVICE_NAME);
    	
    	QName END_POINT_NAME = new QName("http://demo.webservice/",
"DemoServiceEndPoint");
    	factory.setEndpointName(END_POINT_NAME);

    	factory.setServiceClass(DemoServiceEndPoint.class);
    	
    	DemoService demoService = (DemoService) factory.create();  
        demoService.getObjectById(new BigDecimal("5530916")); 

The marshalled SOAP request still contains the 'arg0' element:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>

<ns1:getObjecttById xmlns:ns1="http://demo.webservice/">
<arg0>5530916</arg0>
</ns1:getObjectById>

</soap:Body>
</soap:Envelope>



dkulp wrote:
> 
> 
> The ClientProxyFactoryBean has a 
> setServiceName(QName serviceName)
> and 
> setEndpointName(QName endpointName)
> calls.    You would probably need to do a ?wsdl thing on the endpoint 
> once with your browser or similar to figure out what they are.   Just 
> call those methods on the factory before calling create() and it should 
> work for you. 
>  
> Dan
> 
> 
> On Monday 10 December 2007, tcs wrote:
>> 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:getAct
>> >ByPid></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:getObject
>> >ById></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,
> 
> 
> 
> -- 
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> daniel.kulp@iona.com
> http://www.dankulp.com/blog
> 
> 

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


Re: XML elements does not belong to the namespace

Posted by Daniel Kulp <dk...@apache.org>.
The ClientProxyFactoryBean has a 
setServiceName(QName serviceName)
and 
setEndpointName(QName endpointName)
calls.    You would probably need to do a ?wsdl thing on the endpoint 
once with your browser or similar to figure out what they are.   Just 
call those methods on the factory before calling create() and it should 
work for you. 
 
Dan


On Monday 10 December 2007, tcs wrote:
> 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:getAct
> >ByPid></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:getObject
> >ById></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,



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Re: XML elements does not belong to the namespace

Posted by tcs <ta...@hotmail.com>.
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); // this points to the web service
url +"?wsdl"
    	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.


Re: XML elements does not belong to the namespace

Posted by tcs <ta...@hotmail.com>.
Ok.   The server side does work so the fix is good.

thanks,


Benson Margulies-4 wrote:
> 
> Hmm. The last time I communicated with Dan, he didn't (I thought) have a
> fix to the client side, only the server side.
> 
> 
> On Fri, 2007-12-21 at 12:58 -0800, tcs wrote:
>> So in response to Dan Kulp, the issue with a POJO client talking to a
>> JAXB
>> server is not fixed.
>> 
>> thanks,
>> 
>> 
>> 
>> dkulp wrote:
>> > 
>> > 
>> > I'm deploying a new 2.0.4 snapshot now that SHOULD fix it.  (I'd 
>> > appreciate it if that could be verified)   We'll probably shoot for a 
>> > 2.0.4 release mid January sometime.
>> > 
>> 
>> 
>> 
>> Benson Margulies-4 wrote:
>> > 
>> > If you are really stuck with 1.4, there's not much we can do for you.
>> > You need to really generate a client with wsdl2js or javs2js, and we
>> > can't generate one of those that is 1.4-compatible. 
>> > 
>> > On Fri, 2007-12-21 at 11:00 -0800, tcs wrote:
>> >> I'm still trying to understand if this is an error on my side or if
>> CXF
>> >> is
>> >> not doing the right thing with the Java object fields.
>> >> 
>> >> Any help will be greatly appreciated.
>> >> 
>> >> thanks,
>> > 
>> > 
>> > 
>> 
> 
> 
> 

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


Re: XML elements does not belong to the namespace

Posted by Benson Margulies <bi...@gmail.com>.
Hmm. The last time I communicated with Dan, he didn't (I thought) have a
fix to the client side, only the server side.


On Fri, 2007-12-21 at 12:58 -0800, tcs wrote:
> So in response to Dan Kulp, the issue with a POJO client talking to a JAXB
> server is not fixed.
> 
> thanks,
> 
> 
> 
> dkulp wrote:
> > 
> > 
> > I'm deploying a new 2.0.4 snapshot now that SHOULD fix it.  (I'd 
> > appreciate it if that could be verified)   We'll probably shoot for a 
> > 2.0.4 release mid January sometime.
> > 
> 
> 
> 
> Benson Margulies-4 wrote:
> > 
> > If you are really stuck with 1.4, there's not much we can do for you.
> > You need to really generate a client with wsdl2js or javs2js, and we
> > can't generate one of those that is 1.4-compatible. 
> > 
> > On Fri, 2007-12-21 at 11:00 -0800, tcs wrote:
> >> I'm still trying to understand if this is an error on my side or if CXF
> >> is
> >> not doing the right thing with the Java object fields.
> >> 
> >> Any help will be greatly appreciated.
> >> 
> >> thanks,
> > 
> > 
> > 
> 


Re: XML elements does not belong to the namespace

Posted by tcs <ta...@hotmail.com>.
So in response to Dan Kulp, the issue with a POJO client talking to a JAXB
server is not fixed.

thanks,



dkulp wrote:
> 
> 
> I'm deploying a new 2.0.4 snapshot now that SHOULD fix it.  (I'd 
> appreciate it if that could be verified)   We'll probably shoot for a 
> 2.0.4 release mid January sometime.
> 



Benson Margulies-4 wrote:
> 
> If you are really stuck with 1.4, there's not much we can do for you.
> You need to really generate a client with wsdl2js or javs2js, and we
> can't generate one of those that is 1.4-compatible. 
> 
> On Fri, 2007-12-21 at 11:00 -0800, tcs wrote:
>> I'm still trying to understand if this is an error on my side or if CXF
>> is
>> not doing the right thing with the Java object fields.
>> 
>> Any help will be greatly appreciated.
>> 
>> thanks,
> 
> 
> 

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


Re: XML elements does not belong to the namespace

Posted by Benson Margulies <bi...@gmail.com>.
If you are really stuck with 1.4, there's not much we can do for you.
You need to really generate a client with wsdl2js or javs2js, and we
can't generate one of those that is 1.4-compatible. 

On Fri, 2007-12-21 at 11:00 -0800, tcs wrote:
> I'm still trying to understand if this is an error on my side or if CXF is
> not doing the right thing with the Java object fields.
> 
> Any help will be greatly appreciated.
> 
> thanks,


Using Type attributes with complexContent/extended types

Posted by "Silberman, Nathan" <NS...@doubleclick.com>.
Has anybody had trouble with Abstract and Exteneded types and
unmarshalling? 

I have an abstract type that is being returned as part of a method
declaration. Since the abstract type is the top-level object being
returned, there is no place for CXF to specify the derived type and the
client has no way to unmarshall the SOAP message. So I have added a
***Type element that is a part of my abstract class. But CXF seems to
have problems with this:

      <complexType name="Player" abstract="true">
        <sequence>
          <element name="name" type="xsd:string" />
          <element name="playerType" type="impl:PlayerType"/>
        </sequence>
      </complexType>

      <simpleType name="PlayerType">
	  <restriction base="xsd:string">
	    <enumeration value="BasketballPlayer"/>
	    <enumeration value="SoccerPlayer"/>
	  </restriction>
      </simpleType>

      <complexType name="BasketballPlayer">
        <complexContent>
          <extension base="impl:Player">
            <sequence>
              <element name="height" type="xsd:int" />
            </sequence>
          </extension>
        </complexContent>
      </complexType>

      <complexType name="SoccerPlayer">
        <complexContent>
          <extension base="impl:Player">
            <sequence>
              <element name="number" type="xsd:int" />
            </sequence>
          </extension>
        </complexContent>
      </complexType>

I have exploded the wsdl2java and created each object but the PlayerType
reference on Player turns out a bit funny:

public abstract class Player {

    ...

    @XmlElementRef(name = "playerType", namespace = "http://...", type =
JAXBElement.class)
    protected JAXBElement<PlayerType> playerType;

Why does it result in a JAXBElement? 

Also, no ObjectFactory method is created that deals with creating a
PlayerType. Is there a specific place one should do this? 

Finally, the PlayerType is not being serialized as part of Player in the
SOAP message.

Has anybody had a similar issue?

Re: XML elements does not belong to the namespace

Posted by tcs <ta...@hotmail.com>.
I'm still trying to understand if this is an error on my side or if CXF is
not doing the right thing with the Java object fields.

Any help will be greatly appreciated.

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


Re: XML elements does not belong to the namespace

Posted by tcs <ta...@hotmail.com>.
Any thoughts?


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