【问题标题】:How can I find the parameters of a wsdl service in c#如何在 C# 中找到 wsdl 服务的参数
【发布时间】:2021-01-13 03:54:26
【问题描述】:

我正在尝试获取没有文档的 wsdl 服务的所有参数、方法等。 wsdl服务的网页是:

https://www1.gsis.gr/wsicisnet/MessageProcessorService?wsdl

我发现在 https://www1.gsis.gr/wsicisnet/MessageProcessorService?xsd=3

有些属性是必需的

<xs:attribute name="traderID" type="xs:string" use="required"/>
<xs:attribute name="wsUserID" type="xs:string" use="required"/>
<xs:attribute name="wsPass" type="xs:string" use="required"/>

但是当我尝试发送消息时,它给了我一个错误

RulesConditionasError: SubmittingTraderIdentification ([SubmittingTraderIdentification: null] 必须与 交易者 ID (801063350)

我在任何地方都找不到 SubmittingTraderIdentification 的任何属性或参数。 有人可以帮帮我吗?

编辑: 当我在 SoapUI 中加载 wsdl 服务并生成一个请求时,它看起来像这样

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:icis="http://icis.externaldomain.services.ws">
   <soapenv:Header/>
   <soapenv:Body>
      <icis:processIncomingMessageRequest>
         <!--Optional:-->
         <icis:messageRequest traderID="?" wsUserID="?" wsPass="?">
            <DigitallySignedMessage messageType="?" isXmlString="?">
               <xmlMessage>?</xmlMessage>
            </DigitallySignedMessage>
         </icis:messageRequest>
      </icis:processIncomingMessageRequest>
   </soapenv:Body>
</soapenv:Envelope>

编辑 2: 这是我尝试从我的程序发送的 XML:

<?xml version="1.0" encoding="utf-8"?>
<EF15A xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <Header>
        <MessageSender>TRADER.GR</MessageSender>
        <MessageRecipient>NES.EL</MessageRecipient>
        <DateOfPreparation>2020-10-06</DateOfPreparation>
        <TimeOfPreparation>16:30:00</TimeOfPreparation>
        <MessageIdentifier>20/198</MessageIdentifier>
    </Header>
    <Body>
        <DeclarationOfExciseTaxesRegistration>
            <SubmittingOperator>
                <SubmittingOperatorIdentification>1234567</SubmittingOperatorIdentification>
                <SubmittingTraderIdentification>1234567</SubmittingTraderIdentification>
            </SubmittingOperator>
            <ExciseTaxesDeclaration>
                <LocalReferenceNumber>1544237495/20/198</LocalReferenceNumber>
                <Fallbackflag>0</Fallbackflag>
                <RegistrationOffice>GR004531</RegistrationOffice>
                <DocumentState>0</DocumentState>
                <DocumentNumber>1</DocumentNumber>
                <TotalDocuments>1</TotalDocuments>
                <NumberOfRows>1</NumberOfRows>
                <DispatchCountry>BG</DispatchCountry>
                <DestinationCountry>GR</DestinationCountry>
                <ExistenceOfContainerFlag>0</ExistenceOfContainerFlag>
                <DeliveryConditions>FCA</DeliveryConditions>
                <Currency>EUR</Currency>
                <InvoiceAmount>6600.00</InvoiceAmount>
                <ExchangeFactor>1</ExchangeFactor>
                <ChemicalAnalysisPerformedFlag>0</ChemicalAnalysisPerformedFlag>
                <ThroughSimplifiedProcedureFlag>0</ThroughSimplifiedProcedureFlag>
                <PaymentMethodCode>H</PaymentMethodCode>
                <CertificateIssuanceFlag>1</CertificateIssuanceFlag>
                <DeclarationTypeCode>30</DeclarationTypeCode>
                <CalculationOfTaxesDate>2020-10-06</CalculationOfTaxesDate>
                <GeneralChemistryDetails />
                <DeliveryDetails>
                    <TransportVehicleIdentificationNumber>K4423NBA</TransportVehicleIdentificationNumber>
                    <TransportVehicleCountry>BG</TransportVehicleCountry>
                    <NationalTransportMode>3</NationalTransportMode>
                </DeliveryDetails>
                <ClearingAgent>
                    <ClearingAgentType>1</ClearingAgentType>
                    <ClearingAgentEORI>GR1234567</ClearingAgentEORI>
                </ClearingAgent>
            </ExciseTaxesDeclaration>
            <ExciseTaxesDeclarationConsignor>
                <ExciseTaxesDeclarationConsignorType>0</ExciseTaxesDeclarationConsignorType>
            </ExciseTaxesDeclarationConsignor>
            <ExciseTaxesObligee>
                <ObligeeType>7</ObligeeType>
                <ObligeeIdentificationType>1</ObligeeIdentificationType>
                <ObligeeIdentification>1234567</ObligeeIdentification>
                <ContactDetails />
            </ExciseTaxesObligee>
            <ExciseTaxesDeclarationConsignee>
                <ConsigneeType>0</ConsigneeType>
                <ConsigneeIdentificationType>1</ConsigneeIdentificationType>
                <ConsigneeIdentification>1234567</ConsigneeIdentification>
                <ContactDetails />
                <SpecialConsignee>
                    <SpecialConsigneeLicenseType>1</SpecialConsigneeLicenseType>
                </SpecialConsignee>
                <VesselRegistrationDetails>
                    <VesselRegistrationType>1</VesselRegistrationType>
                </VesselRegistrationDetails>
            </ExciseTaxesDeclarationConsignee>
            <ExciseTaxesRow>
                <ExciseTaxesDeclarationRowNumber>1</ExciseTaxesDeclarationRowNumber>
                <SymbolNumbers>ΔΙΠΛΟΚΑΜΠΙΝΟ ΦΟΡΤΗΓΟ FORD RANGER ΚΥΛ:2500  ΕΤΟΥΣ:2007</SymbolNumbers>
                <TaricCode>8704219900</TaricCode>
                <TaricAdditionCode>1901</TaricAdditionCode>
                <TaxQuantity>1</TaxQuantity>
                <CountryOfOrigin>SE</CountryOfOrigin>
                <GrossWeight>3020.000</GrossWeight>
                <NetWeight>3020.000</NetWeight>
                <ConditionIdentification>48</ConditionIdentification>
                <PreviousConditionIdentification>00</PreviousConditionIdentification>
                <ExemptionCode>P12</ExemptionCode>
                <StatisticalValue>6600.00</StatisticalValue>
                <SupplementaryComputationInformation>
                    <SupplementaryComputationInfo>816       </SupplementaryComputationInfo>
                    <SupplementaryComputationValue>6600.00</SupplementaryComputationValue>
                </SupplementaryComputationInformation>
                <PreviousDocuments>
                    <PreviousDocumentType>4</PreviousDocumentType>
                    <PreviousAsdeDocument />
                    <PreviousEaadDocument />
                    <PreviousStampRequestDocument />
                    <PreviousVehicleArrivalDocument>
                        <DeclarationReferenceNumber>19GRVA44531810</DeclarationReferenceNumber>
                    </PreviousVehicleArrivalDocument>
                    <PreviousVehicleMovementDocument />
                    <PreviousExciseTaxesDeclarationDocument />
                </PreviousDocuments>
                <ReferenceDocuments>
                    <ReferenceDocumentId>1E04</ReferenceDocumentId>
                    <ReferenceDocumentNumber>2048764105</ReferenceDocumentNumber>
                </ReferenceDocuments>
                <ReferenceDocuments>
                    <ReferenceDocumentId>1E05</ReferenceDocumentId>
                    <ReferenceDocumentNumber>1018744363</ReferenceDocumentNumber>
                </ReferenceDocuments>
                <ReferenceDocuments>
                    <ReferenceDocumentId>3</ReferenceDocumentId>
                    <ReferenceDocumentNumber>969/2019</ReferenceDocumentNumber>
                </ReferenceDocuments>
                <ReferenceDocuments>
                    <ReferenceDocumentId>4</ReferenceDocumentId>
                    <ReferenceDocumentNumber>2593/2018</ReferenceDocumentNumber>
                </ReferenceDocuments>
                <ReferenceDocuments>
                    <ReferenceDocumentId>1</ReferenceDocumentId>
                    <ReferenceDocumentNumber>14.03.2019</ReferenceDocumentNumber>
                </ReferenceDocuments>
                <VehicleDetails>
                    <FrameNumber>WF1053539371</FrameNumber>
                    <CarKind>8</CarKind>
                    <ImporterCodeOrBrandName>13</ImporterCodeOrBrandName>
                    <FirstAllowanceDate>2007-12-18</FirstAllowanceDate>
                    <VehicleFactoryType>2AW</VehicleFactoryType>
                    <VehicleUsedFlag>1</VehicleUsedFlag>
                    <EngineCapacity>2500</EngineCapacity>
                    <EngineType>WL</EngineType>
                    <FuelType>ΠΕΤΡΕΛΑΙΟ</FuelType>
                    <MakeYear>2007</MakeYear>
                    <VehicleModelName>RANGER</VehicleModelName>
                    <ImportedDate>2019-02-19</ImportedDate>
                    <CountryLast>SE</CountryLast>
                    <MileageType>456</MileageType>
                    <CarbonDioxideEmissionsType>456</CarbonDioxideEmissionsType>
                    <VehicleRebateFlag>0</VehicleRebateFlag>
                </VehicleDetails>
                <TaxComputation>
                    <NationalAccountingCode>504</NationalAccountingCode>
                    <SuspensionFlag>0</SuspensionFlag>
                    <AmountOfTaxes>686.4</AmountOfTaxes>
                    <PaymentMethodCode>H</PaymentMethodCode>
                    <TaxBase>6600.00</TaxBase>
                    <TaxRate>10,4000</TaxRate>
                </TaxComputation>
                <SpecialMentions />
            </ExciseTaxesRow>
        </DeclarationOfExciseTaxesRegistration>
    </Body>
</EF15A>

【问题讨论】:

  • 您是否在 SoapUI 中导入 WSDL 并让它生成请求?那看起来像什么?该错误看起来像是一些业务规则,而不是特定于 WSDL。
  • @ou_ryperd 是的,我做到了。我将它作为编辑添加到我的问题中
  • 您是否阅读了该服务的 manual (PDF)。那里描述了安全机制。
  • @ou_ryperd 此链接无效。它显示 500 内部服务器错误。奇怪的是,当我从我的程序 messageType "IMP_ID015","ECS_ED15" 和其他一些发送时它工作正常。当我尝试发送“EMCS_EF15”消息时,它给了我这个错误。它似乎要求 SubmittingTraderIdentification 作为参数而不是 XML 中的变量。如果我在他们的平台上从我的程序上传生成的 XML,它可以正常工作,所以我想这不是来自 XML,而是来自错误的凭据或指定消息类型的附加参数
  • 该链接给了我一个 pdf 供我下载。

标签: c# wsdl soapui service-reference


【解决方案1】:

我们在通过 Web 服务提交 EF15 时遇到了同样的问题。 SubmittingTraderIdentification 永远不会通过,即使它在 xml 消息中完成。 希腊海关当局没有对这个问题作出解释。 我们的客户手动上传 ef15 xml 文件

【讨论】:

  • 我多次与他们交谈并向他们发送电子邮件和肥皂信息。答案和你的一样。他们告诉我其他程序工作正常,我对此表示怀疑,因为我可以很好地发送导入和导出消息。所以你认为是 IcisNet 问题而不是我的 XML 消息?
  • 我在我的问题中添加了我的 XML。请注意,我进行了修改,因此即使我多次发送它也可以通过。如果我坚持使用原始 XSD,它会说存在 XML 错误
  • 也许这里的某个人可以使用基于 XSD 的类创建一个正确的文件。当我尝试在 Visual Studio 中创建它时,它给了我错误
  • 我做了一个基于 XSD 的 XML,几乎没有任何变化,仍然是同样的错误。我知道一个可以发送 DEFK 的程序,但我不知道他们是如何做到的。这是一个java应用程序。
  • 我看到一个程序可以将EF15消息发送到icisnet并毫无问题地接收MRN,但我不明白他是如何做到的。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-03-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多