VMware {code} Community
sharnbo
Contributor
Contributor

Failed to execute sample code using java command line. Pls help.

Hi there,

We are trying to execute a sample in VMware-vSphere-SDK-5.1.0-774886 built with JDK 1.6b22, but it failed with the following exception. Pls help to solve it. Thanks in advance!

Br,

Sharnbo

[Exception info]

D:\changbo\JavaFolder\VMware_vSphere\src\java\JAXWS\samples>java -Djavax.net.ssl

.trustStore=%VMKEYSTORE% com.vmware.general.SimpleClient --url https://192.168.1

0.80/sdk --username root --password 12345678

javax.xml.ws.WebServiceException: class com.vmware.vim25.RetrieveServiceContentR

equestType do not have a property of the name {urn:vim25}_this

        at com.sun.xml.internal.ws.client.sei.BodyBuilder$DocLit.<init>(Unknown

Source)

        at com.sun.xml.internal.ws.client.sei.SEIMethodHandler.<init>(Unknown So

urce)

        at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.<init>(Unknown S

ource)

        at com.sun.xml.internal.ws.client.sei.SEIStub.<init>(Unknown Source)

        at com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBase

Proxy(Unknown Source)

        at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(Unknown Sour

ce)

        at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(Unknown Sour

ce)

        at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(Unknown Sour

ce)

        at javax.xml.ws.Service.getPort(Unknown Source)

        at com.vmware.vim25.VimService.getVimPort(VimService.java:56)

        at com.vmware.general.SimpleClient.connect(SimpleClient.java:152)

        at com.vmware.general.SimpleClient.main(SimpleClient.java:391)

Caused by: javax.xml.bind.JAXBException: {urn:vim25}_this is not a valid propert

y on class com.vmware.vim25.RetrieveServiceContentRequestType

        at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getElementProper

tyAccessor(Unknown Source)

        ... 12 more

0 Kudos
0 Replies