WSO2Con 2013 CFP Banner
WSO2Con 2013

Registering WSDL with import/include schema

rmunjuluri's picture

Hello,

 

This is more of a general service registration question.

How do I upload a WSDL that imports/includes and external schema in WSO2 Registry for that matter in any registry? I understand that the "import/include" is a dependency relationship but, when I load the WSDL with an import/include, I get the following error"

 

Failed to put resource /authenticate_.wsdl. All database operations will be rolled back. WSDLException (at /definitions/types/xsd:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'authenticate.xsd', relative to 'file:/C:/Users/RAMMUN~1/AppData/Local/Temp/reg52479.bin'.: java.io.FileNotFoundException: This file was not found: file:/C:/Users/RAMMUN~1/AppData/Local/Temp/authenticate.xsd

 whats the best way to deal with this issue? has any one tried this in the past?

 

thanx in advance

-ram

chathura c. ekanayake's picture

Hi Ram, Can you attach the

Hi Ram, Can you attach the WSDL file you are trying upload, so that we can test the scenario locally. Thanks, Chathura
rmunjuluri's picture

registering a WSDL with import/include schema

here is the sample WSDL and XSD that I tried to load up. thanx -ram
krishantha's picture

We reproduced the error with

We reproduced the error with your given wsdl. Have to do more investigation on issue and come back to you soon. Thanks, Krishantha.
preben's picture

How is this comming on. I

How is this comming on. I had the same problem with relative imports ../
krishantha's picture

Hi Preben/RAM, Registry

Hi Preben/RAM, Registry doesn't support for relative path imports from local file system. You need to host your wsdl and schemas on a sever to import it from relative path. For an instance I will take the WSDL [1] provided by Ram and import it though the "import from URL" option. you will notice that WSDL import also import the relevant XSD files. [1] http://wso2.org/files/authenticate_.wsdl Thanks, Krishantha.
preben's picture

Are there any

Are there any recommendations on how to use relative imports in wsdl's or xsd's. When importing these from the filesystem using the latest registry 3.0.0 I get an error xsd:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'authenticate.xsd'.: java.io.FileNotFoundException: This file was n ot found: file:/C:/java/WSO2GR~1.0/authenticate.xsd We usually develop schemas and wsdl's using Eclipse where the ../ relative import are perfectly legal. Later on in the process the wsdl's would be imported to the registry. Thanks Preben
senakafdo's picture

Re: Are there any

Hi Preben, AFAIK, we don't have issues with relative imports. Can you paste the <xsd:import> elements in your WSDL file(s) to this thread, so that I can try to see whether I can reproduce this issue. Thanks, Senaka
preben's picture

Hi Senaka You can just use

Hi Senaka You can just use the files already attached to this thread. authenticate.xsd and authenticate.wsdl. I reproduced the error using these. Save the files to your filesystem and try and import the wsdl using the file import facility in the gui.
senakafdo's picture

Re: Hi Senaka You can just use

Hi Preben, It works well for me. I added these through the Meta Data -> Add -> WSDL. Thanks, Senaka
preben's picture

Hi Senaka Your right it

Hi Senaka Your right it works your way. What I did was browse -> create some collections -> and then add Resource -> upload from file. This will break. Thanks Preben
senakafdo's picture

Re: Hi Senaka Your right it

Hi Preben, I realize what you tried. This will not work, since the WSDL you tried to upload contains schema imports, and you have no option to upload multiple files at the same time. Instead you can "Import content from URL" (ex:- file:///home/senaka/Desktop/authenticate_.wsdl). This will upload the WSDL file to the location you want. Thanks, Senaka.
preben's picture

You could say that the gui

You could say that the gui gives the impression that it's perfectly legal to import wsdl's and xsd douring browsing the repository. So please make sure that this is clear or handle any errors better regarding wsdl import that imports schemas.
krishantha's picture

Hi Preben, At the moment,

Hi Preben, At the moment, the best workaround is to host your WSDL and Schema in a server and upload the content via URL. G-Reg doesn't support for relative schema imports from local file system. Thanks, Krishantha.
ppazos's picture

Hi, I think I have the same

Hi, I think I have the same problem in my scenario, I described it in http://wso2.org/forum/thread/5746. I discovered the error when clicking on Try this service. I am going to create a JIRA item as suggested by Indika in the other thread
senakafdo's picture

Re: Hi, I think I have the same

Got your issue via the JIRA system. Thanks, Senaka.