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>
感謝, 院長