君樨 2021-11-22 17:09 采纳率: 50%
浏览 59
已结题

webservice 客户端调用时验证wsdl出错

写了一个webservice,本地测试没问题,提交到第三方调用wsdl时验证报错
Value “matnr” is not allowed for the attribute "name" of type "NCName" in element "/schema/complexType("matierials)/sequence/element("MATNR")
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://webService.ceic.com/"
    targetNamespace="http://webService.ceic.com/"
    elementFormDefault="qualified">

    <xs:element name="dataInfoRequest">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="materialsList" maxOccurs="unbounded" type="tns:materials" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:complexType name="materials">
        <xs:sequence>
            <xs:element name=" MATNR  " type="xs:string"/>
            <xs:element name=" MAKTX  " type="xs:string"/>
            <xs:element name=" CHARG  " type="xs:string"/>
            <xs:element name=" WERKS  " type="xs:string"/>
            <xs:element name=" WERKS_NAME " type="xs:string"/>
            <xs:element name=" LGORT  " type="xs:string"/>
            <xs:element name=" LGOBE  " type="xs:string"/>
            <xs:element name=" LGPBE  " type="xs:string"/>
            <xs:element name=" BWTAR  " type="xs:string"/>
            <xs:element name=" MAKTL  " type="xs:string"/>
            <xs:element name=" WGBEZ  " type="xs:string"/>
            <xs:element name=" SOBKZ  " type="xs:string"/>
            <xs:element name=" LIFNR  " type="xs:string"/>
            <xs:element name=" LIFNR_NAME  " type="xs:string"/>
            <xs:element name=" PSPNR " type="xs:int"/>
            <xs:element name=" POSID  " type="xs:string"/>
            <xs:element name=" MTART  " type="xs:string"/>
            <xs:element name=" MEINS  " type="xs:string"/>
            <xs:element name=" MSEH6  " type="xs:string"/>
            <xs:element name=" WAERS  " type="xs:string"/>
        </xs:sequence>
    </xs:complexType>

我的解答思路和尝试过的方法:百度了好久,可能原因是xsd文件格式不正确
我想要达到的结果:提供解决方法,指出你认为的问题所在
  • 写回答

1条回答 默认 最新

  • 燕_青 2021-11-22 17:26
    关注

    你试试把name后面的空格取消

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 12月1日
  • 已采纳回答 11月23日
  • 创建了问题 11月22日

悬赏问题

  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥20 为什么我写出来的绘图程序是这样的,有没有lao哥改一下
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥200 关于#c++#的问题,请各位专家解答!网站的邀请码
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号