cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC adapter on XI 3.0 SP12

Former Member
0 Kudos

Hi all,

I am working on a scernario SOAP->XI3.0(SP12)->JDBC

On the sender side, I have a simple web application posting a SOAP request to an outbound SOAP adapter. I have used Apache AXIS to generate the SOAP request.

On the JDBC side, I have imported the database schema into XI as external resource. The mapping is straightforward (simple moves, no transformation). This is the exception I get when I execute the secnario:

<Trace level="1" type="T">Interface Mapping urn:xilab10 SoapSenderToDatabaseReceiver</Trace>

<Trace level="1" type="T">RuntimeException during appliction Java mapping com/sap/xi/tf/_CustomerToMirageDB_</Trace>

<Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /MirageDB/CUSTOMER_MASTER/row/access/CUSTOMER_NUMBER. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:292) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:63) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:232) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:63) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:91) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:78) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:88) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:63) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0.processFunction(MappingServiceObjectImpl0.java:131) at sun.reflect.GeneratedMethodAccessor536.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy28.processFunction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:95) at com.sap.engine.services.rfcengine.RFCJCOServer.handleRequestInternal(RFCJCOServer.java:113) at com.sap.engine.services.rfcengine.RFCJCOServer$ApplicationRunnable.run(RFCJCOServer.java:171) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)</Trace>

Appreciate your help.

Regards,

Shailesh

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi Shailesh,

if you're using JDBC adapter then the format of your message that you send to database should look like this:

http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

Regards,

michal

Former Member
0 Kudos

Hello Michal,

while your documentation link is certainly helpful, Shailesh's problem happens in the mapping - way before the message even reaches the JDBC receiver.

Regards,

Thilo

Former Member
0 Kudos

Hi Shailesh/ Thilo

As per the exceptin msg,

>>>>>>com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /MirageDB/CUSTOMER_MASTER/row/access/CUSTOMER_NUMBER. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

try to check

- If source msg is compliant to the source XSD

- If target msg is compliant to the target XSD

- Do a test run in msg mapping with the Input XML

here you can fix most of the issues

- Try to hardcode the target field, which is having problems in getting created & run the scenario.

Hope it helps

Regards

Vishnu

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Can you see the source element for target element /MirageDB/CUSTOMER_MASTER/row/access/CUSTOMER_NUMBER - is it populated ?

Also, have you tried re-activating the mapping - this sometimes makes a difference.

Have you also run the mapping through the testtool ok prior to this with no errors ?

Cheers

Colin.

Former Member
0 Kudos

Thanks Michal, Thilo, Colin, Vishnu,

I have tested the map using the test utility and it tests fine. Also tried reactivating it. Still stuck with the same error.

Yes, the field /MirageDB/CUSTOMER_MASTER/row/access/CUSTOMER_NUMBER is populated. Infact thats the primary key in the database

The wierd part is that the same scenario works well on XI3.0 SP9 without any errors.

So I'm guessing this has to do with SP12 in some way. Any patch related issues that anyone aware of?

Heres the db schema that we import inside XI as an external resource. The receiver message type is derived from this schema:

Appreciate your help!

<?xml version="1.0" encoding="ISO-8859-1"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

<xs:element name="ACCOUNT_GROUP">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="AUTHORIZATION_GROUP">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="CITY">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="CITY_CODE">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="COMPANY_CODE">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="COUNTRY_CODE">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="COUNTRY_KEY">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="CUSTOMER_ADDRESS">

<xs:complexType>

<xs:sequence>

<xs:element ref="row" />

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="CUSTOMER_MASTER">

<xs:complexType>

<xs:sequence>

<xs:element ref="row" />

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="CUSTOMER_NUMBER">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="DISTRICT">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="FAX_NUMBER">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="FIRST_NAME">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="HOUSE_NUMBER">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="INDUSTRY_KEY">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="INITIAL_CONTACT">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="LAST_NAME">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="MirageDB">

<xs:complexType>

<xs:sequence>

<xs:element ref="CUSTOMER_MASTER" />

<xs:element ref="CUSTOMER_ADDRESS" />

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="POSTAL_CODE">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="REGION">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="TELEPHONE_NUMBER">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="access">

<xs:complexType>

<xs:sequence>

<xs:element ref="CUSTOMER_NUMBER" />

<xs:element ref="COUNTRY_KEY" minOccurs="0" />

<xs:element ref="FIRST_NAME" minOccurs="0" />

<xs:element ref="LAST_NAME" minOccurs="0" />

<xs:element ref="AUTHORIZATION_GROUP" minOccurs="0" />

<xs:element ref="INDUSTRY_KEY" minOccurs="0" />

<xs:element ref="ACCOUNT_GROUP" minOccurs="0" />

<xs:element ref="INITIAL_CONTACT" minOccurs="0" />

<xs:element ref="COMPANY_CODE" minOccurs="0" />

<xs:element ref="CITY" minOccurs="0" />

<xs:element ref="POSTAL_CODE" minOccurs="0" />

<xs:element ref="REGION" minOccurs="0" />

<xs:element ref="HOUSE_NUMBER" minOccurs="0" />

<xs:element ref="TELEPHONE_NUMBER" minOccurs="0" />

<xs:element ref="FAX_NUMBER" minOccurs="0" />

<xs:element ref="DISTRICT" minOccurs="0" />

<xs:element ref="COUNTRY_CODE" minOccurs="0" />

<xs:element ref="CITY_CODE" minOccurs="0" />

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="row">

<xs:complexType>

<xs:sequence>

<xs:element ref="table" />

<xs:element ref="access" />

</xs:sequence>

<xs:attribute name="action" use="required">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="INSERT" />

</xs:restriction>

</xs:simpleType>

</xs:attribute>

</xs:complexType>

</xs:element>

<xs:element name="table">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="String" />

</xs:restriction>

</xs:simpleType>

</xs:element>

</xs:schema>