Source Code Cross Referenced for LocalJaxWsServiceFactory.java in  » J2EE » spring-framework-2.5 » org » springframework » remoting » jaxws » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » spring framework 2.5 » org.springframework.remoting.jaxws 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2002-2007 the original author or authors.
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *      http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:
017:        package org.springframework.remoting.jaxws;
018:
019:        import java.net.URL;
020:        import java.util.concurrent.Executor;
021:
022:        import javax.xml.namespace.QName;
023:        import javax.xml.ws.Service;
024:        import javax.xml.ws.handler.HandlerResolver;
025:
026:        import org.springframework.core.task.TaskExecutor;
027:        import org.springframework.core.task.support.ConcurrentExecutorAdapter;
028:
029:        /**
030:         * Factory for locally defined JAX-WS {@link javax.xml.ws.Service} references.
031:         * Uses the JAX-WS {@link javax.xml.ws.Service#create} factory API underneath.
032:         *
033:         * <p>Serves as base class for {@link LocalJaxWsServiceFactoryBean} as well as
034:         * {@link JaxWsPortClientInterceptor} and {@link JaxWsPortProxyFactoryBean}.
035:         *
036:         * @author Juergen Hoeller
037:         * @since 2.5
038:         * @see javax.xml.ws.Service
039:         * @see LocalJaxWsServiceFactoryBean
040:         * @see JaxWsPortClientInterceptor
041:         * @see JaxWsPortProxyFactoryBean
042:         */
043:        public class LocalJaxWsServiceFactory {
044:
045:            private URL wsdlDocumentUrl;
046:
047:            private String namespaceUri;
048:
049:            private String serviceName;
050:
051:            private Executor executor;
052:
053:            private HandlerResolver handlerResolver;
054:
055:            /**
056:             * Set the URL of the WSDL document that describes the service.
057:             */
058:            public void setWsdlDocumentUrl(URL wsdlDocumentUrl) {
059:                this .wsdlDocumentUrl = wsdlDocumentUrl;
060:            }
061:
062:            /**
063:             * Return the URL of the WSDL document that describes the service.
064:             */
065:            public URL getWsdlDocumentUrl() {
066:                return this .wsdlDocumentUrl;
067:            }
068:
069:            /**
070:             * Set the namespace URI of the service.
071:             * Corresponds to the WSDL "targetNamespace".
072:             */
073:            public void setNamespaceUri(String namespaceUri) {
074:                this .namespaceUri = (namespaceUri != null ? namespaceUri.trim()
075:                        : null);
076:            }
077:
078:            /**
079:             * Return the namespace URI of the service.
080:             */
081:            public String getNamespaceUri() {
082:                return this .namespaceUri;
083:            }
084:
085:            /**
086:             * Set the name of the service to look up.
087:             * Corresponds to the "wsdl:service" name.
088:             */
089:            public void setServiceName(String serviceName) {
090:                this .serviceName = serviceName;
091:            }
092:
093:            /**
094:             * Return the name of the service.
095:             */
096:            public String getServiceName() {
097:                return this .serviceName;
098:            }
099:
100:            /**
101:             * Set the JDK concurrent executor to use for asynchronous executions
102:             * that require callbacks.
103:             * @see javax.xml.ws.Service#setExecutor
104:             */
105:            public void setExecutor(Executor executor) {
106:                this .executor = executor;
107:            }
108:
109:            /**
110:             * Set the Spring TaskExecutor to use for asynchronous executions
111:             * that require callbacks.
112:             * @see javax.xml.ws.Service#setExecutor
113:             */
114:            public void setTaskExecutor(TaskExecutor executor) {
115:                this .executor = new ConcurrentExecutorAdapter(executor);
116:            }
117:
118:            /**
119:             * Set the JAX-WS HandlerResolver to use for all proxies and dispatchers
120:             * created through this factory.
121:             * @see javax.xml.ws.Service#setHandlerResolver
122:             */
123:            public void setHandlerResolver(HandlerResolver handlerResolver) {
124:                this .handlerResolver = handlerResolver;
125:            }
126:
127:            /**
128:             * Create a JAX-WS Service according to the parameters of this factory.
129:             * @see #setServiceName
130:             * @see #setWsdlDocumentUrl
131:             */
132:            public Service createJaxWsService() {
133:                Service service = (this .wsdlDocumentUrl != null ? Service
134:                        .create(this .wsdlDocumentUrl,
135:                                getQName(this .serviceName)) : Service
136:                        .create(getQName(this .serviceName)));
137:
138:                if (this .executor != null) {
139:                    service.setExecutor(this .executor);
140:                }
141:                if (this .handlerResolver != null) {
142:                    service.setHandlerResolver(this .handlerResolver);
143:                }
144:                return service;
145:            }
146:
147:            /**
148:             * Return a QName for the given name, relative to the namespace URI
149:             * of this factory, if given.
150:             * @see #setNamespaceUri
151:             */
152:            protected QName getQName(String name) {
153:                return (getNamespaceUri() != null ? new QName(
154:                        getNamespaceUri(), name) : new QName(name));
155:            }
156:
157:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.