Discussion

XSD import in 5.1

I have set of XSD files. the first file has reference of second file and the second file has reference of 3rd and 4th file. I placed all the file in serviceExport directory (i.e. all files are placed at same location).
When i am trying to import first file, i am getting error something like:

Could not load document from URL 'file://local/WebLogic9/0/bea/domains/jids1L/dev_prpc_node40/tmp/_WL_user/prweb/uncr60/public/StaticContent/global/ServiceExport/file1.xsd'

But when i try to import 3rd or the 4th xsd file (which does not have any reference to other XSDs) it gets imported successfully.

Can someone please advice what could be the issue? why other XSDs are not imported if they are referred in original XSD? Is that a constraint from pega or is there any specific way of providing path to locate referenced files?

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

Pega
July 6, 2010 - 8:27am

First off, the reason you are putting the files in the Service Export directory is so that you can use an http:// URL rather than a file:// url. HTTP URL's are generally much easier to work with than file URL's. Secondly, relative xsd file imports are resolved based on the URL of the file they are being imported from. The files must be in the correct file path structure according to the relative references. The error message tells you exactly which file it can't load. To verify this, try copying the bad URL into a browser to see if the file exists or not.

July 6, 2010 - 8:37am

thanks Tandp. That is exactly my concern, why is it taking the file:// even when i am not providing it in XSD url.

I was not using file:// url, i had specified the absolute path i.e. "/local/WebLogic9/.../ServiceExport/file1.xsd" but error came out as "file://local/WebLogic9/.../ServiceExport/file2.xsd".

As i mentioned earlier, file location is same for all XSD files.

Pega
July 6, 2010 - 9:46am

An absolute file reference is not the same as a URL. Whenever an XSD file contains import references to other docs, we always recommend hosting the set of docs at an HTTP-based URL. I don't know exactly how to do this in WebLogic, but I typically use the webapps/ROOT folder of Tomcat to host XSD or WSDL docs that need to be imported into PRPC.

July 7, 2010 - 7:46am

Thanks again TANDP. I tried by hosting all the files in tomcat at my local machine and it worked fine there.

February 8, 2011 - 2:25am

hi everyone, I had five XSD's with one referencing other xsd's. Can anyone tell us how to host these xsd's by using Http based URL. we are using weblogic server. do we need to put all these xsd's in ServiceExport directory of pega.