You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
如果這時候 Eclipse 報錯 Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"
把 jstl-1.2.jar 放到專案的 /WEB-INF/lib/ 裡 (ref: stackoverflow#13285826)
<servicename="MyWs" >
<Description>
Please Type your service description here
</Description>
<messageReceivers>
<messageReceivermep="http://www.w3.org/2004/08/wsdl/in-only"class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
<messageReceivermep="http://www.w3.org/2004/08/wsdl/in-out"class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>
<parametername="ServiceClass"locked="false">io.github.shyangs.MyWs</parameter>
</service>
改為
<servicename="MyWs" >
<Description>
Please Type your service description here
</Description>
<messageReceivers>
<messageReceivermep="http://www.w3.org/ns/wsdl/in-only"class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
<messageReceivermep="http://www.w3.org/ns/wsdl/in-out"class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>
<parametername="ServiceClass"locked="false">io.github.shyangs.MyWs</parameter>
</service>
否則Client呼叫時, 會叫不到Service, 報出錯誤 The ServiceClass object does not implement the required method in the following form: OMElement xxxxx(OMElement e)
(ref: stackoverflow#36319901)
STEP 00
使用的工具/環境:
STEP 01
Tomcat 我下載的是 apache-tomcat-9.0.21.zip, 這是免安裝版, 把下載的 axis2.war 放到 apache-tomcat-9.0.21\webapps 目錄下, 執行 apache-tomcat-9.0.21\bin\startup.bat
開啟瀏覽器, 輸入 http://localhost:8080/axis2/ , 如果出現了Axis2的 welcome 頁, 表示Axis2成功安裝到Tomcat裡了.
執行 apache-tomcat-9.0.21\bin\shutdown.bat 關掉 Tomcat.
STEP 02
設定 Eclipse 的 Preferences / Web Services / Axis2 Preferences/ Axis2 Preferences / Axis2 runtime location 設定為 C:\mylib\axis2-1.7.9
下方出現 Axis2 runtime loaded successfully 表示設定成功.
STEP 03
Eclipse 設定 Server 使用 tomcat-9.0.21
STEP 04
Eclipse 裡新增一個 Dynamic Web Project.
STEP 05
JSTL
如果這時候 Eclipse 報錯
Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"
把 jstl-1.2.jar 放到專案的
/WEB-INF/lib/
裡 (ref: stackoverflow#13285826)XmlSchema Core
把 xmlschema-core-2.2.4.jar 放到專案的
/WEB-INF/lib/
裡 (ref: stackoverflow#35188087)STEP 06
建一個class
STEP 07
STEP 08
用瀏覽器開啟 http://localhost:8080/WsAxis2Demo/services/listServices 會看到我們的 Web Service 資訊
同頁的藍色連結,則是 WSDL
STEP 09
修改 services.xml 裡的 messageReceiver mep屬性值
從
改為
否則Client呼叫時, 會叫不到Service, 報出錯誤
The ServiceClass object does not implement the required method in the following form: OMElement xxxxx(OMElement e)
(ref: stackoverflow#36319901)
改完要重啟 Server.
參考
The text was updated successfully, but these errors were encountered: