I tried to marshall one of these JAXB generated beans and it worked...
The issue does not look to be on the JAXB side.


Maybe there is a difference in the libs used when generating the classes and 
the ones used when creating the Service?

Another solution would be to have wsdl2java generate beans with "content" 
instead of using this mixedExtension that seems to be the issue....

Any idea?


-----Message d'origine-----
De : Daniel Kulp [mailto:[email protected]] 
Envoyé : lundi 7 février 2011 17:33
À : [email protected]
Cc : MARTELLI Julien
Objet : Re: IllegalStateException - start tag has already been written

On Monday 07 February 2011 5:37:33 am MARTELLI Julien wrote:
> I just tried something, and there is something new.
> 
> I changed my binding file, I deleted the generateMixedExtensions option.
> This involves having my classes generated without any XmlMixed annotation.
> It works, my client is correctly deployed.
> 
> But this not solve my problem because I need to have this extension
> activated in order to add some data to my XML when calling the service.
> 
> Any clue?

If you just take the generated JAXB beans, create a context and marshaller, 
and then call marshal with an XMLStreamReader (also try just an outputstream), 
does the problem also manifest itself?   If so, it would definitely be a JAXB 
issue and a bug would need to be logged there.

Dan


> 
> 
> -----Message d'origine-----
> De : MARTELLI Julien [mailto:[email protected]]
> Envoyé : lundi 7 février 2011 11:18
> À : [email protected]
> Objet : IllegalStateException - start tag has already been written
> 
> Hi everyone,
> 
> To develop a Web Service client I generate the classes from the WSDL file
> using the cxf-codegen-plugin. This generation works fine, to customize it
> I use a xjc binding file :
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <bindings version="2.0" xmlns="http://java.sun.com/xml/ns/jaxb";
> xmlns:xs="http://www.w3.org/2001/XMLSchema";
> xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";
> extensionBindingPrefixes="xjc"> <globalBindings
> generateMixedExtensions="true">
>                                <serializable />
>                 </globalBindings>
> </bindings>
> 
> 
> But when I build the PortType in my client code I get the following
> exception :
> 
> IllegalStateException  start tag has already been written
> 
> 
> I found this post
> (http://osdir.com/ml/users-servicemix.apache.org/2010-08/msg00077.html)
> that looks like the same issue but there is no solution...
> 
> I use cxf 2.2.10.
> 
> Do you guys have any clue ?
> 
> Thanks,
> j.

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to