Added downloadFile and uploadFile operations (with MTOM support)

git-svn-id: https://brutex.net/svn/xservices/trunk@55 e7e49efb-446e-492e-b9ec-fcafc1997a86
tag-20130205r
Brian Rosenberger 2011-04-20 16:59:54 +00:00
parent fb4542b456
commit 5557394f12
3 changed files with 63 additions and 53 deletions

View File

@ -1,30 +1,40 @@
<beans xmlns="http://www.springframework.org/schema/beans" <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xmlns:jaxrs="http://cxf.apache.org/jaxrs" xsi:schemaLocation="
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd"> http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml"/> <import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/> <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<jaxws:endpoint id="archiveservice" <jaxws:endpoint id="archiveservice"
implementor="net.brutex.xservices.ws.impl.ArchiveServiceImpl" implementor="net.brutex.xservices.ws.impl.ArchiveServiceImpl" address="/ArchiveService" />
address="/ArchiveService"/>
<jaxws:endpoint id="fileservice" <jaxws:endpoint id="fileservice"
implementor="net.brutex.xservices.ws.impl.FileServiceImpl" implementor="net.brutex.xservices.ws.impl.FileServiceImpl" address="/FileService">
address="/FileService"/> <jaxws:properties>
<entry key="mtom-enabled" value="false" />
</jaxws:properties>
</jaxws:endpoint>
<jaxws:endpoint id="executeservice" <!-- This is the MTOM enabled FileServices endpoint -->
implementor="net.brutex.xservices.ws.impl.ExecuteServiceImpl" <jaxws:endpoint id="fileservice2"
address="/ExecuteService"/> implementor="net.brutex.xservices.ws.impl.FileServiceImpl" address="/FileServiceMTOM">
<jaxws:properties>
<entry key="mtom-enabled" value="true" />
<entry key="attachment-directory" value="c:\temp"/>
<entry key="attachment-memory-threshold" value="2000"/>
</jaxws:properties>
</jaxws:endpoint>
<jaxws:endpoint id="miscservice"
implementor="net.brutex.xservices.ws.impl.MiscServiceImpl" <jaxws:endpoint id="executeservice"
address="/MiscService"/> implementor="net.brutex.xservices.ws.impl.ExecuteServiceImpl" address="/ExecuteService" />
<jaxws:endpoint id="miscservice"
implementor="net.brutex.xservices.ws.impl.MiscServiceImpl" address="/MiscService" />
</beans> </beans>

View File

@ -1,32 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<context-param> <context-param>
<param-name>contextConfigLocation</param-name> <param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/cxf-beans.xml</param-value> <param-value>WEB-INF/cxf-beans.xml</param-value>
</context-param> </context-param>
<listener> <listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener> </listener>
<servlet>
<servlet> <servlet-name>XServices</servlet-name>
<servlet-name>XServices</servlet-name> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class> <load-on-startup>1</load-on-startup>
<load-on-startup>1</load-on-startup> </servlet>
</servlet> <servlet-mapping>
<servlet-name>XServices</servlet-name>
<servlet-mapping> <url-pattern>/*</url-pattern>
<servlet-name>XServices</servlet-name> </servlet-mapping>
<url-pattern>/*</url-pattern> <session-config>
<session-timeout>30</session-timeout>
</servlet-mapping> </session-config>
<welcome-file-list>
<session-config> <welcome-file>index.html</welcome-file>
<session-timeout> </welcome-file-list>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app> </web-app>

7
web/index.html Normal file
View File

@ -0,0 +1,7 @@
<html>
<head>
<title>XServices</title>
</head>
<body><h1>
XServices</h1></body>
</html>