Java WSDL中具有相同名称但具有不同参数的两个操作

Java WSDL中具有相同名称但具有不同参数的两个操作,java,soap,wsdl,axis,Java,Soap,Wsdl,Axis,我有一个wsdl(RPC编码),其中包含两对操作,它们具有相同的操作名称,但具有不同的参数和不同的输入/输出消息 以下是wsdl的重要部分(我可以生成java代码,并且wsdl是有效的) 问题是,每当我尝试调用第二个方法(来自两个同名的方法)时,我都会遇到此异常(500内部服务器错误): faultDetail: {}:返回代码:500 服务器 soapAction[]和body元素缺少操作[{http://nevermind/}SomethingGood]与SOAP版本[SOAP1.1]

我有一个wsdl(RPC编码),其中包含两对操作,它们具有相同的操作名称,但具有不同的参数和不同的输入/输出消息

以下是wsdl的重要部分(我可以生成java代码,并且wsdl是有效的)


问题是,每当我尝试调用第二个方法(来自两个同名的方法)时,我都会遇到此异常(500内部服务器错误):

faultDetail:
{}:返回代码:500
服务器
soapAction[]和body元素缺少操作[{http://nevermind/}SomethingGood]与SOAP版本[SOAP1.1]
有趣的是,我可以毫无问题地调用其他每个操作(从java客户机和SoapUI),并且可以从共享相同名称的用户调用第一个操作

所以我可以用5个参数成功地做一些好的事情,但是当我尝试调用3个参数的时候,我得到了上面描述的异常

是否有解决方法,或者仅通过修复wsdl?(我得到了wsdl,所以我不能自己编辑它)


提前谢谢

虽然在中重载方法是合法的,但WS-I不允许此功能。AXIS、JAX-WS、CXF、Spring和其他一些框架声称与基本概要文件兼容。创建此WSDL的人可能无法使用java/BP兼容的web服务,如果您仍使用这些框架,则必须修改WSDL。

无论是谁提供了此WSDL,他在生成此类WSDL时一定收到了警告。他只是不理它。在这种情况下,您可以提供不同的SOAP操作,但同样,您必须编辑wsdl。
<!-- message for the first operation -->
<wsdl:message name="SomethingGoodRequest">
    <wsdl:part name="paramOne" type="xsd:int">
    </wsdl:part>
    <wsdl:part name="paramTwo" type="soapenc:string">
    </wsdl:part>
    <wsdl:part name="paramThree" type="soapenc:string">
    </wsdl:part>
    <wsdl:part name="paramFour" type="soapenc:string">
    </wsdl:part>
    <wsdl:part name="paramFive" type="soapenc:string">
    </wsdl:part>
</wsdl:message>

<!-- message for the second operation -->
<wsdl:message name="SomethingGoodRequest1">
    <wsdl:part name="paramOne" type="xsd:int">
    </wsdl:part>
    <wsdl:part name="paramTwo" type="soapenc:string">
    </wsdl:part>
    <wsdl:part name="paramThree" type="tns1:VerySpecialTypeForGoodThings">
    </wsdl:part>
    <wsdl:part name="paramFour" type="soapenc:string">
    </wsdl:part>
    <wsdl:part name="paramFive" type="soapenc:string">
    </wsdl:part>
</wsdl:message>

<!-- the operations -->
<wsdl:operation name="SomethingGood" parameterOrder="paramOne paramTwo paramThree paramFour paramFive">
    <wsdl:input message="impl:SomethingGoodRequest" name="SomethingGoodRequest" />
    <wsdl:output message="impl:SomethingGoodResponse" name="SomethingGoodResponse" />
</wsdl:operation>
<wsdl:operation name="SomethingGood" parameterOrder="paramOne paramTwo paramThree">
    <wsdl:input message="impl:SomethingGoodRequest1" name="SomethingGoodRequest1" />
    <wsdl:output message="impl:SomethingGoodResponse1" name="SomethingGoodResponse1" />
</wsdl:operation>

<wsdl:operation name="SomethingGood">
    <wsdlsoap:operation soapAction=""/>
    <wsdl:input name="SomethingGoodRequest">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://nevermind" use="encoded"/>
    </wsdl:input>
    <wsdl:output name="SomethingGoodResponse">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://nevermind" use="encoded"/>
    </wsdl:output>
</wsdl:operation>

<wsdl:operation name="SomethingGood">
    <wsdlsoap:operation soapAction=""/>
    <wsdl:input name="SomethingGoodRequest1">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://nevermind" use="encoded"/>
    </wsdl:input>
    <wsdl:output name="SomethingGoodResponse1">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://nevermind" use="encoded"/>
    </wsdl:output>
</wsdl:operation>
faultDetail: 
       {}:return code:  500
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
    <soapenv:Fault>
      <faultcode>Server</faultcode>
      <faultstring>Missing operation for soapAction [] and body element [{http://nevermind/}SomethingGood] with SOAP Version [SOAP 1.1]</faultstring>
    </soapenv:Fault>
  </soapenv:Body>
</soapenv:Envelope>