java.lang.Object
com.sun.xml.ws.model.wsdl.WSDLModelImpl
- All Implemented Interfaces:
com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel,WSDLExtensible,WSDLModel,WSDLObject
public final class WSDLModelImpl
extends Object
implements com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
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(com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType boundPortType) Add BindingvoidAdds a newWSDLExtensionto this object.voidaddMessage(com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLMessage msg) Add messagevoidaddNotUnderstoodExtension(QName extnEl, Locator locator) This can be used if a WSDL extension element that has wsdl:required=true is not understoodvoidaddPortType(com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLPortType pt) Add port typevoidaddService(com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLService svc) Add servicebooleanThis method should be called after freezing the WSDLModelvoidfinalizeRpcLitBinding(com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType boundPortType) Finalize rpc-lit bindingvoidfreeze()Invoked at the end of the model construction to fix up references, etc.com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortTypegetBinding(QName name) GetsWSDLBoundPortTypethat modelswsdl:bindingcom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortTypegetBinding(QName serviceName, QName portName) Give aWSDLBoundPortTypefor the given wsdl:service and wsdl:port names.<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.com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLMessagegetMessage(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 understoodcom.sun.xml.ws.policy.PolicyMapGives the PolicyMap associated with the WSDLModelcom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLPortTypegetPortType(QName name) GetsWSDLPortTypethat modelswsdl:portTypecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLServicegetService(QName name) GetsWSDLServicethat modelswsdl:serviceGives aMapof wsdl:service qualified name andWSDLServicevoidsetPolicyMap(com.sun.xml.ws.policy.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
public void addMessage(com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLMessage msg) Description copied from interface:com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModelAdd message- Specified by:
addMessagein interfacecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel- Parameters:
msg- Message
-
getMessage
Description copied from interface:WSDLModelReturns the message with the given QName- Specified by:
getMessagein interfacecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel- Specified by:
getMessagein interfaceWSDLModel- Parameters:
name- Message name- Returns:
- Message
-
addPortType
public void addPortType(com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLPortType pt) Description copied from interface:com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModelAdd port type- Specified by:
addPortTypein interfacecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel- Parameters:
pt- Port type
-
getPortType
Description copied from interface:WSDLModelGetsWSDLPortTypethat modelswsdl:portType- Specified by:
getPortTypein interfacecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel- 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
public void addBinding(com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType boundPortType) Description copied from interface:com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModelAdd Binding- Specified by:
addBindingin interfacecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel- Parameters:
boundPortType- Bound port type
-
getBinding
Description copied from interface:WSDLModelGetsWSDLBoundPortTypethat modelswsdl:binding- Specified by:
getBindingin interfacecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel- 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
public void addService(com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLService svc) Description copied from interface:com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModelAdd service- Specified by:
addServicein interfacecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel- Parameters:
svc- Service
-
getService
Description copied from interface:WSDLModelGetsWSDLServicethat modelswsdl:service- Specified by:
getServicein interfacecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel- 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 interfacecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel- Specified by:
getMessagesin interfaceWSDLModel- Returns:
- an empty Map if the wsdl document has no wsdl:message
-
getPortTypes
@NotNull public Map<QName,com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLPortType> getPortTypes()Description copied from interface:WSDLModel- Specified by:
getPortTypesin interfacecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel- Specified by:
getPortTypesin interfaceWSDLModel- Returns:
- an empty Map if the wsdl document has no wsdl:portType
-
getBindings
@NotNull public Map<QName,? extends com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType> getBindings()Description copied from interface:WSDLModel- Specified by:
getBindingsin interfacecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel- 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 interfacecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel- 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
public com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType getBinding(QName serviceName, QName portName) Description copied from interface:WSDLModelGive aWSDLBoundPortTypefor the given wsdl:service and wsdl:port names.- Specified by:
getBindingin interfacecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel- 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
public void finalizeRpcLitBinding(com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType boundPortType) Description copied from interface:com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModelFinalize rpc-lit binding- Specified by:
finalizeRpcLitBindingin interfacecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel- Parameters:
boundPortType- Binding
-
getPolicyMap
public com.sun.xml.ws.policy.PolicyMap getPolicyMap()Gives the PolicyMap associated with the WSDLModel- Specified by:
getPolicyMapin interfaceWSDLModel- Returns:
- PolicyMap
-
setPolicyMap
public void setPolicyMap(com.sun.xml.ws.policy.PolicyMap policyMap) Set PolicyMap for the WSDLModel.- Specified by:
setPolicyMapin interfacecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel- Parameters:
policyMap-
-
freeze
public void freeze()Invoked at the end of the model construction to fix up references, etc.- Specified by:
freezein interfacecom.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
-
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-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
-