connect to WSDL webservice with authentication using createClassFromWsdl
3 次查看(过去 30 天)
显示 更早的评论
Hey all, I try to connect to an interface. But I have problems doing the authentication. (everything with R2013a by the way) May be you have a good idea how to do it?
I tried urlnam='...?wsdl'; % a valid address i can reach with firefox! createClassFromWsdl(urlnam) without success since user and pass cannot be given.
I tried urlnam='https://user:pass@...wsdl'; createClassFromWsdl(urlnam) without success but throwing the error Error using urlreadwrite (line 92) Either Basic authentication is not supported or the username or password provided are incorrect.
I changed createClassFromWsdl to createClassFromWsdl2 in line 54 from downloadedData = urlread(wsdl); to downloadedData = urlread(wsdl,'Authentication','Basic','Username','user','Password','pass'); without success but throwing the error Undefined function 'xmlstringinput' for input arguments of type 'char'.
I copied this m-file from matlabroot\toolbox\matlab\iofun\private to my current directory, tried again but making it worse with the error Unspecified Exception: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:import): faultCode=OTHER_ERROR: Unable to resolve imported document at 'http://127.0.0.1:8080/...wsdl=....wsdl', relative to 'file:/home/projects/blabla/wsdl.wsdl': java.net.ConnectException: Connection refused: connect
Thats the point where I give up now.
It is not really supported to connect using authentication, is it?!?!?
Thanks very much! Rafael
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!