0
我有一個API資源在WSO2這樣的:WSO2 ESB WstxEOFException閱讀ADRESS端點
<?xml version="1.0" encoding="UTF-8"?>
<api context="/akademik" name="GetListStudent" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="GET" uri-template="/students">
<inSequence>
<header scope="default">
<m:complexHeader xmlns:m="http://org.synapse.example">
<property key="SOAPAction" value="getListStudent"/>
<property key="Content-Type" value="text/xml"/>
</m:complexHeader>
</header>
<send>
<endpoint>
<address format="soap11" uri="http://localhost:8080/AkademikSOAP/Service?wsdl"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<send/>
</outSequence>
<faultSequence/>
</resource>
和WSDL:https://dl.dropboxusercontent.com/u/49439028/Service.xml
當我嘗試訪問它的API顯示
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/>
<S:Body>
<S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope>
<faultcode>S:Client</faultcode>
<faultstring>Couldn't create SOAP message due to exception: XML reader error: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]</faultstring>
</S:Fault>
</S:Body>
但是當我嘗試wsdl從wso2 sample wsdl它完美的工作
會發生什麼? 如何解決這個問題?
我已經改變了它,並且錯誤仍然是相同的 –
當您「嘗試訪問API 「,你給它發送一條消息,根據有效負載設置ContentType:text/xml,用於帶有xml序言(版本,編碼)的soap11消息以及完整的soap信封/ body? –