You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Kugaprakash Visagamani <kv...@infoblox.com> on 2008/09/18 01:13:15 UTC

CXF - WSDLTOJAVA generates JaxbElement for "nillable=true"

Hi,
In the XSD, I am defining the following:

<complexType name = "test">
	<element name="value" minOccurs="0" nillable="true"
type="anyType"/>
</complexType>

When generating the java objects using WSDLTOJava, the generated java
object looks like this:

@XmlElementRef(name = "value", type = JAXBElement.class)
protected JAXBElement<Object> value;

Due to this I am getting a MarshalException while trying to send a SOAP
write request.

Would appreciate if anyone could help me with any pointers to this
issue.

Thanks & Best Regards,
Kuga

javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
 - with linked exception:
[javax.xml.bind.JAXBException:
com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImp
l is not known to this context]
      at
com.sun.xml.internal.ws.message.jaxb.JAXBMessage.writePayloadTo(Unknown
Source)
      at
com.sun.xml.internal.ws.message.AbstractMessageImpl.writeTo(Unknown
Source)
      at com.sun.xml.internal.ws.encoding.StreamSOAPCodec.encode(Unknown
Source)
      at
com.sun.xml.internal.ws.encoding.SOAPBindingCodec.encode(Unknown Source)
      at
com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(
Unknown Source)
      at
com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processR
equest(Unknown Source)
      at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown Source)
      at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
      at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
      at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown Source)
      at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
      at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown
Source)
      at
com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
Source)
      at
com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
Source)
      at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown
Source)
      at $Proxy73.objectWrite(Unknown Source)

RE: CXF - WSDLTOJAVA generates JaxbElement for "nillable=true"

Posted by Kugaprakash Visagamani <kv...@infoblox.com>.
Can anyone please help with any information?
Thanks
Kuga

-----Original Message-----
From: Kugaprakash Visagamani [mailto:kvisagamani@infoblox.com] 
Sent: Wednesday, September 17, 2008 5:15 PM
To: users@cxf.apache.org
Subject: RE: CXF - WSDLTOJAVA generates JaxbElement for "nillable=true"

Hi,
Just as an update,
I have the following also in my <complexType>
<element name="utilization_update" minOccurs="0" type="dateTime"/>
Not sure if this is the one giving the XMLGregorianCalendarImp
exception.

Any pointers is highly appreciated.
Thanks
Kuga

-----Original Message-----
From: Kugaprakash Visagamani [mailto:kvisagamani@infoblox.com] 
Sent: Wednesday, September 17, 2008 4:13 PM
To: users@cxf.apache.org
Subject: CXF - WSDLTOJAVA generates JaxbElement for "nillable=true"

Hi,
In the XSD, I am defining the following:

<complexType name = "test">
	<element name="value" minOccurs="0" nillable="true"
type="anyType"/>
</complexType>

When generating the java objects using WSDLTOJava, the generated java
object looks like this:

@XmlElementRef(name = "value", type = JAXBElement.class)
protected JAXBElement<Object> value;

Due to this I am getting a MarshalException while trying to send a SOAP
write request.

Would appreciate if anyone could help me with any pointers to this
issue.

Thanks & Best Regards,
Kuga

javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
 - with linked exception:
[javax.xml.bind.JAXBException:
com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImp
l is not known to this context]
      at
com.sun.xml.internal.ws.message.jaxb.JAXBMessage.writePayloadTo(Unknown
Source)
      at
com.sun.xml.internal.ws.message.AbstractMessageImpl.writeTo(Unknown
Source)
      at com.sun.xml.internal.ws.encoding.StreamSOAPCodec.encode(Unknown
Source)
      at
com.sun.xml.internal.ws.encoding.SOAPBindingCodec.encode(Unknown Source)
      at
com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(
Unknown Source)
      at
com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processR
equest(Unknown Source)
      at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown Source)
      at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
      at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
      at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown Source)
      at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
      at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown
Source)
      at
com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
Source)
      at
com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
Source)
      at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown
Source)
      at $Proxy73.objectWrite(Unknown Source)

RE: CXF - WSDLTOJAVA generates JaxbElement for "nillable=true"

Posted by Kugaprakash Visagamani <kv...@infoblox.com>.
Hi,
Just as an update,
I have the following also in my <complexType>
<element name="utilization_update" minOccurs="0" type="dateTime"/>
Not sure if this is the one giving the XMLGregorianCalendarImp
exception.

Any pointers is highly appreciated.
Thanks
Kuga

-----Original Message-----
From: Kugaprakash Visagamani [mailto:kvisagamani@infoblox.com] 
Sent: Wednesday, September 17, 2008 4:13 PM
To: users@cxf.apache.org
Subject: CXF - WSDLTOJAVA generates JaxbElement for "nillable=true"

Hi,
In the XSD, I am defining the following:

<complexType name = "test">
	<element name="value" minOccurs="0" nillable="true"
type="anyType"/>
</complexType>

When generating the java objects using WSDLTOJava, the generated java
object looks like this:

@XmlElementRef(name = "value", type = JAXBElement.class)
protected JAXBElement<Object> value;

Due to this I am getting a MarshalException while trying to send a SOAP
write request.

Would appreciate if anyone could help me with any pointers to this
issue.

Thanks & Best Regards,
Kuga

javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
 - with linked exception:
[javax.xml.bind.JAXBException:
com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImp
l is not known to this context]
      at
com.sun.xml.internal.ws.message.jaxb.JAXBMessage.writePayloadTo(Unknown
Source)
      at
com.sun.xml.internal.ws.message.AbstractMessageImpl.writeTo(Unknown
Source)
      at com.sun.xml.internal.ws.encoding.StreamSOAPCodec.encode(Unknown
Source)
      at
com.sun.xml.internal.ws.encoding.SOAPBindingCodec.encode(Unknown Source)
      at
com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(
Unknown Source)
      at
com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processR
equest(Unknown Source)
      at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown Source)
      at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
      at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
      at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown Source)
      at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
      at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown
Source)
      at
com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
Source)
      at
com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
Source)
      at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown
Source)
      at $Proxy73.objectWrite(Unknown Source)