Hello,
does anybody has experience to the executing of value mappings during a java mapping in XI.
I have the problem, that the funktion
public abstract String query( IRepresentation source,
IRepresentation target)
return null for a enquired object-key. In the Directory I have entered the value mapping table.
Here are the inserts:
Source-System: EU_OPTO_SAPR3
Source-Objecttyp: Name
Source-Namespace: urn:sap-com:document:sap:idoc:messages
Source-Key: UsedName
Target-System: EU_OPTO_TEST
Traget-Objecttyp: Name
Target-Namespace: http://zeiss.org/xi/mo/test
Traget-Key: KeyValue
Here is the source-code:
try{
KeyMappingService s = KeyMappingService.getInstance();
IRepresentation rIn = s.newRepresentation ("EU_OPTO_SAPR3", "Name", "urn:sap-com:document:sap:idoc:messages", "UsedName");
IRepresentation rOut = s.newRepresentation("EU_OPTO_TEST", "Name", "http://zeiss.org/xi/mo/test");
String usedIniFile = s.query( rIn, rOut );
generateTrace( "reading key-Mapping [" + usedIniFile + "]-[" + rOut.getKey() + "]", TRACELEVEL_INFO, false );
} catch( Exception e ){
generateTrace( "Exception reading key-Mapping " + e.toString(), TRACELEVEL_INFO, false );
}
Hi!!!
Which version of XI do you use? I use 2.0 - I hope SAP doesn't change the signature of "newRepresentation" function between XI versions.
You've got the wrong order of parameters in "newRepresentation" function: you put the object type on the namespace place.
Here is a simple example:
IRepresentation source = s.newRepresentation(sourceSystem, sourceNamespace, sourceObjectType, sourceKey);
IRepresentation target = s.newRepresentation(targetSystem, targetNamespace, targetObjectType);
Have a nice day,
Andrzej Filusz
Add a comment