com.vmware.vim25.ws.WSClient.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vijava Show documentation
Show all versions of vijava Show documentation
Java API for accessing VMWare web services API
The newest version!
???? 2? com/vmware/vim25/ws/WSClient java/lang/Object SOAP_HEADER Ljava/lang/String;
ConstantValue SOAP_END " SOAP_ACTION_HEADER
SOAPAction SOAP_ACTION_V40
urn:vim25/4.0 SOAP_ACTION_V41
urn:vim25/4.1 SOAP_ACTION_V50
urn:vim25/5.0 SOAP_ACTION_V51
urn:vim25/5.1 baseUrl Ljava/net/URL; cookie vimNameSpace
soapAction connectTimeout I readTimeout (Ljava/lang/String;)V
Exceptions ( java/net/MalformedURLException Code
+ $ , (Ljava/lang/String;Z)V LineNumberTable LocalVariableTable this Lcom/vmware/vim25/ws/WSClient; serverUrl
3 $ 4 ()V 6 8 : < > ! " @ # " B /
D F E java/lang/String G H endsWith (Ljava/lang/String;)Z
D J K L length ()I
D N O P substring (II)Ljava/lang/String; R java/net/URL
Q T $ %
V W 4 trustAllHttpsCertificates Y com/vmware/vim25/ws/WSClient$1
X [ $ \ !(Lcom/vmware/vim25/ws/WSClient;)V
^ ` _ javax/net/ssl/HttpsURLConnection a b setDefaultHostnameVerifier #(Ljavax/net/ssl/HostnameVerifier;)V d java/lang/Exception
ignoreCert Z
StackMapTable invoke ?(Lcom/vmware/vim25/ManagedObjectReference;Ljava/lang/String;[Lcom/vmware/vim25/ws/Argument;Ljava/lang/String;)Ljava/lang/Object; k java/io/IOException m com/vmware/vim25/ws/Argument o _this q ManagedObjectReference
l s $ t 9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V
v x w java/lang/System y z arraycopy *(Ljava/lang/Object;ILjava/lang/Object;II)V
| h } W(Ljava/lang/String;[Lcom/vmware/vim25/ws/Argument;Ljava/lang/String;)Ljava/lang/Object; mor )Lcom/vmware/vim25/ManagedObjectReference;
methodName paras [Lcom/vmware/vim25/ws/Argument;
returnType fullParas ? java/rmi/RemoteException
? h ? F(Ljava/lang/String;[Lcom/vmware/vim25/ws/Argument;)Lorg/dom4j/Element; ? ? ? org/dom4j/Element ? ? elements ()Ljava/util/List; ? ? ? java/util/List ? ? get (I)Ljava/lang/Object; ? ? ? ? getName ()Ljava/lang/String; ? Fault
D ? ? ? indexOf (Ljava/lang/String;)I
? ? ? com/vmware/vim25/ws/XmlGen ? ? parseSoapFault =(Lorg/dom4j/Element;)Lcom/vmware/vim25/ws/SoapFaultException; ? Exception in WSClient.invoke:
? ? $ ? *(Ljava/lang/String;Ljava/lang/Throwable;)V ? ? ? &com/vmware/vim25/ws/SoapFaultException ? ? detail Ljava/lang/Throwable;
? ? ? ? fromXML 9(Ljava/lang/String;Lorg/dom4j/Element;)Ljava/lang/Object; root Lorg/dom4j/Element; body resp sfe (Lcom/vmware/vim25/ws/SoapFaultException; e Ljava/lang/Exception; ?
? ? ? createSoapMessage E(Ljava/lang/String;[Lcom/vmware/vim25/ws/Argument;)Ljava/lang/String;
? ? ? post )(Ljava/lang/String;)Ljava/io/InputStream; ? org/dom4j/io/SAXReader
? 3
? ? ? ? read +(Ljava/io/InputStream;)Lorg/dom4j/Document; ? ? ? org/dom4j/Document ? ? getRootElement ()Lorg/dom4j/Element; ? java/lang/StringBuilder ? VI SDK invoke exception:
? T
? ? ? ? append -(Ljava/lang/Object;)Ljava/lang/StringBuilder;
? ? ? ? toString
? T
? ? ? java/io/InputStream ? 4 close soapMsg is Ljava/io/InputStream; reader Lorg/dom4j/io/SAXReader; doc Lorg/dom4j/Document; ? java/lang/Throwable invokeAsString K(Ljava/lang/String;[Lcom/vmware/vim25/ws/Argument;)Ljava/lang/StringBuffer;
? ? ?
readStream /(Ljava/io/InputStream;)Ljava/lang/StringBuffer; ? java/lang/StringBuffer
? 3
? ? ? ? ,(Ljava/lang/String;)Ljava/lang/StringBuffer; ? <
? ? ? ? -(Ljava/lang/String;)Ljava/lang/StringBuilder;
l ?
l ? getType
l getValue ()Ljava/lang/Object;
?
toXML J(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String; >
? ? sb Ljava/lang/StringBuffer; i key type obj Ljava/lang/Object;
Q openConnection ()Ljava/net/URLConnection; java/net/HttpURLConnection
setConnectTimeout (I)V
"# setReadTimeout% POST
'( % setRequestMethod
*,+ java/net/ProtocolException- 4 printStackTrace
/01 setDoOutput (Z)V
341
setDoInput
678 setRequestProperty '(Ljava/lang/String;Ljava/lang/String;)V: Content-Type< text/xml; charset=utf-8> Cookie
@AB getOutputStream ()Ljava/io/OutputStream;D java/io/OutputStreamWriterF UTF8
CH $I +(Ljava/io/OutputStream;Ljava/lang/String;)V
CKL % write
C ?
OPQ getInputStream ()Ljava/io/InputStream;
STQ getErrorStreamV
Set-Cookie
XYZ getHeaderField &(Ljava/lang/String;)Ljava/lang/String; postCon Ljava/net/HttpURLConnection; Ljava/net/ProtocolException; os Ljava/io/OutputStream; out Ljava/io/OutputStreamWriter; ioe Ljava/io/IOException;e java/io/OutputStream
getBaseUrl ()Ljava/net/URL;
setBaseUrl (Ljava/net/URL;)V getCookie setCookie getVimNameSpace setVimNameSpace timeoutMilliSec getConnectTimeout getReadTimeout setSoapActionOnApiVersions 4.0
Duvw equals (Ljava/lang/Object;)Zy 4.1{ 5.0} 5.1
apiVersion? java/io/BufferedReader? java/io/InputStreamReader
?? $? (Ljava/io/InputStream;)V
? $? (Ljava/io/Reader;)V
?? ? readLine
? in Ljava/io/BufferedReader; lineStr? &java/security/NoSuchAlgorithmException? $java/security/KeyManagementException? javax/net/ssl/TrustManager? ,com/vmware/vim25/ws/WSClient$TrustAllManager
?? $? 1(Lcom/vmware/vim25/ws/WSClient$TrustAllManager;)V? SSL
??? javax/net/ssl/SSLContext?? getInstance .(Ljava/lang/String;)Ljavax/net/ssl/SSLContext;
???? init W([Ljavax/net/ssl/KeyManager;[Ljavax/net/ssl/TrustManager;Ljava/security/SecureRandom;)V
???? getSocketFactory "()Ljavax/net/ssl/SSLSocketFactory;
^??? setDefaultSSLSocketFactory #(Ljavax/net/ssl/SSLSocketFactory;)V
trustAllCerts [Ljavax/net/ssl/TrustManager; sc Ljavax/net/ssl/SSLContext;
SourceFile
WSClient.java InnerClasses TrustAllManager 1
! " # " $ % &