當然:這裏是代碼 - 我縮短了那麼一點點,但主要功能是給
順便說一句,我現在改變了數據的類型長,現在我得到了IllegalArgumentException
的Java:
@WebMethod(operationName = "setData", action = "setData")
public void setData(final long k)
{
myValue = k;
}
VBA 在Sheet1我打電話例如:
Call dataService.wsm_setData(5)
,並在serviceFile(與Web服務工具包生成):
Private sc_DataServic As SoapClient30
Private Const c_WSDL_URL As String = "http://pcname:8010/myurl/data?wsdl"
Private Const c_SERVICE As String = "DataServiceService"
Private Const c_PORT As String = "DataServicePort"
Private Const c_SERVICE_NAMESPACE As String = "http://myurl"
Private Sub Class_Initialize()
Set sc_DataServic = New SoapClient30
sc_DataServic.MSSoapInit2 c_WSDL_URL, str_WSML, c_SERVICE, c_PORT, c_SERVICE_NAMESPACE
sc_DataServic.ConnectorProperty("ProxyServer") = "<CURRENT_USER>"
sc_DataServic.ConnectorProperty("EnableAutoProxy") = True
Set sc_DataServic.ClientProperty("GCTMObjectFactory") = New clsof_Factory_Data
End Sub
Public Function wsm_setData(ByVal dcml_arg0 As Double)
On Error GoTo wsm_setDataTrap
sc_DataServic.setData dcml_arg0
Set sc_DataServic = Nothing
Exit Function
wsm_setDataTrap:
DataServicErrorHandler "wsm_setData"
End Function
你能告訴我們一些代碼? – orique
我會盡快告訴你代碼,但我必須等待幾個小時才能以正確的方式發表評論,因爲我是一個新的代表;) – user1595399