This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 82944 - Model should handle external schema/wsdl URL references with out forcing user to use retriever wizard.
Summary: Model should handle external schema/wsdl URL references with out forcing user...
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Girish Balachandran
URL:
Keywords:
Depends on: 83239
Blocks:
  Show dependency tree
 
Reported: 2006-08-17 22:57 UTC by Ritesh Adval
Modified: 2007-03-08 00:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screen shot of the problem (211.00 KB, application/octet-stream)
2006-08-17 22:58 UTC, Ritesh Adval
Details
schema file having problem (1.60 KB, application/octet-stream)
2006-08-17 22:59 UTC, Ritesh Adval
Details
UI problems (139.50 KB, application/octet-stream)
2006-08-17 23:08 UTC, Ritesh Adval
Details
capture of fix verification (92.85 KB, application/octet-stream)
2007-03-08 00:37 UTC, tonybeckham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ritesh Adval 2006-08-17 22:57:44 UTC
I imported soap encoding schema at 
http://schemas.xmlsoap.org/soap/encoding/ in a schema and used SOAP-
ENC:arrayType as the type of one of my element.

I could validate but in Schema tree under "referenced schema", it shows up as 
broken reference.
Comment 1 Ritesh Adval 2006-08-17 22:58:26 UTC
Created attachment 33038 [details]
screen shot of the problem
Comment 2 Ritesh Adval 2006-08-17 22:59:36 UTC
Created attachment 33039 [details]
schema file having problem
Comment 3 Ritesh Adval 2006-08-17 23:08:25 UTC
Note also there some UI issue like:
(a) Missing type information for “arrayOfString[1…1]”, expected

“arrayOfString[1…1] instanceof SOAP-ENC:arrayType" for the node.

(b) Note preview is showing type=””, expected type=”SOAP-ENC:arrayType”

see attached doc soapencoding_xsd_UI_problems.
Comment 4 Ritesh Adval 2006-08-17 23:08:55 UTC
Created attachment 33040 [details]
UI problems
Comment 5 Chris Webster 2006-08-18 01:03:56 UTC
Was the retriever used to reference this file locally or were you expecting this
to work from a remote location?
Comment 6 Ritesh Adval 2006-08-18 01:47:44 UTC
This should work from remote location. User should not be forced to make changes
to some existing xsd which imports an external xsd.

Use case is that someone sends me an xsd with import to a remote xsd. I just 
copy it to my bpel project and it should work. User should not have to worry 
about changing imports extra or using retriever unless he wants to.

Basically we should always support connected mode. 
Comment 7 Girish Balachandran 2006-08-22 23:44:31 UTC
I fixed this bug in the following way in the retriever module...

When ever resolver does not find an entry in the catalog for an absolute http(s)
URL, retriever API will be called automatically in a background thread and the
schema/wsdl referenced by that URL will be retrieved and cached locally. The
location of the cache is actually determined by the CacheDirectoryProvider of
the project. CacheDirectoryProvider.getCacheDirectory()+"/retriever" is the
cache folder. A separate catalog will also be created for this cached resources
@ CacheDirectoryProvider.getCacheDirectory()+"/retriever/catalog.xml". This
cache catalog file will actually be linked (by a relative path NOT absolute -
hence unique for a project and not system dependent) to the project wide catalog
by "nextCatalog" element of OASIS catalog. This way, cache catalog will also be
indirectly used for all the resolutions going forward. 

Since, the files are stored in the cache dir of the project, they are not
versionable and hence will not be checked in along with the project. Each
developer using this project will get his own copy of the retrieved files in his
cache folder.

This automatic retrieval will be called only for IDE use case. For all the unit
test cases, this logic is omitted intentionally. 

In the schema view, the visible change user would notice is, there will be a
noticiable delay/freez when the retriever actually fetches the files from
internet. This could be tested by opening up below schema and trying to add new
element that is based on the included external UBL schema (that has a closure of
19 other files). This is un-avoidable mostly. We are going to work with HIE to
have a better user experience (Jiri?)


<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:Order-1.0"
            xmlns:tns="http://xml.netbeans.org/schema/newXMLSchema"
            elementFormDefault="qualified">
<xsd:include
schemaLocation="http://docs.oasis-open.org/ubl/cd-UBL-1.0/xsd/maindoc/UBL-Order-1.0.xsd"/>
</xsd:schema>
Comment 8 tonybeckham 2007-03-08 00:37:22 UTC
Created attachment 39284 [details]
capture of fix verification
Comment 9 tonybeckham 2007-03-08 00:38:08 UTC
Fix VERIFIED build 070307_11 see screenshot.