• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Importing xsd into wsdl

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is my current configuration:
XSD



WSDL


However,the moment ref="Stock" is changed to type="Stock",the wsdl2java starts giving Type {http://stock.com/schemas/services/stock}Stock is referenced but not defined.

Somehow it seems a clash between wsdl and xsd imports - but I just cant resolve it.Help is appreciated.
 
Ranch Hand
Posts: 734
7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[1]

<xsd:element name="stock" ref="Stock" minOccurs="1" maxOccurs="unbounded"/>


This won't ever be a valid construction.

[1.1] Either you want the element at that location be called "Stock" (with the upper s) and reference the global element so defined up there at the top-level. In this case, you simply reference to it like this.


[1.2] Or you want the element at that location be called "stock" with the structure in mind as that global element named "Stock" (with the upper s). In that case, you rename the global element to "stock".


and reference it like this.


[2] Note also that you can reference to Stock/stock without prefix and that you can say type="Quote" without prefix are simply due to you having a default namespace defined which happens to coincide with the targetNamespace; if not, a prefix is needed to result in a fully-qualified name as value for the ref and type attributes.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic