Source Code Cross Referenced for JaxWsEndpointImpl.java in  » Web-Services-apache-cxf-2.0.1 » frontend » org » apache » cxf » jaxws » support » 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 » Web Services apache cxf 2.0.1 » frontend » org.apache.cxf.jaxws.support 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Licensed to the Apache Software Foundation (ASF) under one
003:         * or more contributor license agreements. See the NOTICE file
004:         * distributed with this work for additional information
005:         * regarding copyright ownership. The ASF licenses this file
006:         * to you under the Apache License, Version 2.0 (the
007:         * "License"); you may not use this file except in compliance
008:         * with the License. You may obtain a copy of the License at
009:         *
010:         * http://www.apache.org/licenses/LICENSE-2.0
011:         *
012:         * Unless required by applicable law or agreed to in writing,
013:         * software distributed under the License is distributed on an
014:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015:         * KIND, either express or implied. See the License for the
016:         * specific language governing permissions and limitations
017:         * under the License.
018:         */package org.apache.cxf.jaxws.support;
019:
020:        import java.util.List;
021:
022:        import javax.xml.ws.Binding;
023:
024:        import org.apache.cxf.Bus;
025:        import org.apache.cxf.binding.soap.SoapBinding;
026:        import org.apache.cxf.binding.xml.XMLBinding;
027:        import org.apache.cxf.endpoint.EndpointException;
028:        import org.apache.cxf.endpoint.EndpointImpl;
029:        import org.apache.cxf.interceptor.Interceptor;
030:        import org.apache.cxf.jaxws.binding.BindingImpl;
031:        import org.apache.cxf.jaxws.binding.http.HTTPBindingImpl;
032:        import org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl;
033:        import org.apache.cxf.jaxws.handler.logical.DispatchLogicalHandlerInterceptor;
034:        import org.apache.cxf.jaxws.handler.logical.LogicalHandlerFaultInInterceptor;
035:        import org.apache.cxf.jaxws.handler.logical.LogicalHandlerFaultOutInterceptor;
036:        import org.apache.cxf.jaxws.handler.logical.LogicalHandlerInInterceptor;
037:        import org.apache.cxf.jaxws.handler.logical.LogicalHandlerOutInterceptor;
038:        import org.apache.cxf.jaxws.handler.soap.DispatchSOAPHandlerInterceptor;
039:        import org.apache.cxf.jaxws.handler.soap.SOAPHandlerFaultInInterceptor;
040:        import org.apache.cxf.jaxws.handler.soap.SOAPHandlerFaultOutInterceptor;
041:        import org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor;
042:        import org.apache.cxf.jaxws.interceptors.HolderInInterceptor;
043:        import org.apache.cxf.jaxws.interceptors.HolderOutInterceptor;
044:        import org.apache.cxf.jaxws.interceptors.SwAInInterceptor;
045:        import org.apache.cxf.jaxws.interceptors.SwAOutInterceptor;
046:        import org.apache.cxf.jaxws.interceptors.WrapperClassInInterceptor;
047:        import org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor;
048:        import org.apache.cxf.phase.Phase;
049:        import org.apache.cxf.service.Service;
050:        import org.apache.cxf.service.model.EndpointInfo;
051:
052:        /**
053:         * A JAX-WS specific implementation of the CXF {@link org.apache.cxf.endpoint.Endpoint} interface.
054:         * Extends the interceptor provider functionality of its base class by adding 
055:         * interceptors in which to execute the JAX-WS handlers.
056:         * Creates and owns an implementation of {@link Binding} in addition to the
057:         * CXF {@link org.apache.cxf.binding.Binding}. 
058:         *
059:         */
060:        public class JaxWsEndpointImpl extends EndpointImpl {
061:
062:            private Binding jaxwsBinding;
063:            private JaxWsImplementorInfo implInfo;
064:
065:            public JaxWsEndpointImpl(Bus bus, Service s, EndpointInfo ei)
066:                    throws EndpointException {
067:                this (bus, s, ei, null);
068:            }
069:
070:            public JaxWsEndpointImpl(Bus bus, Service s, EndpointInfo ei,
071:                    JaxWsImplementorInfo implementorInfo)
072:                    throws EndpointException {
073:                super (bus, s, ei);
074:                this .implInfo = implementorInfo;
075:
076:                createJaxwsBinding();
077:
078:                List<Interceptor> in = super .getInInterceptors();
079:                List<Interceptor> out = super .getOutInterceptors();
080:
081:                if (implInfo != null && implInfo.isWebServiceProvider()) {
082:                    DispatchLogicalHandlerInterceptor slhi = new DispatchLogicalHandlerInterceptor(
083:                            jaxwsBinding, Phase.USER_LOGICAL);
084:                    in.add(slhi);
085:                    out
086:                            .add(new DispatchLogicalHandlerInterceptor(
087:                                    jaxwsBinding));
088:
089:                    if (getBinding() instanceof  SoapBinding) {
090:                        in
091:                                .add(new DispatchSOAPHandlerInterceptor(
092:                                        jaxwsBinding));
093:                        out
094:                                .add(new DispatchSOAPHandlerInterceptor(
095:                                        jaxwsBinding));
096:                    }
097:                } else {
098:                    // Inbound chain
099:                    in.add(new LogicalHandlerInInterceptor(jaxwsBinding));
100:                    in.add(new WrapperClassInInterceptor());
101:                    in.add(new HolderInInterceptor());
102:                    if (getBinding() instanceof  SoapBinding) {
103:                        in.add(new SOAPHandlerInterceptor(jaxwsBinding));
104:                        in.add(new SwAInInterceptor());
105:                        getOutInterceptors().add(new SwAOutInterceptor());
106:                    } else {
107:                        // TODO: what for non soap bindings?
108:                    }
109:
110:                    // Outbound chain
111:                    out.add(new LogicalHandlerOutInterceptor(jaxwsBinding));
112:                    out.add(new WrapperClassOutInterceptor());
113:                    out.add(new HolderOutInterceptor());
114:                    if (getBinding() instanceof  SoapBinding) {
115:                        out.add(new SOAPHandlerInterceptor(jaxwsBinding));
116:                    }
117:                }
118:
119:                //Outbound fault chain
120:                List<Interceptor> outFault = super .getOutFaultInterceptors();
121:                outFault
122:                        .add(new LogicalHandlerFaultOutInterceptor(jaxwsBinding));
123:                if (getBinding() instanceof  SoapBinding) {
124:                    outFault.add(new SOAPHandlerFaultOutInterceptor(
125:                            jaxwsBinding));
126:                }
127:
128:                //Inbound fault chain
129:                List<Interceptor> inFault = super .getInFaultInterceptors();
130:                inFault.add(new LogicalHandlerFaultInInterceptor(jaxwsBinding));
131:                if (getBinding() instanceof  SoapBinding) {
132:                    inFault
133:                            .add(new SOAPHandlerFaultInInterceptor(jaxwsBinding));
134:                }
135:            }
136:
137:            public Binding getJaxwsBinding() {
138:                return jaxwsBinding;
139:            }
140:
141:            final void createJaxwsBinding() {
142:                if (getBinding() instanceof  SoapBinding) {
143:                    jaxwsBinding = new SOAPBindingImpl(getEndpointInfo()
144:                            .getBinding());
145:                } else if (getBinding() instanceof  XMLBinding) {
146:                    jaxwsBinding = new HTTPBindingImpl(getEndpointInfo()
147:                            .getBinding());
148:                } else {
149:                    jaxwsBinding = new BindingImpl();
150:                }
151:            }
152:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.