cancel
Showing results for 
Search instead for 
Did you mean: 

Java Mapping : Read Interface Mapping detail data

Former Member
0 Kudos

Hi,

In various mappings techniques, you have access to a lot of message header information, even dynamic information.

But as far as I could see, access to some ( important ) mapping data itself ( e.g. input message type / output message type ) is not possible ?

( you have sender interface and target interface in the header but no further details )

Or does somebody know how to get access to the mapping environment runtime data ?

Or did somebody found an ( undocumented ? ) api to read data from ID/IR ?

In my case, I would only need access to the message datatype 'name' ( not actual structure but that could be nice for other advanced purposes ) to build a valid ( yet generic MAP ) XML output

rgds

Dirk

rgds

Dirk

Accepted Solutions (0)

Answers (2)

Answers (2)

moorthy
Active Contributor
0 Kudos

HI,

You can access following runtime constants - go thru this doc-

http://help.sap.com/saphelp_nw2004s/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm

if you want message type to acces, it is nothing but root node in the payload..

hope this helps,

Regards,

moorthy

Former Member
0 Kudos

Hi Moorthy

But that root would be SOURCE message type and not TARGET message type ? Right ? ( In my case, I needed the TARGET )

Dirk

moorthy
Active Contributor
0 Kudos

Hi,

Target Message type , you will not get in the java mapping. Because you are generating the target message manually in the java code... right..

Regards,

Moorthy

Former Member
0 Kudos

Hi Moorthy,

Yes, I understand. But it would have been nice to know what target stucture is 'expected'....

Since you need to create an interface mapping, it should ideally be possible to use this 'meta' data in your own java mapping. But if SAP doesn't publish it (yet), I guess it's not possible....

thx

Dirk

Former Member
0 Kudos

Dear Dirk,

I spent A LOT of time on this. And I found something.

I found an undocumented way to retrive the XSD from URL:

http://<server>:<java stack port>/rep/read/ext/?method=XSD&release=2.0&KEY=<message interface name>%<namespace>&TYPE=ifmmessif&language=EN&VC=SWC&SWCGUID=<SWCGUID>

You may have an help composing this url looking to the SPROXY transaction on a generated object on the tab "Documentation". Look to the page URL.

Regards,

Sandro

Former Member
0 Kudos

Hi Sandro

Thx for the effort ( sometimes I also hate the SDN challenges...)

But I'm can't get the URL to return a proper response ( I get java dumps / stack traces )

I'm also confused on the 'key' : How can you retrieve an XSD for a message type if you only pass message interface name ? Or do you get 'all' XSDs ( request / response / fault )

From what I read, I think that what you did is try to figure out ( debug ? ) how SPROXY reads the IR when generating the various objects ? Right ? Interesting idea.

I don't understand your hint for sproxy / documentation : If i select an message type proxy object , I don't a documentation tab for it . I only see the SPROXY documentation .

rgds

Dirk

Former Member
0 Kudos

Hi Sandro,

I indeed debugged the sproxy for the generation of a datatype ( start simple ) and at some point i get this huge URL that results in the WSDL file !!

http://sapbebr014.be.getranet.com:53000/rep/read/ext/?service=READ&method=WSDL&KEY=<MyDataType>%7cht...

( used by ABAP class cl_proxy_wsdl_index , method 'parse_url' )

So that's not a bad start

Dirk

Message was edited by:

Dirk Deberlanger

Former Member
0 Kudos

Hi Sandro

And indeed, if you replace the 'WSDL' by 'XSD' and the 'TYPE=ifmtypedef' by

'TYPE=ifmmessif', you get e.g. message interface info .

So , I guess we will be writing some 'wrappers' around this and see were we end.

In ABAP I would of course use the same classes as SPROXY does. I guess in JAVA

( if you don't want to make ABAP calls ) , you would need to code an a HTTP request with the URL ( until we find the corresponding JAVA classes...)

Seems like a lof work, but i will allow you to make more generic ( read 'reusable' ) mapping programs...

thx

Dirk

Former Member
0 Kudos

I think that to build a Java class that make this call and cache the result will be the best thing.

Regards,

Sandro

Former Member
0 Kudos

Hi Dirk,

please let me know if during your debug you found the way to get the URL that give access to the documentation (that one accessed pressing the button "Show/Hide documentation) in the Integration Scenario (configuratin part).

I'am trying to look for the URL without success (at ths time)

Regards,

Sandro