• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Importing xsd into wsdl

 
Ranadhir Nag
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • 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.
 
g tsuji
Ranch Hand
Posts: 666
3
  • Mark post as helpful
  • send pies
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic