com.sun.xml.ws.model.wsdl
Class WSDLBoundOperationImpl

java.lang.Object
  extended by com.sun.xml.ws.model.wsdl.WSDLBoundOperationImpl
All Implemented Interfaces:
EditableWSDLBoundOperation, WSDLBoundOperation, WSDLExtensible, WSDLObject

public final class WSDLBoundOperationImpl
extends Object
implements EditableWSDLBoundOperation

Implementation of WSDLBoundOperation

Author:
Vivek Pandey

Nested Class Summary
protected static class com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension
           
 
Nested classes/interfaces inherited from interface com.sun.xml.ws.api.model.wsdl.WSDLBoundOperation
WSDLBoundOperation.ANONYMOUS
 
Field Summary
protected  Set<WSDLExtension> extensions
           
protected  List<com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension> notUnderstoodExtensions
           
 
Constructor Summary
WSDLBoundOperationImpl(XMLStreamReader xsr, EditableWSDLBoundPortType owner, QName name)
           
 
Method Summary
 void addExtension(WSDLExtension ex)
          Adds a new WSDLExtension to this object.
 void addFault(EditableWSDLBoundFault fault)
          Add Fault
 void addNotUnderstoodExtension(QName extnEl, Locator locator)
          This can be used if a WSDL extension element that has wsdl:required=true is not understood
 void addPart(EditableWSDLPart part, WebParam.Mode mode)
          Add Part
 boolean areRequiredExtensionsUnderstood()
          This method should be called after freezing the WSDLModel
 void freeze(EditableWSDLModel parent)
          Freezes WSDL model to prevent further modification
 WSDLBoundOperation.ANONYMOUS getAnonymous()
          Gets the soapbinding:binding/operation/wsaw:Anonymous.
 EditableWSDLBoundPortType getBoundPortType()
          Gives the owner WSDLBoundPortType
<T extends WSDLExtension>
T
getExtension(Class<T> type)
          Gets the extension that is assignable to the given type.
 Iterable<WSDLExtension> getExtensions()
          Gets all the WSDLExtensions added through WSDLExtensible.addExtension(WSDLExtension).
<T extends WSDLExtension>
Iterable<T>
getExtensions(Class<T> type)
          Gets all the extensions that is assignable to the given type.
 ParameterBinding getFaultBinding(String part)
          Gets ParameterBinding for a given wsdl part in wsdl:fault
 Map<String,ParameterBinding> getFaultParts()
          Map of wsdl:fault part name and the binding as ParameterBinding
 List<? extends EditableWSDLBoundFault> getFaults()
          Gets all the WSDLFault bound to this operation.
 Map<String,? extends EditableWSDLPart> getInParts()
          Gets all inbound WSDLPart by its name.
 ParameterBinding getInputBinding(String part)
          Gets ParameterBinding for a given wsdl part in wsdl:input
 Map<String,ParameterBinding> getInputParts()
          Map of wsdl:input part name and the binding as ParameterBinding
 Locator getLocation()
          Gets the source location information in the parsed WSDL.
 String getMimeTypeForFaultPart(String part)
          Gets the MIME type for a given wsdl part in wsdl:fault
 String getMimeTypeForInputPart(String part)
          Gets the MIME type for a given wsdl part in wsdl:input
 String getMimeTypeForOutputPart(String part)
          Gets the MIME type for a given wsdl part in wsdl:output
 QName getName()
          Short-cut for getOperation().getName()
 List<? extends com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension> getNotUnderstoodExtensions()
          Lists extensions marked as not understood
 EditableWSDLOperation getOperation()
          Gets the wsdl:portType/wsdl:operation model - WSDLOperation, associated with this binding operation.
 Map<String,? extends EditableWSDLPart> getOutParts()
          Gets all outbound WSDLPart by its name.
 ParameterBinding getOutputBinding(String part)
          Gets ParameterBinding for a given wsdl part in wsdl:output
 Map<String,ParameterBinding> getOutputParts()
          Map of wsdl:output part name and the binding as ParameterBinding
 EditableWSDLPart getPart(String partName, WebParam.Mode mode)
          Gets WSDLPart for the given wsdl:input or wsdl:output part
 String getRequestNamespace()
          For rpclit gives namespace value on soapbinding:body@namespace
 QName getRequestPayloadName()
          Gets the payload QName of the request message.
 String getResponseNamespace()
          For rpclit gives namespace value on soapbinding:body@namespace
 QName getResponsePayloadName()
          Gets the payload QName of the response message.
 String getSOAPAction()
          Gives soapbinding:operation@soapAction value.
 void setAnonymous(WSDLBoundOperation.ANONYMOUS anonymous)
          Sets the soapbinding:binding/operation/wsaw:Anonymous.
 void setFaultExplicitBodyParts(boolean b)
          Sets fault explicit body parts
 void setInputExplicitBodyParts(boolean b)
          Sets input explicit body parts
 void setOutputExplicitBodyParts(boolean b)
          Sets output explicit body parts
 void setRequestNamespace(String ns)
          Set request namespace
 void setResponseNamespace(String ns)
          Set response namespace
 void setSoapAction(String soapAction)
          Set SOAP action
 void setStyle(SOAPBinding.Style style)
          Set parameter style
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.xml.ws.api.model.wsdl.WSDLExtensible
addExtension, addNotUnderstoodExtension, areRequiredExtensionsUnderstood, getExtension, getExtensions, getExtensions, getNotUnderstoodExtensions
 
Methods inherited from interface com.sun.xml.ws.api.model.wsdl.WSDLObject
getLocation
 

Field Detail

extensions

protected final Set<WSDLExtension> extensions

notUnderstoodExtensions

protected List<com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension> notUnderstoodExtensions
Constructor Detail

WSDLBoundOperationImpl

public WSDLBoundOperationImpl(XMLStreamReader xsr,
                              EditableWSDLBoundPortType owner,
                              QName name)
Parameters:
name - wsdl:operation name qualified value
Method Detail

getName

public QName getName()
Description copied from interface: WSDLBoundOperation
Short-cut for getOperation().getName()

Specified by:
getName in interface WSDLBoundOperation

getSOAPAction

public String getSOAPAction()
Description copied from interface: WSDLBoundOperation
Gives soapbinding:operation@soapAction value. soapbinding:operation@soapAction is optional attribute. If not present an empty String is returned as per BP 1.1 R2745.

Specified by:
getSOAPAction in interface WSDLBoundOperation

setSoapAction

public void setSoapAction(String soapAction)
Description copied from interface: EditableWSDLBoundOperation
Set SOAP action

Specified by:
setSoapAction in interface EditableWSDLBoundOperation
Parameters:
soapAction - SOAP action

getPart

public EditableWSDLPart getPart(String partName,
                                WebParam.Mode mode)
Description copied from interface: WSDLBoundOperation
Gets WSDLPart for the given wsdl:input or wsdl:output part

Specified by:
getPart in interface EditableWSDLBoundOperation
Specified by:
getPart in interface WSDLBoundOperation
Returns:
null if no part is found

addPart

public void addPart(EditableWSDLPart part,
                    WebParam.Mode mode)
Description copied from interface: EditableWSDLBoundOperation
Add Part

Specified by:
addPart in interface EditableWSDLBoundOperation
Parameters:
part - Part
mode - Mode

getInputParts

public Map<String,ParameterBinding> getInputParts()
Map of wsdl:input part name and the binding as ParameterBinding

Specified by:
getInputParts in interface WSDLBoundOperation
Returns:
empty Map if there is no parts

getOutputParts

public Map<String,ParameterBinding> getOutputParts()
Map of wsdl:output part name and the binding as ParameterBinding

Specified by:
getOutputParts in interface WSDLBoundOperation
Returns:
empty Map if there is no parts

getFaultParts

public Map<String,ParameterBinding> getFaultParts()
Map of wsdl:fault part name and the binding as ParameterBinding

Specified by:
getFaultParts in interface WSDLBoundOperation
Returns:
empty Map if there is no parts

getInParts

public Map<String,? extends EditableWSDLPart> getInParts()
Description copied from interface: WSDLBoundOperation
Gets all inbound WSDLPart by its name.

Specified by:
getInParts in interface EditableWSDLBoundOperation
Specified by:
getInParts in interface WSDLBoundOperation

getOutParts

public Map<String,? extends EditableWSDLPart> getOutParts()
Description copied from interface: WSDLBoundOperation
Gets all outbound WSDLPart by its name.

Specified by:
getOutParts in interface EditableWSDLBoundOperation
Specified by:
getOutParts in interface WSDLBoundOperation

getFaults

@NotNull
public List<? extends EditableWSDLBoundFault> getFaults()
Description copied from interface: WSDLBoundOperation
Gets all the WSDLFault bound to this operation.

Specified by:
getFaults in interface EditableWSDLBoundOperation
Specified by:
getFaults in interface WSDLBoundOperation

addFault

public void addFault(@NotNull
                     EditableWSDLBoundFault fault)
Description copied from interface: EditableWSDLBoundOperation
Add Fault

Specified by:
addFault in interface EditableWSDLBoundOperation
Parameters:
fault - Fault

getInputBinding

public ParameterBinding getInputBinding(String part)
Gets ParameterBinding for a given wsdl part in wsdl:input

Specified by:
getInputBinding in interface WSDLBoundOperation
Parameters:
part - Name of wsdl:part, must be non-null
Returns:
null if the part is not found.

getOutputBinding

public ParameterBinding getOutputBinding(String part)
Gets ParameterBinding for a given wsdl part in wsdl:output

Specified by:
getOutputBinding in interface WSDLBoundOperation
Parameters:
part - Name of wsdl:part, must be non-null
Returns:
null if the part is not found.

getFaultBinding

public ParameterBinding getFaultBinding(String part)
Gets ParameterBinding for a given wsdl part in wsdl:fault

Specified by:
getFaultBinding in interface WSDLBoundOperation
Parameters:
part - Name of wsdl:part, must be non-null
Returns:
null if the part is not found.

getMimeTypeForInputPart

public String getMimeTypeForInputPart(String part)
Gets the MIME type for a given wsdl part in wsdl:input

Specified by:
getMimeTypeForInputPart in interface WSDLBoundOperation
Parameters:
part - Name of wsdl:part, must be non-null
Returns:
null if the part is not found.

getMimeTypeForOutputPart

public String getMimeTypeForOutputPart(String part)
Gets the MIME type for a given wsdl part in wsdl:output

Specified by:
getMimeTypeForOutputPart in interface WSDLBoundOperation
Parameters:
part - Name of wsdl:part, must be non-null
Returns:
null if the part is not found.

getMimeTypeForFaultPart

public String getMimeTypeForFaultPart(String part)
Gets the MIME type for a given wsdl part in wsdl:fault

Specified by:
getMimeTypeForFaultPart in interface WSDLBoundOperation
Parameters:
part - Name of wsdl:part, must be non-null
Returns:
null if the part is not found.

getOperation

public EditableWSDLOperation getOperation()
Description copied from interface: WSDLBoundOperation
Gets the wsdl:portType/wsdl:operation model - WSDLOperation, associated with this binding operation.

Specified by:
getOperation in interface EditableWSDLBoundOperation
Specified by:
getOperation in interface WSDLBoundOperation
Returns:
always same WSDLOperation

getBoundPortType

public EditableWSDLBoundPortType getBoundPortType()
Description copied from interface: WSDLBoundOperation
Gives the owner WSDLBoundPortType

Specified by:
getBoundPortType in interface EditableWSDLBoundOperation
Specified by:
getBoundPortType in interface WSDLBoundOperation

setInputExplicitBodyParts

public void setInputExplicitBodyParts(boolean b)
Description copied from interface: EditableWSDLBoundOperation
Sets input explicit body parts

Specified by:
setInputExplicitBodyParts in interface EditableWSDLBoundOperation
Parameters:
b - True, if input body part is explicit

setOutputExplicitBodyParts

public void setOutputExplicitBodyParts(boolean b)
Description copied from interface: EditableWSDLBoundOperation
Sets output explicit body parts

Specified by:
setOutputExplicitBodyParts in interface EditableWSDLBoundOperation
Parameters:
b - True, if output body part is explicit

setFaultExplicitBodyParts

public void setFaultExplicitBodyParts(boolean b)
Description copied from interface: EditableWSDLBoundOperation
Sets fault explicit body parts

Specified by:
setFaultExplicitBodyParts in interface EditableWSDLBoundOperation
Parameters:
b - True, if fault body part is explicit

setStyle

public void setStyle(SOAPBinding.Style style)
Description copied from interface: EditableWSDLBoundOperation
Set parameter style

Specified by:
setStyle in interface EditableWSDLBoundOperation
Parameters:
style - Style

getRequestPayloadName

@Nullable
public QName getRequestPayloadName()
Description copied from interface: WSDLBoundOperation
Gets the payload QName of the request message.

It's possible for an operation to define no body part, in which case this method returns null.

Specified by:
getRequestPayloadName in interface WSDLBoundOperation

getResponsePayloadName

@Nullable
public QName getResponsePayloadName()
Description copied from interface: WSDLBoundOperation
Gets the payload QName of the response message.

It's possible for an operation to define no body part, in which case this method returns null.

Specified by:
getResponsePayloadName in interface WSDLBoundOperation

getRequestNamespace

public String getRequestNamespace()
For rpclit gives namespace value on soapbinding:body@namespace

Specified by:
getRequestNamespace in interface WSDLBoundOperation
Returns:
non-null for rpclit and null for doclit
See Also:
RuntimeModeler.processRpcMethod(JavaMethodImpl, String, String, Method)

setRequestNamespace

public void setRequestNamespace(String ns)
Description copied from interface: EditableWSDLBoundOperation
Set request namespace

Specified by:
setRequestNamespace in interface EditableWSDLBoundOperation
Parameters:
ns - Namespace

getResponseNamespace

public String getResponseNamespace()
For rpclit gives namespace value on soapbinding:body@namespace

Specified by:
getResponseNamespace in interface WSDLBoundOperation
Returns:
non-null for rpclit and null for doclit
See Also:
RuntimeModeler.processRpcMethod(JavaMethodImpl, String, String, Method)

setResponseNamespace

public void setResponseNamespace(String ns)
Description copied from interface: EditableWSDLBoundOperation
Set response namespace

Specified by:
setResponseNamespace in interface EditableWSDLBoundOperation
Parameters:
ns - Namespace

freeze

public void freeze(EditableWSDLModel parent)
Description copied from interface: EditableWSDLBoundOperation
Freezes WSDL model to prevent further modification

Specified by:
freeze in interface EditableWSDLBoundOperation
Parameters:
parent - WSDL Model

setAnonymous

public void setAnonymous(WSDLBoundOperation.ANONYMOUS anonymous)
Description copied from interface: EditableWSDLBoundOperation
Sets the soapbinding:binding/operation/wsaw:Anonymous.

Specified by:
setAnonymous in interface EditableWSDLBoundOperation
Parameters:
anonymous - Anonymous value of the operation

getAnonymous

public WSDLBoundOperation.ANONYMOUS getAnonymous()
Description copied from interface: WSDLBoundOperation
Gets the soapbinding:binding/operation/wsaw:Anonymous. A default value of OPTIONAL is returned.

Specified by:
getAnonymous in interface WSDLBoundOperation
Returns:
Anonymous value of the operation

getExtensions

public final Iterable<WSDLExtension> getExtensions()
Description copied from interface: WSDLExtensible
Gets all the WSDLExtensions added through WSDLExtensible.addExtension(WSDLExtension).

Specified by:
getExtensions in interface WSDLExtensible
Returns:
never null.

getExtensions

public final <T extends WSDLExtension> Iterable<T> getExtensions(Class<T> type)
Description copied from interface: WSDLExtensible
Gets 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:
getExtensions in interface WSDLExtensible
Parameters:
type - The type of the extension to obtain. Must not be null.
Returns:
Can be an empty fromjava.collection but never null.

getExtension

public <T extends WSDLExtension> T getExtension(Class<T> type)
Description copied from interface: WSDLExtensible
Gets 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:
getExtension in interface WSDLExtensible
Returns:
null if the extension was not found.

addExtension

public void addExtension(WSDLExtension ex)
Description copied from interface: WSDLExtensible
Adds a new WSDLExtension to this object.

Specified by:
addExtension in interface WSDLExtensible
Parameters:
ex - must not be null.

getNotUnderstoodExtensions

public List<? extends com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension> getNotUnderstoodExtensions()
Description copied from interface: WSDLExtensible
Lists extensions marked as not understood

Specified by:
getNotUnderstoodExtensions in interface WSDLExtensible
Returns:
List of not understood extensions

addNotUnderstoodExtension

public void addNotUnderstoodExtension(QName extnEl,
                                      Locator locator)
This can be used if a WSDL extension element that has wsdl:required=true is not understood

Specified by:
addNotUnderstoodExtension in interface WSDLExtensible
Parameters:
extnEl -
locator -

areRequiredExtensionsUnderstood

public boolean areRequiredExtensionsUnderstood()
This method should be called after freezing the WSDLModel

Specified by:
areRequiredExtensionsUnderstood in interface WSDLExtensible
Returns:
true if all wsdl required extensions on Port and Binding are understood

getLocation

@NotNull
public final Locator getLocation()
Description copied from interface: WSDLObject
Gets the source location information in the parsed WSDL. This is useful when producing error messages.

Specified by:
getLocation in interface WSDLObject


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.