Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Moxy - return class type for XML element(xpath xml)
Moxy - return class type for XML element [message #1750832] Thu, 29 December 2016 18:51 Go to next message
leor amikam is currently offline leor amikamFriend
Messages: 8
Registered: October 2016
Junior Member

xpath = "/msg:L1MessageRequest/msg:Header";
val = jaxbContexL1.getValueByXPath(message.getPayload(), xpath, resolver, Object.class);

I am getting null value back from call to getValueByXPath() method when I try to pass in an expression that should be returning an XML set of elements. for example, returning:

<msg:Header>
<hdr:MsgID>LA00000000000110wAA11111</hdr:MsgID>
<hdr:MsgType>request</hdr:MsgType>
<hdr:MsgTimestamp>2016-01-05T09:00:00-04:00</hdr:MsgTimestamp>
.. more stuff ...
</msg:Header>

Since I do not know what the expected return type is, I just passed in Object.class, but not sure if that is the problem. Does anyone know what java type's class I should be using to return an XML fragment?

Thanks.
Re: Moxy - return class type for XML element [message #1751275 is a reply to message #1750832] Fri, 06 January 2017 20:08 Go to previous messageGo to next message
leor amikam is currently offline leor amikamFriend
Messages: 8
Registered: October 2016
Junior Member
Anyone, anyone...???
Re: Moxy - return class type for XML element [message #1751615 is a reply to message #1751275] Wed, 11 January 2017 22:46 Go to previous message
leor amikam is currently offline leor amikamFriend
Messages: 8
Registered: October 2016
Junior Member
My bad. I got it working.
Previous Topic:NullPointerException when using HAVING on JPQL
Next Topic:Eclipselink: batch reading creates a lot of queries
Goto Forum:
  


Current Time: Wed Dec 13 11:28:00 GMT 2017

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

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