Hi All,

We have two options in the output of auto-generation tool.

   1. source code of the connector
   2. connector zip

If we generate connector zip file directly we can reduce the manual works
but if we generate the source code from this tool

   - add init method manually for authentication
   - modify some special cases like adding DISABLE_CHUNKING etc.
   - integration test

WDYT?

On Wed, Oct 12, 2016 at 3:28 PM, Malaka Silva <mal...@wso2.com> wrote:

> Yes Authorization is bit tricky and specific to vendors. So we can have
> predefined templates (eg: Salesforce custom web services) and make this
> plug-able?
>
> On Wed, Oct 12, 2016 at 2:44 PM, Rajjaz Mohammed <raj...@wso2.com> wrote:
>
>> Hi All,
>>
>> I have done some testings on this area for that I created an apex
>> class[1] to create an account in salesforce and tested with simple java
>> client using WSDL file and it works fine and can able to extract the common
>> information from WSDL (attached).
>>
>> Our next step will create the connector based on the information
>> extracted from WSDL. But we can only create the synapse template
>> configuration which is general. Another challenge is the authentication
>> part so we plan to create the init as the separate module  because it will
>> not same to all connectors.
>>
>> [1]
>>
>> global class ConnectorAutomation{
>>     global class RequestClass{
>>         webService String accountName;
>>     }
>>     global class ResponseClass{
>>         webService String responseResultID;
>>         webService String responseResultName;
>>         webService String responseResultRecordType;
>>     }
>>     webService static ResponseClass addAccount(String name){
>>         Account acct = new Account();
>>         acct.Name = name;
>>         insert acct;
>>         ResponseClass resClass = new ResponseClass();
>>         resClass.responseResultID = acct.Id;
>>         resClass.responseResultName = acct.Name;
>>         resClass.responseResultRecordType = acct.AccountNumber;
>>         return resClass;
>>     }
>> }
>>
>>
>>
>> On Wed, Sep 21, 2016 at 10:41 AM, Malaka Silva <mal...@wso2.com> wrote:
>>
>>> Yes Kasun this is what our end goal is. We are starting this with soap
>>> based services. Also great if you can share any work done to speed up our
>>> r&d.
>>>
>>> @Ajanthan
>>> ​ - Yes we are currently planning to have this a command line tool,
>>> however this is not yet finalized.​
>>>
>>> On Wed, Sep 21, 2016 at 2:09 AM, Kasun Indrasiri <ka...@wso2.com> wrote:
>>>
>>>> Hi Malaka,
>>>>
>>>> We did a PoC project on generating a connector based on a given Swagger
>>>> definition. Is this a similar requirement?
>>>>
>>>> On Tue, Sep 20, 2016 at 10:51 AM, Ajanthan Balachandran <
>>>> ajant...@wso2.com> wrote:
>>>>
>>>>> What do you mean by a tool? Is it command line tool  or maven plugin
>>>>> or eclipse plugin?
>>>>>
>>>>> On Fri, Sep 9, 2016 at 2:07 AM, Rajjaz Mohammed <raj...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>>
>>>>>>> ​We have currently 150+ connectors in store
>>>>>>> <https://store.wso2.com/store/>. Using those we can easily build
>>>>>>> integration use cases with WSO2 ESB.
>>>>>>>
>>>>>>> However there are some apis that resides on premises and specific to
>>>>>>> some users. If we need to integrate such services, we either need to
>>>>>>> manually do the integration with ESB or develop a connector and use it.
>>>>>>>
>>>>>>> The idea of this project is to automate the development of
>>>>>>> connectors that makes the integration tasks more productive.
>>>>>>>
>>>>>>> So we are planning to start this with soap based connectors and move
>>>>>>> to rest based support later.
>>>>>>>
>>>>>>> For soap based connector generation we basically need to parse the
>>>>>>> wsdl and generate a connector operation per soap operation.
>>>>>>>
>>>>>>> For that we can use WSDL4J. Using this we can get the required
>>>>>>> operations and request/response messages required. Using this 
>>>>>>> information
>>>>>>> we can build the connector operations.(Sequence Templates)
>>>>>>>
>>>>>>> eg:
>>>>>>> String wsdlPath = "/home/wso2/Desktop/ConnectorTest.wsdl";
>>>>>>> WSDLReader reader = javax.wsdl.factory.WSDLFactory
>>>>>>> .newInstance().newWSDLReader();
>>>>>>> javax.wsdl.Definition defn = reader.readWSDL(wsdlPath);
>>>>>>>
>>>>>>> Map <javax.xml.namespace.QName , ServiceImpl>tmp =
>>>>>>> defn.getAllServices();
>>>>>>>
>>>>>>> for(javax.xml.namespace.QName  key:tmp.keySet()){
>>>>>>> ServiceImpl serviceImpl = tmp.get(key);
>>>>>>> Map <String,PortImpl> mPorts = serviceImpl.getPorts();
>>>>>>> for(String k1:mPorts.keySet()){
>>>>>>> PortImpl portImpl = mPorts.get(k1);
>>>>>>> List<BindingOperationImpl> bindingOperations =
>>>>>>> portImpl.getBinding().getBindingOperations();
>>>>>>> for(BindingOperationImpl bindingOperation:bindingOperations){
>>>>>>> System.out.println("operation:" + bindingOperation.getName());
>>>>>>> BindingInput bindingInput = bindingOperation.getBindingInput();
>>>>>>> }
>>>>>>> }
>>>>>>> }
>>>>>>> Map messages = defn.getMessages();
>>>>>>> Iterator msgIterator = messages.values().iterator();
>>>>>>> while (msgIterator.hasNext()){
>>>>>>> Message msg = (Message)msgIterator.next();
>>>>>>> if (!msg.isUndefined()) {
>>>>>>>      System.out.println(msg.getQName());
>>>>>>> }
>>>>>>> }
>>>>>>> Thoughts?
>>>>>>>
>>>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I have the plan to implement ESB connector auto-generation tool.
>>>>>> Plase add if anything more to above explanation about the tool.
>>>>>>
>>>>>> Best Regards,
>>>>>>>
>>>>>>> Malaka Silva
>>>>>>> Senior Technical Lead
>>>>>>> M: +94 777 219 791
>>>>>>> Tel : 94 11 214 5345
>>>>>>> Fax :94 11 2145300
>>>>>>> Skype : malaka.sampath.silva
>>>>>>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>>>>>>> Blog : http://mrmalakasilva.blogspot.com/
>>>>>>>
>>>>>>> WSO2, Inc.
>>>>>>> lean . enterprise . middleware
>>>>>>> https://wso2.com/signature
>>>>>>> http://www.wso2.com/about/team/malaka-silva/
>>>>>>> <http://wso2.com/about/team/malaka-silva/>
>>>>>>> https://store.wso2.com/store/
>>>>>>>
>>>>>>> Don't make Trees rare, we should keep them with care
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Thank you
>>>>>> Best Regards
>>>>>>
>>>>>> *Rajjaz HM*
>>>>>> Associate Software Engineer
>>>>>> Platform Extension Team
>>>>>> WSO2 Inc. <http://wso2.com/>
>>>>>> lean | enterprise | middleware
>>>>>> Mobile | +94752833834|+94777226874
>>>>>> Email   | raj...@wso2.com
>>>>>> LinkedIn <https://lk.linkedin.com/in/hmohammedrajjaz> | Blogger
>>>>>> <http://rajjazhm.blogspot.com/> | WSO2 Profile
>>>>>> <http://wso2.com/about/team/mohammer-rajjaz/>
>>>>>> [image: https://wso2.com/signature] <https://wso2.com/signature>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Architecture mailing list
>>>>>> Architecture@wso2.org
>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Ajanthan
>>>>> Software Engineer;
>>>>> WSO2, Inc.;  http://wso2.com/
>>>>>
>>>>> email: ajanthan <http://goog_595075977>@wso2.com; cell: +1 425 919
>>>>> 8630
>>>>> blog: http://bkayts.blogspot.com/
>>>>>
>>>>> Lean . Enterprise . Middleware
>>>>>
>>>>> _______________________________________________
>>>>> Architecture mailing list
>>>>> Architecture@wso2.org
>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Kasun Indrasiri
>>>> Director, Integration Technologies
>>>> WSO2, Inc.; http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> cell: +1 650 450 2293
>>>> Blog : http://kasunpanorama.blogspot.com/
>>>>
>>>> _______________________________________________
>>>> Architecture mailing list
>>>> Architecture@wso2.org
>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> Best Regards,
>>>
>>> Malaka Silva
>>> Senior Technical Lead
>>> M: +94 777 219 791
>>> Tel : 94 11 214 5345
>>> Fax :94 11 2145300
>>> Skype : malaka.sampath.silva
>>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>>> Blog : http://mrmalakasilva.blogspot.com/
>>>
>>> WSO2, Inc.
>>> lean . enterprise . middleware
>>> https://wso2.com/signature
>>> http://www.wso2.com/about/team/malaka-silva/
>>> <http://wso2.com/about/team/malaka-silva/>
>>> https://store.wso2.com/store/
>>>
>>> Don't make Trees rare, we should keep them with care
>>>
>>> _______________________________________________
>>> Architecture mailing list
>>> Architecture@wso2.org
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>>
>>
>> --
>> Thank you
>> Best Regards
>>
>> *Rajjaz HM*
>> Associate Software Engineer
>> Platform Extension Team
>> WSO2 Inc. <http://wso2.com/>
>> lean | enterprise | middleware
>> Mobile | +94752833834|+94777226874
>> Email   | raj...@wso2.com
>> LinkedIn <https://lk.linkedin.com/in/hmohammedrajjaz> | Blogger
>> <http://rajjazhm.blogspot.com/> | WSO2 Profile
>> <http://wso2.com/about/team/mohammer-rajjaz/>
>> [image: https://wso2.com/signature] <https://wso2.com/signature>
>>
>> _______________________________________________
>> Architecture mailing list
>> Architecture@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
>
> Best Regards,
>
> Malaka Silva
> Senior Technical Lead
> M: +94 777 219 791
> Tel : 94 11 214 5345
> Fax :94 11 2145300
> Skype : malaka.sampath.silva
> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
> Blog : http://mrmalakasilva.blogspot.com/
>
> WSO2, Inc.
> lean . enterprise . middleware
> https://wso2.com/signature
> http://www.wso2.com/about/team/malaka-silva/
> <http://wso2.com/about/team/malaka-silva/>
> https://store.wso2.com/store/
>
> Don't make Trees rare, we should keep them with care
>
> _______________________________________________
> Architecture mailing list
> Architecture@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Thank you
Best Regards

*Rajjaz HM*
Associate Software Engineer
Platform Extension Team
WSO2 Inc. <http://wso2.com/>
lean | enterprise | middleware
Mobile | +94752833834|+94777226874
Email   | raj...@wso2.com
LinkedIn <https://lk.linkedin.com/in/hmohammedrajjaz> | Blogger
<http://rajjazhm.blogspot.com/> | WSO2 Profile
<http://wso2.com/about/team/mohammer-rajjaz/>
[image: https://wso2.com/signature] <https://wso2.com/signature>
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to