spring-guides / gs-consuming-web-service

Consuming a SOAP web service :: Learn how to create a client that consumes a WSDL-based service
http://spring.io/guides/gs/consuming-web-service
Apache License 2.0
135 stars 166 forks source link

Server returns 404. #32

Closed wkaczurba closed 6 years ago

wkaczurba commented 6 years ago

Hi,

It looks like this tutorial will not work as server returns 404 for queries like: http://www.webservicex.com/stockquote.asmx?WSDL http://www.webservicex.com/stockquote.asmx?op=GetQuote

Perhaps it might be worth updating the tutorial, or bundling up with https://spring.io/guides/gs/producing-web-service/ ?

Rgds, Witold

mikepotter1024 commented 6 years ago

I got this too. Googled some newer references to .net site. Didn't work either. Also went to site www.webservicex.net the page reads REST API. Seems doesn't support SOAP anymore. Seems the guide will have to be refactored to a different URL/API.

I refactored the code to use the temp converter at https://www.w3schools.com/xml/tempconvert.asmx?WSDL. Unfortunately my company as far as I know precludes my contributing a solution although we use Open Source tools and Spring. Is TBD last I heard. I would not ask for permission either since I got a needs improving annual review for my soft skills. :]

A few hiccups I encountered using BuildShip 2.0 in STS 3.9.3 was that in task genJaxb ext.schema = "https://www.w3schools.com/xml/tempconvert.asmx?WSDL" didnt work seems could not deal with https. So I saved the wsdl off to a file put in project root using ext.schema = "${projectDir}/hello.wsdl". Then had to run the BuildShip build task twice to get a clean build. Finally to run Application.java as a Java Application had to add build/classes/jaxb in Java Build Path as a Class Folder. Got correct answer for 0C:

2018-04-10 12:31:38.373 INFO 5304 --- [ main] hello.TempClient : Requesting temp F for 0 32

dsyer commented 6 years ago

Duplicates #27

houssam-eldeen commented 6 years ago

please, i need the wsdl file to run the application

houssam-eldeen commented 6 years ago

i found wsdl file: <?xml version="1.0" encoding="utf-8"?>

Get Stock quote for a company Symbol Get Stock quote for a company Symbol Get Stock quote for a company Symbol
dsyer commented 6 years ago

That's the old stock quote wsdl from the external service that shut down. Please read the guide and follow instructions for running the server locally. And please don't comment on multiple old issues with the same information.

houssam-eldeen commented 6 years ago

ok, i'll do but i still need the wsdl file to run the application. do you have any any solution?

dsyer commented 6 years ago

Where does it say in the guide that you need a wsdl file? You need to run the server that generates the wsdl locally. It tells you how to do it. Please look again and see if that makes sense.