Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-11

gSOAP vs ws_helper.exe vs VMware

14 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Joyner ᏩᏯ

I have tried using the ws_helper from the web services toolkit to import the WSDL file relating to vSphere, I end up with a *.pas file that only contains nothing of note beyond initial class registration. :(

I processed the same files with gSOAP and got lots of 'C' code out.

Is there a set process to convert gSOAP output into object files and convert the *.h files into *.pas files that results in usable stuff?

Reply by email

Michael Van Canneyt
to Michael Joyner ᏩᏯ
Michael Joyner ?? wrote
I have tried using the ws_helper from the web services toolkit to import the WSDL file relating to vSphere, I end up with a *.pas file that only contains nothing of note beyond initial class registration. :(

Did you request the other files ? You should end up with 3 files: mywsdl.pas
urn_mywsdl.pas
mywsdl_proxy.pas

The _proxy file contains what you need to communicate with the service.

Michael.

Reply by email

Michael Joyner ᏩᏯ
to Michael Van Canneyt
Michael Van Canneyt wrote 24 lines
On Sun, 22 Nov 2009, Michael Joyner ?? wrote: > I have tried using the ws_helper from the web services toolkit to > import the WSDL file relating to vSphere, I end up with a *.pas file > that only contains nothing of note beyond initial class registration. :( Did you request the other files ? You should end up with 3 files: mywsdl.pas urn_mywsdl.pas mywsdl_proxy.pas The _proxy file contains what you need to communicate with the service. Michael. ------------------------------------------------------------------------ -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Here are the four files:

//==================================================== {
This unit has been produced by ws_helper.
Input unit name : "vimService".
This unit name : "vimService_binder".
Date : "23-11-09 08:01:15".
}
unit vimService_binder;
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}
interface

uses SysUtils, Classes, base_service_intf, server_service_intf, vimService;
type
Implementation
uses TypInfo, wst_resources_imp,metadata_repository;
initialization
  {$i vimService.wst}
  {$IF DECLARED(Register_vimService_ServiceMetadata)}
  Register_vimService_ServiceMetadata();
  {$IFEND}
End.

//================================================================= {
This unit has been produced by ws_helper.
Input unit name : "vimService".
This unit name : "vimService_imp".
Date : "23-11-09 08:01:19".
}
Unit vimService_imp;
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}
Interface

Uses SysUtils, Classes,
     base_service_intf, server_service_intf, server_service_imputils,
vimService;
Type
Implementation
uses config_objects;
End.

//================================================= {
This unit has been produced by ws_helper.
Input unit name : "vimService".
This unit name : "vimService".
Date : "23-11-09 08:01:19".
}
unit vimService;
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}
interface

uses SysUtils, Classes, TypInfo, base_service_intf, service_intf;
const
  sNAME_SPACE = 'urn:vim25Service';
  sUNIT_NAME = 'vimService';
type
  procedure Register_vimService_ServiceMetadata();
Implementation
uses metadata_repository;
procedure Register_vimService_ServiceMetadata();
var
  mm : IModuleMetadataMngr;
begin
  mm := GetModuleMetadataMngr();
  mm.SetRepositoryNameSpace(sUNIT_NAME, sNAME_SPACE);
end;
initialization
End.
//===========================================================

{
This unit has been produced by ws_helper.
Input unit name : "vimService".
This unit name : "vimService_proxy".
Date : "23-11-09 08:01:12".
}

Unit vimService_proxy;
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}
Interface
Uses SysUtils, Classes, TypInfo, base_service_intf, service_intf,
vimService;
Type
Implementation
uses wst_resources_imp, metadata_repository;
initialization
  {$i vimService.wst}
  {$IF DECLARED(Register_vimService_ServiceMetadata)}
  Register_vimService_ServiceMetadata();
  {$IFEND}
End.

Reply by email

Michael Van Canneyt
to Michael Joyner ᏩᏯ
Michael Joyner ?? wrote 26 lines
Michael Van Canneyt wrote: > > > On Sun, 22 Nov 2009, Michael Joyner ?? wrote: > >> I have tried using the ws_helper from the web services toolkit to import >> the WSDL file relating to vSphere, I end up with a *.pas file that only >> contains nothing of note beyond initial class registration. :( > > Did you request the other files ? You should end up with 3 files: > mywsdl.pas > urn_mywsdl.pas > mywsdl_proxy.pas > > The _proxy file contains what you need to communicate with the service. > > Michael. > ------------------------------------------------------------------------ > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > Here are the four files:

Indeed, I forgot the mywsdl_intf file :)

But the proxy file contains what you need:

Var
  MI : MyInterface;
begin
   MI:=MyInterface_Proxy.Create('MyInterface',
                                'SOAP:'+GetServiceDefaultFormatProperties(TypeInfo(MyInterface)),
                                'HTTP:address='+URL) as MyInterface;
   // Now MI can be used to communicate with the webservice
end;

Michael.

Reply by email

Michael Joyner ᏩᏯ
to Michael Van Canneyt
Michael Van Canneyt wrote 57 lines
On Mon, 23 Nov 2009, Michael Joyner ?? wrote: > Michael Van Canneyt wrote: >> >> >> On Sun, 22 Nov 2009, Michael Joyner ?? wrote: >> >>> I have tried using the ws_helper from the web services toolkit to >>> import the WSDL file relating to vSphere, I end up with a *.pas >>> file that only contains nothing of note beyond initial class >>> registration. :( >> >> Did you request the other files ? You should end up with 3 files: >> mywsdl.pas >> urn_mywsdl.pas >> mywsdl_proxy.pas >> >> The _proxy file contains what you need to communicate with the service. >> >> Michael. >> ------------------------------------------------------------------------ >> >> >> -- >> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >> > Here are the four files: Indeed, I forgot the mywsdl_intf file :) But the proxy file contains what you need: Var MI : MyInterface; begin MI:=MyInterface_Proxy.Create('MyInterface', 'SOAP:'+GetServiceDefaultFormatProperties(TypeInfo(MyInterface)), 'HTTP:address='+URL) as MyInterface; // Now MI can be used to communicate with the webservice end; Michael. ------------------------------------------------------------------------ -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Eh? This defines all the 100's of different service calls?

Reply by email

Michael Van Canneyt
to Michael Joyner ᏩᏯ
Michael Joyner ?? wrote 56 lines
Michael Van Canneyt wrote: > > > On Mon, 23 Nov 2009, Michael Joyner ?? wrote: > >> Michael Van Canneyt wrote: >>> >>> >>> On Sun, 22 Nov 2009, Michael Joyner ?? wrote: >>> >>>> I have tried using the ws_helper from the web services toolkit to import >>>> the WSDL file relating to vSphere, I end up with a *.pas file that only >>>> contains nothing of note beyond initial class registration. :( >>> >>> Did you request the other files ? You should end up with 3 files: >>> mywsdl.pas >>> urn_mywsdl.pas >>> mywsdl_proxy.pas >>> >>> The _proxy file contains what you need to communicate with the service. >>> >>> Michael. >>> ------------------------------------------------------------------------ >>> >>> -- >>> _______________________________________________ >>> Lazarus mailing list >>> >>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >>> >> Here are the four files: > > Indeed, I forgot the mywsdl_intf file :) > > But the proxy file contains what you need: > > Var > MI : MyInterface; > > begin > MI:=MyInterface_Proxy.Create('MyInterface', > 'SOAP:'+GetServiceDefaultFormatProperties(TypeInfo(MyInterface)), > 'HTTP:address='+URL) as MyInterface; > // Now MI can be used to communicate with the webservice > end; > > Michael. > ------------------------------------------------------------------------ > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > Eh? This defines all the 100's of different service calls?

It depends how they are organized. I can't comment on that without having seen the WSDL, but:
If it is 1 interface with 100 calls: yes.
if it is 1 service per call, then you'll have to create each service proxy object separately.

Michael.

Reply by email

Michael Joyner
to Inoussa OUEDRAOGO

Yes, after doing the agreement thing and sign up thing of course, here is the link:

"vSphere Web Services SDK"

