Author |
Message
|
venkat_chekka |
Posted: Thu Oct 01, 2009 5:20 am Post subject: How to Generate XSD from Particular Operation in the WSDL |
|
|
Apprentice
Joined: 14 Apr 2006 Posts: 37
|
Hi,
I have WSDL file and would like to generate XSD to a particular operation in the WSDL file.
See below points to understand completely.
1. Use a WSDL document/literal file as input
2. Select an operation and create a XSD file
3. Use XSD file to validate the SOAP XML message for that operation
Could you please guide me how to achieve this issue and suggest me is there XML tools to solve this.
Thanks,
Venkat Chekka. |
|
Back to top |
|
 |
harish_td |
Posted: Fri Oct 02, 2009 4:14 am Post subject: |
|
|
Master
Joined: 13 Feb 2006 Posts: 236
|
1. Copy the .wsdl file into a message set project.
2. Right click WSDL --> New --> Message Definition File from --> WSDL File.
3. This will create a new .mxsd file. Navigate to the namespace that is used for this message and select the .mxsd that contains all the operations within the WSDL
4. The .mxsd is in essence a xsd file that contains broker specific information.
5. Open your SOAP Request and remove the soap headers.
6. Your actual payload would be within the SOAP Body.
7. Copy paste only the body into an editor [i use XMLSPY]
8. Assign the .mxsd file as the Schema file for validation
9. Click validate and then you can validate the WS request. |
|
Back to top |
|
 |
venkat_chekka |
Posted: Fri Oct 02, 2009 6:08 am Post subject: |
|
|
Apprentice
Joined: 14 Apr 2006 Posts: 37
|
Hi,
I want to get XSD for that particular operation in the WSDL and will store that one into database. So I need XSD for particular operation in the WSDL.
Is there any way to get XSD for an operation in the WSDL?
Thanks,
Venkat Chekka. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Oct 02, 2009 6:43 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You're missing several very obvious things.
The first is that a WSDL contains XSDs in the first place. |
|
Back to top |
|
 |
venkat_chekka |
Posted: Fri Oct 02, 2009 7:22 am Post subject: |
|
|
Apprentice
Joined: 14 Apr 2006 Posts: 37
|
Yes, There are so many XSD referenses at stating of the WSDL file.
Like this:
[color=red]<xsd:include schemaLocation="Common.xsd"/>
<xsd:include schemaLocation="DisputeResolution.xsd"/>
<xsd:include schemaLocation="ActivityConditionPlace.xsd"/>
<xsd:include schemaLocation="PhysicalObject.xsd"/>
<xsd:include schemaLocation="Rating.xsd"/>[/color]
So, my opeartion will refer so many XSD's in above list. I want to generate single XSD for my operation from the WSDL.
Thanks,
Venkat Chekka. |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Oct 02, 2009 7:29 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
In other words, you could create a .xsd file that only contains the import statement for the other .xsd's that are referenced in the wsdl
With that and the referenced xsd's in your project, you will have in effect one xsd. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|