Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot parse correctly XML CDATA response #3

Open
apandichi opened this issue Jul 9, 2014 · 0 comments
Open

Cannot parse correctly XML CDATA response #3

apandichi opened this issue Jul 9, 2014 · 0 comments

Comments

@apandichi
Copy link
Contributor

Given the following WSDL:
http://www.webservicex.net/globalweather.asmx?WSDL

I want to invoke the operation named "GetWeather" with the following parameters:
CityName: New York
CountryName: United States

You can manually invoke it using this page:
http://www.webservicex.net/globalweather.asmx?op=GetWeather

The response could be something like:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <GetWeatherResponse xmlns="http://www.webserviceX.NET">
         <GetWeatherResult><![CDATA[<?xml version="1.0" encoding="utf-16"?>
<CurrentWeather>
  <Location>NEW YORK LA GUARDIA AIRPORT , NY, United States (KLGA) 40-47N 73-53W 11M</Location>
  <Time>Jul 09, 2014 - 08:51 AM EDT / 2014.07.09 1251 UTC</Time>
  <Wind> from the SW (230 degrees) at 7 MPH (6 KT):0</Wind>
  <Visibility> 10 mile(s):0</Visibility>
  <SkyConditions> partly cloudy</SkyConditions>
  <Temperature> 79.0 F (26.1 C)</Temperature>
  <DewPoint> 64.9 F (18.3 C)</DewPoint>
  <RelativeHumidity> 62%</RelativeHumidity>
  <Pressure> 29.88 in. Hg (1011 hPa)</Pressure>
  <Status>Success</Status>
</CurrentWeather>]]></GetWeatherResult>
      </GetWeatherResponse>
   </soap:Body>
</soap:Envelope>

Using WSClient and Item, the node CurrentWeather is not parsed correctly. Please see a test case at
apandichi@68d1b35

A possible fix for this issue is submitted at
apandichi@fa382c0

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant