的vSphere Web服务样本失败“的服务器发送HTTP状态码200:OK”

问题描述:

我想从的vSphere /编程的vCenter等部署VM模板作为开始我下载VMware的SDK的压缩和复制的VMClone.java从Web服务SDK到Eclipse项目,并使用此代码运行:的vSphere Web服务样本失败“的服务器发送HTTP状态码200:OK”

String[] myargs = new String[12]; 
myargs[0] = "--url"; 
myargs[1] = "https://192.168.0.91:9443"; 
myargs[2] = "--username"; 
myargs[3] = "[myuser]"; 
myargs[4] = "--password"; 
myargs[5] = "[mypassword]."; 
myargs[6] = "--datacentername"; 
myargs[7] = "LaptopIkor"; 
myargs[8] = "--vmpath"; 
myargs[9] = "[datastore1]/liferayTomcat/liferayTomcat.vmx"; 
myargs[10] = "--clonename"; 
myargs[11] = "DriverCreation1"; 
com.vmware.vm.VMClone.main(myargs); 

(这只是一个示例设置,所以上面的代码没有隐私问题) (是这个代码是不是很漂亮,它只是用于测试)

但这失败,以下消息/堆栈跟踪:

com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 200: OK 
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.createResponsePacket(Unknown Source) 
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(Unknown Source) 
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(Unknown Source) 
at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(Unknown Source) 
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown Source) 
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source) 
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source) 
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown Source) 
at com.sun.xml.internal.ws.client.Stub.process(Unknown Source) 
at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown Source) 
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source) 
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source) 
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown Source) 
at $Proxy35.retrieveServiceContent(Unknown Source) 
at com.vmware.vm.VMCreate.connect(VMCreate.java:287) 
at com.vmware.vm.VMCreate.main(VMCreate.java:1047) 
at (my own class with above code) 

这也恰好与VMCreate和使用samples.jar时,而不是复制的源文件。任何想法如何解决这个问题?

URL指向安装了vCenter Server的服务器WIN2008,包括vSphere Web Client中。

感谢您的任何帮助。

+0

你是怎么解决的呢? – happyHelper

+0

我没有对不起: – sotix

myargs[1] = "https://192.168.0.91:9443"; 

尝试

myargs[1] = "https://192.168.0.91/sdk";