0
我们有一个工作的wsdl2java,但是xsd缺少xmlns定义和targetNamespace定义。当添加的WSDL2Java然后用这些错误cxf - wsdl2java不允许在xsd中声明名称空间?
<<< ERROR!
Part <parameter> in Message <{enrollment}enrollmentResultRequestMessage> referenced Type <Enrollment> can not be found in the schemas
Part <parameter> in Message <{enrollment}enrollmentRequestMessage> referenced Type <Enrollment> can not be found in the schemas
打破我所做的只是改变
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
到
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://yyy.com/enrollment" targetNamespace="http://yyy.com/enrollment">
我升级CXF 2.5.2和仍然无法正常工作。任何人都知道为什么这不起作用?我们需要开始使用规范的xsds,并且不希望每次都删除名称空间。有任何想法吗?
是我们的错WSDL在这种情况下,或东西(尽管它与XSD的第一个版本的作品)......
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tns="enrollment2"
xmlns:en="http://yyy.com/enrollment"
targetNamespace="enrollment2">
<wsdl:import namespace="http://yyy.com/enrollment" location="enrollment.xsd"/>
<wsdl:types>
<xs:schema targetNamespace="enrollment2" elementFormDefault="qualified"/>
</wsdl:types>
感谢, 院长