Thanks for your answer and explanation. I passed wsse security header
section (as I said before). I think you'd used different way to do that.
Thanks for ideas again.
> hi,
> You can not create soap header for security as follows that you write.
> Because wsse writing is different.
> We can overwrite(rewrite) nativetosoap procedure in TSoapheader and
> problem can be solved.
> Dr.Sait SARI
> Meddata Bilisim.
> "Ýbrahim KAZANCI" <ikaza...@yahoo.com>, iletisinde þunu yazdý,
> news:4881db50@newsgroups.borland.com...
>> Hello,
>> It will be a long message. Because i am confused on many parts of this
>> soap thing. If i pass this stage i have many questions to ask :)
>> I'm trying to use a web service of a newly starting hl7 project in
>> Turkey. (Bad side is that developers are not giving delphi examples,
>> just c# and java.)
>> Service wsdl file in "muayene" directory at
>> http://www.sagliknet.saglik.gov.tr/portal_pages/notlogin/bilisimciler...
>> I want to add some wsse and wsa (is it required?) header into my
>> httprio xml output.
>> I added wsse security tags as described in
>> http://groups.google.com.tr/group/borland.public.delphi.webservices.s...
>> and it solved that part. (i added WSSE.pas which given at above link
>> to uses list.)
>> But wsa section still missing in created xml.
>> 1. Should i create a TSoapHeader class myself which includes Action,
>> replyto parameters to add wsa:Action, wsa:replyto, ... information to
>> soap header.
>> 2. or is there a wsdl file which i should create a pas file from that to
>> get a wsa structure to use.
>> 3. i try to use Headers := GetService(RIO) as ISOAPHeaders; may be it
>> will solve but can't find GetService function in 2006. Is it only in
>> D2007?
>> When i send my xml code at their test site
>> (http://www.sagliknet.saglik.gov.tr:7750/USBSTest/pages/testHL7WS.jsp)
>> (with selecting not added ["eklemedim" in Turkish] radiobutton for
>> soap envelope format) it's returning some xml code back.
>> But if i select "added" ["ekledim" in Turkish] radiobutton for soap
>> env. format i get a "The endpoint reference (EPR) for the Operation
>> not found is
>> http://TestAppSrv1.esaglik.gov.tr:7750/Muayene/services/MCCI_AR000001...
>> and the WSA Action =" error for same xml file.
>> I think my soapheader has some mistakes.
>> i used following delphi code to create and send header. Is there
>> someone to tell me what's wrong or missing in the code.
>> Regards,
>> Ýbrahim KAZANCI
>> (frmMain.HnetMuayene : HTTPRIO Component...)
>> ---------------------------------------
>> var
>> netMuayene: MCCI_IN000001TR01;
>> netMuayeneServis: MCCI_AR000001TR_PortType;
>> netMuayeneAnswer: MCCI_IN000002TR01;
>> Hdr: Security;
>> Headers: ISOAPHeaders;
>> HeadersT: TSOAPHeader;
>> begin
>> Hdr := Security.Create;
>> try
>> Hdr.MustUnderstand := False;
>> Hdr.Timestamp := TimeStamp.Create;
>> Hdr.Timestamp.Id :=
>> 'Timestamp-af6fe54b-7723-41f9-8f27-c1b3fecc5ff5'; // should i send
>> this id or will it be created automatically
>> 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'; // should i
>> send this id
>> Hdr.UsernameToken.Username := 'xxxx';
>> Hdr.UsernameToken.Password := Password.Create;
>> Hdr.UsernameToken.Password.Type_ :=
>> 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-toke...
>> Hdr.UsernameToken.Password.Text := 'yyyy';
>> Hdr.UsernameToken.Created := Created.Create;
>> Hdr.UsernameToken.Created.XSToNative('2008-07-16T14:04:08Z');
>> finally
>> // Hdr.Free;
>> end;
>> frmMain.HnetMuayene.Port := '6246';
>> frmMain.HnetMuayene.HTTPWebNode.UseUTF8InHeader := true;
>> netMuayene := MCCI_IN000001TR01.Create;
>> netMuayene.id := id42.Create;
>> netMuayene.id.root := '2.16.840.1.113883.3.129.2.1.2';
>> netMuayene.id.extension := '5T2504E0-4F89-11D3-9A0C-0305E82C330';
>> netMuayene.receiver := MCCI_IN000001TR01_Receiver.Create;
>> netMuayene.receiver.typeCode := RCV;
>> netMuayene.receiver.device := MCCI_IN000001TR01_Device2.Create;
>> netMuayene.receiver.device.classCode := 'DEV';
>> netMuayene.receiver.device.determinerCode := 'INSTANCE';
>> netMuayene.receiver.device.id := id41.Create;
>> netMuayene.receiver.device.id.root := '2.16.840.1.113883.3.129.1.1.5';
>> netMuayene.receiver.device.id.extension := 'USBS';
>> ....
>> ....
>> netMuayeneServis := GetMCCI_AR000001TR_PortType(false, '',
>> frmMain.HnetMuayene);
>> // not working "unknown identifier" error about getservice.
>> // Headers := GetService(frmMain.HnetMuayene) as ISOAPHeaders;
>> Headers := netMuayeneServis as ISoapHeaders;
>> Headers.OwnsSentHeaders := True;
>> // HeadersT := TSoapHeader.Create;
>> // HeadersT.MustUnderstand := False;
>> // expecting parameter as TSOAPHeader, so not working as ISOAPHeaders
>> // (netMuayeneServis as ISOAPHeaders).send(Headers);
>> // doesn't change anything
>> // (netMuayeneServis as ISOAPHeaders).send(HeadersT);
>> // i dont know if it means anything
>> // Headers.Send(HeadersT);
>> Headers.Send(hdr);
>> // doesn't change anything also
>> // frmMain.HnetMuayene.SOAPHeaders.Send(hdr);
>> frmMain.HnetMuayene.SOAPHeaders.SetOwnsSentHeaders(True);
>> netMuayeneAnswer := MCCI_IN000002TR01.Create;
>> try
>> netMuayeneAnswer :=
>> netMuayeneServis.MCCI_AR000001TR_MCCI_IN000001TR(netMuayene);
>> except
>> end;
>> my xml/soap file output:
>> ----------------------------
>> <?xml version="1.0"?>
>> <SOAP-ENV:Envelope
>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>> <SOAP-ENV:Header>
>> <Security
>> xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-se...">
>> <Timestamp
>> xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-ut..."
>> Id="Timestamp-af6fe54b-7723-41f9-8f27-c1b3fecc5ff5">
>> <Created>2008-07-19T14:33:53.153+03:00</Created>
>> <Expires>2008-07-19T14:33:53.153+03:00</Expires>
>> </Timestamp>
>> <UsernameToken Id="SecurityToken-15a785ac-fc7c-4784-94f7-7f79387fa2f1">
>> <Username>xxxx</Username>
>> <Password
>> Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-toke...">yyyy</Password>
>> <Nonce>
>> </Nonce>
>> <Created
>> xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-ut...">2008-07-16T14:04:08Z</Created>
>> </UsernameToken>
>> </Security>
>> </SOAP-ENV:Header>
>> <SOAP-ENV:Body>
>> <MCCI_IN000001TR01 xmlns="urn:hl7-org:v3">
>> <id nullFlavor="" root="2.16.840.1.113883.3.129.2.1.2"
>> extension="5T2504E0-4F89-11D3-9A0C-0305E82C330"
>> assigningAuthorityName="" displayable="false" />
>> <creationTime xsi:nil="true" />
>> <responseModeCode xsi:nil="true" />
>> <interactionId xsi:nil="true" />
>> <processingCode xsi:nil="true" />
>> <processingModeCode xsi:nil="true" />
>> <acceptAckCode xsi:nil="true" />
>> <receiver typeCode="RCV">
>> <device classCode="DEV" determinerCode="INSTANCE">
>> <id nullFlavor="" root="2.16.840.1.113883.3.129.1.1.5"
>> extension="USBS" assigningAuthorityName="" displayable="false" />
>> </device>
>> </receiver>
>> <sender xsi:nil="true" />
>> <controlActEvent xsi:nil="true" />
>> </MCCI_IN000001TR01>
>> </SOAP-ENV:Body>
>> </SOAP-ENV:Envelope>
>> Web Service user guide indicate that wsse part has to be in this format:
>> ----------------------------------------------
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:wsse="
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-se..."...>
>> ...
>> <wsse:Security soap:mustUnderstand="0">
>> ...
>> <wsse:UsernameToken>
>> <wsse:Username>denemeKullaniciAdi</wsse:Username>
>> <wsse:Password>denemeKullaniciSifresi</wsse:Password>
>> <wsse:UsernameToken>
>> ...
>> </ wsse:Security>
>> ...
>> </soap:Envelope>
>> and their soap template example in their site
>> (http://www.sagliknet.saglik.gov.tr/portal_pages/notlogin/bilisimciler...)
>> -----------------------
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
>> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-se..."
>> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-ut..."
>> xsi:schemaLocation="urn:hl7-org:v3
>> C:\DOCUME~1\erdinc.sabur\Desktop\msvs_semalari\Muayene\MCCI_IN000001TR01.xs d">
>> <soap:Header>
>> <wsse:Security>
>> <wsu:Timestamp wsu:Id="Timestamp-5fd6873f-ede3-47da-938f-413bc55408b5">
>> <wsu:Created>2008-05-27T09:30:00Z</wsu:Created>
>> <wsu:Expires>2008-05-27T09:35:00Z</wsu:Expires>
>> </wsu:Timestamp>
>> <wsse:UsernameToken
...