Java 使用ApacheCamel(使用DSL)公开HTTP-SOAP服务

Java 使用ApacheCamel(使用DSL)公开HTTP-SOAP服务,java,soap,wsdl,apache-camel,cxf,Java,Soap,Wsdl,Apache Camel,Cxf,我正在尝试使用apache camel(我没有使用spring,我使用的是DSL)和以下WSDL公开HTTP-SOAP web服务: <?xml version="1.0" encoding="ISO-8859-1"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://javainuse.com" xmlns:xs="http://www.w3.

我正在尝试使用apache camel(我没有使用spring,我使用的是DSL)和以下WSDL公开HTTP-SOAP web服务:

<?xml version="1.0" encoding="ISO-8859-1"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://javainuse.com" xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    targetNamespace="http://javainuse.com">

    <wsdl:types>
        <xs:schema targetNamespace="http://javainuse.com">
            <xs:element name="inputSOATest">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element type="xs:string" name="test" />
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="outputSOATest">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element type="xs:string" name="result" />
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:schema>
    </wsdl:types>


<!--Define input and output parameters -->
    <wsdl:message name="inputSOATest">
        <wsdl:part name="in" element="tns:inputSOATest" />
    </wsdl:message>
    <wsdl:message name="outputSOATest">
        <wsdl:part name="out" element="tns:outputSOATest" />
    </wsdl:message>

<!--Define port definition -->
    <wsdl:portType name="SOATestEndpoint">
        <wsdl:operation name="SOATest">
            <wsdl:input message="tns:inputSOATest" />
            <wsdl:output message="tns:outputSOATest" />
        </wsdl:operation>
    </wsdl:portType>

<!--Bind Soap operation and service -->
    <wsdl:binding name="SOATestBinding" type="tns:SOATestEndpoint">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="SOATest">
            <soap:operation soapAction="http://javainuse.com"
                style="document" />
            <wsdl:input>
                <soap:body parts="in" use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap:body parts="out" use="literal" />
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

<!--Define service -->
    <wsdl:service name="SOATestEndpointService">
        <wsdl:port name="SOATestEndpoint" binding="tns:SOATestBinding">
            <soap:address location="http://localhost:8181/cxf/javainuse/learn" />
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

请您指导我如何公开服务,该服务将接受soap xml并将soap响应发送回客户端


请帮我输入一些示例代码。

这里有人能帮我吗!