Hi, after yesterdays improvement most topic are clear for me.
We habe an AppServer for internal interfaces using TCP, which is working well now. Furthermore the same AppServer is using another WebService (using ROIndyHTTPServer). In the interface is a “Monitor”-function, which gets a HTML-page. Unfortunatly this interface is not usable in my WebBrowser (e.g. Firefox);instead the WSDL is shown instead (I’ve unchecked the “ServeRodl” already).
can you check that another WebService (using ROIndyHTTPServer) has TROPostMessage as dispatcher? if WSDL is shown it indicates that SOAP message is used…
I’ve tried the MegaDemo, and it’s the same -->
when I open the Browser (Firefox) without function, I get the WDSL. If I try a function (e.g. GetServerTime), I get “Invalid Path” like in my project
And in our project, we mask (envelop) the messages in ROPostMessageReadFromStream; I think, that sure also work. But I’ll get only “Invalid Path” when I try the Monitor-function. (I’ve tried your solition, but the result is the same …)
ROSDK supports only POST method instead of GET by default. however you can change this behavior with OnCustomResponseEvent.
update MegaDemoServerMain.pas as
procedure TMegaDemoServerMainForm.ROServerCustomResponseEvent(
const aTransport: IROHTTPTransport; const aRequestStream,
aResponseStream: TStream; const aResponse: IROHTTPResponse;
var aHandled: Boolean);
var
lMessage: IROMessage;
op: TROResponseOptions;
s: ansistring;
begin
if pos('/xxxx',aTransport.PathInfo) = 1 then begin // "xxxx" shouldn't be defined in Server.Dispathers
s := aTransport.QueryString;
aRequestStream.Size := 0;
aRequestStream.Write(Pointer(s)^, Length(s));
lMessage:= (ROPOSTMessage as IROMessageCloneable).Clone;
MainProcessMessage(lMessage,atransport,aRequestStream,aResponseStream,op);
aHandled := True;
end;
end;
note: this update requires another changes from my earlier post.