• Post Reply Bookmark Topic Watch Topic
  • New Topic

extract inline XSD from wsdl into an external file?

 
Elhanan Maayan
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • 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?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • 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: 136
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!