on 02-19-2007 3:05 PM
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>
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
Hi ravi
Hi you do not have to import/create a xsd!
Import the WSDL file! That is the philosophy of WebServices
Regards Mario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.