【问题标题】:Error in Axis generate webservice clientAxis 中的错误生成 Web 服务客户端
【发布时间】:2015-08-25 17:23:15
【问题描述】:

我已经使用 Axis 1 生成了一个 Webservice 客户端。Webservice 一开始运行良好,但我们在使用特定方法时遇到了一些问题。

有一种方法可以检索一个项目的信息,也有一种方法可以检索多个项目的信息。第一种方法需要物品的字符串 id,第二种方法需要物品的 id 字符串[]。

我用谷歌搜索了这个问题,发现这个网站描述了我们遇到的问题:https://issues.apache.org/jira/browse/AXIS-2669

不幸的是,我无法告诉您这是关于哪个 Web 服务或披露 wsdl,但我希望有一位 Axis 专家可以帮助我找到解决方法或解决此问题,最好不要更改 Web 服务服务器(因为这是第三方)。

亲切的问候,

约翰尼斯克

---------- 已编辑的 WSDL ---------------

<?xml version="1.0" encoding="UTF-8"?>-<wsdl:definitions targetNamespace="<url>" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="<url>" xmlns:soap-env="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
-<wsdl:types>
-<xsd:schema targetNamespace="<url>">
-<xsd:complexType name="arrayArray">
-<xsd:complexContent>
-<xsd:restriction base="soap-enc:Array"><xsd:attribute wsdl:arrayType="soap-enc:Array[]" ref="soap-enc:arrayType"/></xsd:restriction></xsd:complexContent></xsd:complexType>
-<xsd:complexType name="intArray">
-<xsd:complexContent>
-<xsd:restriction base="soap-enc:Array"><xsd:attribute wsdl:arrayType="xsd:int[]" ref="soap-enc:arrayType"/></xsd:restriction></xsd:complexContent></xsd:complexType>
-<xsd:complexType name="stringArray">
-<xsd:complexContent>
-<xsd:restriction base="soap-enc:Array"><xsd:attribute wsdl:arrayType="xsd:string[]" ref="soap-enc:arrayType"/></xsd:restriction></xsd:complexContent></xsd:complexType></xsd:schema></wsdl:types><wsdl:message name="getSyncIdRequest"/>
-<wsdl:message name="getSyncIdResponse"><wsdl:part name="getSyncIdReturn" type="xsd:string"/></wsdl:message>
-<wsdl:message name="sendItemsDataRequest"><wsdl:part name="sId" type="xsd:string"/><wsdl:part name="sAttr1" type="xsd:string"/><wsdl:part name="sAttr2" type="xsd:string"/><wsdl:part name="sAttr3" type="xsd:string"/><wsdl:part name="sAttr4" type="xsd:string"/><wsdl:part name="sAttr5" type="xsd:string"/><wsdl:part name="sAttr6" type="xsd:string"/><wsdl:part name="sAttr7" type="xsd:string"/><wsdl:part name="sAttr8" type="xsd:string"/><wsdl:part name="sAttr9" type="xsd:string"/><wsdl:part name="sAttr10" type="xsd:string"/><wsdl:part name="sAttr11" type="xsd:string"/><wsdl:part name="aItemsParts" type="tns:arrayArray"/><wsdl:part name="aItemsComments" type="tns:arrayArray"/></wsdl:message>
-<wsdl:message name="sendItemsDataResponse"><wsdl:part name="sendItemsDataReturn" type="tns:arrayArray"/></wsdl:message>
-<wsdl:message name="getItemsIDsByChangedStatusRequest"><wsdl:part name="sId" type="xsd:string"/></wsdl:message>
-<wsdl:message name="getItemsIDsByChangedStatusResponse"><wsdl:part name="getItemsIDsByChangedStatusReturn" type="tns:arrayArray"/></wsdl:message>
-<wsdl:message name="getItemsStatusByIDsRequest"><wsdl:part name="sId" type="xsd:string"/><wsdl:part name="aItemsIDs" type="tns:intArray"/></wsdl:message>
-<wsdl:message name="getItemsStatusByIDsResponse"><wsdl:part name="getItemsStatusByIDsReturn" type="tns:arrayArray"/></wsdl:message>
-<wsdl:message name="getItemsStatusBySendersRefsRequest"><wsdl:part name="sId" type="xsd:string"/><wsdl:part name="aSendersRefs" type="tns:stringArray"/></wsdl:message>
-<wsdl:message name="getItemsStatusBySendersRefsResponse"><wsdl:part name="getItemsStatusBySendersRefsReturn" type="tns:arrayArray"/></wsdl:message>
-<wsdl:message name="getItemsStatusBySendersRefRequest"><wsdl:part name="sId" type="xsd:string"/><wsdl:part name="aSendersRef" type="xsd:string"/></wsdl:message>
-<wsdl:message name="getItemsStatusBySendersRefResponse"><wsdl:part name="getItemsStatusBySendersRefReturn" type="xsd:int"/></wsdl:message>
-<wsdl:message name="getItemsStatusRequest"><wsdl:part name="sId" type="xsd:string"/><wsdl:part name="iItemsId" type="xsd:int"/></wsdl:message>
-<wsdl:message name="getItemsStatusResponse"><wsdl:part name="getItemsStatusReturn" type="xsd:int"/></wsdl:message>
-<wsdl:message name="getExtraInformationRequest"><wsdl:part name="sId" type="xsd:string"/><wsdl:part name="sSendersRef" type="xsd:string"/></wsdl:message>
-<wsdl:message name="getExtraInformationResponse"><wsdl:part name="getExtraInformationReturn" type="tns:arrayArray"/></wsdl:message>
-<wsdl:portType name="portalInterfacePortType">
-<wsdl:operation name="getSyncId"><wsdl:documentation></wsdl:documentation><wsdl:input message="tns:getSyncIdRequest"/><wsdl:output message="tns:getSyncIdResponse"/></wsdl:operation>
-<wsdl:operation name="sendItemsData"><wsdl:documentation></wsdl:documentation><wsdl:input message="tns:sendItemsDataRequest"/><wsdl:output message="tns:sendItemsDataResponse"/></wsdl:operation>
-<wsdl:operation name="getItemsIDsByChangedStatus"><wsdl:documentation></wsdl:documentation><wsdl:input message="tns:getItemsIDsByChangedStatusRequest"/><wsdl:output message="tns:getItemsIDsByChangedStatusResponse"/></wsdl:operation>
-<wsdl:operation name="getItemsStatusByIDs"><wsdl:documentation></wsdl:documentation><wsdl:input message="tns:getItemsStatusByIDsRequest"/><wsdl:output message="tns:getItemsStatusByIDsResponse"/></wsdl:operation>
-<wsdl:operation name="getItemsStatusBySendersRefs"><wsdl:documentation></wsdl:documentation><wsdl:input message="tns:getItemsStatusBySendersRefsRequest"/><wsdl:output message="tns:getItemsStatusBySendersRefsResponse"/></wsdl:operation>
-<wsdl:operation name="getItemsStatusBySendersRef"><wsdl:documentation></wsdl:documentation><wsdl:input message="tns:getItemsStatusBySendersRefRequest"/><wsdl:output message="tns:getItemsStatusBySendersRefResponse"/></wsdl:operation>
-<wsdl:operation name="getItemsStatus"><wsdl:documentation></wsdl:documentation><wsdl:input message="tns:getItemsStatusRequest"/><wsdl:output message="tns:getItemsStatusResponse"/></wsdl:operation>
-<wsdl:operation name="getExtraInformation"><wsdl:documentation></wsdl:documentation><wsdl:input message="tns:getExtraInformationRequest"/><wsdl:output message="tns:getExtraInformationResponse"/></wsdl:operation></wsdl:portType>
-<wsdl:binding name="portalInterfaceBinding" type="tns:portalInterfacePortType"><soap-env:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
-<wsdl:operation name="getSyncId"><soap-env:operation style="rpc" xmlns="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://<url>/service.php?method=getSyncId"/>
-<wsdl:input><soap-env:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/></wsdl:input>
-<wsdl:output><soap-env:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/></wsdl:output></wsdl:operation>
-<wsdl:operation name="sendItemsData"><soap-env:operation style="rpc" xmlns="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://<url>/service.php?method=sendItemsData"/>
-<wsdl:input><soap-env:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/></wsdl:input>
-<wsdl:output><soap-env:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/></wsdl:output></wsdl:operation>
-<wsdl:operation name="getItemsIDsByChangedStatus"><soap-env:operation style="rpc" xmlns="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://<url>/service.php?method=getItemsIDsByChangedStatus"/>
-<wsdl:input><soap-env:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/></wsdl:input>
-<wsdl:output><soap-env:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/></wsdl:output></wsdl:operation>
-<wsdl:operation name="getItemsStatusByIDs"><soap-env:operation style="rpc" xmlns="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://<url>/service.php?method=getItemsStatusByIDs"/>
-<wsdl:input><soap-env:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/></wsdl:input>
-<wsdl:output><soap-env:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/></wsdl:output></wsdl:operation>
-<wsdl:operation name="getItemsStatusBySendersRefs"><soap-env:operation style="rpc" xmlns="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://<url>/service.php?method=getItemsStatusBySendersRefs"/>
-<wsdl:input><soap-env:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/></wsdl:input>
-<wsdl:output><soap-env:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/></wsdl:output></wsdl:operation>
-<wsdl:operation name="getItemsStatusBySendersRef"><soap-env:operation style="rpc" xmlns="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://<url>/service.php?method=getItemsStatusBySendersRef"/>
-<wsdl:input><soap-env:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/></wsdl:input>
-<wsdl:output><soap-env:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/></wsdl:output></wsdl:operation>
-<wsdl:operation name="getItemsStatus"><soap-env:operation style="rpc" xmlns="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://<url>/service.php?method=getItemsStatus"/>
-<wsdl:input><soap-env:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/></wsdl:input>
-<wsdl:output><soap-env:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/></wsdl:output></wsdl:operation>
-<wsdl:operation name="getExtraInformation"><soap-env:operation style="rpc" xmlns="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://<url>/service.php?method=getExtraInformation"/>
-<wsdl:input><soap-env:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/></wsdl:input>
-<wsdl:output><soap-env:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/></wsdl:output></wsdl:operation></wsdl:binding>
-<wsdl:service name="portalInterface"><wsdl:documentation/>
-<wsdl:port name="portalInterfacePort" binding="tns:portalInterfaceBinding"><soap-env:address location="http://<url>/service.php"/></wsdl:port></wsdl:service></wsdl:definitions>

【问题讨论】:

    标签: java web-services axis


    【解决方案1】:

    你如何生成你的客户?你有一个XSD文件你能提供更多信息吗?您可以发布类似的 wsdl 或代码,但不会提示您的原始 wsdl...

    【讨论】:

    • 添加了修改后的 WSDL。问题似乎出在 Axis 本身。如果您知道生成独立客户端(不使用 Axis)的好工具,欢迎提出建议。
    • 你用的是soap 1.0还是1.1
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-05-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多