Apache and JSON

55 views
Skip to first unread message

Robert Gilland

unread,
Dec 1, 2015, 7:15:39 AM12/1/15
to WST-LIST
Is there an issue with Apache modules and JSON.

I keep getting an error under Apache of "No serializer for this type".

However when I try under a stand alone web server. There are no problems.

What could this be?

Kind Regards,

Robert.

Inoussa OUEDRAOGO

unread,
Dec 1, 2015, 9:31:45 AM12/1/15
to wst-list
Make sure to include the "json_formatter" unit in yours "uses" clause.

--
Inoussa O.

Robert Gilland

unread,
Dec 1, 2015, 4:42:21 PM12/1/15
to WST-LIST
Hi Inoussa,

I added json_formatter and it did not help unfortunately.
Only the SOAP protocol seems to work .

Kind Regards,

Robert.

Same error "No serialiser for this type"

Robert Gilland

unread,
Dec 1, 2015, 5:52:08 PM12/1/15
to WST-LIST
Apache now spawns a child process to handle requests this makes it impossible to debug in Lazarus the wst library

Robert Gilland

unread,
Dec 1, 2015, 7:00:16 PM12/1/15
to WST-LIST
Resolved!

Resolutions:

- Add -X to command line of apache to debug.
- the sample wst_apache_binding.pas procedure needs updating to handle format argument i

ie:

Add these lines to ProcessServiceRequest:

    pArg := FindArg(ARequestInfo.ArgList,'format');
    if Assigned(pArg) then
      targetFormat := pArg^.Value;
    if IsStrEmpty(targetFormat) then
      targetFormat := ARequestInfo.ContentType; 

Solved!

Inoussa OUEDRAOGO

unread,
Dec 2, 2015, 2:40:54 AM12/2/15
to wst-...@googlegroups.com
2015-12-02 0:00 UTC, Robert Gilland <rgilla...@gmail.com>:
> Resolved!
>
> Resolutions:
>
> - Add -X to command line of apache to debug.
> - the sample wst_apache_binding.pas procedure needs updating to handle
> format argument i
>
> ie:
>
> Add these lines to ProcessServiceRequest:
>
> pArg := FindArg(ARequestInfo.ArgList,'format');
> if Assigned(pArg) then
> targetFormat := pArg^.Value;
> if IsStrEmpty(targetFormat) then
> targetFormat := ARequestInfo.ContentType;
>
> Solved!

Great :-)

Thanks for the report.

--
Inoussa O.
Reply all
Reply to author
Forward
0 new messages