xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified"

2007-11-06 Thread Monica Ferrero


Hi!

The wsdl generated from cxf has in the schema definition:
attributeFormDefault="unqualified" elementFormDefault="unqualified"
I need these to be generated as "qualified".
What do I need to do  for these to be generated as qualified? Is there any
annotation for this? Or any specific way of defining the service?
Bellow the wsdl:types from wsdl exposed at
http://localhost:8080/lmqs/ws/ListService?wsdl and my ws interface.

Thanks for your help,

Monica



http://schemas.xmlsoap.org/wsdl/"; xmlns:soap
="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:tns="http://ls.lmqs.acc.com/
" xmlns:xsd="http://www.w3.org/2001/XMLSchema"; name="LM" targetNamespace="
http://ls.lmqs.acc.com/";>
  
http://www.w3.org/2001/XMLSchema";
attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="http://ls.lmqs.acc.com/"; xmlns:tns="
http://ls.lmqs.acc.com/";>
  

  

  
  

  
  
  
  
  
  
  

  
  

  

  
  

  

  

  

  
  
  
  
  
  
  
  
  
  

  
[]



package com.acc.lmqs.ls;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;

@WebService(targetNamespace="http://ls.lmqs.acc.com/";, name = "LM")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface LM {

@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@WebMethod
@WebResult(targetNamespace = "http://ls.lmqs.acc.com/";, partName=
"newId", name="newId")
public int newL(
@WebParam(targetNamespace = "http://ls.lmqs.acc.com/";, partName=
"dsId", name="dsId")
int ds,
@WebParam(targetNamespace = "http://ls.lmqs.acc.com/";, partName=
"name", name="name")
String name,
@WebParam(targetNamespace = "http://ls.lmqs.acc.com/";, partName=
"query", name="query")
String query
);

@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@WebResult(targetNamespace = "http://ls.lmqs.acc.com/";, partName="info"
, name="info"  )
@WebMethod
public Info getInfo(
@WebParam(targetNamespace = "http://ls.lmqs.acc.com/";, partName=
"id", name="id")
int id
);

@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@WebResult(targetNamespace = "http://ls.lmqs.acc.com/",partName="data";,
name="data")
@WebMethod
public Data getData(
  @WebParam(targetNamespace = "http://ls.lmqs.acc.com/";, partName="id",
name="id")
int id
);

@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@WebResult(targetNamespace = "http://ls.lmqs.acc.com/";, partName=
"infos", name="infos")
@WebMethod
public InfoArray getLists();

@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@WebResult(targetNamespace = "http://ls.lmqs.acc.com/";, partName =
"dss", name = "dss")
@WebMethod
public StringArray getDsNames();

}Accelrys Limited (http://www.accelrys.com) 
Registered office: 334 Cambridge Science Park, Cambridge, CB4 0WN, UK 
Registered in England: 2326316   

Re: Default WSDL generated from annotated class has elementFormDefault=unqualified

2007-11-12 Thread Monica Ferrero

Hi!

I got that question answered from Jim last week!

Here you have:


Hi ,
You can annotate the package-info.java  with " XmlNsForm.QUALIFIED" like
this :

@javax.xml.bind.annotation.XmlSchema(namespace = "http://example.org";,

attributeFormDefault=javax.xml.bind.annotation.XmlNsForm.QUALIFIED,

elementFormDefault=javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package org.example;

Regards

Jim



   
 RichTaylor
 <[EMAIL PROTECTED] 
 .com>  To 
   cxf-user@incubator.apache.org   
 09/11/2007 23:54   cc 
   
   Subject 
 Please respond to Re: Default WSDL generated from 
 [EMAIL PROTECTED] annotated class has 
   r.apache.orgelementFormDefault=unqualified  
   
   
   
   
   
   






I'm looking for the same ability to set "elementFormDefault=qualified"
using
the Java --> WSDL approach, has anyone found an answer to this?  I'm using
the most basic approach of JAX-WS / JAXB / annotations.

Thanks, Rich



Jon Mountjoy wrote:
>
> Hi,
>
> The default WSDL generated from my annotated classes seems to have
> elementFormDefault="unqualified"
>
> While the result is perfectly valid, the service I'm integrating with
> dies when it gets unqualified element content.
>
> Is there a way to configure the server to generate qualified elements
> by default instead?
>
> Thanks
> Jon
>
>

--
View this message in context:
http://www.nabble.com/Default-WSDL-generated-from-annotated-class-has-elementFormDefault%3Dunqualified-tf4425777.html#a13677523

Sent from the cxf-user mailing list archive at Nabble.com.



--
Click on the link below to report this email as spam
https://www.mailcontrol.com/sr/Xxo7GY2sHBPi0M4MRtUZSk!BeBJDT3AXg7pHCQXRFwRVODfVJMad!aym9+VSqWXhPnFxMBrhQotszOBJ!x5xgPd7FkPYvtmv4UC+qfF6umROsBnNRp5VeDHnc3WVGrm3UWsTN2GfaeSrFqUAoOJJ9gv4d0xx4edSCmmqHUxBz6BMJNT2iLc0TQaa8r3cWs4wwPNQopDNf6DvIAFkij0w8PnlrScQD5EK

Accelrys Limited (http://www.accelrys.com) 
Registered office: 334 Cambridge Science Park, Cambridge, CB4 0WN, UK 
Registered in England: 2326316   

WSDLToJava Error : Thrown by JAXB : undefined element declaration 'ns1:orderBy'

2008-01-04 Thread Monica Ferrero


Hi!

I'm getting this error:

WSDLToJava Error : Thrown by JAXB : undefined element declaration
'ns1:orderBy'

when trying to generate java stubs from the wsdl.


This is my original service:

@WebService(endpointInterface = "com.aaa.bbb.ccc.MyService")
public interface MyService {

[...]

@WebResult(name="MyList")
@WebMethod
MyList getItems( @WebParam(name="listId") int listId);

[...]
}


the MyList class:

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {"items"})
@XmlRootElement(name = "myList")
public class MyList {

@XmlElement(required = true)
private List items;

public List getItems() {
if (items == null) {
items = new ArrayList();
}
return items;
}

public void setItems(List items) {
this.items = items;
}
}


The Item is a JAXB generated file from a schema:


@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"attributesPD",
"orderBy"
})
@XmlRootElement(name = "item")
public class Item {

@XmlElement(name = "attributes", required = true)
protected AttributesPD attributesPD;
protected Item.OrderBy orderBy;
@XmlAttribute
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "token")
protected String id;
@XmlAttribute
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "token")
protected String createdBy;
@XmlAttribute
@XmlSchemaType(name = "date")
protected XMLGregorianCalendar creationDate;

