Skip to Content
avatar image
Former Member

Create Java-Mapping..


a web service that I created in XI is consumed by a SAP Portal application. Normally other application like XML Spy create a SOAP request like this:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_Service_request xmlns:ns0="http://namespace">





SAP Portal didn't send the empty fields:

<ns0:MT_Service_request xmlns:ns0="http://namespace">



My own Java-Mappings couldn't handle this. I tried something like this:

Field -> Exist -> Java Function

Field -> Java Function (same)

The first input should check, if field is delivered by SOAP request: if(a==null)

Second input should check if it is empty: a.equals("")

But it don't seem to work. Can I proof this with a==null?

It seems that the whole mapping failed, if I have a non existing field.

How does the function Exist proof the fields??



Message was edited by: Christian Riekenberg

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 25, 2006 at 07:48 AM


    Instead of using EXISTS, use MAPWITHDEFAULT.

    MAPWITHDEFAULT will check for the existence of the source field and if it exists then take the source value and pass it as the output. It the field does not exists, then it will pass the Default Field as the Input.

    Use MAPWITHDEFAULT and then pass the output of MAPWITHDEFAULT to the UDF. Make the dfeault value of MAPWITHDEFAULT as a blank string "" and in your UDF check it is is blank , then it implies the field has not come in the source, else the Source Field will be the input to the UDF.



    Add comment
    10|10000 characters needed characters exceeded