使用wsdl4j api如何取得WSDL文件中的Types,取出Types中所有定义的结构和类型?
例如下面文件:
?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:tns="http://www.foresee.com.cn/esb/webservice/wsdl" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.foresee.com.cn/esb/webservice/wsdl" name="EMSDelivery">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.foresee.com.cn/esb/webservice/wsdl">
<s:element name="GetWeather" type="tns:GetWeather"/>
<s:element name="GetCitiesByCountry" type="tns:GetCitiesByCountry"/>
<s:element name="GetWeatherResponse" type="tns:GetWeatherResponse"/>
<s:element name="GetCitiesByCountryResponse" type="tns:GetCitiesByCountryResponse"/>
<s:complexType name="GetWeather">
<s:sequence>
<s:element name="CityName" type="s:string"/>
<s:element name="CountryName" type="s:string"/>
</s:sequence>
</s:complexType>
<s:complexType name="GetCitiesByCountry">
<s:sequence>
<s:element name="CountryName" type="s:string"/>
</s:sequence>
</s:complexType>
<s:complexType name="GetWeatherResponse">
<s:sequence>
<s:element name="GetWeatherResult" type="s:string"/>
</s:sequence>
</s:complexType>
<s:complexType name="GetCitiesByCountryResponse">
<s:sequence>
<s:element name="GetCitiesByCountryResult" type="s:string"/>
</s:sequence>
</s:complexType>
<s:element name="string" nillable="true" type="s:string"/>
</s:schema>
</wsdl:types>
<wsdl:message name="ComposeInMes">
<wsdl:part name="GetWeather" element="tns:GetWeather"/>
<wsdl:part name="GetCitiesByCountry" element="tns:GetCitiesByCountry"/>
</wsdl:message>
<wsdl:message name="ComposeOutMes">
<wsdl:part name="GetWeatherResponse" element="tns:GetWeatherResponse"/>
<wsdl:part name="GetCitiesByCountryResponse" element="tns:GetCitiesByCountryResponse"/>
</wsdl:message>
<wsdl:portType name="execute_ppt">
<wsdl:operation name="execute">
<wsdl:input name="InParameters" message="tns:ComposeInMes"/>
<wsdl:output name="OutParameters" message="tns:ComposeOutMes"/>
</wsdl:operation>
</wsdl:portType>

</wsdl:definitions>
我要取得portType (execute_ppt)入口参数/出口参数所定义的类型,如何取得,我试过WSDL4J 取到的Types信息中不包含这些,哪位高人知道使用WSDL4J 怎么取?在线等!