public AttributesPD getAttributesPD() {
return attributesPD;
}

public void setAttributesPD(AttributesPD value) {
this.attributesPD = value;
}

public Item.OrderBy getOrderBy() {
return orderBy;
}

public void setOrderBy(Item.OrderBy value) {
this.orderBy = value;
}

public String getId() {
return id;
}

public void setId(String value) {
this.id = value;
}

public String getCreatedBy() {
return createdBy;
}

public void setCreatedBy(String value) {
this.createdBy = value;
}

public XMLGregorianCalendar getCreationDate() {
return creationDate;
}

public void setCreationDate(XMLGregorianCalendar value) {
this.creationDate = value;
}


@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"orderedAttributeRef"
})
public static class OrderBy {

@XmlElement(required = true)
protected List orderedAttributeRef;

public List getOrderedAttributeRef() {
if (orderedAttributeRef == null) {
orderedAttributeRef = new
ArrayList();
}
return this.orderedAttributeRef;
}
}
}



The wsdl generated by cxf:


http://schemas.xmlsoap.org/wsdl/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:tns="http://myservice.bbb.aaa.com/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; name="MyServiceImplService"
targetNamespace="http://myservice.bbb.aaa.com/";>
  
http://www.w3.org/2001/XMLSchema";
xmlns:tns="http://www.aaa.com/AaaOtherService";
attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="http://www.aaa.com/AaaOtherService";>
[...]
  

  


  

  

  

  
  
  
  

  
[...]

