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?
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
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture