VMware Cloud Community
anuragvr
Enthusiast
Enthusiast

How to generate the Web service client stub from Orchestrator WSDL definitions by using code Axis generator

How to generate the Web service client stub from Orchestrator WSDL definitions by using code Axis generator 

I have tried with Axis2 1.6.1 code generator through command line tool. My command was

wsdl2java.bat -o -uri http://xx.xx.xxx.xxx:8280/vmware-vmo-webcontrol/webservice?WSDL

Is it correct command to generate the Web service client stub from Orchestrator WSDL definitions?

I am not able to see the following classes get generated with above command VSOWebControlService.java, VSOWebControlProxy.java, VSOWebControlServiceLocator.java

-AnuragR

0 Kudos
8 Replies
sanchezs
VMware Employee
VMware Employee

Hi AnuragR,

I think your code generation is correct. The difference is that the classes that you mention (XService.java, XProxy.java, XServiceLocator.java) were generated with an old "Axis1 style" library (http://axis.apache.org/axis/java/user-guide.html#WSDL2JavaBuildingStubsSkeletonsAndDataTypesFromWSDL) whereas the version that you are using is generating the "Axis2 style" (http://axis.apache.org/axis2/java/core/docs/userguide-creatingclients.html#createclients).

I'd suggest you to run your command with the -t flag:

wsdl2java.bat -o . -uri http://your_ip:8280/vmware-vmo-webcontrol/webservice?wsdl -t

That will generate some example invocations that you can use as samples to use the vCO Web Service API with the "Axis2 style". It's quite straightforward.

And for further information I'd recommend you to check the standard Axis 2 documentation.

I hope it helps.

Sergio

0 Kudos
thechaos
Enthusiast
Enthusiast

Ich bin ab Freitag den 20.1.2012 wieder zu erreichen. E-Mails werden nicht weitergeleitet.

0 Kudos
anuragvr
Enthusiast
Enthusiast

Sergio,

Thanks for reply, I am referring vCenter Orchestrator developer’s guide (vCenter Orchestrator 4.1) and try to write Web Service client application. This guide referrs Web service client stub classes generated through Axis 1.4(not available any more) and explaining how to write the client app based on that. I am using Axis2 1.6.1 to generate Web service client stub classes so it is very difficult to understand how to write the client app.

Is there any tutorial/guide available based on Axis2?

-AnuragR

0 Kudos
sanchezs
VMware Employee
VMware Employee

Hi AnuragR,

AFAIK for now there's no tutorial/guide for vCO Web Services using Axis2.

But in case you want to follow the Developer's Guide for 4.1 you can get the Axis 1.4 distribution from the Apache's website:

http://www.apache.org/dyn/closer.cgi/ws/axis/1_4/

Regards,

Sergio

igorstoyanov
VMware Employee
VMware Employee

Hi,

You may want to look at the vCO code examples and libraries provided here: VMware vCenter Orchestrator 4.2 Examples

You can find a ready to use SOAP client there.

Thanks,

Igor.

Visit http://blogs.vmware.com/orchestrator for the latest in Cloud Orchestration.
0 Kudos
tschoergez
Leadership
Leadership

Hi!

You might also find some hints about creating a Web Service Client for vCO here:

http://www.vcoportal.de/2011/08/sample-webservice-client-for-vco/

Cheers,

Joerg

0 Kudos
anuragvr
Enthusiast
Enthusiast

Thanks guys for valuable suggestions.

Now I start writing client code with classes generated through Axis 1.4. I still have one doubt, even though I had generated stub classes through Axis 1.4 but I could not see these classes VSOWebControlProxy.java and WebserviceSoapBindingStub.java. Is it depends on WSDL also?

-AnuragR

0 Kudos
sanchezs
VMware Employee
VMware Employee

Hi AnuragR

The class WebserviceSoapBindingStub.java doesn't appear in the current documentation (http://pubs.vmware.com/vsphere-50/topic/com.vmware.vsphere.vco_develop_web_services.doc_42/GUID7C6D2...) so in case of being generated I guess it's not required at all for the examples.

And the class VSOWebControlProxy.java probably is an old fashion way how Axis (previous to 1.4) was generating some classes, because you're right, with 1.4 and above it's not generated. The class is described on the documentation but after that it's not used, so probably it's a documentation issue after all since that class not required.

With the default generated classes should be enough:
- VSOWebControl.java
- VSOWebControlService.java
- VSOWebControlServiceLocator.java
- WebServiceStub.java
- Other classes for vCO types

Thank you for your feedback!

Sergio