2016-05-23 159 views
0

我得到這個錯誤,並沒有收到輸出。你能幫我解決嗎?<錯誤xsi:type =「xsd:string」>發生意外錯誤。</Error>

<Messages> 
       <Status>-999</Status> 
       <Errors> 
       <Error xsi:type="xsd:string">Unexpected Error has occured </Error> 
       </Errors> 
       <Warnings/> 
      </Messages> 

下面是完整的代碼: 發送

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:echo="http://www.echo.com/"> 
    <soapenv:Header/> 
    <soapenv:Body> 
     <echo:GetQuote> 
     <!--Optional:--> 
     <echo:echoRateRequest> 
      <!--Optional:--> 
      <echo:AuthInfo> 
       <!--Optional:--> 
       <echo:UserId></echo:UserId> 
       <!--Optional:--> 
       <echo:Password></echo:Password> 
      </echo:AuthInfo> 
      <!--Optional:--> 
      <echo:Requests> 
       <!--Zero or more repetitions:--> 
       <echo:Request> 
        <echo:TotalWeight>1000</echo:TotalWeight> 
        <!--Optional:--> 
        <echo:Items> 
        <!--Zero or more repetitions:--> 
        <echo:Item OriginId="1" DestinationId="1"> 
         <echo:Class>70</echo:Class> 
         <echo:Weight>1000</echo:Weight> 
        </echo:Item> 
        </echo:Items> 
        <!--Optional:--> 
        <echo:Accessorials> 
        <!--Zero or more repetitions:--> 
        <echo:Accessorial> 
         <echo:AccessorialId>12</echo:AccessorialId> 
         <echo:Charge>0</echo:Charge> 
         <!--Optional:--> 
         <echo:PickDel></echo:PickDel> 
         <!--Optional:--> 
         <echo:RateType></echo:RateType> 
         <!--Optional:--> 
         <echo:Description>?</echo:Description> 
        </echo:Accessorial> 
        </echo:Accessorials> 
        <!--Optional:--> 
        <echo:Origin Id=""> 
        <!--Optional:--> 
        <echo:Name></echo:Name> 
        <!--Optional:--> 
        <echo:Address1></echo:Address1> 
        <!--Optional:--> 
        <echo:Address2></echo:Address2> 
        <!--Optional:--> 
        <echo:City></echo:City> 
        <!--Optional:--> 
        <echo:State></echo:State> 
        <!--Optional:--> 
        <echo:Zip>91101</echo:Zip> 
        </echo:Origin> 
        <!--Optional:--> 
        <echo:Destination Id="?"> 
        <!--Optional:--> 
        <echo:Name></echo:Name> 
        <!--Optional:--> 
        <echo:Address1></echo:Address1> 
        <!--Optional:--> 
        <echo:Address2></echo:Address2> 
        <!--Optional:--> 
        <echo:City></echo:City> 
        <!--Optional:--> 
        <echo:State></echo:State> 
        <!--Optional:--> 
        <echo:Zip>60425</echo:Zip> 
        </echo:Destination> 
        <echo:PickupDate>2015-10-03</echo:PickupDate> 
        <!--Optional:--> 
        <echo:ShipmentType></echo:ShipmentType> 
        <echo:PalletQty>0</echo:PalletQty> 
        <echo:ReturnMultipleCarriers>false</echo:ReturnMultipleCarriers> 
        <echo:SaveQuote>false</echo:SaveQuote> 
       </echo:Request> 
      </echo:Requests> 
     </echo:echoRateRequest> 
     </echo:GetQuote> 
    </soapenv:Body> 
</soapenv:Envelope> 

