VMware {code} Community
sunilkumardm
Enthusiast
Enthusiast

"A WebService annotation is not present on class: com.vmware.vim25.VimPortType" error with vim25.jar from vSphere 6.5 HTML SDK

Hi,

We have a vSphere HTML SDK plugin developed using vSphere 6.5 SDK. One of the dependencies for our plugin is vim25.jar (from the libs folder of vSphere 6.5 HTML SDK).

Our plugin gets loaded successfully on the vSphere Client. However, when we click on the plugin and when our main page loading occurs we hit an exception (as below). Since the call is failing inside vim25.jar, I was suggested to ask this in this forum than vSphere SDK forum.

The very first call to getVimPort is failing. Could you please let us know if you have any suggestions to fix this or if you need any further info?

 

com.sun.xml.internal.ws.model.RuntimeModelerException: A WebService annotation is not present on class: com.vmware.vim25.VimPortType
at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:254)
at com.sun.xml.internal.ws.db.DatabindingImpl.<init>(DatabindingImpl.java:85)
at com.sun.xml.internal.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:59)
at com.sun.xml.internal.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:43)
at com.sun.xml.internal.ws.db.DatabindingFactoryImpl.createRuntime(DatabindingFactoryImpl.java:105)
at com.sun.xml.internal.ws.client.WSServiceDelegate.buildRuntimeModel(WSServiceDelegate.java:875)
at com.sun.xml.internal.ws.client.WSServiceDelegate.createSEIPortInfo(WSServiceDelegate.java:892)
at com.sun.xml.internal.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:855)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:435)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:404)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:386)
at javax.xml.ws.Service.getPort(Service.java:119)
at com.vmware.vim25.VimService.getVimPort(Unknown Source)
at com.mycompany.vsphere.ObjectStoreManager.getVimPort(ObjectStoreManager.java:82)

 

Regards,
Sunil

Reply
0 Kudos
3 Replies
ChrisSmith2
Enthusiast
Enthusiast

Did you ever get a solution to this? I'm seeing the same problem when attempting to bundle "vim25.jar" into my plugin.
Reply
0 Kudos
Denis_Chorbadzh
VMware Employee
VMware Employee

Hi all,

Here is a list of steps to follow if you want to bundle vim25.jar with your plugin:

1. Remove any import packages of vim25 from the main bundle's MANIFEST.MF

2. Set the Bundle-Classpath to include vim25.jar (e.g. Bundle-Classpath: .,vim25.jar)

3. Include in the "Import-Package" of your bundle any packages that are imported by the vim25 bundle.

 

Regards,

Denis

Reply
0 Kudos
satish123REUGHE
Contributor
Contributor

Hi,
I am getting the same error too,
A WebService annotation is not present on class: com.vmware.vim25.VimPortType

This is the content of manifest file:

Manifest-Version: 1.0
Bundle-Vendor: VMware
Bundle-Version: 1.0.0
Tool: Bundlor 1.1.0.RELEASE
Bundle-Name: html-sample-service
Bundle-ManifestVersion: 2
Bundle-SymbolicName: com.vmware.samples.htmlsample.service
Bundle-ClassPath: .,vim25.jar
Export-Package: com.vmware.samples.htmlsample.controllers;version="1.0.0",
com.vmware.samples.htmlsample.services;version="1.0.0",
com.vmware.vim25;uses:="javax.jws,javax.xml.bind,javax.xml.bind.annotation,javax.xml.datatype,javax.xml.namespace,javax.xml.ws"
Import-Package: org.apache.commons.logging;version="1.1.1",
javax.servlet.http;version="3.0",
org.springframework.beans.factory.annotation;version="4.2.9",
org.springframework.http;version="4.2.9",
org.springframework.stereotype;version="4.2.9",
org.springframework.web.bind.annotation;version="4.2.9",
com.vmware.vise.usersession;version="6.6.3",
javax.jws,javax.xml.bind,javax.xml.bind.annotation,javax.xml.datatype,javax.xml.namespace,javax.xml.ws



Can anyone help?




Reply
0 Kudos