Apache CXF WSDL2Java未使用输入参数生成方法

Apache CXF WSDL2Java未使用输入参数生成方法,java,wsdl,code-generation,cxf,wsdl2java,Java,Wsdl,Code Generation,Cxf,Wsdl2java,我正在尝试使用ApacheCXF-2.5.2 WSDL2Java从wsdl生成java代码。 这是我的WSDL文件: <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions xmlns:tns="http://soa.mytest.com/services/wsdl/test1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns0="http://soa.myt

我正在尝试使用ApacheCXF-2.5.2 WSDL2Java从wsdl生成java代码。 这是我的WSDL文件:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:tns="http://soa.mytest.com/services/wsdl/test1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns0="http://soa.mytest.com/test/messages/test1" name="TestManifestPT" targetNamespace="http://soa.mytest.com/services/wsdl/test1" xmlns:jms="http://www.tibco.com/namespaces/ws/2004/soap/binding/JMS" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:jndi="http://www.tibco.com/namespaces/ws/2004/soap/apis/jndi">
    <wsdl:types>
        <xs:schema xmlns:tns="http://soa.mytest.com/test/messages/test1" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://soa.mytest.com/test/messages/test1" version="1.2.0" elementFormDefault="qualified" attributeFormDefault="unqualified">
            <xs:complexType name="TestManifest">
                <xs:complexContent>
                    <xs:extension base="tns:Notification"/>
                </xs:complexContent>
            </xs:complexType>
            <xs:complexType name="Message" abstract="true">
                <xs:attribute name="version" type="tns:Version"/>
            </xs:complexType>
            <xs:complexType name="Notification">
                <xs:complexContent>
                    <xs:extension base="tns:Message"/>
                </xs:complexContent>
            </xs:complexType>
            <xs:simpleType name="Version">
                <xs:restriction base="xs:string"/>
            </xs:simpleType>
            <xs:element name="TestManifest" type="tns:TestManifest"/>
        </xs:schema>
    </wsdl:types>
    <wsdl:message name="TestManifest">
        <wsdl:part name="body" element="ns0:TestManifest"/>
    </wsdl:message>
    <wsdl:portType name="TestManifestPT">
        <wsdl:operation name="TestManifest">
            <wsdl:input message="tns:TestManifest"/>
        </wsdl:operation>       
    </wsdl:portType>
    <wsdl:binding name="SOAPService_Binding1" type="tns:TestManifestPT">
        <soap:binding style="document" transport="http://www.tibco.com/namespaces/ws/2004/soap/binding/JMS"/>
        <jms:binding messageFormat="text"/>
        <wsdl:operation name="TestManifest">
            <wsdl:documentation/>
            <soap:operation style="document" soapAction="TestManifest"/>
            <wsdl:input>
                <soap:body use="literal" parts="body"/>
            </wsdl:input>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="TestManifestPT">
        <wsdl:port name="SOAPService_Binding1" binding="tns:SOAPService_Binding1">
            <soap:address location=""/>
            <jndi:context/>
            <jms:connectionFactory>GenericConnectionFactory</jms:connectionFactory>
            <jms:targetAddress destination="queue">INSTRUMENT.BULK.REQUEST</jms:targetAddress>
        </wsdl:port>
    </wsdl:service>
   </wsdl:definitions>
与Axis2-1.6.1使用相同的wsdl时,使用输入参数生成函数“testManifest”。
感谢您的帮助。提前感谢。

我们必须查看您的模式才能确定原因。命名空间前缀为ns0的架构。“ns0:TestManifest”…我已经更新了上面的wsdl文件,您现在可以检查模式了。模式似乎还可以。我能想到的唯一一件事是CXF不能正确处理消息类型的抽象部分。尝试删除它。我删除了Message类型的抽象部分,ant再次尝试。但是仍然是相同的结果。而且我们不想改变WSDL。因为相同的wsdl在ApacheAxis2上工作良好。
    package com.mytest.soa.services.testmaster.testbulkresponse.wsdl.test1;

import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.xml.ws.RequestWrapper;
import org.apache.cxf.annotations.DataBinding;

/**
 * This class was generated by Apache CXF 2.5.2
 * 2012-06-07T12:00:34.142+05:30
 * Generated source version: 2.5.2
 * 
 */
@WebService(targetNamespace = "http://soa.mytest.com/services/testmaster/TestBulkResponse/wsdl/test1", name = "TestManifestPT")
@DataBinding(org.apache.cxf.xmlbeans.XmlBeansDataBinding.class)
public interface TestManifestPT {

    @Oneway
    @RequestWrapper(localName = "TestManifest", targetNamespace = "http://soa.mytest.com/test/messages/test1", className = "com.mytest.soa.test.messages.test1.TestManifestDocument")
    @WebMethod(operationName = "TestManifest", action = "TestManifest")
    public void testManifest();
}