gSOAP错误的代理C ++类为多个操作生成

时间:2012-07-26 10:43:03

标签: web-services wsdl gsoap

我有wsdl文件的以下部分:

<wsdl:binding name="Binding" type="intf:PortType">
    <wsdlsoap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
    <wsdl:operation name="Op1">
        <wsdlsoap:operation soapAction=""/>
        <wsdl:input>
            <wsdlsoap:body use="encoded" namespace="Op1" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </wsdl:input>
        <wsdl:output>
            <wsdlsoap:body use="encoded" namespace="services:ca" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Op2">
        <wsdlsoap:operation soapAction=""/>
        <wsdl:input>
            <wsdlsoap:body use="encoded" namespace="Op2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </wsdl:input>
        <wsdl:output>
            <wsdlsoap:body use="encoded" namespace="services:ca" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Op3">
        <wsdlsoap:operation soapAction=""/>
        <wsdl:input>
            <wsdlsoap:body use="encoded" namespace="Op3" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </wsdl:input>
        <wsdl:output>
            <wsdlsoap:body use="encoded" namespace="services:ca" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </wsdl:output>
    </wsdl:operation>
</wsdl:binding>

问题在于soapcpp2迭代生成soapBidingProxy.h个文件,有效地覆盖了旧文件(Op1Op2),并为{{1}留下了代理类}} 只要。这是Op3错误,还是我做错了什么。

1 个答案:

答案 0 :(得分:1)

我明白了。问题在于input body namespace。如果namespace对于所有操作都相同,则生成的文件只有一个,并包含所有方法。谢谢大家。