ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Xpath statement in IIB10 mapping node

Post new topic  Reply to topic
 Xpath statement in IIB10 mapping node « View previous topic :: View next topic » 
Author Message
wmbfrz
PostPosted: Sun Mar 06, 2016 10:03 pm    Post subject: Xpath statement in IIB10 mapping node Reply with quote

Apprentice

Joined: 08 Jan 2010
Posts: 28

I need to perform a transformation for meeting the following logic

Logic:
discountPrice = (totalPrice*(100-discountPercent)/100);

Xpath Xpression:
xs:integer($totalPrice) * (100 - xs:integer($discountPercent)) / 100

where totalprice and discountPercent are string type and are extracted from two separate elements from the input message. The Custom XPath statement in the IIB10 Mapping node fails and the output from debug is as follows

Insert
Type:INTEGER:5
Text:CHARACTER:{default}:decisionServiceResponseToOutputJSON
Insert
Type:INTEGER:5
Text:CHARACTER:XPath: xs:integer($totalPrice) * (100 - xs:integer($discountPercent))/100
RecoverableException
File:CHARACTER:Undefined
Line:INTEGER:-1
Function:CHARACTER:throwableToMbException
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:3949
Text:CHARACTER:Caught BrokerXCIDynamicException
Insert
Type:INTEGER:5
Text:CHARACTER:IXJXE0458E: [ERR 0407][ERR FORG0001] The operand cannot be cast to type 'xs:integer?'.

If i have missed any info required to understand and resolve the issue, please let me know.
Back to top
View user's profile Send private message
maurito
PostPosted: Mon Mar 07, 2016 2:47 am    Post subject: Re: Xpath statement in IIB10 mapping node Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

wmbfrz wrote:
I need to perform a transformation for meeting the following logic

Logic:
discountPrice = (totalPrice*(100-discountPercent)/100);

Xpath Xpression:
xs:integer($totalPrice) * (100 - xs:integer($discountPercent)) / 100

where totalprice and discountPercent are string type and are extracted from two separate elements from the input message. The Custom XPath statement in the IIB10 Mapping node fails and the output from debug is as follows

Insert
Type:INTEGER:5
Text:CHARACTER:{default}:decisionServiceResponseToOutputJSON
Insert
Type:INTEGER:5
Text:CHARACTER:XPath: xs:integer($totalPrice) * (100 - xs:integer($discountPercent))/100
RecoverableException
File:CHARACTER:Undefined
Line:INTEGER:-1
Function:CHARACTER:throwableToMbException
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:3949
Text:CHARACTER:Caught BrokerXCIDynamicException
Insert
Type:INTEGER:5
Text:CHARACTER:IXJXE0458E: [ERR 0407][ERR FORG0001] The operand cannot be cast to type 'xs:integer?'.

If i have missed any info required to understand and resolve the issue, please let me know.

The error message is clear:
Quote:
The operand cannot be cast to type 'xs:integer
Back to top
View user's profile Send private message
wmbfrz
PostPosted: Mon Mar 07, 2016 6:27 am    Post subject: Re: Xpath statement in IIB10 mapping node Reply with quote

Apprentice

Joined: 08 Jan 2010
Posts: 28

maurito wrote:
wmbfrz wrote:
I need to perform a transformation for meeting the following logic

Logic:
discountPrice = (totalPrice*(100-discountPercent)/100);

Xpath Xpression:
xs:integer($totalPrice) * (100 - xs:integer($discountPercent)) / 100

where totalprice and discountPercent are string type and are extracted from two separate elements from the input message. The Custom XPath statement in the IIB10 Mapping node fails and the output from debug is as follows

Insert
Type:INTEGER:5
Text:CHARACTER:{default}:decisionServiceResponseToOutputJSON
Insert
Type:INTEGER:5
Text:CHARACTER:XPath: xs:integer($totalPrice) * (100 - xs:integer($discountPercent))/100
RecoverableException
File:CHARACTER:Undefined
Line:INTEGER:-1
Function:CHARACTER:throwableToMbException
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:3949
Text:CHARACTER:Caught BrokerXCIDynamicException
Insert
Type:INTEGER:5
Text:CHARACTER:IXJXE0458E: [ERR 0407][ERR FORG0001] The operand cannot be cast to type 'xs:integer?'.

If i have missed any info required to understand and resolve the issue, please let me know.

The error message is clear:
Quote:
The operand cannot be cast to type 'xs:integer

i understand that it could be input data and function mismatch. My main intention was to confirm whether the xpath statement is correct assuming integer input.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Mar 07, 2016 7:02 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

The XPATH statement is wrong. The price needs to be a float or a double.
The result of the operation is not an integer...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Xpath statement in IIB10 mapping node
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.