http://www.w3.org/2001/XMLSchema";
xmlns="http://myservice.bbb.aaa.com/";
xmlns:ns1="http://www.aaa.com/AaaOtherService";
attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="http://myservice.bbb.aaa.com/";>
  http://www.aaa.com/AaaOtherService"/>
  

  

  

  
  




  

  

  
[...]
  
  


Re: WSDLToJava Error : Thrown by JAXB : undefined element declaration 'ns1:orderBy'

2008-01-07 Thread Monica Ferrero
Hi Jim,

Thank you for your reply.

Item and OrderBy are generated by JAXB from a schema.xsd file.
I have followed your advice to see if it behaves any different but I still
get the same error.

The Item and therefore OrderBy classes belong to a different JAXB context:
com.aaa.bbb.zzz.jaxb, but not sure if/how to indicate this?

Thanks for your help,

Monica



  
  From:   Jim Ma <[EMAIL PROTECTED]>
   

  
  To: cxf-user@incubator.apache.org 
  

  
  Date:   07/01/2008 02:22  
  

  
  Subject:Re: WSDLToJava Error : Thrown by JAXB : undefined element 
declaration 'ns1:orderBy' 

  





Hi ,

 From the error message , I think this is caused by the inner class
OrderBy is not loaded into
JAXB context . Can you modify this class as a outer class and try it
again ?
I will look it further to see if the JAXB can not load the inner static
class .

Thanks

Jim


Monica Ferrero wrote:
> Hi!
>
> I'm getting this error:
>
> WSDLToJava Error : Thrown by JAXB : undefined element declaration
> 'ns1:orderBy'
>
> when trying to generate java stubs from the wsdl.
>
>
> This is my original service:
>
> @WebService(endpointInterface = "com.aaa.bbb.ccc.MyService")
> public interface MyService {
>
> [...]
>
> @WebResult(name="MyList")
> @WebMethod
> MyList getItems( @WebParam(name="listId") int listId);
>
> [...]
> }
>
>
> the MyList class:
>
> @XmlAccessorType(XmlAccessType.FIELD)
> @XmlType(name = "", propOrder = {"items"})
> @XmlRootElement(name = "myList")
> public class MyList {
>
> @XmlElement(required = true)
> private List items;
>
> public List getItems() {
> if (items == null) {
> items = new ArrayList();
> }
> return items;
> }
>
> public void setItems(List items) {
> this.items = items;
> }
> }
>
>
> The Item is a JAXB generated file from a schema:
>
>
> @XmlAccessorType(XmlAccessType.FIELD)
> @XmlType(name = "", propOrder = {
> "attributesPD",
> "orderBy"
> })
> @XmlRootElement(name = "item")
> public class Item {
>
> @XmlElement(name = "attributes", required = true)
> protected AttributesPD attributesPD;
> protected Item.OrderBy orderBy;
> @XmlAttribute
> @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
> @XmlSchemaType(name = "token")
> protected String id;
> @XmlAttribute
> @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
> @XmlSchemaType(name = "token")
> protected String createdBy;
> @XmlAttribute
> @XmlSchemaType(name = "date")
> protected XMLGregorianCalendar creationDate;
>
> public AttributesPD getAttributesPD() {
> return attributesPD;
> }
>
> public void setAttributesPD(AttributesPD value) {
> this.attributesPD = value;
> }
>
> public Item.OrderBy getOrderBy() {
> return orderBy;
> }
>
> public void setOrderBy(Item.OrderBy value) {
> this.orderBy = value;
> }
>
> public String getId() {
> return id;
> }
>
> public void setId(String value) {
> this.id = value;
> }
>
> public String getCreatedBy() {
> return createdBy;
> }
>
> public void setCreatedBy(String value) {
> this.createdBy = value;
> }
>
> public XMLGregorianCalendar getCreationDate() {
> return creationDate;
> }
>
> public void setCreationDate(XMLGregorianCalendar value) {
> this.creationDate = value;
> }
>
>
> @XmlAccessorType(XmlAccessType.FIELD)
> @XmlType(name = "", propOrder = {
> 

Re: WSDLToJava Error : Thrown by JAXB : undefined element declaration 'ns1:orderBy'

2008-01-08 Thread Monica Ferrero

Hi Jim,

Changed the logging level to FINE as you indicated and run the wsdl to java
on my wsdl, but there is no such a message in there as "Classes known to
this context:". I've search for "classes" and " context" as well and there
is nothing on those lines.
There are some exceptions that I'm not sure there are relevant. I add here
the last one before the error.

Thanks for your help,

Monica


 [exec] 08-Jan-2008 10:19:57
com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory get
 [exec] FINE: Using optimized Accessor for
com.sun.tools.xjc.reader.xmlschema.bindinfo.BIGlobalBinding$UnderscoreBinding
 com.sun.tools.xjc.re
ader.xmlschema.bindinfo.BIGlobalBinding.getUnderscoreBinding() and void
com.sun.tools.xjc.reader.xmlschema.bindinfo.BIGlobalBinding.setUnderscore
Binding(com.sun.tools.xjc.reader.xmlschema.bindinfo.BIGlobalBinding$UnderscoreBinding)
 [exec] 08-Jan-2008 10:19:57
com.sun.xml.bind.v2.runtime.reflect.opt.Injector inject
 [exec] FINE: Unable to inject
com/sun/tools/xjc/reader/xmlschema/bindinfo/CollectionTypeAttribute$JaxbAccessorF_collectionType
 [exec] java.lang.reflect.InvocationTargetException
 [exec] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown
Source)
 [exec] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 [exec] at java.lang.reflect.Method.invoke(Method.java:597)
 [exec] at
com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:125)
 [...]
 [exec] at
org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:171)
 [exec] Caused by: java.lang.LinkageError: loader (instance of
sun/misc/Launcher$AppClassLoader): attempted  duplicate class definition
for
name:
"com/sun/tools/xjc/reader/xmlschema/bindinfo/CollectionTypeAttribute$JaxbAccessorF_collectionType"
 [exec] at java.lang.ClassLoader.defineClass1(Native Method)
 [exec] at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
 [exec] at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
 [exec] ... 84 more


   
  From:   Jim Ma <[EMAIL PROTECTED]>
   
  To: cxf-user@incubator.apache.org
   
  Date:   08/01/2008 02:56 
   
  Subject:Re: WSDLToJava Error : Thrown by JAXB : undefined element 
