cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping-Problem

Former Member
0 Kudos

Hi,

I wrote a web service that create a SELECT on a JDBC. My first WSDL allows to ask for 3 different columns. If only one column should be in the WHERE statement, the other two shouldn't appear in the payload. This works.

My second web service is designed like the first one. The problem: I did anywhere a mistake I couldn't found. If I fill all fields that appear in the JDBC key-field it works. If I ask for only one, the following mistake appears:

<b>Cannot produce target element /ns0:MT_Hardware_DB_request/STATEMENT/TABLENAME/key1/type. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target</b>

This happened, because he wants all key fields:

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

<ns1:MT_Hardware_DB_request xmlns:ns1="http://namespace">

<STATEMENT>

<TABLENAME action="SELECT">

<TABLE>dbo.myTable</TABLE>

<access>

<model> </model>

<type> </type>

<manufacturer> </manufacturer>

<class> </class>

<price> </price>

<description> </description>

</access>

<key1>

<model compareOperation="LIKE">%P%</model>

<b><type compareOperation=""/>

<class compareOperation=""/></b>

</key1>

</TABLENAME>

</STATEMENT>

</ns1:MT_Hardware_DB_request>

The bold key types will not be produced if I only fill the model key in my web service. But why it works in my first web service? Also there are only those key fields generated whose have an input in web service.

My Mapping looks like this:

source field -> Java mapping that checks if field is empty -> ifWithoutElse -> target field

The Then-Part is filled with source field, means, target field is only create, when source field has an input.

Any ideas?

thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Solved it on my own.

I use a mapping, that maps from abstract sync interface to the corresponding sync inbound interface of my JDBC adapter. These interfaces use the same message type and have a one-2-one direct mapping. These mapping existed, but after I delete and redo <b>the same</b> mapping it works. This is a very big disadvantage of SAP XI that some objects have to be saved again, without changing anything, that he recognized changes.

CU