简体   繁体   中英

Web service response is MessageElement?

I am trying to figure out how to use this service, which should print out holidays in US: http://www.holidaywebservice.com/Holidays/HolidayService.asmx?WSDL

So, I generated Java classes for it, and tried to call its method, which should return list of available countries:

holidayServiceLocator.getHolidayServiceSoap().getCountriesAvailable().get_any()

getAny() method returns org.apache.axis.message.MessageElement[] type of object, and this is where I am lost.

As I can understand, MessageElement is used in order to store XML, am I correct? In that case, how should I handle it in order to get correct result (list of supported countries for this service)?

如果您知道响应中的标记名称,则可以使用MessageElement.getElementsByTagName(String name) ,也可以使用MessageElement.getChildElements()逐个遍历所有这些名称。

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