Package com.sun.xml.ws.model.wsdl
Class WSDLModelImpl
java.lang.Object
com.sun.xml.ws.model.wsdl.WSDLModelImpl
- All Implemented Interfaces:
EditableWSDLModel,WSDLExtensible,WSDLModel,WSDLObject
Implementation of WSDLModel
- Author:
- Vivek Pandey
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.sun.xml.ws.api.model.wsdl.WSDLModel
WSDLModel.WSDLParser -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Set<WSDLExtension>protected List<com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension> -
Constructor Summary
ConstructorsConstructorDescriptionTo create WSDLModelImpl from WSDL that doesn't have a system ID.WSDLModelImpl(String systemId) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBinding(EditableWSDLBoundPortType boundPortType) Add BindingvoidAdds a newWSDLExtensionto this object.voidAdd messagevoidaddNotUnderstoodExtension(QName extnEl, Locator locator) This can be used if a WSDL extension element that has wsdl:required=true is not understoodvoidAdd port typevoidAdd servicebooleanThis method should be called after freezing the WSDLModelvoidfinalizeRpcLitBinding(EditableWSDLBoundPortType boundPortType) Finalize rpc-lit bindingvoidfreeze()Invoked at the end of the model construction to fix up references, etc.getBinding(QName name) GetsWSDLBoundPortTypethat modelswsdl:bindinggetBinding(QName serviceName, QName portName) Give aWSDLBoundPortTypefor the given wsdl:service and wsdl:port names.Map<QName,? extends EditableWSDLBoundPortType> <T extends WSDLExtension>
TgetExtension(Class<T> type) Gets the extension that is assignable to the given type.final Iterable<WSDLExtension>Gets all theWSDLExtensions added throughWSDLExtensible.addExtension(WSDLExtension).final <T extends WSDLExtension>
Iterable<T>getExtensions(Class<T> type) Gets all the extensions that is assignable to the given type.Returns the first service QName from insertion orderfinal LocatorGets the source location information in the parsed WSDL.getMessage(QName name) Returns the message with the given QNameGives aMapof wsdl:message qualified name andWSDLMessageList<? extends com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension>Lists extensions marked as not understoodGives the PolicyMap associated with the WSDLModelgetPortType(QName name) GetsWSDLPortTypethat modelswsdl:portTypegetService(QName name) GetsWSDLServicethat modelswsdl:serviceGives aMapof wsdl:service qualified name andWSDLServicevoidsetPolicyMap(PolicyMap policyMap) Set PolicyMap for the WSDLModel.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sun.xml.ws.api.model.wsdl.WSDLExtensible
addExtension, addNotUnderstoodExtension, areRequiredExtensionsUnderstood, getExtension, getExtensions, getExtensions, getNotUnderstoodExtensionsMethods inherited from interface com.sun.xml.ws.api.model.wsdl.WSDLObject
getLocation
-
Field Details
-
extensions
-
notUnderstoodExtensions
protected List<com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension> notUnderstoodExtensions
-
-
Constructor Details
-
WSDLModelImpl
-
WSDLModelImpl
public WSDLModelImpl()To create WSDLModelImpl from WSDL that doesn't have a system ID.
-
-
Method Details
-
addMessage
Description copied from interface:EditableWSDLModelAdd message- Specified by:
addMessagein interfaceEditableWSDLModel- Parameters:
msg- Message
-
getMessage
Description copied from interface:WSDLModelReturns the message with the given QName- Specified by:
getMessagein interfaceEditableWSDLModel- Specified by:
getMessagein interfaceWSDLModel- Parameters:
name- Message name- Returns:
- Message
-
addPortType
Description copied from interface:EditableWSDLModelAdd port type- Specified by:
addPortTypein interfaceEditableWSDLModel- Parameters:
pt- Port type
-
getPortType
Description copied from interface:WSDLModelGetsWSDLPortTypethat modelswsdl:portType- Specified by:
getPortTypein interfaceEditableWSDLModel- Specified by:
getPortTypein interfaceWSDLModel- Parameters:
name- non-null quaified name of wsdl:message, where the localName is the value ofwsdl:portType@nameand the namespaceURI is the value of wsdl:definitions@targetNamespace- Returns:
- A
WSDLPortTypeor null if no wsdl:portType found.
-
addBinding
Description copied from interface:EditableWSDLModelAdd Binding- Specified by:
addBindingin interfaceEditableWSDLModel- Parameters:
boundPortType- Bound port type
-
getBinding
Description copied from interface:WSDLModelGetsWSDLBoundPortTypethat modelswsdl:binding- Specified by:
getBindingin interfaceEditableWSDLModel- Specified by:
getBindingin interfaceWSDLModel- Parameters:
name- non-null quaified name of wsdl:binding, where the localName is the value ofwsdl:binding@nameand the namespaceURI is the value of wsdl:definitions@targetNamespace- Returns:
- A
WSDLBoundPortTypeor null if no wsdl:binding found
-
addService
Description copied from interface:EditableWSDLModelAdd service- Specified by:
addServicein interfaceEditableWSDLModel- Parameters:
svc- Service
-
getService
Description copied from interface:WSDLModelGetsWSDLServicethat modelswsdl:service- Specified by:
getServicein interfaceEditableWSDLModel- Specified by:
getServicein interfaceWSDLModel- Parameters:
name- non-null quaified name of wsdl:service, where the localName is the value ofwsdl:service@nameand the namespaceURI is the value of wsdl:definitions@targetNamespace- Returns:
- A
WSDLServiceor null if no wsdl:service found
-
getMessages
Description copied from interface:WSDLModelGives aMapof wsdl:message qualified name andWSDLMessage- Specified by:
getMessagesin interfaceEditableWSDLModel- Specified by:
getMessagesin interfaceWSDLModel- Returns:
- an empty Map if the wsdl document has no wsdl:message
-
getPortTypes
Description copied from interface:WSDLModel- Specified by:
getPortTypesin interfaceEditableWSDLModel- Specified by:
getPortTypesin interfaceWSDLModel- Returns:
- an empty Map if the wsdl document has no wsdl:portType
-
getBindings
Description copied from interface:WSDLModel- Specified by:
getBindingsin interfaceEditableWSDLModel- Specified by:
getBindingsin interfaceWSDLModel- Returns:
- an empty Map if the wsdl document has no wsdl:binding
-
getServices
Description copied from interface:WSDLModelGives aMapof wsdl:service qualified name andWSDLService- Specified by:
getServicesin interfaceEditableWSDLModel- Specified by:
getServicesin interfaceWSDLModel- Returns:
- an empty Map if the wsdl document has no wsdl:service
-
getFirstServiceName
Returns the first service QName from insertion order- Specified by:
getFirstServiceNamein interfaceWSDLModel
-
getBinding
Description copied from interface:WSDLModelGive aWSDLBoundPortTypefor the given wsdl:service and wsdl:port names.- Specified by:
getBindingin interfaceEditableWSDLModel- Specified by:
getBindingin interfaceWSDLModel- Parameters:
serviceName- non-null service QNameportName- non-null port QName- Returns:
- WSDLBoundOperation on success otherwise null. throws NPE if any of the parameters null
-
finalizeRpcLitBinding
Description copied from interface:EditableWSDLModelFinalize rpc-lit binding- Specified by:
finalizeRpcLitBindingin interfaceEditableWSDLModel- Parameters:
boundPortType- Binding
-
getPolicyMap
Gives the PolicyMap associated with the WSDLModel- Specified by:
getPolicyMapin interfaceWSDLModel- Returns:
- PolicyMap
-
setPolicyMap
Set PolicyMap for the WSDLModel.- Specified by:
setPolicyMapin interfaceEditableWSDLModel
-
freeze
public void freeze()Invoked at the end of the model construction to fix up references, etc.- Specified by:
freezein interfaceEditableWSDLModel
-
getExtensions
Description copied from interface:WSDLExtensibleGets all theWSDLExtensions added throughWSDLExtensible.addExtension(WSDLExtension).- Specified by:
getExtensionsin interfaceWSDLExtensible- Returns:
- never null.
-
getExtensions
Description copied from interface:WSDLExtensibleGets all the extensions that is assignable to the given type.This allows clients to find specific extensions in a type-safe and convenient way.
- Specified by:
getExtensionsin interfaceWSDLExtensible- Parameters:
type- The type of the extension to obtain. Must not be null.- Returns:
- Can be an empty fromjava.collection but never null.
-
getExtension
Description copied from interface:WSDLExtensibleGets the extension that is assignable to the given type.This is just a convenient version that does
Iterator itr = getExtensions(type); if(itr.hasNext()) return itr.next(); else return null;
- Specified by:
getExtensionin interfaceWSDLExtensible- Returns:
- null if the extension was not found.
-
addExtension
Description copied from interface:WSDLExtensibleAdds a newWSDLExtensionto this object.- Specified by:
addExtensionin interfaceWSDLExtensible- Parameters:
ex- must not be null.
-
getNotUnderstoodExtensions
public List<? extends com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension> getNotUnderstoodExtensions()Description copied from interface:WSDLExtensibleLists extensions marked as not understood- Specified by:
getNotUnderstoodExtensionsin interfaceWSDLExtensible- Returns:
- List of not understood extensions
-
addNotUnderstoodExtension
This can be used if a WSDL extension element that has wsdl:required=true is not understood- Specified by:
addNotUnderstoodExtensionin interfaceWSDLExtensible- Parameters:
extnEl- QName of extensionlocator- Locator
-
areRequiredExtensionsUnderstood
public boolean areRequiredExtensionsUnderstood()This method should be called after freezing the WSDLModel- Specified by:
areRequiredExtensionsUnderstoodin interfaceWSDLExtensible- Returns:
- true if all wsdl required extensions on Port and Binding are understood
-
getLocation
Description copied from interface:WSDLObjectGets the source location information in the parsed WSDL. This is useful when producing error messages.- Specified by:
getLocationin interfaceWSDLObject
-