Package com.vmware.vim25.ws
Class WSClient
java.lang.Object
com.vmware.vim25.ws.SoapClient
com.vmware.vim25.ws.WSClient
- All Implemented Interfaces:
Client
The Web Service Engine
-
Field Summary
Fields inherited from class com.vmware.vim25.ws.SoapClient
baseUrl, connectTimeout, cookie, readTimeout, soapAction, thumbprint, trustManager, vimNameSpace -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected OutputStreamWriterprotected SSLSocketFactoryprotected InputStreamprotected SSLSocketFactorygetTrustAllSocketFactory(boolean ignoreCert) Invoke a given method with suppliedArgumenton the remote vi server.invokeAsString(String methodName, Argument[] paras) Invoke a given method with suppliedArgumenton the remote vi server.protected InputStreamMethods inherited from class com.vmware.vim25.ws.SoapClient
computeX509CertificateThumbprint, getBaseUrl, getConnectTimeout, getCookie, getReadTimeout, getServerThumbprint, getTrustManager, getVimNameSpace, hexify, marshall, readStream, setBaseUrl, setConnectTimeout, setCookie, setReadTimeout, setServerThumbprint, setSoapActionOnApiVersion, setVimNameSpace, unMarshall
-
Constructor Details
-
WSClient
- Throws:
MalformedURLExceptionRemoteException
-
WSClient
- Throws:
MalformedURLExceptionRemoteException
-
WSClient
public WSClient(String serverUrl, boolean ignoreCert, TrustManager trustManager) throws MalformedURLException, RemoteException - Throws:
MalformedURLExceptionRemoteException
-
-
Method Details
-
invoke
Description copied from interface:ClientInvoke a given method with suppliedArgumenton the remote vi server. This method typically creates the payload needed to send to the vi server. For example you would pass in RetrieveServiceContent for the methodName, next the params needed for the method. Next give the returnType the parser should convert the response to in this case the string ServiceContentReturns an
Objectof the given return type. Using the example above you would get aServiceContentObject.- Parameters:
methodName- Name of the method to executeparas- Array of Arguments aka params for the methodreturnType- String name of the return type- Returns:
- Object
- Throws:
RemoteException
-
invokeAsString
Description copied from interface:ClientInvoke a given method with suppliedArgumenton the remote vi server. Returns aStringBufferThis works the same as the above call except there is no conversion done on the return data and instead you just get back the StringBuffer content.- Parameters:
methodName- Name of the method to executeparas- Array of Arguments aka params for the method- Returns:
- StringBuffer with the
- Throws:
RemoteException
-
post
- Throws:
IOException
-
getInputStreamFromConnection
protected InputStream getInputStreamFromConnection(HttpURLConnection postCon) throws RemoteException - Throws:
RemoteException
-
createOutputStreamWriter
protected OutputStreamWriter createOutputStreamWriter(OutputStream os) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
getTrustAllSocketFactory
- Throws:
RemoteException
-
getCustomTrustManagerSocketFactory
protected SSLSocketFactory getCustomTrustManagerSocketFactory(TrustManager tm) throws RemoteException - Throws:
RemoteException
-