cancel
Showing results for 
Search instead for 
Did you mean: 

XSD from WSDL SOAP response

Former Member
0 Kudos

From WSDL, I have SOAP respose as

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

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Body>

<ns1:getDistanceResponse xmlns:ns1="http://DefaultNamespace" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<ns1:getDistanceReturn xsi:type="xsd:double">0.0</ns1:getDistanceReturn>

</ns1:getDistanceResponse>

</soapenv:Body>

</soapenv:Envelope>

How do I create XSD so that I can import external defintion in designer message_type without typing the fields from scratch?

Here is the XSD:-

<?xml version="1.0" encoding="ISO-8859-1"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"><xs:element name="getDistanceResponse"><xs:annotation><xs:documentation>Comment describing your root element</xs:documentation></xs:annotation><xs:complexType><xs:sequence><xs:element name="getDistanceReturn" type="xs:double" /></xs:sequence></xs:complexType></xs:element></xs:schema>

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Actually I only had a client who would not give me the WSDL(weird, that really happened), but some sample XML file. In that case I opened the XML file in XML Spy and created the XSD file with XML Spy tools. This should work 4 u.

Former Member
0 Kudos

Ravi,

You dont need to have a external definition for this. You can directly import your WSDL like you are importing external definiton. When importing choose wsdl insted of xsd. Then after impoting the WSDL you can proceed like a normal scenario.

---Satish

Former Member
0 Kudos

Thanks, so I can select the structures (request, response) from external definition (wsdl) in message_mapping source and target. There is no need create XSD and use them in message mapping. I will give a try.

Former Member
0 Kudos

Ravi,

Yes you are right. For some help on this go through this weblog:

/people/shabarish.vijayakumar/blog/2006/03/23/rfc--xi--webservice--a-complete-walkthrough-part-1

/people/shabarish.vijayakumar/blog/2006/03/28/rfc--xi--webservice--a-complete-walkthrough-part-2

---Satish

Former Member
0 Kudos

Satish,

When I look at /people/shabarish.vijayakumar/blog/2006/03/23/rfc--xi--webservice--a-complete-walkthrough-part-1, from WSDL an XSD is created for getDistanceResponse.

Also there is a note from Shabarish "At my first try i used the messages getDistanceRequest and getDistanceResponse in my mapping but later found out that it wasnt the message structure that the webservice expected."

Hence wondering how to create XSD from WSDL so that I can use the structures in message mapping.

In this case it is simple, so i can create the data type but for complex it is better to create XSD from WSDL. May be I'm not putting the right words and question. Please help

Former Member
0 Kudos

Hey Ravi

i m working on a similar scenario too,well actually first of all test your WSDL,if there are no errors in it you can use it as an interface,but if u see some errors,you can create your own data/message types(as shabarish did in his blog) jst make sure that in message type under XML namespace you give the namespace from the WSDL.

thanx

ahmad

Former Member
0 Kudos

Hi ravi

Hi you do not have to import/create a xsd!

Import the WSDL file! That is the philosophy of WebServices

Regards Mario