CICS Web 服务 - XML 解析错误



我目前在CICS Web服务工作,并且是XML/WSDL概念的新手。我从中间件团队那里得到了一个 WSDL 文件,并尝试执行 DFHWS2LS 实用程序以从该 WSDL 创建 COBOL 语言结构。我收到以下错误,无法解决此问题。还有建议?

DFHPI9027E XML 分析器发现错误:"XSD: 属性"minHappen"不允许在"1"行和"19,015"列中使用文档 "file:/AIGNDVR/DEVL1/ELC/WSDL/MakeOkToSellServiceSOAP.wsdl"。

DFHPI9558E错误已生成处理文件"/AIGNDVR/DEVL1/ELC/WSDL/MakeOkToSellServiceSOAP.wsdl".

.XML:

<?xml version="1.0" encoding="EBCDIC-CP-US"?>
<wsdl:definitions name="MakeOkToSell" targetNamespace="http://MakeOkToSell/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://MakeOkToSell/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl/" >
  <wsdl:types>
    <xs:schema targetNamespace="http://MakeOkToSell/">   
    <xs:element name="MakeOkToSellRequest">
        <xs:complexType>
            <xs:sequence>               
                <xs:element name="RequestSystemName" type="xs:string"/>
                <xs:element name="RequestSystemGearID" type="xs:int"/>
                <xs:element name="transactionIdentifier" type="xs:string" minOccurs="0"/>
                <xs:element name="OkToSellDetails">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="CompanyCode" type="xs:string" minOccurs="0"/>                             
                            <xs:element name="PolicyNumber" type="xs:string" minOccurs="0"/>
                            <xs:element name="UplineID" type="xs:string" minOccurs="0"/>
                            <xs:element name="SSN" type="xs:int" minOccurs="0"/>
                            <xs:element name="NPN" type="xs:string" minOccurs="0"/>
                            <xs:element name="AgencyCode" type="xs:string" minOccurs="0"/>
                            <xs:element name="First5digitSSNandLastName" type="xs:string" minOccurs="0"/>
                            <xs:element name="RequestType" type="xs:string" minOccurs="0"/>
                            <xs:element name="AgentPositionID" type="xs:string" minOccurs="0"/>
                            <xs:element name="PrimaryAgentID" type="xs:string" minOccurs="0"/>
                            <xs:element name="AgentFirstName" type="xs:string" minOccurs="0"/>
                            <xs:element name="AgentLastName" type="xs:string" minOccurs="0"/>
                            <xs:element name="ApplicationState" type="xs:string"/>
                            <xs:element name="ProductID" type="xs:string"/>
                            <xs:element name="ProductType" type="xs:string" minOccurs="0"/>
                            <xs:element name="ApplicationReceivedDate" type="xs:date"/>
                            <xs:element name="ApplicationSignedDate" type="xs:date"/>
                            <xs:element name="GrossPremium" type="xs:decimal" minOccurs="0"/>
                            <xs:element name="NetPremium" type="xs:decimal" minOccurs="0"/>
                            <xs:element name="AdditionalData" minOccurs="0">                            
                                <xs:complexType>
                                       <xs:sequence>
                                          <xs:element name="Property" minOccurs="1" maxOccurs="unbounded">
                                    <xs:complexType>
                                      <xs:simpleContent>
                                         <xs:extension base="xs:string" minOccurs="1">
                                             <xs:attribute type="xs:string" name="name"/>
                                         </xs:extension>
                                      </xs:simpleContent>
                                    </xs:complexType>
                                      </xs:element>
                                     </xs:sequence>
                                   </xs:complexType>
                                            </xs:element> 
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="MakeOkToSellResponse">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="UID">
                    <xs:simpleType>
                        <xs:restriction base="xs:string">
                            <xs:minLength value="1"/>
                            <xs:maxLength value="50"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:element>
                <xs:element name="EvaluationStatus">
                    <xs:simpleType>
                        <xs:restriction base="xs:string">
                            <xs:minLength value="1"/>
                            <xs:maxLength value="50"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:element>
                <xs:element name="TaskID" type="xs:string" minOccurs="0"/>
                <xs:element name="ErrorDetails" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="ErrorCode" type="xs:string" minOccurs="0" maxOccurs="1"/>
                            <xs:element name="ErrorType" type="xs:string" minOccurs="0" maxOccurs="1"/>
                            <xs:element name="ErrorMessage" type="xs:string" minOccurs="0" maxOccurs="1"/>
                            <xs:element name="ObjectType" type="xs:string" minOccurs="0" maxOccurs="1"/>
                            <xs:element name="ObjectID" type="xs:string" minOccurs="0" maxOccurs="1"/>                          
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="Warnings" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="WarningCode" type="xs:string" minOccurs="0" maxOccurs="1"/>
                            <xs:element name="WarningType" type="xs:string" minOccurs="0" maxOccurs="1"/>
                            <xs:element name="WarningMessage" type="xs:string" minOccurs="0" maxOccurs="1"/>
                            <xs:element name="ObjectType" type="xs:string" minOccurs="0" maxOccurs="1"/>
                            <xs:element name="ObjectID" type="xs:string" minOccurs="0" maxOccurs="1"/>                          
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
       <xs:element name="MakeOkToSellFault">
    <xs:complexType>
      <xs:all>
        <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
        <xs:element name="errorCode" type="xs:string" minOccurs="0"/>
      </xs:all>
    </xs:complexType>
      </xs:element>