收到迴應:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
    <soap:Body> 
     <GetQuoteResponse xmlns="http://www.echo.com/"> 
     <GetQuoteResult> 
      <TotalRateQuotes>1</TotalRateQuotes> 
      <RateQuote> 
       <QuoteId>0</QuoteId> 
       <Request> 
        <TotalWeight>1000</TotalWeight> 
        <Items> 
        <Item OriginId="1" DestinationId="1"> 
         <Class>70</Class> 
         <Weight>1000</Weight> 
        </Item> 
        </Items> 
        <Accessorials> 
        <Accessorial> 
         <AccessorialId>12</AccessorialId> 
         <Charge>0</Charge> 
         <PickDel/> 
         <RateType/> 
         <Description>?</Description> 
        </Accessorial> 
        </Accessorials> 
        <Origin Id=""> 
        <Name/> 
        <Address1/> 
        <Address2/> 
        <City/> 
        <State/> 
        <Zip>91101</Zip> 
        </Origin> 
        <Destination Id="?"> 
        <Name/> 
        <Address1/> 
        <Address2/> 
        <City/> 
        <State/> 
        <Zip>60425</Zip> 
        </Destination> 
        <PickupDate>2015-10-03T00:00:00</PickupDate> 
        <ShipmentType/> 
        <PalletQty>0</PalletQty> 
        <ReturnMultipleCarriers>false</ReturnMultipleCarriers> 
        <SaveQuote>false</SaveQuote> 
       </Request> 
       <RateDetails/> 
       <Messages> 
        <Status>-999</Status> 
        <Errors> 
        <Error xsi:type="xsd:string">Unexpected Error has occured.</Error> 
        </Errors> 
        <Warnings/> 
       </Messages> 
      </RateQuote> 
     </GetQuoteResult> 
     </GetQuoteResponse> 
    </soap:Body> 
</soap:Envelope> 

我真的是它努力工作,無法上找到解決方案這個問題。如果你想要,你可以使用這些鏈接測試你的自我。

標準(生產):

http://services.echo.com/Quote.asmx

http://services.echo.com/Quote.asmx?wsdl

+0

你有沒有碰巧檢查應用程序日誌文件,並希望這將是一些方便。 – Rao

+0

你穿過它了嗎?你發送正確的憑證? – Rao

回答

0

從我的結束,以及試圖

請求:

<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> 
    <soap12:Body> 
     <GetQuote xmlns="http://www.echo.com/"> 
     <echoRateRequest> 
      <AuthInfo> 
       <UserId>test-soap</UserId> 
       <Password>xxxx</Password> 
      </AuthInfo> 
      <Requests> 
       <Request> 
        <TotalWeight>3.12</TotalWeight> 
        <PickupDate>2002-09-24-06:00</PickupDate> 
        <PalletQty>12</PalletQty> 
        <ReturnMultipleCarriers>true</ReturnMultipleCarriers> 
        <SaveQuote>true</SaveQuote> 
       </Request> 
       <Request> 
        <TotalWeight>12.4</TotalWeight> 
        <PickupDate>2002-09-24-06:00</PickupDate> 
        <PalletQty>34</PalletQty> 
        <ReturnMultipleCarriers>true</ReturnMultipleCarriers> 
        <SaveQuote>true</SaveQuote> 
       </Request> 
      </Requests> 
     </echoRateRequest> 
     </GetQuote> 
    </soap12:Body> 
</soap12:Envelope> 

響應我

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
    <soap:Body> 
     <GetQuoteResponse xmlns="http://www.echo.com/"> 
     <GetQuoteResult> 
      <TotalRateQuotes>1</TotalRateQuotes> 
      <RateQuote> 
       <QuoteId>0</QuoteId> 
       <Request> 
        <TotalWeight>0</TotalWeight> 
        <Items/> 
        <Accessorials/> 
        <Origin/> 
        <Destination/> 
        <PickupDate>2002-09-24T01:00:00-05:00</PickupDate> 
        <PalletQty>12</PalletQty> 
        <ReturnMultipleCarriers>true</ReturnMultipleCarriers> 
        <SaveQuote>true</SaveQuote> 
       </Request> 
       <RateDetails/> 
       <Messages> 
        <Status>-999</Status> 
        <Errors> 
        <Error xsi:type="xsd:string">Unexpected Error has occured.</Error> 
        </Errors> 
        <Warnings/> 
       </Messages> 
      </RateQuote> 
     </GetQuoteResult> 
     </GetQuoteResponse> 
    </soap:Body> 
</soap:Envelope> 

這意味着在我們發送的值的問題,請在服務器上是什麼原因造成這個錯誤..第二個看看什麼樣的價值觀每個字段必須以文件的日誌。如果我們沒有正確的輸入,我們總會以沒有快樂的迴應結束。這裏的關鍵是發送適當的值。

+0

蘇曼,感謝answere,但我把第三方提供的文檔中提到的相同的值,但仍然有相同的錯誤。 –

+0

鏈接爲文檔請 –

+0

請檢查在這裏:goo.gl/DZKz1x –

相關問題