Xsd 是否可以在org.springframework.ws.WSDL.wsdl11.defaultwsdl11定义中使用WSDL?
我正在尝试在Spring WS上设置SOAP,现在我使用如下文件配置Spring Bean:Xsd 是否可以在org.springframework.ws.WSDL.wsdl11.defaultwsdl11定义中使用WSDL?,xsd,wsdl,spring-ws,Xsd,Wsdl,Spring Ws,我正在尝试在Spring WS上设置SOAP,现在我使用如下文件配置Spring Bean: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:contex
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:sws="http://www.springframework.org/schema/web-services"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/web-services
http://www.springframework.org/schema/web-services/web-services-2.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="com.blog.samples.services" />
<sws:annotation-driven />
<!--
Our test service bean
-->
<bean id="AccountDetailsService" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition" lazy-init="true">
<property name="schemaCollection">
<bean class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
<property name="inline" value="true" />
<property name="xsds">
<list>
<value>schemas/AccountDetailsServiceOperations.xsd</value>
</list>
</property>
</bean>
</property>
<property name="portTypeName" value="AccountDetailsService"/>
<property name="serviceName" value="AccountDetailsServices" />
<property name="locationUri" value="/endpoints"/>
</bean>
</beans>
架构/AccountDetailsServiceOperations.xsd
不幸的是,我没有xsd,我只有描述我的服务的wsdl。问题是:我可以在这个spring配置文件中使用wsdl吗?如果是-如何(使用wsdl而不是wsdl)?我知道我可以从wsdl提取xsd,但我只想使用wsdl。谢谢。您可以使用SimpleWsdl11Definition而不是DefaultWsdl11Definition: 通过XML:
<sws:static-wsdl id="operations" location="[your_location]/[your_wsdl].wsdl"/>
“id”bean名称是关于如何访问.wsdl的标识符。在上述情况下:
http://[your_server]/[url_mapping_from_message_dispatcher]/operations.wsdl
是否有任何方法可以使用SimpleWSDL11定义覆盖
soap:address location
?提示:如果您的wsdl响应的URL在查询字符串处包含?wsdl
,则可以通过过滤器()实现。
http://[your_server]/[url_mapping_from_message_dispatcher]/operations.wsdl