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 206469 - JAXWS:wsimport utility, Reason: undefined element declaration 's:schema'
Summary: JAXWS:wsimport utility, Reason: undefined element declaration 's:schema'
Status: RESOLVED WORKSFORME
Alias: None
Product: webservices
Classification: Unclassified
Component: JAX-WS (show other bugs)
Version: 7.3
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-16 10:31 UTC by wadasalisu
Modified: 2017-06-06 11:37 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
abcd (3.26 KB, application/octet-stream)
2017-06-06 11:37 UTC, kushagravarshney
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wadasalisu 2011-12-16 10:31:19 UTC

    
Comment 1 wadasalisu 2011-12-16 10:33:54 UTC
am using jdk7 and netbeans 7.0.1

i tried loading a web service developed with asp.net but the wizard keeps showing:

JAXWS:wsimport utility 
Reason: undefined element declaration 's:schema'

Pls somebody help, Thnx
Comment 2 Denis Anisimov 2011-12-16 10:37:56 UTC
First of all please provide EXACT steps to reproduce.
I cannot identify the problem from you description.
Comment 3 wadasalisu 2011-12-16 15:22:25 UTC
Thnks for the time. I tried consuming a web services developed in aspx i.e. (asmx) using netbeans 7.0.1. But it keeps showing me an error... The error say :

JAXWS:wsimport utility, Reason: undefined element declaration 's:schema'



so i notice that the web service has the following line of code:

<s:element ref="s:schema" />
<s:any />


I tried a similar asmx web service that does not have those line and it worked, so am guessing the error is from the line...

is there any solution pls
Comment 4 Denis Anisimov 2011-12-16 15:28:26 UTC
Still there are no steps to reproduce.
Based on your description the problem most likely is wrong schema file .
This is not a forum for questions. This is bugtracker.
So please describe exact steps . I'm not able to guess the reason of this 
error without these steps.
Comment 5 mirzahad 2013-04-23 09:28:02 UTC
Reproduce bug:

Create web service client from this:

https://www.imonitor.cz/imonws/BaseWS.asmx?WSDL

it says above message, seems .NET <-> Java WSDL compatibility problem.
Comment 6 Milan Kuchtiak 2013-08-23 09:18:31 UTC
It's mostly problem of JAX-WS wsimport utility.

The workaround, in Netbeans, is the following:

Please read this:
https://weblogs.java.net/blog/vivekp/archive/2007/05/how_to_deal_wit_1.html

You have to:

- download the Kohsuke's JAXB customization.xjb file (link in the page above)
- download http://www.w3.org/2001/XMLSchema.xsd
- download http://www.w3.org/2001/XMLSchema.dtd
- download http://www.w3.org/2001/datatypes.dtd

After you complete the WS Client wizard (for https://www.imonitor.cz/imonws/BaseWS.asmx?WSDL), you have to :

 - right click BaseWS node and open Edit WS Attributes dialog
 - in WSDL Customization panel, External Bindings section, select downloaded customization.xjb and XMLSchema.xsd files
 - go to Files View - Project -> xml-resources/web-service-references/BaseWS/bindings folder
 - add manually XMLSchema.dtd and datatypes.dtd to this folder
 - call Refresh... (at BaseWS node in Project's view)
Comment 7 Milan Kuchtiak 2013-08-23 11:00:30 UTC
Extended file chooser filter to allow schema files selection in "Edit WS Attributes" dialog (External Bindings section):

see: http://hg.netbeans.org/web-main/rev/577d75b55d70
Comment 8 Lukas Jungmann 2013-08-23 11:01:04 UTC
BTW: wsimport is failing with:

 [WARNING] src-resolve.4.2: Error resolving component 's:schema'. It was detected that 's:schema' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'file:/home/lukas/NetBeansProjects/JavaApplication3/xml-resources/web-service-references/BaseWS/wsdl/www.imonitor.cz/imonws/BaseWS.asmx.wsdl#types?schema1'. If this is the incorrect namespace, perhaps the prefix of 's:schema' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/home/lukas/NetBeansProjects/JavaApplication3/xml-resources/web-service-references/BaseWS/wsdl/www.imonitor.cz/imonws/BaseWS.asmx.wsdl#types?schema1'.
  line 65 of file:/home/lukas/NetBeansProjects/JavaApplication3/xml-resources/web-service-references/BaseWS/wsdl/www.imonitor.cz/imonws/BaseWS.asmx.wsdl#types?schema1
Comment 9 Milan Kuchtiak 2013-08-23 11:36:33 UTC
The solution suggested by Vivek Pandey is elegant because the original wsdl file isn't touched.
Comment 10 kushagravarshney 2017-06-06 11:37:45 UTC
Created attachment 164475 [details]
abcd