1
我試圖建立SOAP春WS現在我配置Spring豆文件是這樣的:可以在org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition中使用WSDL嗎?
<?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>
不幸的是我沒有XSD,我只有這說明我的服務的WSDL。問題是:我可以在這個春天的配置文件中以某種方式使用我的wsdl嗎?如果是 - 如何(使用wsdl而不是wsdl)?我知道我可以從wsdl中提取xsd,但只想使用wsdl。謝謝。