[wsf-c-dev] [C++] Exceptions in OMFactory
Samisa Abeysinghe
samisa at wso2.com
Tue Nov 6 21:38:46 PST 2007
Senaka Fernando wrote:
> On Wed, 2007-11-07 at 09:08 +0530, Samisa Abeysinghe wrote:
>
>> Do we need to have a factory for this API?
>>
>
> Yes, we do, the reason is we need the env for C functions and we are not
> exposing the reference to it. Thus, when we create OM classes the env is
> set through the factory.
>
> The env of the factory is set from the Service Client.
>
How come service client set the env of the factory? It does not make
sense. And if that can be done, why not the user can get the env form
service client and create OM without factory?
I see no point in having a factory to share the env.
>
>> Do we need to make it that complex?
>>
>
> I don't think it would be complicated. Even Java has a similar approach
>
C++ does not need to be the same as Java. You can get the idea on the OO
hierarchy from Java. But we are not building an equivalant. We already
have most of the logic in C, so much of the Java stuff is already done.
We just need an API for the user to use the C engine, that is it.
Samisa...
>
>> Samisa...
>>
>>
>
> Regards,
>
> Senaka.
>
>> senaka at wso2.com wrote:
>>
>>> Hi all,
>>>
>>> The OMFactory class
>>> (http://www.wso2.org/wiki/display/wsfcpp/Class+OMFactory) basically is
>>> used to build OM classes such as OMElement, OMAttribute and OMNamespace.
>>> The OMFactory is a composite of the ServiceClient class, and can be
>>> retrieved by calling the getOMFactory() method in the ServiceClient class.
>>>
>>> Now, when creating OM objects we may run into situations such as occasions
>>> in which OM objects can't be created. In such a situation what type of
>>> exception should be thrown? AxisFault is what is being used at the moment,
>>> but, I believe it should have some other name.
>>>
>>> How about something like OMFactoryException?
>>>
>>> Your suggestions are most welcome.
>>>
>>> Regards,
>>> Senaka
>>>
>>> _______________________________________________
>>> Wsf-c-dev mailing list
>>> Wsf-c-dev at wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/wsf-c-dev
>>>
>>>
>>>
>> _______________________________________________
>> Wsf-c-dev mailing list
>> Wsf-c-dev at wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/wsf-c-dev
>>
>
>
> _______________________________________________
> Wsf-c-dev mailing list
> Wsf-c-dev at wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/wsf-c-dev
>
>
--
Samisa Abeysinghe
Software Architect; WSO2 Inc.; http://www.wso2.com/
email: samisa at wso2.com; cell: +94 77 753 7913
"Oxygenating the Web Service Platform."
More information about the Wsf-c-dev
mailing list