场景
官方API
实现
简单中文翻译版
类DefaultWsdl 11定义
java.lang.Object org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition
所有已执行的接口:
初始化豆, Wsdl 11定义, WsdlDefinition
public class DefaultWsdl11Definition
extends Object
implements Wsdl11Definition, InitializingBean
方便实施Wsdl11Definition
这将根据一个或多个内联XSD模式中的命名约定创建SOAP1.1或1.2绑定。代表出席InliningXsdSchemaTypesProvider
, DefaultMessagesProvider
, SuffixBasedPortTypesProvider
, SoapProvider
实际上相当于使用ProviderBasedWsdl4jDefinition
所有这些提供者。
示例配置:
<bean id="airline" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition"> <property name="schema"> <bean class="org.springframework.xml.xsd.SimpleXsdSchema"> <property name="xsd" value="/WEB-INF/airline.xsd"/> </bean> </property> <property name="portTypeName" value="Airline"/> <property name="locationUri" value="http://localhost:8080/airline/services"/> </bean>
构造器摘要 | |
---|---|
DefaultWsdl11Definition() 创建一个新实例。 DefaultWsdl11Definition . |
方法总结 | |
---|---|
void |
afterPropertiesSet() |
Source |
getSource() 返回 Source 的定义。 |
void |
setCreateSoap11Binding(boolean createSoap11Binding) 指示是否应创建SOAP1.1绑定。 |
void |
setCreateSoap12Binding(boolean createSoap12Binding) 指示是否应创建SOAP1.2绑定。 |
void |
setFaultSuffix(String faultSuffix) 设置用于检测架构中的故障元素的后缀。 |
void |
setLocationUri(String locationUri) 设置用于SOAP地址位置属性值的值。 |
void |
setPortTypeName(String portTypeName) 设置用于此定义的端口类型名称。 |
void |
setRequestSuffix(String requestSuffix) 设置用于检测架构中的请求元素的后缀。 |
void |
setResponseSuffix(String responseSuffix) 设置用于检测架构中的响应元素的后缀。 |
void |
setSchema(XsdSchema schema) 将单个XSD架构设置为内联。 |
void |
setSchemaCollection(XsdSchemaCollection schemaCollection) 将XSD架构集合设置为内联。 |
void |
setServiceName(String serviceName) 设置服务名称。 |
void |
setSoapActions(Properties soapActions) 设置此绑定的SOAP操作。 |
void |
setTargetNamespace(String targetNamespace) 设置用于此定义的目标命名空间。 |
void |
setTransportUri(String transportUri) 设置绑定传输属性值的值。 |
方法继承自java.lang类。对象 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造器细节 |
---|
DefaultWsdl 11定义
public DefaultWsdl11Definition()
创建一个新实例。DefaultWsdl11Definition
.
方法细节 |
---|
setTargetNamesspace
public void setTargetNamespace(String targetNamespace)
设置用于此定义的目标命名空间。
默认为定义架构的目标命名空间。
setSchema
public void setSchema(XsdSchema schema)
将单个XSD架构设置为内联。或者这个财产,或者schemaCollection
必须设置好。
setSchemaCollection
public void setSchemaCollection(XsdSchemaCollection schemaCollection)
将XSD架构集合设置为内联。或者这个财产,或者schema
必须设置好。
setPortTypeName
public void setPortTypeName(String portTypeName)
设置用于此定义的端口类型名称。需要。
setRequestSuffix
public void setRequestSuffix(String requestSuffix)
设置用于检测架构中的请求元素的后缀。
setResponseSuffix
public void setResponseSuffix(String responseSuffix)
设置用于检测架构中的响应元素的后缀。
setFaultSuffix
public void setFaultSuffix(String faultSuffix)
设置用于检测架构中的故障元素的后缀。
setCreateSoap11Binding
public void setCreateSoap11Binding(boolean createSoap11Binding)
指示是否应创建SOAP1.1绑定。
默认为true
.
setCreateSoap12Binding
public void setCreateSoap12Binding(boolean createSoap12Binding)
指示是否应创建SOAP1.2绑定。
默认为false
.
setSoapActions
public void setSoapActions(Properties soapActions)
设置此绑定的SOAP操作。钥匙是binding operation names
;价值是SOAP Action URIs
.
参数:
soapActions
-肥皂
setTransportURI
public void setTransportUri(String transportUri)
设置绑定传输属性值的值。默认为HTTP。
setLocationURI
public void setLocationUri(String locationUri)
设置用于SOAP地址位置属性值的值。
setServiceName
public void setServiceName(String serviceName)
设置服务名称。
默认为端口类型名称,后缀为Service
附在上面。
后性质集
public void afterPropertiesSet() throws Exception
具体如下:
afterPropertiesSet
在接口中InitializingBean
投掷:
getSource
public Source getSource()
从接口复制的描述:WsdlDefinition
返回Source
的定义。
具体如下:
返回:
这个Source
这个WSDL定义的
英文原版
org.springframework.ws.wsdl.wsdl11
Class DefaultWsdl11Definition
java.lang.Object org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition
All Implemented Interfaces:
InitializingBean, Wsdl11Definition, WsdlDefinition
public class DefaultWsdl11Definition
extends Object
implements Wsdl11Definition, InitializingBean
Convenient implementation of Wsdl11Definition
that creates a SOAP 1.1 or 1.2 binding based on naming conventions in one or more inlined XSD schemas. Delegates to InliningXsdSchemaTypesProvider
, DefaultMessagesProvider
, SuffixBasedPortTypesProvider
, SoapProvider
underneath; effectively equivalent to using a ProviderBasedWsdl4jDefinition
with all these providers.
Example configuration:
<bean id="airline" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition"> <property name="schema"> <bean class="org.springframework.xml.xsd.SimpleXsdSchema"> <property name="xsd" value="/WEB-INF/airline.xsd"/> </bean> </property> <property name="portTypeName" value="Airline"/> <property name="locationUri" value="http://localhost:8080/airline/services"/> </bean>
Constructor Summary | |
---|---|
DefaultWsdl11Definition() Creates a new instance of the DefaultWsdl11Definition . |
Method Summary | |
---|---|
void |
afterPropertiesSet() |
Source |
getSource() Returns the Source of the definition. |
void |
setCreateSoap11Binding(boolean createSoap11Binding) Indicates whether a SOAP 1.1 binding should be created. |
void |
setCreateSoap12Binding(boolean createSoap12Binding) Indicates whether a SOAP 1.2 binding should be created. |
void |
setFaultSuffix(String faultSuffix) Sets the suffix used to detect fault elements in the schema. |
void |
setLocationUri(String locationUri) Sets the value used for the SOAP Address location attribute value. |
void |
setPortTypeName(String portTypeName) Sets the port type name used for this definition. |
void |
setRequestSuffix(String requestSuffix) Sets the suffix used to detect request elements in the schema. |
void |
setResponseSuffix(String responseSuffix) Sets the suffix used to detect response elements in the schema. |
void |
setSchema(XsdSchema schema) Sets the single XSD schema to inline. |
void |
setSchemaCollection(XsdSchemaCollection schemaCollection) Sets the XSD schema collection to inline. |
void |
setServiceName(String serviceName) Sets the service name. |
void |
setSoapActions(Properties soapActions) Sets the SOAP Actions for this binding. |
void |
setTargetNamespace(String targetNamespace) Sets the target namespace used for this definition. |
void |
setTransportUri(String transportUri) Sets the value used for the binding transport attribute value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
DefaultWsdl11Definition
public DefaultWsdl11Definition()
Creates a new instance of the DefaultWsdl11Definition
.
Method Detail |
---|
setTargetNamespace
public void setTargetNamespace(String targetNamespace)
Sets the target namespace used for this definition.
Defaults to the target namespace of the defined schema.
setSchema
public void setSchema(XsdSchema schema)
Sets the single XSD schema to inline. Either this property, or schemaCollection
must be set.
setSchemaCollection
public void setSchemaCollection(XsdSchemaCollection schemaCollection)
Sets the XSD schema collection to inline. Either this property, or schema
must be set.
setPortTypeName
public void setPortTypeName(String portTypeName)
Sets the port type name used for this definition. Required.
setRequestSuffix
public void setRequestSuffix(String requestSuffix)
Sets the suffix used to detect request elements in the schema.
setResponseSuffix
public void setResponseSuffix(String responseSuffix)
Sets the suffix used to detect response elements in the schema.
setFaultSuffix
public void setFaultSuffix(String faultSuffix)
Sets the suffix used to detect fault elements in the schema.
setCreateSoap11Binding
public void setCreateSoap11Binding(boolean createSoap11Binding)
Indicates whether a SOAP 1.1 binding should be created.
Defaults to true
.
setCreateSoap12Binding
public void setCreateSoap12Binding(boolean createSoap12Binding)
Indicates whether a SOAP 1.2 binding should be created.
Defaults to false
.
setSoapActions
public void setSoapActions(Properties soapActions)
Sets the SOAP Actions for this binding. Keys are binding operation names
; values are SOAP Action URIs
.
Parameters:
soapActions
- the soap
setTransportUri
public void setTransportUri(String transportUri)
Sets the value used for the binding transport attribute value. Defaults to HTTP.
setLocationUri
public void setLocationUri(String locationUri)
Sets the value used for the SOAP Address location attribute value.
setServiceName
public void setServiceName(String serviceName)
Sets the service name.
Defaults to the port type name, with the suffix Service
appended to it.
afterPropertiesSet
public void afterPropertiesSet() throws Exception
Specified by:
afterPropertiesSet
in interface InitializingBean
Throws:
getSource
public Source getSource()
Description copied from interface: WsdlDefinition
Returns the Source
of the definition.
Specified by:
getSource
in interface WsdlDefinition
Returns:
the Source
of this WSDL definition