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"?>
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.