http://communities.vmware.com/community/developer/forums/managementapi

Thanks.

Inoussa OUEDRAOGO wrote 17 lines
> It depends how they are organized. I can't comment on that without having > seen the WSDL, but: > If it is 1 interface with 100 calls: yes. if it is 1 service per call, then > you'll have to create each service proxy object separately. Indeed. Is the WSDL file publicly available ? -- Inoussa O. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091123/741e11c3/attachment.html>

Reply by email

Michael Joyner
to Inoussa OUEDRAOGO: You are using an old and outdated version of WST, please check out from…

svn checkout in progress.

Inoussa OUEDRAOGO wrote 15 lines
> Here are the four files: You are using an old and outdated version of WST, please check out from https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/wst/trunk -- Inoussa O. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091123/e7703b85/attachment.html>

Reply by email

Michael Joyner
to Michael Joyner

Ah.. it didn't do a whole lot with vimService.wsdl (which includes vim.wsdl), but I told it to process vim.wsdl and it's "Parsing" alot.. went down the hall, got a soda, came back, still parsing... I take this as a hopeful sign.

Michael Joyner wrote 23 lines
svn checkout in progress. On Mon, Nov 23, 2009 at 11:53 AM, Inoussa OUEDRAOGO wrote: > > Here are the four files: > > You are using an old and outdated version of WST, please check out > from > https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/wst/trunk > > > -- > Inoussa O. > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091123/95a478f1/attachment.html>

Reply by email

Michael Joyner
to Michael Joyner

Yeegads, a 3.8 MB "vim.pas" file has resulted.

Michael Joyner wrote 32 lines
Ah.. it didn't do a whole lot with vimService.wsdl (which includes vim.wsdl), but I told it to process vim.wsdl and it's "Parsing" alot.. went down the hall, got a soda, came back, still parsing... I take this as a hopeful sign. On Mon, Nov 23, 2009 at 1:51 PM, Michael Joyner wrote: > svn checkout in progress. > > > On Mon, Nov 23, 2009 at 11:53 AM, Inoussa OUEDRAOGO wrote: > >> > Here are the four files: >> >> You are using an old and outdated version of WST, please check out >> from >> https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/wst/trunk >> >> >> -- >> Inoussa O. >> >> -- >> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >> > >

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091123/a813f8c9/attachment.html>

Reply by email

Inoussa OUEDRAOGO
to Michael Joyner

2009/11/23 Michael Joyner :

Yeegads, a 3.8 MB "vim.pas" file has resulted.

This WSDL file is a fairly complex and lenghty one. You will have to merge "vimService.wsdl" and "vim.wsdl" ( just add the service definition located in vimService.wsdl to vim.wsdl ) to get the service interface and proxy generation. By now ws_helper only supports schema import at XSD level, not at WSDL level; I mean, in a XSD file or a WSDL file you can import some XSD files, not WSDL ones.

The file make use of some Object Pascal keywords (such as "property", "deprecated") and I am now adding them(the keyword) to the parser so they
will get renamed. I will report back.

By the way, WST has a dedicated Google Group at
http://groups.google.com/group/wst-list
Please register there so we can continue the discussion there.

Inoussa O.

Reply by email

Michael Joyner ᏩᏯ
to Inoussa OUEDRAOGO

Thanks a million!

Inoussa OUEDRAOGO wrote 22 lines
2009/11/23 Michael Joyner : > Yeegads, a 3.8 MB "vim.pas" file has resulted. > This WSDL file is a fairly complex and lenghty one. You will have to merge "vimService.wsdl" and "vim.wsdl" ( just add the service definition located in vimService.wsdl to vim.wsdl ) to get the service interface and proxy generation. By now ws_helper only supports schema import at XSD level, not at WSDL level; I mean, in a XSD file or a WSDL file you can import some XSD files, not WSDL ones. The file make use of some Object Pascal keywords (such as "property", "deprecated") and I am now adding them(the keyword) to the parser so they will get renamed. I will report back. By the way, WST has a dedicated Google Group at http://groups.google.com/group/wst-list Please register there so we can continue the discussion there.

Reply by email