Using D2007 with last updates. I've some problems with wsdl importer. I've
read the thread of bora aydemir and i got same problems. I ve found
v12.0.2819.32279 of wsdl importer. It can finish the import, but the
imported files are not right.
It converts some variables to TXMLData with warnings and it has some
namespacace problems.
This is a HL7 project all around in Turkey. And all software firms started
to use vs .net or java.
Couse delphi does not work well. Need your help. Couse i dont want to use
vs.
you can download one of the schemas from this address
http://212.174.116.187/wsdl/msvs_semalari.zip
This is the screen log of importer.
------------------------------------------------
Borland WSDLIMP Version 2.3 - $Rev: 12980 $
Copyright (c) 2008 Borland Software Corporation
Reading: MCCI_AR000001TR01.wsdl
Import : MCCI_AR000001TR01.wsdl>0
Import :
D:\Downloads\USVS\msvs_semalari\Vatandas_Yabanci_Kayit\MCCI_IN000001TR0
1.xsd
Import : D:\Downloads\USVS\msvs_semalari\coreschemas\infrastructureRoot.xsd
Import : D:\Downloads\USVS\msvs_semalari\coreschemas\datatypes.xsd
Import : D:\Downloads\USVS\msvs_semalari\coreschemas\datatypes-base.xsd
Import : D:\Downloads\USVS\msvs_semalari\coreschemas\voc.xsd
(Skip) : D:\Downloads\USVS\msvs_semalari\coreschemas\datatypes.xsd
(Skip) : D:\Downloads\USVS\msvs_semalari\coreschemas\voc.xsd
Import :
D:\Downloads\USVS\msvs_semalari\Vatandas_Yabanci_Kayit\POCD_MT000001TR0
1.xsd
(Skip) : D:\Downloads\USVS\msvs_semalari\coreschemas\infrastructureRoot.xsd
Import : D:\Downloads\USVS\msvs_semalari\coreschemas\NarrativeBlock.xsd
Import : D:\Downloads\USVS\msvs_semalari\coreschemas\USBSVoc.xsd
(Skip) : D:\Downloads\USVS\msvs_semalari\coreschemas\datatypes.xsd
Import :
D:\Downloads\USVS\msvs_semalari\Vatandas_Yabanci_Kayit\MCCI_IN000002TR0
1.xsd
(Skip) : D:\Downloads\USVS\msvs_semalari\coreschemas\infrastructureRoot.xsd
Import :
D:\Downloads\USVS\msvs_semalari\Vatandas_Yabanci_Kayit\MCCI_IN000003TR0
1.xsd
(Skip) : D:\Downloads\USVS\msvs_semalari\coreschemas\infrastructureRoot.xsd
Import :
D:\Downloads\USVS\msvs_semalari\Vatandas_Yabanci_Kayit\POCD_MT000201TR0
1.xsd
(Skip) : D:\Downloads\USVS\msvs_semalari\coreschemas\infrastructureRoot.xsd
(Skip) : D:\Downloads\USVS\msvs_semalari\coreschemas\NarrativeBlock.xsd
(Skip) : D:\Downloads\USVS\msvs_semalari\coreschemas\USBSVoc.xsd
Import :
D:\Downloads\USVS\msvs_semalari\Vatandas_Yabanci_Kayit\QUQI_IN000001TR0
1.xsd
(Skip) : D:\Downloads\USVS\msvs_semalari\coreschemas\infrastructureRoot.xsd
Import :
D:\Downloads\USVS\msvs_semalari\Vatandas_Yabanci_Kayit\QUQI_IN000002TR0
1.xsd
(Skip) : D:\Downloads\USVS\msvs_semalari\coreschemas\infrastructureRoot.xsd
Writing: C:\VETA\HL7\MCCI_AR000001TR01.pas
did you manually change unit and object names genreated by the importer
for different msvs's? Is there too much other manual changes in the
units generated?
bora aydemir
sait sari yazmış:
i've changed unit names while generating code with WSDLImport on command
prompt. Changed same named MCCI_AR000001TR01.wsdl in different
directories like netMuayene.pas, netYatanHasta.pas,
netHastaOzlukBilgileri...
(Why they used this meaningless naming system is what i dont understand.)
if id42 is different class for netMuayene and netHastaYatis i think use
that format will be usefull:
id := netMuayene.id42.Create;
or
id := netHastaYatis.id42.Create;
What method you are planning to use?
Am i talk about same thing with you?
Bora Aydemir yazmış:
"İbrahim KAZANCI" <ikaz...@yahoo.com> wrote in message
news:4880...@newsgroups.borland.com...
"Eray HANOGLU" <era...@gmx.net> wrote in message
news:488d799c$1...@newsgroups.borland.com...
First of all you can check this two link...
http://groups.google.com.tr/group/borland.public.delphi.webservices.soap/browse_thread/thread/a3da12c5a91cbc6e/759f2c9b965d3375
http://groups.google.com.tr/group/borland.public.delphi.webservices.soap/browse_thread/thread/8d7e0fb2566d2221
I added wsse.pas which Jean-Marie Babet send earlier in group to the
uses list. You must create this wsse.pas with the code i send at the end
of message.
Then add following delphi code into your project.
Please let me know if it works for you or not. Now i'm trying to create
"muayene" message format.
ibrahim KAZANCI
ikazanci ( @ ) ya (h) oo ( dot ) com
-------------------------
delphi code to create wsse soap header:
HnetMuayene represent a HTTPRIO component in the code.
-------------------------
uses
// ...,
WSSE;
// ...
// ...
procedure TfrmLProtokol.sbtnsagliknetClick(Sender: TObject);
var
WSnetMuayene: MCCI_IN000001TR01;
netMuayeneServis: MCCI_AR000001TR_PortType;
netMuayeneCevap: MCCI_IN000002TR01;
Hdr: Security;
Headers: ISOAPHeaders;
begin
Hdr := Security.Create;
try
Hdr.MustUnderstand := False;
Hdr.Timestamp := TimeStamp.Create;
Hdr.Timestamp.Id := 'Timestamp-af6fe54b-7723-41f9-8f27-c1b3fecc5ff5';
Hdr.Timestamp.Created := Created.Create;
Hdr.Timestamp.Created.AsDateTime := Now;
Hdr.Timestamp.Expires := Expires.Create;
Hdr.Timestamp.Expires.AsDateTime := Now;
Hdr.UsernameToken := UsernameToken.Create;
Hdr.UsernameToken.Id :=
'SecurityToken-15a785ac-fc7c-4784-94f7-7f79387fa2f1';
Hdr.UsernameToken.Username := '25510547852';
Hdr.UsernameToken.Password := Password.Create;
Hdr.UsernameToken.Password.Type_ :=
'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText';
Hdr.UsernameToken.Password.Text := '25510547852';
Hdr.UsernameToken.Created := Created.Create;
Hdr.UsernameToken.Created.XSToNative('2008-07-16T14:04:08Z');
finally
// Hdr.Free;
end;
frmMain.HnetMuayene.HTTPWebNode.UseUTF8InHeader := true;
WSnetMuayene := MCCI_IN000001TR01.Create;
WSnetMuayene.id := id42.Create;
WSnetMuayene.id.root := '2.16.840.1.113883.3.129.2.1.2';
// add required data to send to the web service
Headers := netMuayeneServis as ISoapHeaders;
Headers.OwnsSentHeaders := True;
Headers.Send(hdr);
frmMain.HnetMuayene.SOAPHeaders.SetOwnsSentHeaders(True);
netMuayeneCevap := MCCI_IN000002TR01.Create;
try
netMuayeneCevap :=
netMuayeneServis.MCCI_AR000001TR_MCCI_IN000001TR(WSnetMuayene);
except
end;
end;
-------------------------------
wsse.pas unit:
-------------------------------
unit WSSE;
interface
uses SysUtils, InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;
const
IS_OPTN=$0001;
IS_ATTR=$0010;
IS_TEXT=$0020;
IS_REF =$0080;
type
tTimestampFault=(wsu_MessageExpired);
Id = type WideString;
Nonce = type WideString;
Created=class(TXSDateTime)
end;
Expires=class(TXSDateTime)
end;
Timestamp=class(TRemotable)
private
FCreated:Created;
FExpires:Expires;
FId: Id;
public
destructor Destroy; override;
published
property Created:Created Index (IS_OPTN) read FCreated write FCreated;
property Expires:Expires Index (IS_OPTN) read FExpires write FExpires;
property Id:Id Index (IS_ATTR) read FId write FId;
end;
AttributedString=class(TRemotable)
private
FText:WideString;
FId:Id;
FId_Specified:boolean;
procedure SetId(Index:Integer; const AId:Id);
function Id_Specified(Index:Integer):boolean;
published
property Text:WideString Index (IS_TEXT) read FText write FText;
property Id:Id Index (IS_ATTR or IS_OPTN) read FId write SetId stored
Id_Specified;
end;
Password=class(AttributedString)
private
FType_:WideString;
FType__Specified:boolean;
procedure SetType_(Index:Integer; const AWideString:WideString);
function Type__Specified(Index:Integer):boolean;
published
property Type_:WideString Index (IS_ATTR or IS_OPTN) read FType_ write
SetType_ stored Type__Specified;
end;
UsernameToken=class(TRemotable)
private
FUserName:string;
FCreated:Created;
FPassword:Password;
FNonce: Nonce;
FId: Id;
public
destructor Destroy; override;
published
property Username:String read FUsername write FUsername;
property Password:Password read FPassword write FPassword;
property Nonce: Nonce read FNonce write FNonce;
property Created:Created index (IS_REF) read FCreated write FCreated;
property Id:Id Index (IS_ATTR) read FId write FId;
end;
Security=class(TSOAPHeader)
private
FTimestamp:Timestamp;
FUserNameToken:UserNameToken;
public
destructor Destroy; override;
published
property Timestamp:TimeStamp index (IS_REF) read FTimestamp write
FTimestamp;
property UsernameToken:UsernameToken index (IS_REF) read FUserNameToken
write FUserNameToken;
end;
implementation
destructor Timestamp.Destroy;
begin
FreeAndNIL(FCreated);
FreeAndNIL(FExpires);
inherited Destroy;
end;
destructor UsernameToken.Destroy;
begin
FreeAndNil(FPassword);
inherited Destroy;
end;
procedure AttributedString.SetId(Index:Integer; const AId:Id);
begin
FId:=AId;
FId_Specified:=True;
end;
function AttributedString.Id_Specified(Index:Integer):boolean;
begin
Result:=FId_Specified;
end;
procedure Password.SetType_(Index:Integer; const AWideString:WideString);
begin
FType_:=AWideString;
FType__Specified:=True;
end;
function Password.Type__Specified(Index:Integer):boolean;
begin
Result:=FType__Specified;
end;
destructor Security.Destroy;
begin
FreeAndNIL(FTimestamp);
FreeAndNIL(FUserNameToken);
inherited Destroy;
end;
const
NS_SECEXT='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';
NS_UTILITY='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd';
initialization
RemClassRegistry.RegisterXSClass(Security, NS_SECEXT, 'Security');
RemClassRegistry.RegisterXSClass(Timestamp, NS_UTILITY, 'Timestamp');
RemClassRegistry.RegisterXSClass(Created, NS_UTILITY, 'Created');
RemClassRegistry.RegisterXSClass(Expires, NS_UTILITY, 'Expires');
RemClassRegistry.RegisterXSClass(UsernameToken, NS_SECEXT,
'UsernameToken');
RemClassRegistry.RegisterXSClass(Password, NS_SECEXT, 'Password');
RemClassRegistry.RegisterXSInfo(TypeInfo(Nonce), NS_SECEXT, 'Nonce');
RemClassRegistry.RegisterXSInfo(TypeInfo(tTimestampFault), NS_UTILITY,
'tTimestampFault');
RemClassRegistry.RegisterExternalPropName(TypeInfo(tTimestampFault),
'wsu_MessageExpired', 'wsu:MessageExpired');
RemClassRegistry.RegisterXSInfo(TypeInfo(Id), NS_UTILITY, 'Id');
RemClassRegistry.RegisterXSClass(AttributedString, NS_SECEXT,
'AttributedString');
RemClassRegistry.RegisterExternalPropName(TypeInfo(Password), 'Type_',
'Type');
end.
Eray HANOGLU yazmış:
> What about wsse security? how did you add wsse security to header?
>
>
> "Ýbrahim KAZANCI" <ikaz...@yahoo.com> wrote in message
> news:4880...@newsgroups.borland.com...
> Hello,
>
> i've changed unit names while generating code with WSDLImport on command
> prompt. Changed same named MCCI_AR000001TR01.wsdl in different
> directories like netMuayene.pas, netYatanHasta.pas,
> netHastaOzlukBilgileri...
>
> (Why they used this meaningless naming system is what i dont understand.)
>
> if id42 is different class for netMuayene and netHastaYatis i think use
> that format will be usefull:
>
> id := netMuayene.id42.Create;
> or
> id := netHastaYatis.id42.Create;
>
>
> What method you are planning to use?
>
> Am i talk about same thing with you?
>
>
>
>
>
> Bora Aydemir yazmýþ:
>> hi
>>
>> did you manually change unit and object names genreated by the importer
>> for different msvs's? Is there too much other manual changes in the
>> units generated?
>>
>> bora aydemir
>>
>> sait sari yazmýþ:
>>> hi
>>> you can convert TXMLData to widestring.
>>> There ise no problem.
>>> hl7 namespace is not necessary.
>>> it is working well...
>>> only problem repeting code,timestamp,etc. but if you want, correct
>>> manually(it takes times)
>>> Dr.Sait SARI
>>> meddata bilisim.
>>> "Eray HANOGLU" <era...@gmx.net>, iletisinde þunu yazdý,
>>> news:487c68ab$1...@newsgroups.borland.com...
>
>
happy to see you done it.
ibrahim KAZANCI
Eray HANOGLU yazmış:
> Ignore the last post. I've done it!
>
>
>
> "Eray HANOGLU" <era...@gmx.net> wrote in message
> news:488d799c$1...@newsgroups.borland.com...
> What about wsse security? how did you add wsse security to header?
>
>
> "Y'brahim KAZANCI" <ikaz...@yahoo.com> wrote in message
> news:4880...@newsgroups.borland.com...
> Hello,
>
> i've changed unit names while generating code with WSDLImport on command
> prompt. Changed same named MCCI_AR000001TR01.wsdl in different
> directories like netMuayene.pas, netYatanHasta.pas,
> netHastaOzlukBilgileri...
>
> (Why they used this meaningless naming system is what i dont understand.)
>
> if id42 is different class for netMuayene and netHastaYatis i think use
> that format will be usefull:
>
> id := netMuayene.id42.Create;
> or
> id := netHastaYatis.id42.Create;
>
>
> What method you are planning to use?
>
> Am i talk about same thing with you?
>
>
>
>
>
> Bora Aydemir yazmy'?:
>> hi
>>
>> did you manually change unit and object names genreated by the importer
>> for different msvs's? Is there too much other manual changes in the
>> units generated?
>>
>> bora aydemir
>>
>> sait sari yazmy'?:
>>> hi
>>> you can convert TXMLData to widestring.
>>> There ise no problem.
>>> hl7 namespace is not necessary.
>>> it is working well...
>>> only problem repeting code,timestamp,etc. but if you want, correct
>>> manually(it takes times)
>>> Dr.Sait SARI
>>> meddata bilisim.
>>> "Eray HANOGLU" <era...@gmx.net>, iletisinde ?unu yazdy',
>>> news:487c68ab$1...@newsgroups.borland.com...
>
>
>