Generate DDIC structure from XSD?
Asked Answered
I

1

7

I have a number of XSDs that are part of the enterprise definitions for several services at the client.

I would like to be able to take a single XSD and generate a DDIC structure from it (without the use of PI!)

Seeing as you can generate proxies directly from a WSDL, and this also generates structures and data elements from the XSD definitions inside the WSDL, there is obviously already ABAP code that does this.

But do you know what classes/function modules to use to achieve this? Perhaps there is a convenient utility function or class method that takes the XSD as input and generates the relevant DDIC objects?

Some background on why I need this:

Some of the services include variable sections that include a piece of XML containing the data for one of the enterprise XSD entities; I am hoping to have a DDIC representation of these, which I can fill at runtime and then convert to XML to include in the message.

Ionize answered 30/7, 2013 at 7:27 Comment(0)
I
4

There is a program on the system called SPROX_XSD2PROXY with which you can upload one or more XSD files which will generate proxy objects for you.

You also end up with a service consumer with a corresponding class and what looks like a dummy operation.

The program is fairly short; it uploads the files(s) to an XSTRING, then converts the XSD(s) to WSDL(s) and finally the WSDL(s) to proxy objects using methods of a class called CL_PROXY_TEST_UTILS.

However, the result is satisfactory as it does give me a structure I can work with. And by examining the contents of those methods, it may be possible to build a more fine-tuned tool if I need one.

Ionize answered 15/8, 2013 at 11:11 Comment(1)
And by the way, do you know the other way around: if I have some RFC module which I want to translate XML/XSD and export? Is there simpler way than generating web-service for it?Carboni

© 2022 - 2024 — McMap. All rights reserved.