declaration 'ns1:orderBy'
   





Hi Monica,

You can change the log level to FINE (modify the log configuration file
under ${CXF_HOME}/etc/logging.properties)
 to see if the OrderBy classes added to JAXB Context when you run
java2wsdl tool .

Search "Classes known to this context:" in the log file to see  if this
class is known to JAXB.

Regards

Jim


Monica Ferrero wrote:
>
> Hi Jim,
>
> Thank you for your reply.
>
> Item and OrderBy are generated by JAXB from a schema.xsd file.
> I have followed your advice to see if it behaves any different but I
> still get the same error.
>
> The Item and therefore OrderBy classes belong to a different JAXB
> context: com.aaa.bbb.zzz.jaxb, but not sure if/how to indicate this?
>
> Thanks for your help,
>
> Monica
>
> Inactive hide details for Jim Ma ---07/01/2008 02:22:26---Hi ,Jim Ma
> ---07/01/2008 02:22:26---Hi ,
>
>
> From:
> Jim Ma <[EMAIL PROTECTED]>
>
> To:
> cxf-user@incubator.apache.org
>
> Date:
> 07/01/2008 02:22
>
> Subject:
> Re: WSDLToJava Error : Thrown by JAXB : undefined element declaration
> 'ns1:orderBy'
>
> 
>
>
>
> Hi ,
>
> From the error message , I think this is caused by the inner class
> OrderBy is not loaded into
> JAXB context . Can you modify this class as a outer class and try it
> again ?
> I will look it further to see if the JAXB can not load the inner static
> class .
>
> Thanks
>
> Jim
>
>
> Monica Ferrero wrote:
> > Hi!
> >
> > I'm getting this error:
> >
> > WSDLToJava Error : Thrown by JAXB : undefined element declaration
> > 'ns1:orderBy'
> >
> > when trying to generate java stubs from the wsdl.
> >
> >
> > This is my original service:
> >
> > @WebService(endpointInterface = "com.aaa.bbb.ccc.MyService")
> > public interface MyService {
> >
> > [...]
> >
> > @Web

Re: WSDLToJava Error : Thrown by JAXB : undefined element declaration 'ns1:orderBy'

2008-01-09 Thread Monica Ferrero
Hi Jim,

I'm not sure I follow you. I can't see any wsdl to java log...
The logging.properties in ${CXF_HOME}/etc/logging.properties indicate the
output is taking to the console. Even if I activate the file appender there
is no information about the 'Classes known to this context' there.
If I run the wsdl to java in verbose mode, I get a bit more information
(see below), but no what we are looking for...

Thanks,

Monica


 [exec] Loading FrontEnd jaxws ...
 [exec] Loading DataBinding jaxb ...
 [exec] http://cxf.apache.org/Xutil/Command";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http:/
/cxf.apache.org/Xutil/Command
http://cxf.apache.org/schema/xutil/command.xsd";>
 [exec] 
 [exec] com.aaa.bbb.myservice
 [exec] bindingsPD.xjb
 [exec] MyService.wsdl
 [exec] 
 [exec] wsdl2java -verbose -p com.aaa.bbb.myservice -b bindingsPD.xjb
MyService.wsdl
 [exec] wsdl2java - Apache CXF (incubator) 2.0.3-incubator
 [exec]
 [exec]
 [exec] WSDLToJava Error : Thrown by JAXB : undefined element
declaration 'ns1:orderBy'
 [exec]
 [exec] org.apache.cxf.tools.common.ToolException: Thrown by JAXB :
undefined element declaration 'ns1:orderBy'
 [exec] at
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBBindErrorListener.error(JAXBBindErrorListener.java:34)
 [exec] at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerImpl.java:245)
 [exec] at
