cancel
Showing results for 
Search instead for 
Did you mean: 

Java mapping and no content conversion

Former Member
0 Kudos

Hi all,

I have a file to idoc scenario. The file is in flat idoc format and I've made my own java mapping that gets the flat file and converts it to idoc xml format.

I don't use content conversion in the sender file adapter because I don't wan't the file to be converted to xml before the java mapping processes it. But with this configuration my scenario fails in the interface determination step, as it doesn't find an xml to apply the java mapping.

Is there a way to make it work as I want? (with my java mapping and not applying content conversion?) If not, is there a way to put all the file in a single xml tag using content conversion?

I mean something like this:

<FILE>

-


-


-


-


-


-


</FILE>

This way it would be easy for my java mapping to remove the tags and work with the flat file as it does now.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

> But with this configuration my scenario fails in the interface determination step, as it doesn't find an xml to apply the java mapping.

When you have a Java mapping, you need an interface anyway, but the structure of the interface can be anything, like a dummy field. You create an interface mapping and assign your mapping there, then you can use it in configuration.

Former Member
0 Kudos

Thanks Stephan for your answer.

In fact I have the defined that interface, as well as a dummy data type and message type that uses it. I still get the error though. My guess is that, as I don't use content conversion in file adapter (message protocol is file) the outbound message is in fact not in xml format, and it cannot identify it in interface determination. That's my guess but perhaps I'm wrong?

This is the error I'm getting:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
- <!--  Interface Determination 
  --> 
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
  <SAP:Category>XIServer</SAP:Category> 
  <SAP:Code area="IF_DETERMINATION">CX_ID_PLSRV</SAP:Code> 
  <SAP:P1>No interface determination found for outbound interface <a href="http://********.****/EDELIVERY.SI_OUT_A_0596_RECADV:" TARGET="test_blank">http://********.****/EDELIVERY.SI_OUT_A_0596_RECADV:</a> Error while determining root tag of XML: BOM / charset detection failed</SAP:P1> 
  <SAP:P2 /> 
  <SAP:P3 /> 
  <SAP:P4 /> 
  <SAP:AdditionalText /> 
  <SAP:Stack>Error when determining the inbound interface: No interface determination found for outbound interface <a href="http://********.****/EDELIVERY.SI_OUT_A_0596_RECADV:" TARGET="test_blank">http://********.****/EDELIVERY.SI_OUT_A_0596_RECADV:</a> Error while determining root tag of XML: BOM / charset detection failed No interface determination found for outbound interface <a href="http://********.****/EDELIVERY.SI_OUT_A_0596_RECADV:" TARGET="test_blank">http://********.****/EDELIVERY.SI_OUT_A_0596_RECADV:</a> Error while determining root tag of XML: BOM / charset detection failed Error while determining root tag of XML: BOM / charset detection failed Error while parsing an XML stream: 'BOM / charset detection failed'.</SAP:Stack> 
  <SAP:Retry>M</SAP:Retry> 
  </SAP:Error>

Any idea?

stefan_grube
Active Contributor
0 Kudos

> My guess is that, as I don't use content conversion in file adapter (message protocol is file) the outbound message is in fact not in xml format, and it cannot identify it in interface determination. That's my guess but perhaps I'm wrong?

No, you are right. The error occurs as you work with PI 7.1 and have an interface declared as stateless.

For all interfaces of this type, PI tries to identify the operation by root tag name which is not possible, when the payload is not XML.

Change the interface type to stateless XI 3.0 compatible, this should work (I hope)

Former Member
0 Kudos

Exactly what I needed. Thank you very much Stefan.

Answers (0)