Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Integrate TWebModule for soap into IW14. THttpRequest vs TWebRequest


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Mar 26, 2016 8:37 AM Last Post By: Jeroen Rottink
Jeroen Rottink

Posts: 16
Registered: 1/31/00
Integrate TWebModule for soap into IW14. THttpRequest vs TWebRequest  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 25, 2016 4:12 AM
We are migrating an IW10 / D2007 application towards IW14 / D10Seattle. The application is deployed as a standalone IW windows service. Besides acting as a html-producing webserver for browsers it also delivers a SOAP webservice. In IW10 I used ArcIWWebModuleBridge for this, but that doesn't seem supported for IW14. Instead I could use a custom contenthandler. I should call the (WebModule as IWebRequestHandler).HandleRequest() method and provide a TWebRequest and TWebResponse object.
How can I translate between these classes and the iw classes THttpRequest and THttpReply?

Is this the way to go to integrate a SOAP TWebModule in IW14?

Regards,
Jeroen Röttink
Daniel Fields

Posts: 622
Registered: 11/29/04
Re: Integrate TWebModule for soap into IW14. THttpRequest vs TWebRequest  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 25, 2016 4:22 PM   in response to: Jeroen Rottink in response to: Jeroen Rottink
I do not think you can mix those technologies. The WebModule contains additional controls to handle web requests. Intraweb has that built into it already. A WebModule is a DataModule descendant with a TWebDispatcher built into it. That is where I see overlap and potential conflict.

It really comes down to your architecture. If you have code hardwired into the WebModule, you should move it out into its own class. That would reduce the amount of code in the WebModule, and allow you to use the same class in ContentHandlers.

I have not used the WebBroker technology, but from what I understand there would be tremendous overlap with IW. If you are abandoning that platform, I would start fresh in IW and port the code over, by hand, into ContentHandlers. If you plan to support IW and WebBroker, I would create a class for all of the functionality that exists in the WebModule, then build a new projects for each platform (IW & WebBroker).
Jeroen Rottink

Posts: 16
Registered: 1/31/00
Re: Integrate TWebModule for soap into IW14. THttpRequest vs TWebRequest  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 26, 2016 8:37 AM   in response to: Daniel Fields in response to: Daniel Fields
Hi Daniel,

It works very well for IW10 so I think it should also for IW14. In IW10 I would hand over the http request (TWebRequest) to the webmodule and get a http response (TWebResponse) back.

The only issue is AtoZed choose to create new classes to handle http request and response instead of using the webbroker/delphi classes. Reasons are described here http://www.atozed.com/intraweb/blog/20111120A.EN.aspx. The classes are later on renamed to THttpRequest and THttpReply.

The TWebModule with its soap classes dispatch a http request to the appropriate delphi method following the soap definition. I don't want to and can't write that on my own.

I will be using the IW contenthandlers but would like to hand over the http request to the soap webmodule if it's a soap request.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02