com.sun.tools.xjc.util.ErrorReceiverFilter.error(ErrorReceiverFilter.java:61)
 [exec] at
com.sun.xml.xsom.impl.parser.ParserContext$2.error(ParserContext.java:188)
 [exec] at
com.sun.xml.xsom.impl.parser.ParserContext$1.reportError(ParserContext.java:166)
 [exec] at
com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError(NGCCRuntimeEx.java:103)
 [exec] at
com.sun.xml.xsom.impl.parser.DelayedRef.resolve(DelayedRef.java:91)
 [exec] at
com.sun.xml.xsom.impl.parser.DelayedRef.run(DelayedRef.java:66)
 [exec] at
com.sun.xml.xsom.impl.parser.ParserContext.getResult(ParserContext.java:126)
 [exec] at
com.sun.xml.xsom.parser.XSOMParser.getResult(XSOMParser.java:172)
 [exec] at
com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:488)
 [exec] at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:197)
 [exec] at
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:209)
 [exec] at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:504)
 [exec] at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:183)
 [exec] at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:229)
 [exec] at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:83)
 [exec] at
org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:102)
 [exec] at
org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:171)
 [exec] Caused by: org.xml.sax.SAXParseException: undefined element
declaration 'ns1:orderBy'
 [exec] at
com.sun.xml.xsom.impl.parser.ParserContext$1.reportError(ParserContext.java:162)
 [exec] ... 14 more



  
  From:   Jim Ma <[EMAIL PROTECTED]>
   

  
  To: cxf-user@incubator.apache.org 
  

  
  Date:   09/01/2008 02:18  
  

  
  Subject:Re: WSDLToJava Error : Thrown by JAXB : undefined element 
declaration 'ns1:orderBy' 

  





Hi Monica,

Forget to mention .  Search it in  java to wsdl 's log .

Regards

Jim

