XFire Developing Web Services

Source: Internet
Author: User
Tags wsdl

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]);

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.