简体   繁体   中英

Accessing a hardcoded response xml through Java axis webservice client code

Our code calls a webservice to fetch some data. But the service provider's service is down most of the time. I have the response xml. Can some one help us with the easiest way to access the hardCoded response xml to our webservice client code. We use Java Axis Webservice. Can i host the webservice on my local machine? I have the wsdl and xsd's . Please help me how to host this service.. Or is there any simple way to access the response xml through axis webservice client..

There are many ways available to create web service from wsdl. If you want to create it manually then you follow these steps

The most easiest way is to use some tools that can generate the webservice for you as Netbeans has a wizard which can create the webservice from wsdl. All methods and neccessary files generates automatically. see Developing Webservices from wsdl using Netbeans

After creating webservice you can host it from your local machine. Netbeans also has the option to run and deploy the webservice.

java -cp %AXISCLASSPATH% org.apache.wsdl.WSDL2Java http://wsdl_url

这将帮助您从WSDL生成WebService。

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