The following error occurs when xfire is integrated with spring:
Information: loading spring root webapplicationcontext
Cause:
The xfire package contains a spring1.2.6 jar package, while the project jar package is 2.0.
Solution
Change the header schema of the original configuration file to the doctype mode. The original configuration file is as follows:
Changed:
extensions Microsoft plans for in the add-on (that is, independently priced) applications. The architecture of axis2 allows easy development of such extensions using a component called a module.
The WS-Addressing and WS-Security Modules are currently included in the basic axis2 distribution (which may be downloaded as an independent part or even an independent project in the future, because these modules are not closely coupled with the core axis2 code ). WS-reliablemessaging support is being d
Xfire creating WebService Server and ClientThanks for sharing this blog http://clq9761.iteye.com/blog/1261963.May be the cause of the environment, according to the information in some places did not succeed, so they changed a part, wrote the following demo1. Service Side1.1. Create a new Web project to copy the required jar packages to the Lib folder1.2. Web. xml1.3. Program Structure1.3.1, write service interfacePackage Service;import entity. User;pu
In the last article called Xfire released by the WebService service, I just returned a string from the server to the client, but did not test the delivery of the data from the client to the server. In practical applications, it is generally unlikely that this scenario will occur, so I have further tested the client to pass the data to the server.Because the relevant jar package has been mentioned in the previous article, it is no longer repeated, this
Specific steps for developing WebService:
1,Create a project
2,Import related xfireRack package
Main xfire-1.2.6Underxfire-all-1.2.6.jarRack package and LibAll jar files underRack package
3,In web. xmlIntroduce xfire configuration in the configuration fileThe related code is as follows:
4,Organize webcontentThe directory architecture is shown in the following figure:
The specific code in t
Directly Add codeFor a brief introduction to xfire and spring integration, see my previous article --The first method for integrating xfire with spring
The first is the Web. xml file.
Then there is the core applicationContext-webservice.xml File
Next, I will paste the corresponding web service interfaces and implementation classes.In fact, the interfaces and implementation classes used here are the same
. The method must be the same as that on the server side.*/Public String wearer ();}
6. Test class:
Import java.net. malformedurlexception; import Org. codehaus. xfire. client. xfireproxyfactory; import Org. codehaus. xfire. service. service; import Org. codehaus. xfire. service. binding. objectservicefactory; // http://fxk2006.iteye.com/blog/618802public class
Severe: allocate exception for servlet xfireservlet Java. Io. filenotfoundexception: Class path resource [META-INF/xfire/services. xml] cannot be opened because it does not exist At org. springframework. Core. Io. classpathresource. getinputstream (classpathresource. Java: 137) At org. springframework. Beans. Factory. xml. xmlbeandefinitionreader. loadbeandefinitions (xmlbeandefinitionreader. Java: 167)
Create a new WEB-INF folder under the MET
When xfire + spring develops WebService, the WebService project created through myeclipse encounters a problem during debugging. After Remote Call, spring injection fails, after checking with colleagues, I found that the configuration was faulty. One configuration was web. XML, You need to modify the default xfire configuration to the configuration that combines with spring.
The commented out part is the
1, first Xfire can not be tightened MyEclipse10 only by adding jar package way to add;2. Add Xfire to MyEclipse6.5Click 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 XfireAfter the new is completed
Xfire uses Xbean to parse its configuration file
The XF uses Xbean (http://xbean.org) to process this file, which can be used in Xfire standard syntax
or fully using spring's syntax definition
3. . Usage Xfire Other client calls Service
I used Myclipse 6.0 , Integrated to facilitate generation Xfire Client To easily generate a proxy class: specifically: New À Others À Web Services The following Web service client . Then, generate one step as prompted.
Then, the proxy class is called.Code:
Mamcatalogserviceclient service =NewMamcatalogserviceclient ();
Mamcatalogserviceso
I have read some examples of using Java to call the WebService interface, many of which are Ctrl + C and CTRL + V. Many of them are used to find errors, which are depressing, I wrote a tested article, just a small example.
Server (provides WebService interfaces for clients ):
Tools: myeclipse-8.6.1-win32, APACHE-Tomcat-7.0.11
Development steps: 1. Create a project
File-> New-> Web Service Project. The Web Service Project window is displayed. Enter the project name (demo in this example), select
Here, xfire authenticates with the soap header (handler mode)
The first is the Web. xml file.
Then the services. xml file
Next is the core service verification class.
Package COM. jadyer. server;
Then the Web Service Interface and implementation class
Package COM. jadyer. server;
The helloservice. Aegis. xml file is used to define friendly interface parameters.
The above shows the server-side code.
The following shows the client code.
Xfire generates webservice. Android uses ksoap2 to access the webservice client. xfireksoap2
Use adt to create an Android application project
Confirm the information
Create Interface
Delete the original component
Click hello world
Click delete to open the xml file. The following page is displayed:
Switch to view mode and add textview and button
Switch to xml and you will see the interface
Add permission
Open the androidmainfest
Recently, xfire is used to develop a large number of WebService services, but it has always encountered a tough problem: 10:43:44 org. Apache. commons. httpclient. httpmethodbase writerequestInformation: 100 (CONTINUE) read timeout. resume sending the request10:43:45 org. Apache. commons. httpclient. httpmethodbase readresponseInformation: discarding unexpected response: HTTP/1.1 100 continue10:43:45 org. Apache. commons. httpclient. httpmethodbase re
Create an Android Application project with ADTDetermine the informationCreate an interfaceRemove the original component firstClick Hello WorldClick Delete to remove, open the XML file and see the following interfaceSwitch to view mode, add TextView and buttonThen switch to XML and you'll see the interfaceAdd permissionsOpen Androidmainfest.xml FileAdd the following codeWriting Mainactivity.java implementation-specific codeHow to view IPThen you can understand your phone and run it.If it doesn't
Method 1,Create a WebService client using spring and the WSDL FileMethod 2,Create a WebService client using spring and the WSDL access address
The client code is provided here, and the corresponding server codeSee my previous blog post --The second method of xfire integration with spring
Method 1. Create a WebService client using spring and the WSDL File
Package COM. jadyer. client;
Method 2: Create a WebService client using spring and the WSDL acc
WebService returns the list with the return object that contains the list's configuration resolution JAVAX.SERVLET.SERVLETEXCEPTION:ORG.CODEHAUS.XFIRE.XFIRERUNTIMEEXCEPTION:COULDN ' t create type for property Certinfolist on class Com.itrus.webserviceVO.QueryCertResult:Cannot create mapping for JAVA.U Til.List, unspecified component type for property CertInfoListorg.codehaus.xfire.transport.http.XFireServletController.doService (xfireservletcontroller.java:142 ) Org.codehaus.xfire.transport.http
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.