Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 通过CXF部署契约优先Web服务时,无法展开操作_Java_Spring_Web Services_Soap_Cxf - Fatal编程技术网

Java 通过CXF部署契约优先Web服务时,无法展开操作

Java 通过CXF部署契约优先Web服务时,无法展开操作,java,spring,web-services,soap,cxf,Java,Spring,Web Services,Soap,Cxf,我需要部署一个契约优先的web服务。服务本身非常简单,只需ping操作即可检查系统是否可用 Ping.wsdl: <?xml version="1.0" encoding="utf-8"?> <definitions targetNamespace="urn:hl7-org:v3" name="Ping" xmlns:hl7="urn:hl7-org:v3" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://

我需要部署一个契约优先的web服务。服务本身非常简单,只需ping操作即可检查系统是否可用

Ping.wsdl:

<?xml version="1.0" encoding="utf-8"?>
<definitions targetNamespace="urn:hl7-org:v3" name="Ping" xmlns:hl7="urn:hl7-org:v3" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <types>
        <xsd:schema targetNamespace="urn:hl7-org:v3" elementFormDefault="qualified" xmlns:hl7="urn:hl7-org:v3" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <xsd:include schemaLocation="../schemas_codeGen/COMT_IN118118.xsd" />
            <xsd:include schemaLocation="../schemas_codeGen/COMT_IN229229.xsd" />
        </xsd:schema>
    </types>

    <message name="COMT_IN118118"><part name="body" element="hl7:COMT_IN118118" /></message>
    <message name="COMT_IN229229"><part name="body" element="hl7:COMT_IN229229" /></message>

    <portType name="Ping_PortType">
        <operation name="Ping_PingPong">
            <input message="hl7:COMT_IN118118" />
            <output message="hl7:COMT_IN229229" />
        </operation>
    </portType>

    <binding type="hl7:Ping_PortType" name="Ping_Binding">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
        <operation name="Ping_PingPong">
            <soap:operation soapAction="urn:hl7-org:v3/Ping_PingPong" />
            <input><soap:body use="literal" /></input>
            <output><soap:body use="literal" /></output>
        </operation>
    </binding>
    <service name="Ping_Service">
        <port binding="hl7:Ping_Binding" name="Ping_Port"><soap:address location="http:/www.xis.nl/Ping" /></port>
    </service>
</definitions>
我想通过spring部署我的服务,并将其添加到我的applicationContext中:

<jaxws:endpoint id="pingEndpoint" address="/Ping"
    implementor="com.application.services.impl.PingServiceImpl"
    wsdlLocation="wsdl/Ping.wsdl" serviceName="hl7:Ping_Service"
    endpointName="hl7:Ping_Port">
</jaxws:endpoint>
这很奇怪,因为PingPortType上的@SoapBinding声明parameterStyle应该是裸的,而不是默认的包装。有东西忽略/覆盖了我的@SoapBinding,但我不知道是什么


另外,为什么CXF会将此记录为调试消息?在我看来,错误会更合适(并感谢…。

嗨,我也有类似的问题。你找到决定了吗?不,不幸的是我没有。在我的例子中,问题与相互冲突的web服务框架有关。结合Axis、Axis2和CXF不是一个好主意(大项目、30多名开发人员、大量遗留代码)。我们决定用CXF重写所有旧的web服务逻辑。
<jaxws:endpoint id="pingEndpoint" address="/Ping"
    implementor="com.application.services.impl.PingServiceImpl"
    wsdlLocation="wsdl/Ping.wsdl" serviceName="hl7:Ping_Service"
    endpointName="hl7:Ping_Port">
</jaxws:endpoint>
Operation {urn:hl7-org:v3}Ping_PingPong cannot be unwrapped, input message must reference global element declaration with same localname as operation