cancel
Showing results for 
Search instead for 
Did you mean: 

JAVA mapping, output...

Former Member
0 Kudos

Hello guys,

Again here I am with some simple and easy doubts.

When I'm creating a mapping between two interfaces with JAVA, I'll have a call to :

execute(InputStream in, OutputStream out).

The questions are, these two arguments are two XML files. The first will be the file we want to send, but the second how will it be?

If I'm using a call to a RFC, the structure of the second file will have the importing, exporting and tables arguments of the RFC? And how are they disposed...?

The idea is to perform the correspondence from the original file to the parameters of the RFC, but how will the RFC load the parameters from the file...?

I know it's a really simple doubt but can anyone clear my mind?

Thanks a lot in advance...

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>>execute(InputStream in, OutputStream out).

>>>>The questions are, these two arguments are two XML files

>>>The first will be the file we want to send, but the second how will it be?

the input (inputstream) is the "XML" you want to map to the output (outputstrem)

the first one is not what you send

you send the second one (the mapping output)

>>>>If I'm using a call to a RFC, the structure of the second file will have the importing, exporting and tables arguments of the RFC? And how are they disposed...?

map your file parameters to importing and tables

this way it can go to RFC (you don't use exporting if you're sending data from XI to r/3 with the use of RFC)

Regards,

michal

Answers (2)

Answers (2)

Former Member
0 Kudos

> Hello guys,

>

> The questions are, these two arguments are two XML

> files. The first will be the file we want to send,

> but the second how will it be?

These arguments dont necessarily need to be XML structures, in fact this method accepts any kind of input i.e. flat structure, strings, etc.. However, you are using this mapping within a message mapping so most likely you will pass an XML structure to it. The first parameter is the input (the source) and the second one is the resultt of your Java mapping.

> If I'm using a call to a RFC, the structure of the

> second file will have the importing, exporting and

> tables arguments of the RFC? And how are they

> disposed...?

The RFC structure you have to download it from the R/3 system where you want to call this RFC. You do this from your SWCV in the repository. After you have downloaded the RFC metadata you will see both messages, the request and the response message.

> The idea is to perform the correspondence from the

> original file to the parameters of the RFC, but how

> will the RFC load the parameters from the file...?

Here is where your message mapping (enhanced with your Java mapping) will come into picture.

PS: Without knowiing your requirements I think you can do this mapping from file to RFC call without the use of a Java mapping. i.e. message mapping.

>

> I know it's a really simple doubt but can anyone

> clear my mind?

>

> Thanks a lot in advance...

Good Luck,

Roberto

Message was edited by: Roberto Viana

Message was edited by: Roberto Viana

Former Member
0 Kudos

Roberto your answer was really helpfull, you were able to clear my doubts, but I'm getting another problem...a new one

After creating the Java Mapping I've imported it and tested, but although the test gives me:

"Messages:18:52:52 Start of test

Executed successfully

18:52:52 End of test"

I'm not getting any on the side of the RFC...meaning, I'm not getting the xml file.

I've tested the JAVA class and I generate correctly the xml output.

Despite the fact that I wasn't getting anything on the side of the RFC, I've tested the whole scenario and I get an error on message monitoring.

" Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not get functionname from XML requst: com.sap.aii.af.rfc.RfcAdapterException: failed to read funtionname from XML document: missing namespace declara"

I've checked if there is any namespace missing but the namespace is correct... What am I missing...?

Former Member
0 Kudos

Hi Goncalo,

If I'm using a call to a RFC, the structure of the second file will have the importing, exporting and tables arguments of the RFC? And how are they disposed...?

Since you are sending a message to RFC your target structure should be of RFC format.

You need to import your RFC structure(message) into XI and do the mapping between your sourec and the imported RFC structure.

Regards

Anand