cancel
Showing results for 
Search instead for 
Did you mean: 

Nodes no mapping at runtime

samantha_nez
Participant
0 Kudos

Hi experts,

We have a web service which references other XSD files. When web service and these XSD files are imported as External Definitions, we see PI adds namespace prefixes in the nodes which come from XSD. As the response message that we receive from Third-Party system does not include any namespace prefix in nodes, our Message Mapping did not work (did not recognize these nodes and were not mapped in consequence).

In order to fix this issue, we created a Java Mapping to add the prefixes where were necessary, so now we have an Operation Mapping that first executes the Java Mapping and, once prefixes are added, Message Mapping runs.

If we test in Repository the Operation Mapping with a message received at runtime (got from SXMB_MONI), it works perfectly, no problems found. However, at runtime we see the nodes with prefix are not mapped (in moni transaction, after requesting message mapping, these nodes disappear).

The Java Mapping has a class that extends AbstractTransformation with its corresponding method transform(TransformationInput in, TransformationOutput out) throws StreamTransformationException.

Any idea why at runtime these nodes are not mapped but yes at design time?

Thanks in advance,

Samantha.

Accepted Solutions (1)

Accepted Solutions (1)

samantha_nez
Participant
0 Kudos

Hi experts,

Finally, we found the problem. The issue was in the Java mapping. We receive the external message without parsing, so the Java mapping did not work because we did not manage it. After modifying it in order to parse input to create XML document tree, it works.

Please, note MM worked because for testing we formatted the source message clicking on the 'Pretty Print' button.

Thanks for your help.

Best regards,

Samantha.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Samantha,

If i have understood your problem correctly. there are different namespaces prefixes included in the XSD. If yes, you would have to create dependency or allow the use of prefixes. Please check XMLAnonymizerBean usage.

Regards,

Hiren

samantha_nez
Participant
0 Kudos

Hi Hiren,

I checked the forums and help.sap. Right now the problem is not in the prefixes. The Java Mapping solves this issue.

After new tests, we have seen the Java Mapping in OM is ignored at runtime. The OM is called but no the Java Mapping included. Therefore, the Message Mapping does not map the nodes.

Any idea why is Java Mapping ignored at runtime? After refreshing all caches, it should be recognized and executed, shouldn't it?

Thanks for your help,

Samantha.

Former Member
0 Kudos

Java Mapping shouldnt be ignored. Suprising....

Can you check if it's correctly deployed.

Regards,

Hiren

RaghuVamseedhar
Active Contributor
0 Kudos

Samantha,

Yes, Ideally it should have worked.

As temporary work-around, copy that OM (name new OM as oldNameOM_1). Use this new object in Interface mapping. Retest the interface and post the finding.

samantha_nez
Participant
0 Kudos

Hi Raghu,

We did that work-around creating from scratch all objects again (importing java mapping, new OM, etc.), and it is not still working. Even, we have also created a new java mapping, but no good results.

Could a problem of releases be? java libraries? We are using JDK 1.6 for developing.

Regards,

Samantha.

iaki_vila
Active Contributor
0 Kudos

Hi Samantha,

You can also refresh the CPA cache:

http://hostPI:portPI/CPACache/refresh?mode=full

You can execute the refresh with PIDIRUSER or another user with the role SAP_XI_ID_SERV_USER

Regards.

samantha_nez
Participant
0 Kudos

Hi Iñaki,

Yes, we refreshed CPA and checked caches on Pimon. SXI_CACHE too, but it is still not working.

Regards,

Samantha.

azharshaikh
Active Contributor
0 Kudos

Hello Samantha,

Ensure that you have Activated the Java Mapping and added it in the OM.

Check in the Message Moni Log, if its picking the correct OM.

Try to do some dummy change in JM and Save & Activate. Test if it works.

Regards,
Azhar

samantha_nez
Participant
0 Kudos

Hi Azhar,

We have all objects activated and the OM is called. We also did dummy changes for activating again. However, the issue is not solved.

Regards,

Samantha.