on 03-07-2007 2:06 AM
Hi,
I did the following and still not getting correct value
> Wrote a UDF to accept 1 parameter and return a response
******CODE**********
AbstractTrace trace= container.getTrace();
com.sap.aii.mapping.value.api.XIVMFactory xivm = new com.sap.aii.mapping.value.api.XIVMFactory() ;
String context = "http://sap.com/xi/XI";
com.sap.aii.mapping.value.api.IFIdentifier ifdsrc = xivm.newIdentifier("SRC","PAR1");
trace.addDebugMessage("AA");
com.sap.aii.mapping.value.api.IFIdentifier ifdtgt = xivm.newIdentifier("TGT","PAR1");
com.sap.aii.mapping.value.api.IFRequest ifreq = xivm.newRequest(ifdsrc,ifdtgt,location[0]);
trace.addDebugMessage("BB");
trace.addDebugMessage("CC");
com.sap.aii.mapping.value.api.XIVMService xivs = new com.sap.aii.mapping.value.api.XIVMService();
String value1 = new String("");
boolean v1=false;
try{
com.sap.aii.mapping.value.api.IFResponse ifr1 =xivs.executeMapping(ifreq);
v1 = ifr1.hasTargetValues();
trace.addDebugMessage(" Has Value is " + v1);
value1 = xivs.executeMapping("SRC","PAR1",input[0],"TGT","PAR1");
} catch (Exception e1)
{ result.addValue( "ERROR");}
trace.addDebugMessage("Value is" + value1);
if(v1 ==true)
{result.addValue(value1);}
else
{result.addValue(ResultList.SUPPRESS);}
CODE END **********
However, when I run the map test after connecting the input to the UDF, the output always is
>> THe boolean value is TRUE although I do negative tests with invalid values
>> From the tracing above, the value is always "Mapped value of Source: http://sap.com/xi/XI PAR1 SRC __cC_ Target: http://sap.com/xi/XI TGT PAR1"
I do not know what the exact value is and always getting a TRUE for the "hasTargetValues" method.
Please review if I am doing something wrong here
m
Do you want to access the value mapping inside a User Defined Function?
Code and explanation is available in this blog,.
/people/sukumar.natarajan/blog/2006/10/23/accessing-value-mapping-defined-in-directory-using-java-functions
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Still getting the same
"Mapped value of Source: http://sap.com/xi/XI PAR1 SRC LAAA Target: http://sap.com/xi/XI TGT PAR1"
& no other values
The value mapping does not work in Integration Builder's test tab.
Instead of a real mapping result, the result is the generated text: "mapped value of..."
Value mapping can only be tested by running a real interface (sending test message from RWB amounts to a real interface in that regard).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.