Class ApacheHttpClient

java.lang.Object
com.vmware.vim25.ws.SoapClient
com.vmware.vim25.ws.ApacheHttpClient
All Implemented Interfaces:
Client

public class ApacheHttpClient extends SoapClient
Created by Michael Rice on 8/12/14.

Copyright 2014 Michael Rice

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

  • Constructor Details

  • Method Details

    • invoke

      public Object invoke(String methodName, Argument[] paras, String returnType) throws RemoteException
      Invoke a given method with supplied Argument on 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 ServiceContent

      Returns an Object of the given return type. Using the example above you would get a ServiceContent Object.

      Parameters:
      methodName - Name of the method to execute
      paras - Array of Arguments aka params for the method
      returnType - String name of the return type
      Returns:
      Object
      Throws:
      RemoteException
    • invokeAsString

      public StringBuffer invokeAsString(String methodName, Argument[] paras) throws RemoteException
      Invoke a given method with supplied Argument on the remote vi server. Returns a StringBuffer This 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 execute
      paras - Array of Arguments aka params for the method
      Returns:
      StringBuffer with the
      Throws:
      RemoteException