• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

extract inline XSD from wsdl into an external file?

 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi..

we are attempting to use jibx and spring as webservice users, the advantage in jibx is that generates beans without code dependencies. and does the mapping xml/object in an xml file.

but jibx onlu generates beans from xsd's not wsdl, so we would like some how to extreact all the schemas in under types sections, into external files and then run jibx on them .

is this possible? maybe with wsdl4j?
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
It is very simple to just cut and copy the XML schema from the <wsdl:types> element, since the contents of this element is an XML schema. Having extracted the XML schema to a separate file, you just add an <xsd:schema> element containing an <xsd:import> element in the <wsdl:types> element.
Example:
The following XML schema was extracted from a WSDL. The first line specifying the XML version and encoding was added by hand.

The schema was saved to a file named CalculatorService_schema1.xsd located in the same directory as the WSDL.

The <type> element in the WSDL document looks like this, after the extraction of the XML schema:

Best wishes!
 
Elhanan Maayan
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
unless you have SEVERAL schemas which reference name space declarations in the wsdl root as well as some impot tags for some good taste
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic