|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.ws.wsdl.wsdl11.builder.AbstractWsdl4jDefinitionBuilder org.springframework.ws.wsdl.wsdl11.builder.AbstractBindingWsdl4jDefinitionBuilder org.springframework.ws.wsdl.wsdl11.builder.AbstractSoap11Wsdl4jDefinitionBuilder org.springframework.ws.wsdl.wsdl11.builder.XsdBasedSoap11Wsdl4jDefinitionBuilder
DefaultWsdl11Definition
and the org.springframework.ws.wsdl.wsdl11.provider
package
public class XsdBasedSoap11Wsdl4jDefinitionBuilder
Builds a WsdlDefinition
with a SOAP 1.1 binding based on an XSD schema. This builder iterates over all
element
s found in the schema, and creates a message
for those elements that end with the
request or response suffix. It combines these messages into operation
s, and builds a
portType
based on the operations.
types
block. However, if the schemaLocation
property is set, an XSD import
is used instead. As such, the imported schema file can contain further
imports, which will be resolved correctly in accordance with the schema location.
To create messages from imported and included schemas, set the followIncludeImport
property to
true
.
Typically used within a DynamicWsdl11Definition
, like so:
<bean id="airline" class="org.springframework.ws.wsdl.wsdl11.DynamicWsdl11Definition"> <property name="builder"> <bean class="org.springframework.ws.wsdl.wsdl11.builder.XsdBasedSoap11Wsdl4jDefinitionBuilder"> <property name="schema" value="/WEB-INF/airline.xsd"/> <property name="portTypeName" value="Airline"/> <property name="locationUri" value="http://localhost:8080/airline/services"/> </bean> </property> </bean>Requires the
schema
and portTypeName
properties to be set.
setSchema(org.springframework.core.io.Resource)
,
setPortTypeName(String)
,
setRequestSuffix(String)
,
setResponseSuffix(String)
Field Summary | |
---|---|
static String |
DEFAULT_FAULT_SUFFIX
Deprecated. The default suffix used to detect fault elements in the schema. |
static String |
DEFAULT_PREFIX
Deprecated. The default prefix used to register the target namespace in the WSDL. |
static String |
DEFAULT_REQUEST_SUFFIX
Deprecated. The default suffix used to detect request elements in the schema. |
static String |
DEFAULT_RESPONSE_SUFFIX
Deprecated. The default suffix used to detect response elements in the schema. |
static String |
DEFAULT_SCHEMA_PREFIX
Deprecated. The default prefix used to register the schema namespace in the WSDL. |
static String |
SERVICE_SUFFIX
Deprecated. The suffix used to create a service name from a port type name. |
Fields inherited from class org.springframework.ws.wsdl.wsdl11.builder.AbstractSoap11Wsdl4jDefinitionBuilder |
---|
DEFAULT_TRANSPORT_URI |
Fields inherited from class org.springframework.ws.wsdl.wsdl11.builder.AbstractWsdl4jDefinitionBuilder |
---|
logger |
Constructor Summary | |
---|---|
XsdBasedSoap11Wsdl4jDefinitionBuilder()
Deprecated. |
Method Summary | |
---|---|
void |
afterPropertiesSet()
Deprecated. |
protected void |
buildImports(Definition definition)
Deprecated. Does nothing. |
protected void |
buildMessages(Definition definition)
Deprecated. Creates messages for each element found in the schema for which isRequestMessage(QName) , isResponseMessage(QName) , or isFaultMessage(QName) is true . |
protected void |
buildPortTypes(Definition definition)
Deprecated. Adds port types to the definition. |
protected void |
buildTypes(Definition definition)
Deprecated. Creates a Types object containing a Schema . |
protected QName |
getFaultMessageName(QName requestMessageName)
Deprecated. Given an request message name, return the corresponding fault message name. |
protected QName |
getResponseMessageName(QName requestMessageName)
Deprecated. Given an request message name, return the corresponding response message name. |
protected boolean |
isFaultMessage(QName name)
Deprecated. Indicates whether the given name should be included as Message in the definition. |
protected boolean |
isRequestMessage(QName name)
Deprecated. Indicates whether the given name name should be included as request Message in the definition. |
protected boolean |
isResponseMessage(QName name)
Deprecated. Indicates whether the given name should be included as Message in the definition. |
protected void |
populateDefinition(Definition definition)
Deprecated. Adds the target namespace and schema namespace to the definition. |
protected void |
populateMessage(Message message,
QName elementName)
Deprecated. Called after the Message has been created. |
protected void |
populateOperation(Operation operation,
Message requestMessage,
Message responseMessage)
Deprecated. Called after the Operation has been created. |
protected void |
populatePart(Part part,
QName elementName)
Deprecated. Called after the Part has been created. |
protected void |
populatePortType(PortType portType)
Deprecated. Called after the PortType has been created. |
protected void |
populateService(Service service)
Deprecated. Sets the name of the service to the name of the port type, with "Service" appended to it. |
void |
setFaultSuffix(String faultSuffix)
Deprecated. Sets the suffix used to detect fault elements in the schema. |
void |
setFollowIncludeImport(boolean followIncludeImport)
Deprecated. Indicates whether schema <xsd:include/> and <xsd:import/> should be
followed. |
void |
setPortTypeName(String portTypeName)
Deprecated. Sets the port type name used for this definition. |
void |
setPrefix(String prefix)
Deprecated. Sets the prefix used to declare the target namespace. |
void |
setRequestSuffix(String requestSuffix)
Deprecated. Sets the suffix used to detect request elements in the schema. |
void |
setResponseSuffix(String responseSuffix)
Deprecated. Sets the suffix used to detect response elements in the schema. |
void |
setSchema(Resource schemaResource)
Deprecated. Sets the XSD schema to use for generating the WSDL. |
void |
setSchemaLocation(String schemaLocation)
Deprecated. Sets the location of the schema to import. |
void |
setSchemaPrefix(String schemaPrefix)
Deprecated. Sets the prefix used to declare the schema target namespace. |
void |
setTargetNamespace(String targetNamespace)
Deprecated. Sets the target namespace used for this definition. |
Methods inherited from class org.springframework.ws.wsdl.wsdl11.builder.AbstractSoap11Wsdl4jDefinitionBuilder |
---|
createSoapExtension, populateBinding, populateBindingFault, populateBindingInput, populateBindingOperation, populateBindingOutput, populatePort, populateSoapAddress, populateSoapBinding, populateSoapBody, populateSoapFault, populateSoapOperation, setLocationUri, setTransportUri |
Methods inherited from class org.springframework.ws.wsdl.wsdl11.builder.AbstractBindingWsdl4jDefinitionBuilder |
---|
buildBindings, buildServices |
Methods inherited from class org.springframework.ws.wsdl.wsdl11.builder.AbstractWsdl4jDefinitionBuilder |
---|
buildBindings, buildDefinition, buildImports, buildMessages, buildPortTypes, buildServices, buildTypes, createExtension, getDefinition, populateExtensionRegistry |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_REQUEST_SUFFIX
public static final String DEFAULT_RESPONSE_SUFFIX
public static final String DEFAULT_FAULT_SUFFIX
public static final String DEFAULT_SCHEMA_PREFIX
public static final String DEFAULT_PREFIX
public static final String SERVICE_SUFFIX
Constructor Detail |
---|
public XsdBasedSoap11Wsdl4jDefinitionBuilder()
Method Detail |
---|
public void setRequestSuffix(String requestSuffix)
DEFAULT_REQUEST_SUFFIX
public void setResponseSuffix(String responseSuffix)
DEFAULT_RESPONSE_SUFFIX
public void setFaultSuffix(String faultSuffix)
DEFAULT_FAULT_SUFFIX
public void setPortTypeName(String portTypeName)
public void setTargetNamespace(String targetNamespace)
public void setSchemaPrefix(String schemaPrefix)
DEFAULT_SCHEMA_PREFIX
public void setPrefix(String prefix)
DEFAULT_PREFIX
public void setSchema(Resource schemaResource)
public void setSchemaLocation(String schemaLocation)
schema
element in the
generated WSDL will only contain an import
, referring to the value of this property.
public void setFollowIncludeImport(boolean followIncludeImport)
<xsd:include/>
and <xsd:import/>
should be
followed. Default is false
.
public final void afterPropertiesSet() throws IOException, ParserConfigurationException, SAXException
afterPropertiesSet
in interface InitializingBean
IOException
ParserConfigurationException
SAXException
protected void populateDefinition(Definition definition) throws WSDLException
populateDefinition
in class AbstractSoap11Wsdl4jDefinitionBuilder
definition
- the WSDL4J Definition
WSDLException
- in case of errorsAbstractWsdl4jDefinitionBuilder.buildDefinition()
protected void buildImports(Definition definition) throws WSDLException
buildImports
in class AbstractWsdl4jDefinitionBuilder
definition
- the WSDL4J Definition
WSDLException
- in case of errorsprotected void buildTypes(Definition definition) throws WSDLException
Types
object containing a Schema
. By default, the schema set by the schema
property will be inlined into this type
. If the schemaLocation
is set, object
that is populated with the types found in the schema.
buildTypes
in class AbstractWsdl4jDefinitionBuilder
definition
- the WSDL4J Definition
WSDLException
- in case of errorsprotected void buildMessages(Definition definition) throws WSDLException
isRequestMessage(QName)
, isResponseMessage(QName)
, or isFaultMessage(QName)
is true
.
buildMessages
in class AbstractWsdl4jDefinitionBuilder
definition
- the WSDL4J Definition
WSDLException
- in case of errorsprotected boolean isRequestMessage(QName name)
Message
in the definition. Default
implementation checks whether the local part ends with the request suffix.
name
- the name of the element elligable for being a message
true
if to be included as message; false
otherwisesetRequestSuffix(String)
protected boolean isResponseMessage(QName name)
Message
in the definition. Default implementation
checks whether the local part ends with the response suffix.
name
- the name of the element elligable for being a message
true
if to be included as message; false
otherwisesetResponseSuffix(String)
protected boolean isFaultMessage(QName name)
Message
in the definition. Default implementation
checks whether the local part ends with the fault suffix.
name
- the name of the element elligable for being a message
true
if to be included as message; false
otherwisesetFaultSuffix(String)
protected void populateMessage(Message message, QName elementName) throws WSDLException
Message
has been created.
Default implementation sets the name of the message to the element name.
message
- the WSDL4J Message
elementName
- the element name
WSDLException
- in case of errorsprotected void populatePart(Part part, QName elementName) throws WSDLException
Part
has been created.
Default implementation sets the element name of the part.
part
- the WSDL4J Part
elementName
- the elementName
WSDLException
- in case of errorsPart.setElementName(javax.xml.namespace.QName)
protected void buildPortTypes(Definition definition) throws WSDLException
AbstractWsdl4jDefinitionBuilder
buildPortTypes
in class AbstractWsdl4jDefinitionBuilder
definition
- the WSDL4J Definition
WSDLException
- in case of errorsprotected void populatePortType(PortType portType) throws WSDLException
PortType
has been created.
Default implementation sets the name of the port type to the defined value.
portType
- the WSDL4J PortType
WSDLException
- in case of errorssetPortTypeName(String)
protected QName getResponseMessageName(QName requestMessageName)
requestMessageName
- the name of the request message
protected QName getFaultMessageName(QName requestMessageName)
requestMessageName
- the name of the request message
protected void populateOperation(Operation operation, Message requestMessage, Message responseMessage) throws WSDLException
Operation
has been created.
Default implementation sets the name of the operation to name of the messages, without suffix.
operation
- the WSDL4J Operation
requestMessage
- the WSDL4J request Message
responseMessage
- the WSDL4J response Message
WSDLException
- in case of errorssetPortTypeName(String)
protected void populateService(Service service) throws WSDLException
populateService
in class AbstractBindingWsdl4jDefinitionBuilder
service
- the WSDL4J Service
WSDLException
- in case of errors
|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |