com.vmware.vim25.ws.WSClient.class Maven / Gradle / Ivy
The newest version!
???? 1? 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 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
- . ()V 0 2 4 6 8 : < /
> @ ? java/lang/String A B endsWith (Ljava/lang/String;)Z
> D E F length ()I
> H I J substring (II)Ljava/lang/String; L java/net/URL
K N
P Q . trustAllHttpsCertificates S com/vmware/vim25/ws/WSClient$1
R U V !(Lcom/vmware/vim25/ws/WSClient;)V
X Z Y javax/net/ssl/HttpsURLConnection [ \ setDefaultHostnameVerifier #(Ljavax/net/ssl/HostnameVerifier;)V ^ java/lang/Exception
ignoreCert Z invoke ?(Lcom/vmware/vim25/ManagedObjectReference;Ljava/lang/String;[Lcom/vmware/vim25/ws/Argument;Ljava/lang/String;)Ljava/lang/Object; d java/io/IOException f com/vmware/vim25/ws/Argument h _this j ManagedObjectReference
e l m 9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V
o q p java/lang/System r s arraycopy *(Ljava/lang/Object;ILjava/lang/Object;II)V
u a v 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
? a ? 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
> ? ? ? 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
? -
? ? ? ? read +(Ljava/io/InputStream;)Lorg/dom4j/Document; ? ? ? org/dom4j/Document ? ? getRootElement ()Lorg/dom4j/Element; ? java/lang/StringBuilder ? VI SDK invoke exception:
? N
? ? ? ? append -(Ljava/lang/Object;)Ljava/lang/StringBuilder;
? ? ? ? toString
~ N
? ? ? java/io/InputStream ? . close soapMsg is Ljava/io/InputStream; reader Lorg/dom4j/io/SAXReader; doc Lorg/dom4j/Document; invokeAsString K(Ljava/lang/String;[Lcom/vmware/vim25/ws/Argument;)Ljava/lang/StringBuffer;
? ? ?
readStream /(Ljava/io/InputStream;)Ljava/lang/StringBuffer; ? java/lang/StringBuffer
? -
? ? ? ? ,(Ljava/lang/String;)Ljava/lang/StringBuffer; ? <
? ? ? ? -(Ljava/lang/String;)Ljava/lang/StringBuilder;
e ?
e ? ? ? getType
e ? ? ? 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;
K openConnection ()Ljava/net/URLConnection; java/net/HttpURLConnection
setConnectTimeout (I)V
setReadTimeout POST
setRequestMethod
"! java/net/ProtocolException# . printStackTrace
%&' setDoOutput (Z)V
)*'
setDoInput
,-. setRequestProperty '(Ljava/lang/String;Ljava/lang/String;)V0 Cookie
234 getOutputStream ()Ljava/io/OutputStream;6 java/io/OutputStreamWriter
58 9 (Ljava/io/OutputStream;)V
5;<