</xs:schema>
  </wsdl:types>  
  <wsdl:message name="MakeOkToSellRequest">
      <wsdl:part element="impl:MakeOkToSellRequest" name="parameters"/>
   </wsdl:message>  
      <wsdl:message name="MakeOkToSellResponse">
      <wsdl:part element="impl:MakeOkToSellResponse" name="parameters"/>
   </wsdl:message>   
      <wsdl:message name="MakeOkToSellFault">
         <wsdl:part element="impl:MakeOkToSellFault" name="parameters"/>
   </wsdl:message>
     <wsdl:portType name="MakeOkToSellService">
      <wsdl:operation name="MakeOkToSell">
         <wsdl:input message="impl:MakeOkToSellRequest" name="MakeOkToSellRequest"/>
         <wsdl:output message="impl:MakeOkToSellResponse" name="MakeOkToSellResponse"/>
    <wsdl:fault message="impl:MakeOkToSellFault" name="MakeOkToSellFault"/>
      </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding name="MakeOkToSellServiceBinding" type="impl:MakeOkToSellService">
   <wsaw:UsingAddressing wsdl:required="false"/>
      <wsdlsoap:binding style="document"  transport="http://schemas.xmlsoap.org/soap/http"/>        
      <wsdl:operation name="MakeOkToSell">
         <wsdlsoap:operation soapAction="urn:MakeOkToSell"/>
         <wsdl:input name="MakeOkToSellRequest">
            <wsdlsoap:body    use="literal"/>
         </wsdl:input>      
     <wsdl:output name="MakeOkToSellResponse">
            <wsdlsoap:body    use="literal"/>enter code here
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
    <wsdl:service name="MakeOkToSellService">
      <wsdl:documentation>WSDL File for MakeOkToSell</wsdl:documentation>
      <wsdl:port binding="impl:MakeOkToSellServiceBinding" name="MakeOkToSellServiceSOAP">
         <wsdlsoap:address location="http://localhost:9080/MakeOkToSellService" />
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions>

DFHWS2Ls大概是从MF上的JCL运行的。我注意到WSDL文档有一个EBCDIC-CP-US的编码,这是有道理的,但这不是我们正在查看的编码。我认为WSDL要么是为了便于阅读而在这里打印的漂亮,要么是转码错误导致EBCDIC版本中的所有内容都流入一长行。

我已经在 WSDL 验证器中加载了 WSDL(我在 Eclipse Web Tools 项目中使用了验证器)。它报告了同样的问题,只是这次在第 39 行:<xs:extension> 。我不确定 WSDL 作者试图实现什么,但 minOccurs 在 XML 中是无效的,我建议删除它。

[编辑以更正 XML 标记上的标记]

最新更新