WSDL to XML generator

Hi all, I need to generate xml files based on the WSDL files given to us. I have been generating them manually but now i need to genarate as many as 100 xml files based on the WSDLs supplied. I just want to know if there is a tool which can be used to generate the xml files from the WSDL files. All the alternative methods of generating this would be really helpful.

Thanks in advance

Since WSDL files are already XML files, I’m not sure what you are trying to accomplish.

A WSDL file describes a Service (capital ‘S’ used to differentiate between an IS Flow or java “service” which is more like a method or function).

Services contain operations. Each operation accepts one message and (usually) returns one message. Each message may have one or more message parts. Message parts are described using XML schemas that are either imported or that are provided “inline” in the types section.

You can use a variety of client tools to generate code to invoke one or more operations described in the WSDL. Each java-based SOAP stack usually has a utility called WSDL2Java to to this. .Net language code can be generated using the “wsdl.exe” utility provided with the .Net Framework Tools In webMethods Developer you create a “Web Service Connector” to generate a starter Flow service (WSDL2Flow).

Given all that, what is it that you want to do with your WSDL files? How were your WSDL files created? Were they generated from some application server or COTS package?

Mark

Thanks for the quick reply mark. The WSDL is generated on the client side using a WSDL generator tool and webmethods GLUE. We need to analyze that WSDL file and look out for the speceffic references to the elements. After we identify the set of elements which are required for integration, we need to create a SOAP message which has all the elements pertaining to this single operation. We have been doing this manually but it is really time consuming. So i wanted to know if we have some tools which can do this. I have checked for some WSDL tools but all these require java coding to be done which was equally time consuming. Please let me knoa if there are any tools which accomplish this task. I am giving the example below for a better understanding:

[highlight=xml]

<?xml version='1.0' encoding='UTF-8'?>

<wsdl:definitions name=‘MyService’ targetNamespace=‘mywebsite’ xmlns:wsdl=‘http://schemas.xmlsoap.org/wsdl/’ xmlns:xsd=‘http://www.w3.org/2001/XMLSchema’ xmlns:n4=‘http://mySite/xmlschema/resource/metadata/osa/infrastructure/v001’ xmlns:n5=‘http://mySite/xmlschema/resource/abc
xmlns:n6=‘http://mySite/xmlschema/resource/abc
xmlns:n8=‘http://mySite/xmlschema/resource/abc
xmlns:api=‘mywebsite’ xmlns:soap=‘http://schemas.xmlsoap.org/wsdl/soap/’ >
wsdl:types
<xsd:schema elementFormDefault=‘qualified’ targetNamespace=‘mywebsite’>
<xsd:import namespace=‘http://mySite/xmlschema/resource/abc’/>
<xsd:import namespace=‘http://mySite/xmlschema/resource/abc’/>
<xsd:element name=“MyService” type=“api:MyService”/>
<xsd:element name=“MyServiceResponse” type=“api:MyServiceResponse”/>
<xsd:element name=“FaultException” type=“n8:FaultException”/>
<xsd:complexType name=‘MyServiceResponse’>
xsd:sequence
<xsd:element name=‘Header’ type=‘n4:Header’/>
<xsd:element name=‘Summary’ type=‘n5:Summary’/>
<xsd:element name=‘Remarks’ type=‘n5:RemarkList’/>
<xsd:element name=‘IDDetailList’ type=‘n5:IDDetailList’/>
<xsd:element name=‘Profiles’ type=‘n5:SummaryList’/>
<xsd:element name=‘mDetailsList’ type=‘n5:MDetailsList’/>
<xsd:element name=‘DetailList’ type=‘n5:DetailList’/>
<xsd:element name=‘IDSummary’ type=‘n5:IDSummary’/>
<xsd:element name=‘aGroupID’ type=‘xsd:string’/>
<xsd:element name=‘aIDShortDescription’ type=‘xsd:string’/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name=‘MyService’>
xsd:sequence
<xsd:element name=‘Header’ type=‘n4:Header’/>
<xsd:element name=‘lInformation’ type=‘n5:LInformation’/>
<xsd:element name=‘cInformation’ type=‘n5:CInformation’/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
<xsd:schema elementFormDefault=‘qualified’ targetNamespace=‘http://mySite/xmlschema/resource/abc’>
<xsd:complexType name=‘Header’>
xsd:sequence
<xsd:element name=‘component’ type=‘xsd:string’/>
<xsd:element name=‘service’ type=‘n4:Service’/>
<xsd:element name=‘traceId’ type=‘xsd:string’/>
<xsd:element name=‘serverInstance’ type=‘xsd:string’/>
<xsd:element name=‘timestamp’ type=‘xsd:dateTime’/>
<xsd:element name=‘listOfWarnings’ minOccurs=‘0’ type=‘n4:ListOfWarnings’/>
<xsd:element name=‘iBag’ minOccurs=‘0’ type=‘n4:Bag’/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name=‘Service’>
xsd:sequence
<xsd:element name=‘name’ type=‘xsd:string’/>
<xsd:element name=‘operation’ type=‘xsd:string’/>
<xsd:element name=‘version’ type=‘xsd:string’/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name=‘OWarning’>
xsd:sequence
<xsd:element name=‘name’ type=‘xsd:string’/>
<xsd:element name=‘detail’ type=‘n4:Detail’/>
<xsd:element name=‘service’ minOccurs=‘0’ type=‘n4:Service’/>
<xsd:element name=‘serverInstance’ minOccurs=‘0’ type=‘xsd:string’/>
</xsd:sequence>

[/highlight]

In this, we need to create a SOAP xml message for myserviceResponse. Can we have any tool which does this automatically?

Thanks in advance.

The XML fragment you posted is not a complete WSDL file, so it is not possible to tell whether you are attempting to use soap-rpc or soap-msg (doc/lit).

As I mentioned in my previoius message, the Developer Web Services Connector will generate Flow and document types describing the request and response messages from a WSDL file. Give that a try.

Mark

From what is the WSDL generated? Since you mentioned Glue, are you generating WSDL from Java classes? This bottom-up, WSDL-last approach will result in one Service for each java class with one operation in the WSDL for each public method in the class.

While this approach will technically web service enable your java classes, I would not recommend it as the message design and service granularity aspects become accidental artifcats of the WSDL generation and will not get the analysis and design attention that they deserve.

I believe Glue has a utlity for generating XML schemas from Java classes. That might be helpful if you continue to follow this ill-advised WSDL-last approach.

Hi

You can generate sample SOAP XML Message in XMLSPY latest version.(You can try it from trial version…too)…under the Menu SOAP

Regards
Ramanujam

Yes, but only if you are using the Enterprise Edition of XML Spy. The Professional Edition lacks the ability to edit WSDL files or generate and send soap messages.

Mark