I created a webservice in Matlab using a WSDL file, ( all methods were created successfully. However I have been trying to call the webservice but i keep getting the error below. How can I include my username and password in the code for authentication
Error using callSoapService (line 147)Unspecified Fault: Java exception occurred:java.lang.NullPointerException at com.mathworks.net.transport.MWTransportClientPropertiesFactory$1.getPasswordAuthentication(MWTransportClientPropertiesFactory.java:86) at java.net.Authenticator.requestPasswordAuthentication(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.privilegedRequestPasswordAuthentication(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getServerAuthentication(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)Error in MeteredDataService/GetReadingsForRegisterByDate (line 41)response = callSoapService( ...Error in trywebservice (line 27)value=GetReadingsForRegisterByDate(service,registerId,startDateTime,endDateTime, options);
Best Answer