This content has been marked as final.
Show 3 replies
-
1. Re: Consuming Web Services when WSDL access / UDDI discovery
asoldano Oct 28, 2009 4:38 AM (in response to vimalm)You can store the wsdl locally and point that copy instead of the remote one.
-
2. Re: Consuming Web Services when WSDL access / UDDI discovery
vimalm Oct 28, 2009 11:01 AM (in response to vimalm)Hello Alessio
Thanks for your response. My current code looks likeURL wsdlURL = new URL ( "http://www.example.com/example.asmx?WSDL"); QName serviceQName = new QName("http://www.example.com/example/", "Calculate"); Calculate calc = new Calculate(wsdlURL, serviceQName); CalculateSoap calcSoap = calc.getCalculateSoap(); calcSoap.execute();
It fails on Line 3 with a FileNotFoundException. If I use a WSDL stored locally will I have to modify the WSDL to point to the correct soap address in the following WSDL fragment at the very tail end of the WSDl to let it know where the service is hosted?<wsdl:port CalculateSoap binding="tns:CalculateSoap"> <soap:address location="http://www.example.com/example.asmx" /> </wsdl:port>
Thanks for your help! -
3. Re: Consuming Web Services when WSDL access / UDDI discovery
vimalm Oct 28, 2009 12:16 PM (in response to vimalm)Never mind I figured out that the above way will work. The only problem is that I need to attach multiple WSDL's for different environments (dev, uat and prod) inside my ear and then use the logic to dynamically figure out which WSDL URL to load depending on environment.