Hi Ajith,

As per my findings permissions will not affect by this but need to do more
testing on this. will take more advice on that.

Hi Senaka,

As per the discussion had with you on 23rd I found a wsdl[1] which matches
to mentioned requirement. I was able to upload this wsdl successfully after
doing some changes in WADLMediaTypeHandler.put. Will do demo and a review
on this.

wsdl/wadl/schema and policy will not be downloaded in jsp level it will be
downloaded in UI level[2], Therefore we need to do a performance evaluation
on that. Since I'm hoping to use URLConection to download the content of
the resource there could be a security limitation on this as well.(points
taken)

Hoping to run all the test cases and will organise a demo plus code review
asap.

[1] -
https://svn.wso2.org/repos/wso2/carbon/platform/trunk/platform-integration/platform-automated-test-suite/org.wso2.carbon.automation.test.repo/src/main/resources/artifacts/GREG/wsdl/Axis2Service_Wsdl_With_Wsdl_Imports.wsdl

[2] - *org.wso2.carbon.registry.resource.ui/ImportResourceProcessor.process*
Need to fetch then WSDL/WADL/Schema/Policy content and return it as
a DataHandler.
Add Source URL as a property(just like version)

Thanks,


On Wed, Dec 24, 2014 at 9:50 PM, Senaka Fernando <sen...@wso2.com> wrote:

