SOAPWeb服务调用,在postman中工作,但不是从SpringBoot项目

erhoui1w  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(136)

我正试图从我的spring boot项目中调用基于.net的web服务。当我们从 Postman 那里打电话时,它工作得很好,但是当我从我的项目中打电话时,它给出了一个错误。我们在这两者中传递了相同的标题和正文。
headers:-
{post/v7/webservices/update1.asmx?wsdl http/1.1:null}{接受编码:gzip}{接受:text/xml,text/html,image/gif,image/jpeg,*;q=.2,/;q=.2}{soapaction:“https://secure.newcropaccounts.com/v7/webservices/getpatientfullmedicationhistory6“}{内容类型:text/xml;charset=utf-8}{cache control:no cache}{pragma:no cache}{user-agent:java/1.8.0\u 261}{host:preproduction.newcropaccounts.com}{connection:keep-alive}{content-length:1047}
body:-

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetPatientFullMedicationHistory6 xmlns="https://secure.newcropaccounts.com/V7/webservices">
      <credentials>
        <PartnerName>string</PartnerName>
        <Name>string</Name>
        <Password>string</Password>
      </credentials>
      <accountRequest>
        <AccountId>string</AccountId>
        <SiteId>string</SiteId>
      </accountRequest>
      <patientRequest>
        <PatientId>string</PatientId>
      </patientRequest>
      <prescriptionHistoryRequest>
        <StartHistory>dateTime</StartHistory>
        <EndHistory>dateTime</EndHistory>
        <PrescriptionStatus>string</PrescriptionStatus>
        <PrescriptionSubStatus>string</PrescriptionSubStatus>
        <PrescriptionArchiveStatus>string</PrescriptionArchiveStatus>
      </prescriptionHistoryRequest>
      <patientInformationRequester>
        <UserType>string</UserType>
        <UserId>string</UserId>
      </patientInformationRequester>
      <patientIdType>string</patientIdType>
      <includeSchema>string</includeSchema>
    </GetPatientFullMedicationHistory6>
  </soap:Body>
</soap:Envelope>

response:-
headers:-
{null:http/1.1 200 ok}{日期:2021年3月3日星期三13:48:19 gmt}{内容类型:text/xml;charset=utf-8}{content length:579}{connection:keep alive}{cache control:private,max age=0}{server:microsoft iis/10.0}{x-powered-by:asp.net}
body:-

<?xml version="1.0" encoding="UTF-8"?><GetPatientFullMedicationHistory6Responsexmlns="https://secure.newcropaccounts.com/V7/webservices"><GetPatientFullMedicationHistory6Result>
<Status>Fail</Status>
<Message>Internal error</Message>
<XmlResponse/>
<RowCount>0</RowCount>
<Timing>0</Timing>
</GetPatientFullMedicationHistory6Result></GetPatientFullMedicationHistory6Response>

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题