This is the piece of code which i am running :

public static void main(String[] args) throws Exception {
System.out.println("Registering Plugin...");
ServiceConnection connection = ServiceConnection.CreateServiceConnection( "ServiceInstance" );
connection.connect(Constants.VCENTER_URL,Constants.VCENTER_USERNAME,Constants.VCENTER_PASSWORD, true);
VimPortType service = null;
VimServiceLocator locator = new VimServiceLocator();
locator.setMaintainSession(true);
 
if(connection != null){
System.out.println("Connected successfully to vCenter.");
service = connection.getService();
} else {
System.out.println("Could not connect to vCenter.");
return;
}
}

and i am getting the following error :


Registering Plugin...
Exception in thread "main" AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (404)Not Found
faultActor:
faultNode:
faultDetail:
{}:return code: 404
<html><head><title>Apache Tomcat/6.0.28 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /sdk/vim</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/sdk/vim</u></p><p><b>description</b> <u>The requested resource (/sdk/vim) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.28</h3></body></html>
{http://xml.apache.org/axis/}HttpErrorCode:404
(404)Not Found
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.vmware.vim25.VimBindingStub.retrieveServiceContent(VimBindingStub.java:47221)
at com.vmware.apputils.vim25.ServiceConnection.connect(ServiceConnection.java:54)
at pluginregistor.PubsRegisterPlugin.main(PubsRegisterPlugin.java:90) \\the line to this error is : connection.connect(Constants.VCENTER_URL,Constants.VCENTER_USERNAME,Constants.VCENTER_PASSWORD, true);


Please help.

Thanks in advance.

Have you looked up the 404 status/return code?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.