使用jaxb:version=“2.1”生成java Spring wsdl
我试图生成一个wsdl,其中包含xsd文件中使用的jaxb绑定版本。我想要的最终结果是:
<wsdl:definitions xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
jaxb:version="2.1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://schemas.yyy.co.za/zzz" targetNamespace="http://schemas.yyy.co.za/zzz">
而不是:
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://schemas.yyy.co.za/zzz" targetNamespace="http://schemas.yyy.co.za/zzz">
我将Spring2.5.6与SpringWeb服务组件1.5.5一起使用。我怀疑问题出在我的Spring上下文设置中,它看起来像:
<bean id="ClientServices" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
<property name="portTypeName" value="ClientServicesPort" />
<property name="locationUri" value="http://localhost/client/services/ClientServices" />
<property name="schemaCollection" ref="ClientServicesSchemaCollection" />
<property name="requestSuffix" value="RequestMessage"/>
<property name="responseSuffix" value="ResponseMessage" />
</bean>
<bean id="ClientServicesSchemaCollection" class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
<description>
This bean wrap all the xsds and inlines them as a one.
</description>
<property name="inline" value="true" />
<property name="xsds">
<list>
<value>classpath*:xsd/sample.xsd</value>
</list>
</property>
</bean>
部分样本。xsd:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns="http://schemas.yyy.co.za/zzz" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.1"
提前谢谢
共 (0) 个答案