1, first Xfire can not be tightened MyEclipse10 only by adding jar package way to add;
2. Add Xfire to MyEclipse6.5
Click Help->software Updates->find and install, select Search for new features to install select Second then next;
Add Site url:http://dist.codehaus.org/xfire/update/
3. Create a new Web service project project and select Xfire
After the new is completed, Web. Xml appears as follows:
<servlet> <Servlet-name>Xfireservlet</Servlet-name> <Servlet-class>Org.codehaus.xfire.transport.http.XFireConfigurableServlet</Servlet-class> <Load-on-startup>0</Load-on-startup> </servlet> <servlet-mapping> <Servlet-name>Xfireservlet</Servlet-name> <Url-pattern>/services/*</Url-pattern> </servlet-mapping>
4. Add a Web service to the project
After completing the project, a Services.xml file will appear, as follows
<Service> <name>Testhellowservice</name> <ServiceClass>Itesthellowservice</ServiceClass> <ImplementationClass>Testhellowserviceimpl</ImplementationClass> <style>Wrapped</style> < Use>Literal</ Use> <Scope>Application</Scope> </Service>
5, in the case of project launch test, such as: The top right corner of the selection of WSDL, when the status display successfully is correct.
Access Address: Http://localhost:8080/testService/services/testHellowService?WSDL
The path of the servlet configured by Services for Web. XML, testhellowservice to Services.xml interface name
6. Client access to new Java project
New Client (new URL ("Http://localhost:8080/testService/services/testHellowService?WSDL")); New Object[] {"1234"}); System.out.println ((String) res[0]);