もちろん:これがコードです - 少し短くしましたが、主な機能は与えられています
ところで、データのタイプを long に変更したところ、IllegalArgumentException
ジャワ:
@WebMethod(operationName = "setData", action = "setData")
public void setData(final long k)
{
myValue = k;
}
Sheet1のVBAは、たとえば次のように呼び出します。
Call dataService.wsm_setData(5)
および serviceFile (Web Service Toolkit で生成) では:
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