Java Doc for WSDLParserExtension.java in  » 6.0-JDK-Modules » jax-ws-runtime » com » sun » xml » ws » api » wsdl » parser » 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 » 6.0 JDK Modules » jax ws runtime » com.sun.xml.ws.api.wsdl.parser 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.xml.ws.api.wsdl.parser.WSDLParserExtension

All known Subclasses:   com.sun.xml.ws.wsdl.parser.DelegatingParserExtension,  com.sun.xml.ws.wsdl.parser.WSDLParserExtensionFacade,  com.sun.xml.ws.wsdl.parser.W3CAddressingWSDLParserExtension,
WSDLParserExtension
abstract public class WSDLParserExtension (Code)
Extends the WSDL parsing process.

This interface is implemented by components that build on top of the JAX-WS RI, to participate in the WSDL parsing process that happens in the runtime. This allows such components to retrieve information from WSDL extension elements, and use that later to, for example, configure Tube s.

How it works?

Each method on this interface denotes one extension point in WSDL (the place where foreign elements/attributes can be added.) A RuntimeWSDLParser starts parsing WSDL with a fixed set of WSDLParserExtension s, and as it finds extension elements/attributes, it calls appropriate callback methods to provide a chance for WSDLParserExtension to parse such an extension element.

There are two kinds of callbacks.

Attribute callbacks

One is for attributes, which ends with the name Attributes . This callback is invoked with XMLStreamReader that points to the start tag of the WSDL element.

The callback method can read interesting attributes on it. The method must return without advancing the parser to the next token.

Element callbacks

The other callback is for extension elements, which ends with the name Elements . When a callback is invoked, XMLStreamReader points to the start tag of the extension element. The callback method can do one of the following:

  1. Return false without moving XMLStreamReader , to indicate that the extension element isn't recognized. This allows the next WSDLParserExtension to see this extension element.
  2. Parse the whole subtree rooted at the element, move the cursor to the XMLStreamConstants.END_ELEMENT state, and return true , indicating that the extension element is consumed. No other WSDLParserExtension s are notified of this extension.

Parsing in callback

For each callback, the corresponding WSDL model object is passed in, so that WSDLParserExtension can relate what it's parsing to the WSDLModel . Most likely, extensions can parse their data into an WSDLExtension -derived classes, then use WSDLExtensible interface to hook them into WSDLModel .

Note that since the WSDLModel itself is being built, WSDLParserExtension may not invoke any of the query methods on the WSDL model. Those references are passed just so that WSDLParserExtension can hold on to those references, or put WSDLExtensible objects into the model, not to query it.

If WSDLParserExtension needs to query WSDLModel , defer that processing until WSDLParserExtension.finished(WSDLParserExtensionContext) , when it's safe to use WSDLModel can be used safely.

Also note that WSDLParserExtension s are called in no particular order. This interface is not designed for having multiple WSDLParserExtension s parse the same extension element.

Error Handling

For usability, WSDLParserExtension s are expected to check possible errors in the extension elements that it parses. When an error is found, it may throw a WebServiceException to abort the parsing of the WSDL. This exception will be propagated to the user, so it should have detailed error messages pointing at the problem.

Discovery

The JAX-WS RI locates the implementation of WSDLParserExtension s by using the standard service look up mechanism, in particular looking for META-INF/services/com.sun.xml.ws.api.wsdl.parser.WSDLParserExtension

TODO

As it's designed today, extensions cannot access to any of the environmental information before the parsing begins (such as what WSService this WSDL is being parsed for, etc.) We might need to reconsider this aspect. The JAX-WS team waits for feedback on this topic.
author:
   Kohsuke Kawaguchi





Method Summary
public  voidbindingAttributes(WSDLBoundPortType binding, XMLStreamReader reader)
    
public  booleanbindingElements(WSDLBoundPortType binding, XMLStreamReader reader)
    
public  voidbindingOperationAttributes(WSDLBoundOperation operation, XMLStreamReader reader)
    
public  booleanbindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader)
    
public  voidbindingOperationFaultAttributes(WSDLBoundFault fault, XMLStreamReader reader)
    
public  booleanbindingOperationFaultElements(WSDLBoundFault fault, XMLStreamReader reader)
    
public  voidbindingOperationInputAttributes(WSDLBoundOperation operation, XMLStreamReader reader)
    
public  booleanbindingOperationInputElements(WSDLBoundOperation operation, XMLStreamReader reader)
    
public  voidbindingOperationOutputAttributes(WSDLBoundOperation operation, XMLStreamReader reader)
    
public  booleanbindingOperationOutputElements(WSDLBoundOperation operation, XMLStreamReader reader)
    
public  booleandefinitionsElements(XMLStreamReader reader)
    
public  voidfinished(WSDLParserExtensionContext context)
     Called when the parsing of a set of WSDL documents are all done.
public  voidmessageAttributes(WSDLMessage msg, XMLStreamReader reader)
    
public  booleanmessageElements(WSDLMessage msg, XMLStreamReader reader)
    
public  voidportAttributes(WSDLPort port, XMLStreamReader reader)
    
public  booleanportElements(WSDLPort port, XMLStreamReader reader)
    
public  voidportTypeAttributes(WSDLPortType portType, XMLStreamReader reader)
    
public  booleanportTypeElements(WSDLPortType portType, XMLStreamReader reader)
    
public  voidportTypeOperationAttributes(WSDLOperation operation, XMLStreamReader reader)
    
public  booleanportTypeOperationElements(WSDLOperation operation, XMLStreamReader reader)
    
public  booleanportTypeOperationFault(WSDLOperation op, XMLStreamReader reader)
    
public  voidportTypeOperationFaultAttributes(WSDLFault fault, XMLStreamReader reader)
    
public  booleanportTypeOperationFaultElements(WSDLFault fault, XMLStreamReader reader)
    
public  booleanportTypeOperationInput(WSDLOperation op, XMLStreamReader reader)
    
public  voidportTypeOperationInputAttributes(WSDLInput input, XMLStreamReader reader)
    
public  booleanportTypeOperationInputElements(WSDLInput input, XMLStreamReader reader)
    
public  booleanportTypeOperationOutput(WSDLOperation op, XMLStreamReader reader)
    
public  voidportTypeOperationOutputAttributes(WSDLOutput output, XMLStreamReader reader)
    
public  booleanportTypeOperationOutputElements(WSDLOutput output, XMLStreamReader reader)
    
public  voidpostFinished(WSDLParserExtensionContext context)
    
public  voidserviceAttributes(WSDLService service, XMLStreamReader reader)
    
public  booleanserviceElements(WSDLService service, XMLStreamReader reader)
    
public  voidstart(WSDLParserExtensionContext context)
    



Method Detail
bindingAttributes
public void bindingAttributes(WSDLBoundPortType binding, XMLStreamReader reader)(Code)



bindingElements
public boolean bindingElements(WSDLBoundPortType binding, XMLStreamReader reader)(Code)



bindingOperationAttributes
public void bindingOperationAttributes(WSDLBoundOperation operation, XMLStreamReader reader)(Code)



bindingOperationElements
public boolean bindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader)(Code)



bindingOperationFaultAttributes
public void bindingOperationFaultAttributes(WSDLBoundFault fault, XMLStreamReader reader)(Code)



bindingOperationFaultElements
public boolean bindingOperationFaultElements(WSDLBoundFault fault, XMLStreamReader reader)(Code)



bindingOperationInputAttributes
public void bindingOperationInputAttributes(WSDLBoundOperation operation, XMLStreamReader reader)(Code)



bindingOperationInputElements
public boolean bindingOperationInputElements(WSDLBoundOperation operation, XMLStreamReader reader)(Code)



bindingOperationOutputAttributes
public void bindingOperationOutputAttributes(WSDLBoundOperation operation, XMLStreamReader reader)(Code)



bindingOperationOutputElements
public boolean bindingOperationOutputElements(WSDLBoundOperation operation, XMLStreamReader reader)(Code)



definitionsElements
public boolean definitionsElements(XMLStreamReader reader)(Code)



finished
public void finished(WSDLParserExtensionContext context)(Code)
Called when the parsing of a set of WSDL documents are all done.

This is the opportunity to do any post-processing of the parsing you've done.
Parameters:
  context - WSDLParserExtensionContext gives fully parsed WSDLModel.




messageAttributes
public void messageAttributes(WSDLMessage msg, XMLStreamReader reader)(Code)



messageElements
public boolean messageElements(WSDLMessage msg, XMLStreamReader reader)(Code)



portAttributes
public void portAttributes(WSDLPort port, XMLStreamReader reader)(Code)



portElements
public boolean portElements(WSDLPort port, XMLStreamReader reader)(Code)



portTypeAttributes
public void portTypeAttributes(WSDLPortType portType, XMLStreamReader reader)(Code)



portTypeElements
public boolean portTypeElements(WSDLPortType portType, XMLStreamReader reader)(Code)



portTypeOperationAttributes
public void portTypeOperationAttributes(WSDLOperation operation, XMLStreamReader reader)(Code)



portTypeOperationElements
public boolean portTypeOperationElements(WSDLOperation operation, XMLStreamReader reader)(Code)



portTypeOperationFault
public boolean portTypeOperationFault(WSDLOperation op, XMLStreamReader reader)(Code)



portTypeOperationFaultAttributes
public void portTypeOperationFaultAttributes(WSDLFault fault, XMLStreamReader reader)(Code)



portTypeOperationFaultElements
public boolean portTypeOperationFaultElements(WSDLFault fault, XMLStreamReader reader)(Code)



portTypeOperationInput
public boolean portTypeOperationInput(WSDLOperation op, XMLStreamReader reader)(Code)



portTypeOperationInputAttributes
public void portTypeOperationInputAttributes(WSDLInput input, XMLStreamReader reader)(Code)



portTypeOperationInputElements
public boolean portTypeOperationInputElements(WSDLInput input, XMLStreamReader reader)(Code)



portTypeOperationOutput
public boolean portTypeOperationOutput(WSDLOperation op, XMLStreamReader reader)(Code)



portTypeOperationOutputAttributes
public void portTypeOperationOutputAttributes(WSDLOutput output, XMLStreamReader reader)(Code)



portTypeOperationOutputElements
public boolean portTypeOperationOutputElements(WSDLOutput output, XMLStreamReader reader)(Code)



postFinished
public void postFinished(WSDLParserExtensionContext context)(Code)



serviceAttributes
public void serviceAttributes(WSDLService service, XMLStreamReader reader)(Code)



serviceElements
public boolean serviceElements(WSDLService service, XMLStreamReader reader)(Code)



start
public void start(WSDLParserExtensionContext context)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

w___w__w.ja__v_a2__s___.c__o__m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.