Skip to Content
author's profile photo
Former Member

Using Value Mapping feature during JavaMapping

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 );

}

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Posted on Jun 14, 2004 at 01:08 PM

    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 comment
    10|10000 characters needed characters exceeded