How can I make a parameter type for which I cannot annotate nillable in my JAX-WS endpoint?
Issue
- How can I make a parameter type for which I cannot annotate nillable in my JAX-WS endpoint?
- I want to use
java.util.Calendaras a parameter in one of my methods in my JAX-WS interface, and I want it to benillable. When I usexsi:nil="true"in the SOAP request, I get anIllegalArgumentExceptionfrom JAXB during unmarshalling of the SOAP request.
Caused by: java.lang.IllegalArgumentException:
at org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl$Parser.parseYear(Unknown Source)
at org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl$Parser.parse(Unknown Source)
at org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl.<init>(Unknown Source)
at org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl.newXMLGregorianCalendar(Unknown Source)
at __redirected.__DatatypeFactory.newXMLGregorianCalendar(__DatatypeFactory.java:181) [jboss-modules.jar:1.1.2.GA-redhat-1]
at com.sun.xml.bind.DatatypeConverterImpl._parseDateTime(DatatypeConverterImpl.java:369)
at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$2.parse(RuntimeBuiltinLeafInfoImpl.java:270)
at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$2.parse(RuntimeBuiltinLeafInfoImpl.java:268)
at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:247)
at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:65)
... 35 more
How can I fix this?
Environment
- JBoss Enterprise Application Platform (EAP)
- 6.x
- JBossWS/CXF/JAXB
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
