使用wsdl4j api如何取得WSDL文件中的Types,取出Types中所有定义的结构和类型?

huwen_83 2006-12-21 04:34:46
使用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 怎么取?在线等!
...全文
309 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
歪嘴鱼 2006-12-21
  • 打赏
  • 举报
回复
mark

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