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 » Error while mixing Xpath and ESQL in mapping node - IIB V9

Post new topic  Reply to topic
 Error while mixing Xpath and ESQL in mapping node - IIB V9 « View previous topic :: View next topic » 
Author Message
alaychem
PostPosted: Tue Feb 13, 2018 4:04 am    Post subject: Error while mixing Xpath and ESQL in mapping node - IIB V9 Reply with quote

Acolyte

Joined: 10 Feb 2016
Posts: 66

I'm getting the following error while mixing Xpath and custom ESQL:

Code:
[ERR 0395][ERR XPTY0004] The argument was expected to be a sequence containing no items or one item, but the value is a sequence containing more than one item. It is a type error if a value does not match a required type as specified by the SequenceType matching rules.


The expression in the mapping node is:

Code:
<customFunction lang="esql" ref="BidiUtils:esbBidiHebrewConvert">
                <input path="request_by_array/request_by/mash_street_no" var="mash_street_no"/>
                <output path="TNBK_KTOVET_BAIT"/>
                <param name="message" value="fn:string((fn:substring($mash_street_no, 1, 6),&quot;&quot;)[1])"/>
            </customFunction>


For some reason, I don't get this error while evaluating this expression:
Code:
<customFunction lang="esql" ref="BidiUtils:esbBidiHebrewConvert">
                <input path="request_by_array/request_by/mash_street" var="mash_street"/>
                <output path="TNBK_KTOVET_REHOV"/>
                <param name="message" value="fn:string(($mash_street,&quot;&quot;)[1])"/>
            </customFunction>
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Feb 13, 2018 5:27 am    Post subject: Reply with quote

Grand High Poobah

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

Looks like you have a type mismatch for the output...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
alaychem
PostPosted: Thu Feb 15, 2018 2:10 am    Post subject: Reply with quote

Acolyte

Joined: 10 Feb 2016
Posts: 66

For the output?? no... "BidiUtils:esbBidiHebrewConvert" returns a string, nothing else.
Back to top
View user's profile Send private message
martinb
PostPosted: Mon Feb 19, 2018 2:37 am    Post subject: Reply with quote

Master

Joined: 09 Nov 2006
Posts: 210
Location: UK

Hi

My guess is that the XPath error XPTY0004 is being thrown because you are causing one of the XPath functions that requires a single value argument to be invoked with a sequence of values.

I note you are using the array operator, "[1]" to coalesce possible sequence into a single value. However it looks like your placement is such that it will only protect the fn:string() cast function but not the fn:substring(). Also I suspect you'd want the string cast applied first.

I think you'd need something more like this:-

Code:
<param name="message" value="fn:substring((fn:string($mash_street_no),&quot;&quot;)[1], 1, 6)"/>


HTH
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Error while mixing Xpath and ESQL in mapping node - IIB V9
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.