> Hi Eranda,
>
> Please do not confuse the bad words thing. This is an example taken by
> Sagara to explain that the handler needs to be extensible for an arbitrary
> scenario of an end user.
>
> Hi Thushara,
>
> Before getting into implementation details, you need to see whether the
> approach you plan to take is feasible as discussed on the 23rd.
>
> I would suggest that you check whether your flow can handle a WSDL-WSDL
> import or a Cyclic import scenario very well. Because the objective behind
> this improvement is to make it possible for someone to intercept the
> process of importing a WSDL but if this is only going to cover the base
> WSDL it serves no purpose, since all the imports are handled in different
> ways.
>
> Next, you need to consider the client-side performance overheads etc and
> also security limitations. For example, you won't be able to process WSDLs
> using Javascript on the browser and forward it to the BE if the server is
> running on a different machine.
>
> Apart from this, Isuruwan had some excellent suggestions, please consider
> those as well.
>
> Thanks,
> Senaka.
>
> On Wed, Dec 24, 2014 at 7:54 PM, Eranda Sooriyabandara <era...@wso2.com>
> wrote:
>
>> Hi Thushara,
>>
>> On Wed, Dec 24, 2014 at 2:22 AM, Thushara Ranawaka <thusha...@wso2.com>
>> wrote:
>>
>>> *Reasons for this change :*
>>> As per the current wsdl upload process which is going through
>>> importResource do not contain the wsdl content which is very much needed to
>>> explore content of a wsdl. For instance using exiting process it's kind a
>>> difficult to create a handler to filter bad words that can be contained in
>>> a wsdl. Other than that using importResource to put some artifact into
>>> registry is theoretically wrong, therefore best practice is to use put
>>> method.
>>>
>>
>> WDYM by bad words? I think this is over engineering.
>>
>> thanks
>> Eranda
>>
>>
>>>
>>> *Current process flow(wsdl) :*
>>> org.wso2.carbon.registry.resource.ui/import_resource_ajaxprocessor.jsp
>>> org.wso2.carbon.registry.resource.ui/ImportResourceProcessor.process
>>> org.wso2.carbon.registry.resource.ui/ResourceServiceClient.importResource
>>>
>>> org.wso2.carbon.registry.resource.stub/ResourceAdminServiceStub.importResource
>>> ...
>>> org.wso2.carbon.registry.core.session.UserRegistry.importResourceInternal
>>> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.importResource
>>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.importResource
>>>
>>> org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.importResource
>>> org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.importResource
>>>
>>> org.wso2.carbon.registry.extensions.handlers.WSDLMediaTypeHandler.importResource
>>>
>>> org.wso2.carbon.registry.extensions.handlers.WSDLMediaTypeHandler.processWSDLImport
>>>
>>> org.wso2.carbon.registry.extensions.handlers.utils.WSDLProcessor.addWSDLToRegistry
>>>
>>> org.wso2.carbon.registry.extensions.handlers.utils.WSDLProcessor.evaluateWSDLsToDefinitions
>>>
>>> *Things needed to be done :*
>>> In order to do $subject We need to fetch content in the UI
>>> level(org.wso2.carbon.registry.resource.ui) and send it to the next level
>>> including data submitted through html form. Following *bold* methods
>>> will be changed accordingly. Since we need to fetch dependancies such
>>> as WSDL/WADL/Schema which can be included in WSDL/WADL/Schema we need to to
>>> add sourceURL as a property and send it too, which will be used in
>>> org.wso2.carbon.registry.extensions.handlers.WSDLMediaTypeHandler,
>>> org.wso2.carbon.registry.extensions.handlers.WADLMediaTypeHandler later to
>>> fetch contents of the dependancies.
>>>
>>> *Expected process flow(wsdl) :*
>>> org.wso2.carbon.registry.resource.ui/import_resource_ajaxprocessor.jsp
>>> *org.wso2.carbon.registry.resource.ui/ImportResourceProcessor.process*
>>>
>>> org.wso2.carbon.registry.resource.ui.clients.ResourceServiceClient.addResource
>>>
>>> org.wso2.carbon.registry.resource.stub.ResourceAdminServiceStub.addResource
>>> ...
>>> org.wso2.carbon.registry.core.session.UserRegistry.putInternal
>>> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.put
>>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.put
>>> org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.put
>>> org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.put
>>> org.wso2.carbon.registry.extensions.handlers.WSDLMediaTypeHandler.*put*
>>>
>>> org.wso2.carbon.registry.extensions.handlers.WSDLMediaTypeHandler.processWSDLImport
>>>
>>> org.wso2.carbon.registry.extensions.handlers.utils.WSDLProcessor.addWSDLToRegistry
>>>
>>> org.wso2.carbon.registry.extensions.handlers.utils.WSDLProcessor.evaluateWSDLsToDefinitions
>>>
>>> *Note :*
>>> This change will also affect to WADL/Schema and Policy upload paths as
>>> well. But for Schema and Policy the impact is very low.
>>> All the put methods(WSDL/WADL) are already implemented and need to do
>>> some modifications and validations in order to start working.
>>> It is must to run all the tests which related to WSDL/WADL/Schema/Policy
>>> upload after the implementation.
>>>
>>> Please share any ideas on $Subject.
>>>
>>> --
>>> Thushara Kasun Ranawaka
>>> Software Engineer
>>> WSO2 Inc.; <http://www.wso2.com>
>>> lean.enterprise.middleware
>>> Mobile : *+94 (0) 773438949 <%2B94%20%280%29%20773438949>*
>>> *thusha...@wso2.com <thusha...@wso2.com>*
>>>
>>> _______________________________________________
>>> Architecture mailing list
>>> Architecture@wso2.org
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>>
>>
>> --
>>
>> *Eranda Sooriyabandara*Senior Software Engineer;
>> Integration Technologies Team;
>> WSO2 Inc.; http://wso2.com
>> Lean . Enterprise . Middleware
>>
>> E-mail: eranda AT wso2.com
>> Mobile: (812) 964-9032
>> Linked-In: http://www.linkedin.com/in/erandasooriyabandara
>> Blog: http://emsooriyabandara.blogspot.com/
>>
>>
>>
>>
>>
>> _______________________________________________
>> Architecture mailing list
>> Architecture@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
>
>
> *[image: http://wso2.com] <http://wso2.com>Senaka Fernando*
> Solutions Architect; WSO2 Inc.; http://wso2.com
>
>
>
> *Member; Apache Software Foundation; http://apache.org
> <http://apache.org>E-mail: senaka AT wso2.com <http://wso2.com>**P: +1
> 408 754 7388 <%2B1%20408%20754%207388>; ext: 51736*;
>
>
> *M: +44 782 741 1966 <%2B44%20782%20741%201966>Linked-In:
> http://linkedin.com/in/senakafernando
> <http://linkedin.com/in/senakafernando>*Lean . Enterprise . Middleware
>



-- 
Thushara Kasun Ranawaka
Software Engineer
WSO2 Inc.; <http://www.wso2.com>
lean.enterprise.middleware
Mobile : *+94 (0) 773438949*
*thusha...@wso2.com <thusha...@wso2.com>*
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to