델파이가 생성해준 인터페이스내 함수에
RIO.HTTPWebNode.UseUTF8InHeader := True;
를 추가해주니 별다른 변환없이 제대로 메세지가 전달되는군요
ServiceSMSSoap = interface(IInvokable)
...
...
function GetServiceSMSSoap(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): ServiceSMSSoap;
const
defWSDL = ' http://webservice.youiwe.co.kr/SMS.v.5/ServiceSMS.asmx?WSDL';
defURL = ' http://webservice.youiwe.co.kr/SMS.v.5/ServiceSMS.asmx';
defSvc = 'ServiceSMS';
defPrt = 'ServiceSMSSoap';
var
RIO: THTTPRIO;
begin
Result := nil;
if (Addr = '') then
begin
if UseWSDL then
Addr := defWSDL
else
Addr := defURL;
end;
if HTTPRIO = nil then begin
RIO := THTTPRIO.Create(nil);
RIO.HTTPWebNode.UseUTF8InHeader := True;
end
else
RIO := HTTPRIO;
try
Result := (RIO as ServiceSMSSoap);
if UseWSDL then
begin
RIO.WSDLLocation := Addr;
RIO.Service := defSvc;
RIO.Port := defPrt;
end else
RIO.URL := Addr;
finally
if (Result = nil) and (HTTPRIO = nil) then
RIO.Free;
end;
end;
|