简体   繁体   中英

How to parse soap response?

I have wsdl file of webservice. But because of using .net webservice my response include schema and complex type. How should i parse it. Can some wsdlToJava tools creta java class. I ask, Because in wsdl there is no detail about schema that what contains in schema.

Example part of wsdl:

 <s:element name="PersonDetailResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="PersonDetailResult">
<s:complexType>
<s:sequence>
<s:element ref="s:schema"/>
<s:any/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>

使用Apache axis ,它具有wsdl2java工具:

wsdl2java -uri ../samples/wsdl/Axis2SampleDocLit.wsdl

You can parse your soap like xml (SAX,StAX,DOM).

Also if you have scheme file you can parse this with help of scheme, if you don't - you have to parse and determine all link to java classes manually.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM