Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
HI all,

i have a wsdl which is splitted intlo multiple schemas.

lets suppose in main wsdl in WSDL:types i have below code snippe

XML
<wsdl:types xmlns:wsdl="#unknown">

<xsd:schema targetnamespace="http://tempuri.org/Imports" xmlns:xsd="#unknown">

<xsd:import schemalocation="http://localhost:8787/service/test?xsd=xsd0" namespace="http://tempuri.org/" />


<xsd:import schemalocation="http://localhost:8787/service/test?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/TestService" /><xsd:import schemalocation="http://localhost:8787/service/test?xsd=xsd3" namespace="http://othernamespace.org/" />

</xsd:schema>

</wsdl:types>

and if i go to schemalocation "http://localhost:8787/service/test?xsd=xsd0" i have below code in the schema element as given below

XML
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://tempuri.org/" elementformdefault="qualified" targetnamespace="http://tempuri.org/"><xs:import schemalocation="http://localhost:8787/service/test?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/TestService" /><xs:import schemalocation="http://localhost:8787/service/test?xsd=xsd3" namespace="http://othernamespace.org/" />


if i again deep down to location "http://localhost:8787/service/test?xsd=xsd2"

like this i have recursive imports how can i parse the xsd files and get the information regarding schema
Posted
Updated 16-Sep-14 21:52pm
v2
Comments
Sergey Alexandrovich Kryukov 17-Sep-14 2:07am    
WSDL file is not XML schema. What are you talking about?
—SA
Subramanyam Shankar 7-Mar-15 11:21am    
why do you want to parse this WSDL file? create a proxy using svcutil.exe
and it will generate the proxy class with all the details you need. You don't need to parse this file.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900