Added by Ruslim Chang , last edited by Ruslim Chang on Aug 07, 2008
Normally, we would love to get XSD from the partner, so that we can upload it directly to SAP-PI, and use it to create message interface. However, some time, we may not be able to upload it correctly, as it may contains certain tags which SAP-PI does not support, like <xsd:import> or <xsd:include>. SAP-PI currently on works with one single XSD file, not with multiple modularized XSDs. How should we go about it if we have to face this situation?
However, what if we receive huge modularized XSDs which covers the whole products range that offered by a certain company, whereas we just actually interested in one of their products offering. Those 2 alternatives above may not be a a visible solutions anymore.
This is what happened in one of the project in states when we have requirements from user to connect SAP CRM with credit scores companies using SAP-PI. They provide us a huge main XSD which covers the whole range of products offered y their companies, and which links to many other XSDs using <xsd:import> and <xsd:include>. After trying and struggling with alternative 1 and 2, we end up doing this alternative.
The idea is to create XML instance from XSD. And then later on, we create back the XSD using the XML created from the previous step. These 2 steps are breeze of cakes to do, if you have XML tool of course However, there are several things we need to remember, if we dont want to have problem uploading the generated XSD into SAP-PI as well as creating the proxy from it in your back end application.
And last but not least, you need to check the correctness of the generated XSD by validating it against the sample XML file you get from the partner system.
Comments (Hide Comments)
Really nice way. However I am still facing the problem while trying it out. I created XML instance using stylus studio deleted XMLSchemaLocation which it was referring to and then created the XSD from the XML. But I again end up with a XSD which refers to another XSD for some elements though it has taken out now "import" statements from original XSD. It has created a small schema under the same folder where new schema is created and referring it by tag SchemaLocation again.
Any help on this matter will be appreciated. (Not sure if it is a right place to ask the query).
Many Thanks.
Hi Calvin,
Have you make sure that when you convert the XML back to XSD using XML tool, you have checked all types to be local?
Regards - Lim...
Posted by Calvin at Aug 12, 2008 11:22
Posted by Ruslim Chang at Aug 25, 2008 10:28 | Edit
Life is beautiful! Let's make it meaningful and colorful!