axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sathya Raghunathan" <pappu.raghunat...@gmail.com>
Subject Question on user defined faults and multithreading (Please clarify this urgently for me)
Date Thu, 27 Sep 2007 04:41:10 GMT
Hi

1) I can understand that multithreading is taken care of by
axis2_http_server after reading one of the mailing lists. For a new request,
a worker thread is created. I would like to know if the number of threads
can be configured or not.
Should i modify any parameter in the httpd.conf for this?

2) I read from one of your mailing list that user defined soap faults can be
sent as an element as part of soap Body by using the
AXIS2_ERROR_SET_STATUS_CODE(env->error, AXIS2_FAILURE); and
   AXIS2_ERROR_SET_ERROR_NUMBER(env->error, AXIS2_ERROR_FOO);

But how and where can we create this AXIS2_ERROR_FOO with a custom error
message? Which function to call, to create the error number for
AXIS2_ERROR_FOO? I saw that axis error.c file has all the axis related error
messages defined. Similarly where to define the the AXIS2_ERROR_FOO?

Please clarify

Thank you so much for all the support you have given till now

Regards
Sathya

On 9/26/07, Sathya Raghunathan <pappu.raghunathan@gmail.com> wrote:
>
> Hi
>
> 1) How to build a multithreaded service using axis2c? Can wsdl2c tool
> generate C code with multithreading functionality? If not, what is the way
> to implement multithreading?
> 2) Can we give user defined faults in wsdl file? How will wsdl2c generate
> code corresponding to the faults? Will the code generate any structures for
> these fault types? I have an example wsdl for this. But i am not able to
> generate code, because wsdl2c errors out saying "No element type is defined
> for message faultMethodRequest"
> Please clarify.
>
>
> Below is the wsdl for user defined faults service which takes a single
> integer and generates faults based on that integer value:
>
>
> <wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/
> " xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="
> http://schemas.xmlsoap.org/wsdl/" xmlns:tns="
> http://www.roguewave.com/rwsf/webservice/fault" targetNamespace="http://www.roguewave.com/rwsf/webservice/fault
> " name="Fault">
>   <message name="faultMethodRequest">
>     <part name="in1" type="xsd:int"/>
>   </message>
>   <message name="faultMethodResponse">
>     <part name="return" type="xsd:int"/>
>   </message>
>   <message name="InvalidRequest">
>     <part name="data" type="xsd:int"/>
>   </message>
>   <message name="WrongParameter">
>     <part name="part1" type="xsd:int"/>
>     <part name="part2" type="xsd:int"/>
>   </message>
>   <portType name="Fault">
>     <operation name="faultMethod" parameterOrder="in1">
>       <input message="tns:faultMethodRequest"/>
>       <output message="tns:faultMethodResponse"/>
>       <fault name="InvalidRequest" message="tns:InvalidRequest"/>
>       <fault name="WrongParameter" message="tns:WrongParameter"/>
>     </operation>
>   </portType>
>   <binding name="Fault" type="tns:Fault">
>     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/
> <http://schemas.xmlsoap.org/soap/http%22/>>
>     <operation name="faultMethod">
>       <soap:operation soapAction="faultMethod" style="document"/>
>       <input>
>         <soap:body use="literal" namespace="
> http://www.roguewave.com/rwsf/webservice/"/<http://www.roguewave.com/rwsf/webservice/%22/>
> >
>       </input>
>       <output>
>         <soap:body use="literal" namespace="
> http://www.roguewave.com/rwsf/webservice/"/<http://www.roguewave.com/rwsf/webservice/%22/>
> >
>       </output>
>       <fault name="InvalidRequest">
>         <soap:fault name="InvalidRequest" use="literal"/>
>       </fault>
>       <fault name="WrongParameter">
>         <soap:fault name="WrongParameter" use="literal"/>
>       </fault>
>     </operation>
>   </binding>
>   <service name="Fault">
>     <port name="Fault" binding="tns:Fault">
>       <soap:address location="http://localhost:8090/fault/Fault"/
> <http://localhost:8090/fault/Fault%22/>>
>     </port>
>   </service>
> </wsdl:definitions>
>
>
> Thanks
> Sathya
>
>
>

Mime
View raw message