Why am I getting a "Error using matlab.int​ernal.call​Java: No method with appropriate signature exists in Java class" error message when using a service built using the 'matlab.ws​dl.createW​SDLClient' function?

I would like to communicate with a web service using a WSDL XML file in MATLAB. However, when I use the 'matlab.wsdl.createWSDLClient' function, I see a number of warning messages about types being ignored due to being unsupported. 
Then, when I try to call a method from the generated web service, I see the following error message:
Error using matlab.internal.callJava
No MY_METHOD method with appropriate signature exists in Java class com.sun.proxy.$Proxy52
What could be causing this, and how can I work around this? 

 采纳的回答

This particular error message usually occurs if the WSDL XML file does not conform to the 'wrapper style'. Please refer to the following MATLAB documentation page for more information: 
https://www.mathworks.com/help/releases/R2017b/matlab/matlab_external/limitations-to-wsdl-document-support.html#mw_d80952ca-89ce-4d11-87df-e5d66d51f021
As mentioned in the above documentation page, the two primary workarounds for this are to edit the WSDL wrapper to conform to the wrapper style rules, or to edit the generated MATLAB code. 
If the WSDL document contains a lot of methods which do not conform to the wrapper style, it may be better to use an alternative workflow to communicate with this web service. The following two MATLAB Answers pages describe workflows to communicate with a web service in MATLAB using either Apache Axis or using an autogenerated .NET assembly: 
https://www.mathworks.com/matlabcentral/answers/100121-how-can-i-use-apache-axis2-to-call-a-web-service-in-matlab-7-12-r2011a
https://www.mathworks.com/matlabcentral/answers/92247-how-can-i-call-web-services-from-matlab-7-14-r2012a-using-net-assemblies-generated-using-svcutil
 

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Call Web Services from MATLAB Using WSDL 的更多信息

产品

版本

R2015b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by