Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » EclipseLink Unmarshalling null Strings to ""(Empty Strings)(EclipseLink Unmarshalling null Strings to ""(Empty Strings))
EclipseLink Unmarshalling null Strings to ""(Empty Strings) [message #1702753] Fri, 24 July 2015 13:13 Go to next message
Jared Fucci is currently offline Jared FucciFriend
Messages: 3
Registered: July 2015
Junior Member
I am in desperate need of help. I have been racking my brain over this for almost an entire week and it's causing a delay in getting our code to the QA team.

The problem is that ever since we moved from WebLogic 10.3.5. to 12.1.2 we are having an issue with the unmarshalling of null Strings.

.xsd
...
            <xs:element name="puReadyTime" type="xs:string"
                nillable="true">
            </xs:element>
            <xs:element name="puNotCompleteTime" type="xs:string"
                nillable="true">
...


generated object
...
    @XmlElement(required = true, nillable = true)
    protected String puReadyTime;
    @XmlElement(required = true, nillable = true)
    protected String puNotCompleteTime;
...


Soap Request:
...
         <puReadyTime xsi:nil="true" />
         <puNotCompleteTime xsi:nil="true" />
...



When you get into the endpoint that the SOAP request calls the values for these are "" instead of null. This causes validation errors because there are checks for null.

This link shows under Null Handling that it should pass through.
http://wiki.eclipse.org/EclipseLink/Release/2.4.0/JSONBinding

I drilled down into the EclipseLink code and found that XMLUnmarshaller calls methods in SAXUnmarshaller, which uses a DomReader to parse the XML. I confirmed that the XMLMarshaller passes in the correct XML(with the nulls) into the SAXUnmarshaller...but the SAXUnmarshaller returns a parsed string with ""s instead of nulls.

I heard there were issues with this in WebLogic 12.1.1 but was corrected with EclipseLink 2.3.3 and forward. We are running EclipseLink 2.4.2.

I have tried searches upon searches and have tried global bindings, reverting the server back to the old RI JAXB implementation, using my own JAXB implementation and it's always the exact same result.

Can anyone help me understand why it is doing this? What could be causing it? How can I correct it? etc. ANY help would be greatly appreciated.
Re: EclipseLink Unmarshalling null Strings to ""(Empty Strings) [message #1703121 is a reply to message #1702753] Tue, 28 July 2015 16:41 Go to previous message
Jared Fucci is currently offline Jared FucciFriend
Messages: 3
Registered: July 2015
Junior Member
UPDATE:

Just in case anyone comes across this with the same issue. The issue, for some reason, was log4j. We were using log4j version 1.2.17. I swapped it out to 2.3 and everything works now. I don't know why or how this effected it but it's good now.
Previous Topic:git repository for docs?
Next Topic:OrderBy bug on ElementCollection?
Goto Forum:
  


Current Time: Sat Dec 21 16:38:36 GMT 2024

Powered by FUDForum. Page generated in 0.03263 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top