1

我正在开发一个使用 Axis 1 Web 服务的 Java 1.4 Web 应用程序。该应用程序调用由第三方合作伙伴开发和托管的 Web 服务。我们的生产环境正在运行 WebSphere 5.1,应用程序运行良好。出于安全原因,我们需要将服务器从 5.1 迁移到 6.1。我们首先将开发环境升级到 6.1。在我们的开发环境中,除了 WebSphere 迁移之外,我们还决定将应用程序更新到 Java 1.5。dev 上的应用程序运行良好。所有 Web 服务调用都正确执行,除了一个。此特定调用始终返回以下错误。

使用编码样式“http://schemas.xmlsoap.org/soap/encoding/”找不到“http://schemas.xmlsoap.org/soap/encoding/:string”的映射

有谁知道为什么除了这个之外所有的 WS 都可以工作?我没有更改代码库,只是我使用的是什么版本的编译器。由于它适用于产品,我不确定我能做些什么来搞乱开发。

我的 Google-Fu 在这一点上让我失望了。非常感谢您提供的任何信息!

WSDL

    <?xml version = '1.0' encoding = 'UTF-8'?>
<!--Generated by the Oracle JDeveloper 10g Web Services WSDL Generator-->
<!--Date Created: Thu Jul 08 13:27:58 PDT 2004-->
<definitions
   name="CSIWebService"
   targetNamespace="http://mil/dcma/csi/ws/CSIWebService.wsdl"
   xmlns="http://schemas.xmlsoap.org/wsdl/"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
   xmlns:tns="http://mil/dcma/csi/ws/CSIWebService.wsdl"
   xmlns:ns1="http://mil.dcma.csi.ws/ICSIWebService.xsd">
   <types>
      <schema
         targetNamespace="http://mil.dcma.csi.ws/ICSIWebService.xsd"
         xmlns="http://www.w3.org/2001/XMLSchema"
         xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
         <complexType name="mil_dcma_csi_ws_WSCSIServiceResponse" jdev:packageName="mil.dcma.csi.ws" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
            <all>
               <element name="results" type="ns1:ArrayOfmil_dcma_csi_ws_WSContract"/>
               <element name="comments" type="ns1:mil_dcma_csi_ws_WSStatusCommentary"/>
            </all>
         </complexType>
         <complexType name="mil_dcma_csi_ws_WSContract" jdev:packageName="mil.dcma.csi.ws" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
            <all>
               <element name="cage" type="string"/>
               <element name="dodaac" type="string"/>
               <element name="latestModDate" type="string"/>
               <element name="lineItemIds" type="ns1:ArrayOfString"/>
               <element name="lineItems" type="ns1:ArrayOfmil_dcma_csi_ws_WSLineItem"/>
               <element name="piinDodaac" type="string"/>
               <element name="piinSerial" type="string"/>
               <element name="piinType" type="string"/>
               <element name="piinYear" type="string"/>
               <element name="spiin" type="string"/>
            </all>
         </complexType>
         <complexType name="ArrayOfString" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
            <complexContent>
               <restriction base="SOAP-ENC:Array">
                  <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:string[]"/>
               </restriction>
            </complexContent>
         </complexType>
         <complexType name="mil_dcma_csi_ws_WSLineItem" jdev:packageName="mil.dcma.csi.ws" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
            <all>
               <element name="fobSite" type="string"/>
               <element name="inspectAcceptCode" type="string"/>
               <element name="itemName" type="string"/>
               <element name="lineItemId" type="string"/>
               <element name="nsn" type="string"/>
               <element name="partNumber" type="string"/>
               <element name="piin" type="string"/>
               <element name="quantityAccepted" type="int"/>
               <element name="quantityShipped" type="int"/>
               <element name="serviceCompletionDate" type="string"/>
               <element name="serviceCompletionEstimatedFlag" type="string"/>
               <element name="spiin" type="string"/>
               <element name="spnRecipient" type="string"/>
               <element name="totalUnits" type="int"/>
               <element name="totalUnitsEstimatedFlag" type="string"/>
               <element name="unitCost" type="double"/>
               <element name="unitCostEstimatedFlag" type="string"/>
               <element name="unitOfMeasure" type="string"/>
               <element name="varianceOver" type="double"/>
               <element name="varianceUnder" type="double"/>
               <element name="schedules" type="ns1:ArrayOfmil_dcma_csi_ws_WSSchedule"/>
               <element name="shipments" type="ns1:ArrayOfmil_dcma_csi_ws_WSShipment"/>
            </all>
         </complexType>
         <complexType name="mil_dcma_csi_ws_WSSchedule" jdev:packageName="mil.dcma.csi.ws" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
            <all>
               <element name="clin" type="string"/>
               <element name="deliveryDate" type="string"/>
               <element name="deliveryDateEstimatedFlag" type="string"/>
               <element name="elin" type="string"/>
               <element name="lineItemId" type="string"/>
               <element name="markFor" type="string"/>
               <element name="milStrip" type="string"/>
               <element name="modNumber" type="string"/>
               <element name="piin" type="string"/>
               <element name="schedQuantityEstimatedFlag" type="string"/>
               <element name="scheduledQuantity" type="int"/>
               <element name="shipTo" type="string"/>
               <element name="spiin" type="string"/>
            </all>
         </complexType>
         <complexType name="ArrayOfmil_dcma_csi_ws_WSSchedule" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
            <complexContent>
               <restriction base="SOAP-ENC:Array">
                  <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="ns1:mil_dcma_csi_ws_WSSchedule[]"/>
               </restriction>
            </complexContent>
         </complexType>
         <complexType name="mil_dcma_csi_ws_WSShipment" jdev:packageName="mil.dcma.csi.ws" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
            <all>
               <element name="acceptanceSite" type="string"/>
               <element name="dateAccepted" type="string"/>
               <element name="dateShipped" type="string"/>
               <element name="fobSite" type="string"/>
               <element name="lineItemId" type="string"/>
               <element name="markFor" type="string"/>
               <element name="milStrip" type="string"/>
               <element name="piin" type="string"/>
               <element name="pqaSite" type="string"/>
               <element name="quantityAccepted" type="int"/>
               <element name="quantityShipped" type="int"/>
               <element name="shipmentNumber" type="string"/>
               <element name="spiin" type="string"/>
               <element name="unitOfMeasure" type="string"/>
            </all>
         </complexType>
         <complexType name="ArrayOfmil_dcma_csi_ws_WSShipment" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
            <complexContent>
               <restriction base="SOAP-ENC:Array">
                  <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="ns1:mil_dcma_csi_ws_WSShipment[]"/>
               </restriction>
            </complexContent>
         </complexType>
         <complexType name="ArrayOfmil_dcma_csi_ws_WSLineItem" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
            <complexContent>
               <restriction base="SOAP-ENC:Array">
                  <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="ns1:mil_dcma_csi_ws_WSLineItem[]"/>
               </restriction>
            </complexContent>
         </complexType>
         <complexType name="ArrayOfmil_dcma_csi_ws_WSContract" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
            <complexContent>
               <restriction base="SOAP-ENC:Array">
                  <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="ns1:mil_dcma_csi_ws_WSContract[]"/>
               </restriction>
            </complexContent>
         </complexType>
         <complexType name="mil_dcma_csi_ws_WSStatusCommentary" jdev:packageName="mil.dcma.csi.ws" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
            <all>
               <element name="comments" type="ns1:ArrayOfmil_dcma_csi_ws_WSStatusList"/>
               <element name="statusTypes" type="ns1:ArrayOfString"/>
            </all>
         </complexType>
         <complexType name="mil_dcma_csi_ws_WSStatusList" jdev:packageName="mil.dcma.csi.ws" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
            <all>
               <element name="contents" type="ns1:ArrayOfString"/>
            </all>
         </complexType>
         <complexType name="ArrayOfmil_dcma_csi_ws_WSStatusList" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
            <complexContent>
               <restriction base="SOAP-ENC:Array">
                  <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="ns1:mil_dcma_csi_ws_WSStatusList[]"/>
               </restriction>
            </complexContent>
         </complexType>
      </schema>
   </types>
   <message name="getContracts0Request">
      <part name="cage" type="xsd:string"/>
      <part name="piinDodaac" type="xsd:string"/>
      <part name="piinYear" type="xsd:string"/>
      <part name="piinType" type="xsd:string"/>
      <part name="piinSerial" type="xsd:string"/>
      <part name="spiin" type="xsd:string"/>
   </message>
   <message name="getContracts0Response">
      <part name="return" type="ns1:mil_dcma_csi_ws_WSCSIServiceResponse"/>
   </message>
   <message name="getContractLineItems1Request">
      <part name="piinDodaac" type="xsd:string"/>
      <part name="piinYear" type="xsd:string"/>
      <part name="piinType" type="xsd:string"/>
      <part name="piinSerial" type="xsd:string"/>
      <part name="spiin" type="xsd:string"/>
      <part name="lineItemIds" type="ns1:ArrayOfString"/>
   </message>
   <message name="getContractLineItems1Response">
      <part name="return" type="ns1:mil_dcma_csi_ws_WSCSIServiceResponse"/>
   </message>
   <portType name="CSIWebServicePortType">
      <operation name="getContracts">
         <input name="getContracts0Request" message="tns:getContracts0Request"/>
         <output name="getContracts0Response" message="tns:getContracts0Response"/>
      </operation>
      <operation name="getContractLineItems">
         <input name="getContractLineItems1Request" message="tns:getContractLineItems1Request"/>
         <output name="getContractLineItems1Response" message="tns:getContractLineItems1Response"/>
      </operation>
   </portType>
   <binding name="CSIWebServiceBinding" type="tns:CSIWebServicePortType">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
      <operation name="getContracts">
         <soap:operation soapAction="" style="rpc"/>
         <input name="getContracts0Request">
            <soap:body use="encoded" namespace="CSIWebService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </input>
         <output name="getContracts0Response">
            <soap:body use="encoded" namespace="CSIWebService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
      </operation>
      <operation name="getContractLineItems">
         <soap:operation soapAction="" style="rpc"/>
         <input name="getContractLineItems1Request">
            <soap:body use="encoded" namespace="CSIWebService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </input>
         <output name="getContractLineItems1Response">
            <soap:body use="encoded" namespace="CSIWebService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
      </operation>
   </binding>
   <service name="CSIWebService">
      <documentation>
This class defines Web Service messages as local
methods. Each method is a valid Web Service messages, using
RPC-style. This design is appropriate for typical Web Service
implementation toolkits such as Axis.
</documentation>
      <port name="CSIWebServicePort" binding="tns:CSIWebServiceBinding">
         <soap:address location="http://hxacacarqw025:8888/CSI/CSIWebService"/>
      </port>
   </service>
</definitions>
4

2 回答 2

0

WAS 6.1 也有axis1 jars 的副本,所以您可以尝试使用此处提到的“parent last”标志:http: //pic.dhe.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic= %2Fcom .ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Fcrun_classload.html

于 2012-06-03T21:46:26.657 回答
0

所以问题最终是我们的 SOAP 客户端(Axis 1)的版本在 WebSphere 5.1 和 6.1 之间略有不同。运行 Axis 实用程序函数“WSDL to JAVA”更新了我们应用程序中的类。我们不得不修改我们的代码以指向这些重新生成的类并重建。错误消失了。我们所有的 Web 服务调用现在都可以正常执行。

感谢所有试图提供帮助的人。

于 2012-08-22T18:38:14.107 回答