首页 > delphi > Delphi7中使用webservices(SOAP) + Apache2.2X

Delphi7中使用webservices(SOAP) + Apache2.2X

2008年4月24日 发表评论 阅读评论

Help to development a Web Services that run unter Apache 2.2.3 using D7
All posts: borland.public.delphi.webservices.soap
Source: borland.public.delphi.webservices.soap
>Apply the Dr Bob « unofficial fix » (see
>http://www.drbob42.com/delphi7/Apache2040.htm)
>
>and modify :
>
>MODULE_MAGIC_COOKIE = $041503232; (* “AP22” *)
>MODULE_MAGIC_NUMBER_MAJOR = 20051115; { Apache 2.2.x}
>MODULE_MAGIC_NUMBER_MINOR = 0;
>LibAPR = ‘libapr-1.dll’; {do not localize}
Re: Help to development a Web Services that run unter Apache 2.2.3 using D7
Sent date: 01/30/2007
From: David M <(email address - cut out)>
Message:

There a few other changes as well – the following Beyond Compare diff
report should help get people up to speed who are thinking about
moving their Apache modules to the 2.2.x release.

Note this is for Apache 2.2.3 – and HAS NOT YET BEEN TESTED in
production code. Use at your own risk – but feedback welcome.
Changes for Apache 2.2.4 will involve changing the minor version
number to 4.

Cheers

D

##########################

— C:\TEMP\new5\trunk\HTTPD2.pas 2007-01-30 17:17:14.000000000
+-1300
+++ C:\TEMP\new5\trunk\HTTPD22.pas 2007-01-30 17:04:26.000000000
+-1300
@@ -86,13 +86,17 @@
uses Libc;
{$ENDIF}

const
{$IFDEF MSWINDOWS}
LibHTTPD = ‘libhttpd.dll’; {do not localize}
– LibAPR = ‘libapr.dll’; {do not localize}
+ // version 2.0
+ //LibAPR = ‘libapr.dll’; {do not localize}
+ // version 2.2
+ LibAPR = ‘libapr-1.dll’; {do not localize}
+
{$A8}
{$ENDIF}

{$IFDEF LINUX}
{ By using a blank string, we will not require httpd to be built
with
a shared core on Linux. If you wish to build with a shared core,
@@ -226,20 +230,32 @@
{$HPPEMIT ‘#include ‘}
(*
* @file http_config.h
* @brief Apache Configuration
*)
const
– MODULE_MAGIC_COOKIE = $041503230; (* “AP20” *)
+ // AP20
+ //MODULE_MAGIC_COOKIE = $041503230; (* “AP20” *)
+ // AP22
+ MODULE_MAGIC_COOKIE = $41503232; (* “AP22” *)
{$EXTERNALSYM MODULE_MAGIC_COOKIE}
– MODULE_MAGIC_NUMBER_MAJOR = 20020612;
+// MODULE_MAGIC_NUMBER_MAJOR = 20020612;
+ // http://www.drbob42.com/delphi7/apache2040.htm
+ // For Apache 2.0.51 up to 2.0.54, change the following constants:
+// MODULE_MAGIC_NUMBER_MAJOR = 20020903; { Apache 2.0.51..54 }
+
+ // For Apache 2.2.3 change the following constants:
+ MODULE_MAGIC_NUMBER_MAJOR = 20051115; { Apache 2.2.x }
{$EXTERNALSYM MODULE_MAGIC_NUMBER_MAJOR}
– MODULE_MAGIC_NUMBER_MINOR = 1; (* 0…n *)
+// MODULE_MAGIC_NUMBER_MINOR = 1; (* 0…n *)
+// MODULE_MAGIC_NUMBER_MINOR = 9;
+ MODULE_MAGIC_NUMBER_MINOR = 0;//3;
{$EXTERNALSYM MODULE_MAGIC_NUMBER_MINOR}
MODULE_MAGIC_NUMBER = MODULE_MAGIC_NUMBER_MAJOR; (* backward compat
*)
{$EXTERNALSYM MODULE_MAGIC_NUMBER}
+

(* Hook orderings *)
(** run this hook first, before ANYTHING *)
APR_HOOK_REALLY_FIRST = -10;
{$EXTERNALSYM APR_HOOK_REALLY_FIRST}
@@ -284,13 +300,14 @@
FLAG, (*< One of 'On' or 'Off' *) NO_ARGS, (*< No args at all, e.g.
*)
TAKE12, (*< one or two arguments *) TAKE3, (*< three arguments only *) TAKE23, (*< two or three arguments *) TAKE123, (*< one, two or three arguments *) - TAKE13 (*< one or three arguments *) + TAKE13, (*< one or three arguments *) + TAKE_ARGV (**< an argc and argv are passed *) ); {$EXTERNALSYM cmd_how} (* * This structure is passed to a command which is being invoked, * to carry a large variety of miscellaneous data which is all of * use to *somebody*... @@ -714,13 +731,67 @@ {$EXTERNALSYM apr_sockaddr_t}
Papr_bucket_alloc_t = ^apr_bucket_alloc_t;
apr_bucket_alloc_t = {$IFDEF LINUX}packed{$ENDIF} record end;
{$EXTERNALSYM apr_bucket_alloc_t}

-(** Structure to store things which are per connection *)
+ (** Enumeration of connection states *)
+ conn_state_e = (CONN_STATE_CHECK_REQUEST_LINE_READABLE,
+ CONN_STATE_READ_REQUEST_LINE,
+ CONN_STATE_LINGER);
+
+
+ (** Used in apr_pollfd_t to determine what the apr_descriptor is *)
+ apr_datatype_e = (
+ APR_NO_DESC, //**< nothing here */ + APR_POLL_SOCKET, //**< descriptor refers to a socket */ + APR_POLL_FILE, //**< descriptor refers to a file */ + APR_POLL_LASTDESC); //**< descriptor is the last one in the list */ + + (** Union of either an APR file or socket. *) + apr_descriptor = {$IFDEF LINUX}packed{$ENDIF} record + case Byte of + 0: (f: Papr_file_t); + 1: (s: Papr_socket_t); + end; + + (** Poll descriptor set. *) + apr_pollfd_t = {$IFDEF LINUX}packed{$ENDIF} record + p: Papr_pool_t; (*< associated pool *) + desc_type: apr_datatype_e; (*< descriptor type *) + reqevents: SmallInt; (*< requested events *) + rtnevents: SmallInt; (*< returned events *) + desc: apr_descriptor; (*< @see apr_descriptor *) + client_data: Pointer; (*< allows app to associate context *) + end; + + (** A structure to contain connection state information *) + Pconn_state_t = ^conn_state_t; + conn_state_t = {$IFDEF LINUX}packed{$ENDIF} record + (** APR_RING of expiration timeouts *) + timeout_list: record + next: Pconn_state_t; + prev: Pconn_state_t; + end; + (** the expiration time of the next keepalive timeout *) + expiration_time: apr_time_t; + (** Current state of the connection *) + state: conn_state_e; + (** connection record this struct refers to *) + c: Pconn_rec; + (** memory pool to allocate from *) + p: Papr_pool_t; + (** bucket allocator *) + bucket_alloc: Papr_bucket_alloc_t; + (** poll file decriptor information *) + pfd: Pointer;//apr_pollfd_t; + end; + {$EXTERNALSYM conn_state_t} + + ap_conn_keepalive_e = (AP_CONN_UNKNOWN, AP_CONN_CLOSE, AP_CONN_KEEPALIVE); + (** Structure to store things which are per connection *) conn_rec = {$IFDEF LINUX}packed{$ENDIF} record (** Pool associated with this connection *) pool: Papr_pool_t; (** Physical vhost this conn came in on *) base_server: Pserver_rec; (** used by http_vhost.c *) @@ -739,25 +810,28 @@ * get_remote_host() *) remote_host: PChar; (** Only ever set if doing rfc1413 lookups. N.B. Only access this through * get_remote_logname() *) remote_logname: PChar;
– (** Are we still talking? *)
– flags: Cardinal;
+ (** Are we still talking? *)
+ flags1: Cardinal;
{ The following are in the flags bitset:
– unsigned aborted:1;
+ unsigned aborted:1; }

(** Are we going to keep the connection alive for another
request?
– * -1 fatal error, 0 undecided, 1 yes *)
– signed int keepalive:2;
+ * @see ap_conn_keepalive_e *)
+ keepalive: ap_conn_keepalive_e;

+ flags2: Cardinal;
+ { The following are in the flags bitset:
(** have we done double-reverse DNS? -1 yes/failure, 0 not yet,
* 1 yes/success *)
signed int double_reverse:2;
}
+
(** How many times have we used it? *)
keepalives: Integer;
(** server IP address *)
local_ip: PChar;
(** used for ap_get_server_name when UseCanonicalName is set to
DNS
* (ignores setting of HostnameLookups) *)
@@ -775,12 +849,17 @@
(** A list of output filters to be used for this connection *)
output_filters: Pap_filter_t;
(** handle to scoreboard information for this connection *)
sbh: Pointer;
(** The bucket allocator to use for all bucket/brigade creations
*)
bucket_alloc: Papr_bucket_alloc_t;
+ // New for Apache 2.2
+ (* The current state of this connection *)
+ cs: Pconn_state_t; // Pointer
+ (** Is there data pending in the input filters? *)
+ data_in_input_filters: Integer;
end;
{$EXTERNALSYM conn_rec}

(*
* @defgroup ModuleInit Module structure initializers
*
@@ -917,19 +996,20 @@
Phtaccess_result = ^htaccess_result;
htaccess_result = {$IFDEF LINUX}packed{$ENDIF} record
(* the directory to which this applies *)
dir: PChar;
(* the overrides allowed for the .htaccess file *)
override: Integer;
+ (* the override options allowed for the .htaccess file *)
+ override_opts: Integer;
(* the configuration directives *)
htaccess: Pap_conf_vector_t;
(* the next one, or NULL if no more; N.B. never change this *)
next: Phtaccess_result;
end;
{$EXTERNALSYM htaccess_result}


(* A list of buckets *)
apr_bucket_brigade = Pointer; // apr_buckets.h
{$EXTERNALSYM apr_bucket_brigade}
Papr_bucket_brigade = ^apr_bucket_brigade;

@@ -1372,12 +1452,13 @@
* record to improve 64bit alignment the next time we need to break
* binary compatibility for some other reason.
*)
end;
{$EXTERNALSYM request_rec}

+
(* A structure to be used for Per-vhost config *)

Pserver_addr_rec = ^server_addr_rec;
server_addr_rec = {$IFDEF LINUX}packed{$ENDIF} record
(* The next server in the list *)
next: Pserver_addr_rec;
@@ -1454,12 +1535,14 @@
(* limit on size of the HTTP request line *)
limit_req_line: Integer;
(* limit on size of any request header field *)
limit_req_fieldsize: Integer;
(* limit on number of request header fields *)
limit_req_fields: Integer;
+ (** The server request scheme for redirect responses *)
+ server_scheme: PChar;
end;
{$EXTERNALSYM server_rec}

(*
* Generic command handling function for strings
* @param cmd The command parameters for this directive

分类: delphi 标签: 3,799 次阅读
原文链接:http://www.wenhq.com/article/view_204.html
欢迎转载,请注明出处:亲亲宝宝
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.