xml - Read a wsdl file and get tags referring to a particular namespace in java -
i have huge wsdl file,i need parse , check if valid wsdl. found can validate xml against xsd using validator object follows:
javax.xml.validation.schema schema2 = factory.newschema(new file("d:\\test3\\admin.xsd")); validator validator = ((javax.xml.validation.schema) schema2).newvalidator(); validator.validate(new streamsource(new file("abc.xml")));
but since need same wsdl, thinking maybe find tags in wsdl refer particular namespace(hence schema) , write them xml file. use validator object.
issue is, how should extract elements/tags refer particular xsd form wsdl? or if there wiser/simpler solution please thanks
Comments
Post a Comment