Monica Ferrero wrote:
>
> Hi Jim,
>
> Changed the logging level to FINE as you indicated and run the wsdl to
> java on my wsdl, but there is no such a message in there as "Classes
> known to this context:". I've search for "classes" and " context" as
> well and there is nothing on thos

java2wsdl: java.lang.ClassCastException: $Proxy53 cannot be cast to com.sun.xml.bind.v2.schemagen.xmlschema.ComplexTypeHost

2008-02-06 Thread Monica Ferrero


Hi!

The moment my SEI for MyService includes a type MyData that has been
derived from a schema file myschema.xsd with jaxb I get the error below.
That's even with a very simplified version of MyData that has just an ID.
 Any ideas? Thanks a lot,

Monica


//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB)
Reference Implementation, v2.1.5-b01-fcs
// See http://java.sun.com/xml/jaxb";>http://java.sun.com/xml/jaxb
// Generated on: 2008.02.06 at 02:46:54 PM GMT
//
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "myData")
public class MyData {

@XmlAttribute(namespace = "http://www.aaa.com/AaaService";)
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;

public String getId() {
return id;
}
public void setId(String value) {
this.id = value;
}
}


c:\>java2wsdl.bat -o j2w.wsdl -s src -classdir build\classes
-cp.;build\classes;..\Documents\build\classes -verbose
com.aaa.bbb.myservice.MyService
java2wsdl -o j2w.wsdl -s src -classdir build\classes -cp
.;build\classes;..\Documents\build\classes -verbose
com.aaa.bbb.myservice.MyService
java2wsdl - Apache CXF (incubator) 2.0.4-incubator

Error: java.lang.ClassCastException: $Proxy53 cannot be cast to
com.sun.xml.bind.v2.schemagen.xmlschema.ComplexTypeHost

java.lang.RuntimeException: java.lang.ClassCastException: $Proxy53 cannot
be cast to com.sun.xml.bind.v2.schemagen.xmlschema.ComplexTypeHost
at
org.apache.cxf.frontend.AbstractServiceFactory.createService(AbstractServiceFactory.java:41)
at
org.apache.cxf.tools.java2wsdl.processor.JavaToProcessor.process(JavaToProcessor.java:88)
at
org.apache.cxf.tools.java2wsdl.JavaToWSDLContainer.execute(JavaToWSDLContainer.java:58)
at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:83)
at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:52)
at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:39)
at
org.apache.cxf.tools.java2wsdl.JavaToWSDL.run(JavaToWSDL.java:74)
at
org.apache.cxf.tools.java2wsdl.JavaToWSDL.main(JavaToWSDL.java:42)
Caused by: java.lang.ClassCastException: $Proxy53 cannot be cast to
com.sun.xml.bind.v2.schemagen.xmlschema.ComplexTypeHost
at
com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.writeClass(XmlSchemaGenerator.java:719)
at
com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.writeTypeRef(XmlSchemaGenerator.java:607)
at
com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.writeTo(XmlSchemaGenerator.java:516)
at
com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.access$600(XmlSchemaGenerator.java:341)
at
com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator.write(XmlSchemaGenerator.java:322)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.generateSchema(JAXBContextImpl.java:767)
at
org.apache.cxf.jaxb.JAXBDataBinding.generateJaxbSchemas(JAXBDataBinding.java:306)
at
org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:264)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:313)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:362)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:156)
at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:89)
at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:74)
at
org.apache.cxf.frontend.AbstractServiceFactory.createService(AbstractServiceFactory.java:39)
... 7 more
JavaToWSDL Error : java.lang.ClassCastException: $Proxy53 cannot be cast to
com.sun.xml.bind.v2.schemagen.xmlschema.ComplexTypeHost

