You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Jef Grezes <jf...@progexia.net> on 2007/10/31 16:43:48 UTC
Invoking system method within a webservice
Hi there,
I developed a web service which invokes a system("<command>") during its
execution.
Trying my webservice with axis_http_server works fine ...
When I try my webservice with apache and axis2_mod, the system call fails.
Can you help me with this ?
Regards,
Jef
Re: Invoking system method within a webservice
Posted by Samisa Abeysinghe <sa...@wso2.com>.
Dinesh Premalal wrote:
> jf.grezes@progexia.net writes:
>
>
>> I'd like to do that... but can you explain me how I can debug a web
>> service running on apache ?
>>
> axis2c is deployed in apache2 as a module, therefore you can debug
> httpd executable.
>
To debug httpd, you have to run it in the debug mode
e.g.
# gdb httpd
gdb > run -X
Samisa...
> thanks,
> Dinesh
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>
>
--
Samisa Abeysinghe
Software Architect; WSO2 Inc.; http://www.wso2.com/
email: samisa@wso2.com; cell: +94 77 753 7913
"Oxygenating the Web Service Platform."
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
Re: Invoking system method within a webservice
Posted by Dinesh Premalal <xy...@gmail.com>.
jf.grezes@progexia.net writes:
> I'd like to do that... but can you explain me how I can debug a web
> service running on apache ?
axis2c is deployed in apache2 as a module, therefore you can debug
httpd executable.
thanks,
Dinesh
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
Re: Invoking system method within a webservice
Posted by jf...@progexia.net.
I'd like to do that... but can you explain me how I can debug a web
service running on apache ?
Thanks,
Jef
> Jef,
>
> Could you please recheck the entry that you made to httpd.conf , And
> if possible please send us axis2 log file.
>
> Please run it with gdb, and try to pinpoint the place where error
> occurs.
>
>
> thanks,
> Dinesh
> Jef Grezes <jf...@progexia.net> writes:
>
>> Suavi Ali Demir wrote:
>>> Do the user permissions matter? Does the process making the system
>>> request have required permissions? If thats the problem, and if you
>>> are using windows, in the thread you are making the request, you can
>>> logon as a different user, then make the thread impersonate that
>>> user, do the call, then restore old user. i forgot the details, but
>>> i remember doing something like this in iis.
>>> Regards,
>>> Ali
>>>
>> Why not. Unfortunately (or fortunately who knows), i'm running apache
>> on Linux (Ubuntu). I checked all the permissions and everything should
>> work.
>> As a test, i tried to execute something like system("echo hello >
>> /tmp/test.txt") and it also didn't work (but still running superb with
>> axis2_http_server).
>> I tried almost everything I knew possible ... I'm running out of
>> inspiration.
>>
>> Thanks for your attention.
>> Jef
>>
>>>
>>> */Jef Grezes <jf...@progexia.net>/* wrote:
>>>
>>> Royston Day wrote:
>>> > Hi Jef,
>>> >
>>> >
>>> >> Hi there,
>>> >>
>>> >
>>> >
>>> >> I developed a web service which invokes a system("") during its
>>> >> execution.
>>> >> Trying my webservice with axis_http_server works fine ...
>>> >> When I try my webservice with apache and axis2_mod, the system
>>> call fails.
>>> >>
>>> >
>>> >
>>> >> Can you help me with this ?
>>> >>
>>> >
>>> > Have you set-up the httpd.conf file appropriately?
>>> >
>>> > Are you using the correct path && port when sending a request
>>> from the
>>> > service client (when using apache)?
>>> >
>>> > Regards,
>>> >
>>> > Royston
>>> >
>>> Thanks for your quick answer.
>>> In fact, I'm sure my webservice is called since I left some traces
>>> (that
>>> are logged in a file).
>>> The only problem is that the call to system("whatever") does not
>>> work
>>> (ie not resulting in a core dump
>>> or whatever .. it just don't return 0).
>>>
>>> So to answer accurately to your question : yes, everything in
>>> apache is
>>> well configured (the axis2c samples works fine also).
>>>
>>> Regards,
>>>
>>> Jef
>>> begin:vcard
>>> fn;quoted-printable:Jean-Fran=C3=A7ois Grezes
>>> n;quoted-printable:Grezes;Jean-Fran=C3=A7ois
>>> email;internet:jf.grezes@progexia.net
>>> version:2.1
>>> end:vcard
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>>
>>>
>>> __________________________________________________
>>> Do You Yahoo!?
>>> Tired of spam? Yahoo! Mail has the best spam protection around
>>> http://mail.yahoo.com
>>>
>>
>>
>> --
>> ------------------------------------------------------------------------
>> *Progexia*
>> 23, rue de la république
>> 13002 Marseille - FRANCE
>>
>> Téléphone : 04 91 91 73 21
>> web : http://www.progexia.net
>>
>> ------------------------------------------------------------------------
>> /
>>
>> "Ce courriel et les documents qui y sont attachés peuvent contenir des
>> informations confidentielles. Si vous n'êtes pas le destinataire
>> escompté, merci d'en informer l'expéditeur immédiatement et de
>> détruire ce courriel ainsi que tous les documents attachés de votre
>> système informatique. Toute divulgation, distribution ou copie du
>> présent courriel et des documents attachés sans autorisation
>> préalable
>> de son émetteur est interdite."
>>
>> "This e-mail and any attached documents may contain confidential or
>> proprietary information. If you are not the intended recipient, please
>> advise the sender immediately and delete this e-mail and all attached
>> documents from your computer system. Any unauthorised disclosure,
>> distribution or copying hereof is prohibited."
>>
>> /
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
Re: Invoking system method within a webservice
Posted by Dinesh Premalal <xy...@gmail.com>.
Jef,
Could you please recheck the entry that you made to httpd.conf , And
if possible please send us axis2 log file.
Please run it with gdb, and try to pinpoint the place where error
occurs.
thanks,
Dinesh
Jef Grezes <jf...@progexia.net> writes:
> Suavi Ali Demir wrote:
>> Do the user permissions matter? Does the process making the system
>> request have required permissions? If thats the problem, and if you
>> are using windows, in the thread you are making the request, you can
>> logon as a different user, then make the thread impersonate that
>> user, do the call, then restore old user. i forgot the details, but
>> i remember doing something like this in iis.
>> Regards,
>> Ali
>>
> Why not. Unfortunately (or fortunately who knows), i'm running apache
> on Linux (Ubuntu). I checked all the permissions and everything should
> work.
> As a test, i tried to execute something like system("echo hello >
> /tmp/test.txt") and it also didn't work (but still running superb with
> axis2_http_server).
> I tried almost everything I knew possible ... I'm running out of
> inspiration.
>
> Thanks for your attention.
> Jef
>
>>
>> */Jef Grezes <jf...@progexia.net>/* wrote:
>>
>> Royston Day wrote:
>> > Hi Jef,
>> >
>> >
>> >> Hi there,
>> >>
>> >
>> >
>> >> I developed a web service which invokes a system("") during its
>> >> execution.
>> >> Trying my webservice with axis_http_server works fine ...
>> >> When I try my webservice with apache and axis2_mod, the system
>> call fails.
>> >>
>> >
>> >
>> >> Can you help me with this ?
>> >>
>> >
>> > Have you set-up the httpd.conf file appropriately?
>> >
>> > Are you using the correct path && port when sending a request
>> from the
>> > service client (when using apache)?
>> >
>> > Regards,
>> >
>> > Royston
>> >
>> Thanks for your quick answer.
>> In fact, I'm sure my webservice is called since I left some traces
>> (that
>> are logged in a file).
>> The only problem is that the call to system("whatever") does not work
>> (ie not resulting in a core dump
>> or whatever .. it just don't return 0).
>>
>> So to answer accurately to your question : yes, everything in
>> apache is
>> well configured (the axis2c samples works fine also).
>>
>> Regards,
>>
>> Jef
>> begin:vcard
>> fn;quoted-printable:Jean-Fran=C3=A7ois Grezes
>> n;quoted-printable:Grezes;Jean-Fran=C3=A7ois
>> email;internet:jf.grezes@progexia.net
>> version:2.1
>> end:vcard
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam? Yahoo! Mail has the best spam protection around
>> http://mail.yahoo.com
>>
>
>
> --
> ------------------------------------------------------------------------
> *Progexia*
> 23, rue de la république
> 13002 Marseille - FRANCE
>
> Téléphone : 04 91 91 73 21
> web : http://www.progexia.net
>
> ------------------------------------------------------------------------
> /
>
> "Ce courriel et les documents qui y sont attachés peuvent contenir des
> informations confidentielles. Si vous n'êtes pas le destinataire
> escompté, merci d'en informer l'expéditeur immédiatement et de
> détruire ce courriel ainsi que tous les documents attachés de votre
> système informatique. Toute divulgation, distribution ou copie du
> présent courriel et des documents attachés sans autorisation préalable
> de son émetteur est interdite."
>
> "This e-mail and any attached documents may contain confidential or
> proprietary information. If you are not the intended recipient, please
> advise the sender immediately and delete this e-mail and all attached
> documents from your computer system. Any unauthorised disclosure,
> distribution or copying hereof is prohibited."
>
> /
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
Re: Invoking system method within a webservice
Posted by Jef Grezes <jf...@progexia.net>.
Suavi Ali Demir wrote:
> Do the user permissions matter? Does the process making the system
> request have required permissions? If thats the problem, and if you
> are using windows, in the thread you are making the request, you can
> logon as a different user, then make the thread impersonate that user,
> do the call, then restore old user. i forgot the details, but i
> remember doing something like this in iis.
> Regards,
> Ali
>
Why not. Unfortunately (or fortunately who knows), i'm running apache on
Linux (Ubuntu). I checked all the permissions and everything should work.
As a test, i tried to execute something like system("echo hello >
/tmp/test.txt") and it also didn't work (but still running superb with
axis2_http_server).
I tried almost everything I knew possible ... I'm running out of
inspiration.
Thanks for your attention.
Jef
>
> */Jef Grezes <jf...@progexia.net>/* wrote:
>
> Royston Day wrote:
> > Hi Jef,
> >
> >
> >> Hi there,
> >>
> >
> >
> >> I developed a web service which invokes a system("") during its
> >> execution.
> >> Trying my webservice with axis_http_server works fine ...
> >> When I try my webservice with apache and axis2_mod, the system
> call fails.
> >>
> >
> >
> >> Can you help me with this ?
> >>
> >
> > Have you set-up the httpd.conf file appropriately?
> >
> > Are you using the correct path && port when sending a request
> from the
> > service client (when using apache)?
> >
> > Regards,
> >
> > Royston
> >
> Thanks for your quick answer.
> In fact, I'm sure my webservice is called since I left some traces
> (that
> are logged in a file).
> The only problem is that the call to system("whatever") does not work
> (ie not resulting in a core dump
> or whatever .. it just don't return 0).
>
> So to answer accurately to your question : yes, everything in
> apache is
> well configured (the axis2c samples works fine also).
>
> Regards,
>
> Jef
> begin:vcard
> fn;quoted-printable:Jean-Fran=C3=A7ois Grezes
> n;quoted-printable:Grezes;Jean-Fran=C3=A7ois
> email;internet:jf.grezes@progexia.net
> version:2.1
> end:vcard
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
--
------------------------------------------------------------------------
*Progexia*
23, rue de la république
13002 Marseille - FRANCE
Téléphone : 04 91 91 73 21
web : http://www.progexia.net
------------------------------------------------------------------------
/
"Ce courriel et les documents qui y sont attachés peuvent contenir des
informations confidentielles. Si vous n'êtes pas le destinataire
escompté, merci d'en informer l'expéditeur immédiatement et de détruire
ce courriel ainsi que tous les documents attachés de votre système
informatique. Toute divulgation, distribution ou copie du présent
courriel et des documents attachés sans autorisation préalable de son
émetteur est interdite."
"This e-mail and any attached documents may contain confidential or
proprietary information. If you are not the intended recipient, please
advise the sender immediately and delete this e-mail and all attached
documents from your computer system. Any unauthorised disclosure,
distribution or copying hereof is prohibited."
/
Re: Invoking system method within a webservice
Posted by Suavi Ali Demir <de...@yahoo.com>.
Do the user permissions matter? Does the process making the system request have required permissions? If thats the problem, and if you are using windows, in the thread you are making the request, you can logon as a different user, then make the thread impersonate that user, do the call, then restore old user. i forgot the details, but i remember doing something like this in iis.
Regards,
Ali
Jef Grezes <jf...@progexia.net> wrote:
Royston Day wrote:
> Hi Jef,
>
>
>> Hi there,
>>
>
>
>> I developed a web service which invokes a system("") during its
>> execution.
>> Trying my webservice with axis_http_server works fine ...
>> When I try my webservice with apache and axis2_mod, the system call fails.
>>
>
>
>> Can you help me with this ?
>>
>
> Have you set-up the httpd.conf file appropriately?
>
> Are you using the correct path && port when sending a request from the
> service client (when using apache)?
>
> Regards,
>
> Royston
>
Thanks for your quick answer.
In fact, I'm sure my webservice is called since I left some traces (that
are logged in a file).
The only problem is that the call to system("whatever") does not work
(ie not resulting in a core dump
or whatever .. it just don't return 0).
So to answer accurately to your question : yes, everything in apache is
well configured (the axis2c samples works fine also).
Regards,
Jef
begin:vcard
fn;quoted-printable:Jean-Fran=C3=A7ois Grezes
n;quoted-printable:Grezes;Jean-Fran=C3=A7ois
email;internet:jf.grezes@progexia.net
version:2.1
end:vcard
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: Invoking system method within a webservice
Posted by Jef Grezes <jf...@progexia.net>.
Royston Day wrote:
> Hi Jef,
>
>
>> Hi there,
>>
>
>
>> I developed a web service which invokes a system("<command>") during its
>> execution.
>> Trying my webservice with axis_http_server works fine ...
>> When I try my webservice with apache and axis2_mod, the system call fails.
>>
>
>
>> Can you help me with this ?
>>
>
> Have you set-up the httpd.conf file appropriately?
>
> Are you using the correct path && port when sending a request from the
> service client (when using apache)?
>
> Regards,
>
> Royston
>
Thanks for your quick answer.
In fact, I'm sure my webservice is called since I left some traces (that
are logged in a file).
The only problem is that the call to system("whatever") does not work
(ie not resulting in a core dump
or whatever .. it just don't return 0).
So to answer accurately to your question : yes, everything in apache is
well configured (the axis2c samples works fine also).
Regards,
Jef
Re: Invoking system method within a webservice
Posted by Royston Day <rd...@mpc-data.co.uk>.
Hi Jef,
> Hi there,
> I developed a web service which invokes a system("<command>") during its
> execution.
> Trying my webservice with axis_http_server works fine ...
> When I try my webservice with apache and axis2_mod, the system call fails.
> Can you help me with this ?
Have you set-up the httpd.conf file appropriately?
Are you using the correct path && port when sending a request from the
service client (when using apache)?
Regards,
Royston
- - -
Royston Day, Software Engineer
MPC Data Limited
e-mail: rday@mpc-data.co.uk web: www.mpc-data.co.uk
tel: +44 (0) 1225 710600 fax: +44 (0) 1225 710601
ddi: +44 (0) 1225 710634
MPC Data Limited is a company registered in England and Wales with
company number 05507446
Registered Address: County Gate, County Way, Trowbridge, Wiltshire,
BA14 7FJ VAT no: 850625238
The information in this email and in the attached documents is
confidential and may be legally privileged. Any unauthorized review,
copying, disclosure or distribution is prohibited and may be unlawful.
It is intended solely for the addressee. Access to this email by
anyone else is unauthorized. If you are not the intended recipient,
please contact the sender by reply email and destroy all copies of the
original message. When addressed to our clients any opinions or advice
contained in this email is subject to the terms and conditions
expressed in the governing contract.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org