Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Moxy xpath predicate not working(xpath xml )
Moxy xpath predicate not working [message #1751611] Wed, 11 January 2017 21:22 Go to next message
leor amikam is currently offline leor amikamFriend
Messages: 8
Registered: October 2016
Junior Member
I have the following XML:

<msg:L1MessageRequest xmlns:hdr="hsn.us.banner.hsntech.com:header" xmlns:msg="hsn.us.banner.hsntech.com:message1" xmlns:hsn="hsn.us.banner.hsntech.com:payload" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="hsn.us.banner.hsntech.com:message1 ../HSNLevel1Message.xsd">
<msg:Header>
<hdr:MsgID>1001123</hdr:MsgID>
<hdr:MsgType>request</hdr:MsgType>
<hdr:MsgTimestamp>2016-01-05T09:00:00</hdr:MsgTimestamp>
<hdr:MsgPriority>low</hdr:MsgPriority>
<hdr:MsgSourceSystem>SUS-SCM</hdr:MsgSourceSystem>
<hdr:MsgTargetSystem>HSN-Banner</hdr:MsgTargetSystem>
<hdr:MsgEncryption>false</hdr:MsgEncryption>
<hdr:MsgVersion>1.0</hdr:MsgVersion>
<hdr:MsgOperationType>synchronous</hdr:MsgOperationType>
<hdr:MsgOperationName>
<hdr:Verb>UPDATE</hdr:Verb>
<hdr:Noun>Customer</hdr:Noun>
</hdr:MsgOperationName>
<hdr:MsgOperationUser>hcmuser</hdr:MsgOperationUser>
</msg:Header>
<msg:Payload>
<msg:UpdateCustomerRequest>
<hsn:Customer>
<hsn:AccountID>2001-2001</hsn:AccountID>
<hsn:CustomerID>2001</hsn:CustomerID>
<hsn:CommunicationPreference>
<hsn:CommType>Letter</hsn:CommType>
<hsn:Enabled>Y</hsn:Enabled>
</hsn:CommunicationPreference>
</hsn:Customer>
</msg:UpdateCustomerRequest>
</msg:Payload>
</msg:L1MessageRequest>


Calling JaxbContext.getValueByXpath() method with this, return null:

//msg:UpdateCustomerRequest/hsn:Customer/hsn:CommunicationPreference[hsn:CommType='Letter']/hsn:Enabled/text()

Calling with this, returns the proper value:

//msg:UpdateCustomerRequest/hsn:Customer/hsn:CommunicationPreference[1]/hsn:Enabled/text()

Does Moxy not support the 1st type of xpath expression?
Re: Moxy xpath predicate not working [message #1753681 is a reply to message #1751611] Wed, 08 February 2017 18:08 Go to previous messageGo to next message
surya aditya is currently offline surya adityaFriend
Messages: 5
Registered: February 2017
Junior Member
HI, I have the same problem? have you found the answer by other means pls let know. thx.
Re: Moxy xpath predicate not working [message #1753749 is a reply to message #1753681] Thu, 09 February 2017 15:20 Go to previous messageGo to next message
leor amikam is currently offline leor amikamFriend
Messages: 8
Registered: October 2016
Junior Member
Nope. Kind of lame that using that type of predicate is not supported. I even tried with the latest build, and does not seem to be implemented yet.
Re: Moxy xpath predicate not working [message #1753849 is a reply to message #1753749] Fri, 10 February 2017 17:07 Go to previous messageGo to next message
surya aditya is currently offline surya adityaFriend
Messages: 5
Registered: February 2017
Junior Member
thanks for response, not sure what is the best way to communicate the project developers, no answer either on stackoverflow Sad
Re: Moxy xpath predicate not working [message #1753850 is a reply to message #1753749] Fri, 10 February 2017 17:07 Go to previous messageGo to next message
surya aditya is currently offline surya adityaFriend
Messages: 5
Registered: February 2017
Junior Member
thanks for response, not sure what is the best way to communicate the project developers, no answer either on stackoverflow Sad
Re: Moxy xpath predicate not working [message #1753851 is a reply to message #1753749] Fri, 10 February 2017 17:07 Go to previous message
surya aditya is currently offline surya adityaFriend
Messages: 5
Registered: February 2017
Junior Member
thanks for response, not sure what is the best way to communicate the project developers, no answer either on stackoverflow Sad
Previous Topic:Trouble with getter annotations in entities
Next Topic:Bi-directional entity-keyed map
Goto Forum:
  


Current Time: Thu Dec 14 13:29:21 GMT 2017

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

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