org.apache.cxf.tools.common.ToolException: java.lang.ClassCastException:
$Proxy53 cannot be cast to
com.sun.xml.bind.v2.schemagen.xmlschema.ComplexTypeHost
at
org.apache.cxf.tools.java2wsdl.JavaToWSDLContainer.execute(JavaToWSDLContainer.java:75)
at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:83)
at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:52)
at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:39)
at
org.apache.cxf.tools.java2wsdl.JavaToWSDL.run(JavaToWSDL.java:74)
at
org.apache.cxf.tools.java2wsdl.JavaToWSDL.main(JavaToWSDL.java:42)
Caused by: java.lang.ClassCastException: $Proxy53 cannot be cast to
com.sun.xml.bind.v2.schemagen.xmlschema.ComplexTypeHost
at
com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.writeClass(XmlSchemaGenerator.java:719)
at
com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.

Re: java2wsdl: java.lang.ClassCastException: $Proxy53 cannot be cast to com.sun.xml.bind.v2.schemagen.xmlschema.ComplexTypeHost

2008-02-06 Thread Monica Ferrero

Hi Dan,

I'm using jdk1.6.0_03, but I also got jaxb-ri-20070917 which is version
2.1.5 fcs.
I'll try to use 2.0.5 and see if it helps.


Thanks a lot,

Monica



  
  From:   Daniel Kulp <[EMAIL PROTECTED]>   
   

  
  To: cxf-user@incubator.apache.org 
  

  
  Cc:     "Monica Ferrero" <[EMAIL PROTECTED]>  
  

  
  Date:   06/02/2008 16:50  
  

  
  Subject:Re: java2wsdl:  java.lang.ClassCastException: $Proxy53 cannot be 
cast to
  com.sun.xml.bind.v2.schemagen.xmlschema.ComplexTypeHost   
  

  






What version of the JDK are you using?   It looks like it might be
getting some interference with various versions of JAXB.   I notice the
code you have was generated with   v2.1.5-b01-fcs.   However, CXF 2.0.4
uses a 2.0.5 version of JAXB.   I'm not sure if that's an issue or not.

Dan


On Wednesday 06 February 2008, Monica Ferrero wrote:
> Hi!
>
> The moment my SEI for MyService includes a type MyData that has been
> derived from a schema file myschema.xsd with jaxb I get the error
> below. That's even with a very simplified version of MyData that has
> just an ID. Any ideas? Thanks a lot,
>
> Monica
>
>
> //
> // This file was generated by the JavaTM Architecture for XML
> Binding(JAXB) Reference Implementation, v2.1.5-b01-fcs
> // See  href="http://java.sun.com/xml/jaxb";>http://java.sun.com/xml/jaxb
> // Generated on: 2008.02.06 at 02:46:54 PM GMT
> //
> @XmlAccessorType(XmlAccessType.FIELD)
> @XmlRootElement(name = "myData")
> public class MyData {
>
> @XmlAttribute(namespace = "http://www.aaa.com/AaaService";)
> @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
> @XmlID
> @XmlSchemaType(name = "ID")
> protected String id;
>
> public String getId() {
> return id;
> }
> public void setId(String value) {
> this.id = value;
> }
> }
>
>
> c:\>java2wsdl.bat -o j2w.wsdl -s src -classdir build\classes
> -cp.;build\classes;..\Documents\build\classes -verbose
> com.aaa.bbb.myservice.MyService
> java2wsdl -o j2w.wsdl -s src -classdir build\classes -cp
> .;build\classes;..\Documents\build\classes -verbose
> com.aaa.bbb.myservice.MyService
> java2wsdl - Apache CXF (incubator) 2.0.4-incubator
>
> Error: java.lang.ClassCastException: $Proxy53 cannot be cast to
> com.sun.xml.bind.v2.schemagen.xmlschema.ComplexTypeHost
>
> java.lang.RuntimeException: java.lang.ClassCastException: $Proxy53
> cannot be cast to
> com.sun.xml.bind.v2.schemagen.xmlschema.ComplexTypeHost at
> org.apache.cxf.frontend.AbstractServiceFactory.createService(AbstractS
>erviceFactory.java:41) at
> org.apache.cxf.tools.java2wsdl.processor.JavaToProcessor.process(JavaT
>oProcessor.java:88) at
> org.apache.cxf.tools.java2wsdl.JavaToWSDLContainer.execute(JavaToWSDLC
>ontainer.java:58) at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.jav
>a:83) at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.jav
>a:52) at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.jav
>a:39) at
> org.apache.cxf.tools.java2wsdl.JavaToWSDL.run(JavaToWSDL.java:74)
> at
> org.apache.cxf.tools.java2wsdl.JavaToWSDL.main(JavaToWSDL.java:42)
> Caused by: java.lang.ClassCastException: $Proxy53 cannot be cast to
> com.sun.xml.bind.v2.schemagen.xmlschema.ComplexTypeHost
> at
> com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.writeClass(
>XmlSchemaGenerator.java:719) at
> com.sun.xml.bind.v2.schemagen.Xml

Re: java2wsdl: java.lang.ClassCastException: $Proxy53 cannot be cast to com.sun.xml.bind.v2.schemagen.xmlschema.ComplexTypeHost

2008-02-06 Thread Monica Ferrero

Nope, same error when generating the code with v2.0.5-b02-fcs :(
Any other ideas? Would it be any influence that MyData is in a different
subproject and of course package from MyService?

Thanks a lot,

Monica



  
  From:   "Monica Ferrero" <[EMAIL PROTECTED]>  
  

  
  To: cxf-user@incubator.apache.org 
  

  
  Date:   06/02/2008 17:32  
  

  
  Subject:Re: java2wsdl:  java.lang.ClassCastException: $Proxy53 cannot be 
cast to
  com.sun.xml.bind.v2.schemagen.xmlschema.ComplexTypeHost   
  

  





Hi Dan,

I'm using jdk1.6.0_03, but I also got jaxb-ri-20070917 which is version
2.1.5 fcs.
I'll try to use 2.0.5 and see if it helps.


Thanks a lot,

Monica

Inactive hide details for Daniel Kulp ---06/02/2008 16:50:46---What version
of the JDK are you using? It looks like it might beDaniel Kulp ---06
/02/2008 16:50:46---What version of the JDK are you using? It looks like it
might be
   
   
 From:Daniel Kulp <[EMAIL PROTECTED]>   
   
   
 To:  cxf-user@incubator.apache.org
   
           
 Cc:  "Monica Ferrero" <[EMAIL PROTECTED]> 
   
   
 Date:06/02/2008 16:50 
   
   
 Subject: Re: java2wsdl: java.lang.ClassCastException: $Proxy53 cannot be  
  cast to com.sun.xml.bind.v2.schemagen.xmlschema.ComplexTypeHost  
   






What version of the JDK are you using?   It looks like it might be
getting some interference with various versions of JAXB.   I notice the
code you have was generated with   v2.1.5-b01-fcs.   However, CXF 2.0.4
uses a 2.0.5 version of JAXB.   I'm not sure if that's an issue or not.

Dan


On Wednesday 06 February 2008, Monica Ferrero wrote:
> Hi!
>
> The moment my SEI for MyService includes a type MyData that has been
> derived from a schema file myschema.xsd with jaxb I get the error
> below. That's even with a very simplified version of MyData that has
> just an ID. Any ideas? Thanks a lot,
>
> Monica
>
>
> //
> // This file was generated by the JavaTM Architecture for XML
> Binding(JAXB) Reference Implementation, v2.1.5-b01-fcs
> // See  href="http://java.sun.com/xml/jaxb";>http://java.sun.com/xml/jaxb
> // Generated on: 2008.02.06 at 02:46:54 PM GMT
> //
> @XmlAccessorType(XmlAccessType.FIELD)
> @XmlRootElement(name = "myData")
> public class MyData {
>
> @XmlAttribute(namespace = "http://www.aaa.com/AaaService";)
> @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
> @XmlID
> @XmlSchemaType(name = "ID")
> protected String id;
>
> public String getId() {
> return id;
> }
> public void setId(String value) {
> this.id = value;
> }
> }
>
>
> c:\>java2wsdl.bat -o j2w.wsdl -s src -classdir build\classes
> -cp.;build\classes;..\Documents\build\classes -verbose
> com.aaa.bbb.myservice.MyService
> java2wsdl -o j2w.wsdl -s src -classdir build\classes -cp
>