This week The apache Ignite book becomes one of the top books of leanpub

This week The apache Ignite book becomes one of the top books of leanpub.


Register webservices wsdl in OEG through script

In my previous Post blogger Mark O'Neill pointed me to check new version of OEG, which has been shipped with sample scripts. Last weekend i decided to spent some time to digging out these samples. The following a list of sample scripts which ship with the Gateway: - analyse Perform various analysis on configuration - certs Examples working with certificates - io Exporting and importing configuration - publish Publishing new types to the configuration - upgrade Upgrading older versions of configuration - users Examples working with users - ws Working with Webservices and WSDLs It's pretty easy yo run these scripts, for example sh ws\ will show the list of the registered web service. Similarly will register web service wsdl into OEG. I have simply modify the script to register web services wsdl from file, where file contain a list of web service wsdl as follows:
and here is the modified jython script:
Register WSDL in Gateway

from java.util import ArrayList
from deploy import DeployAPI
from esapi import EntityStoreAPI
from import AddWebServiceServletProcessor
from vtrace import Tracer
import common

t = Tracer(Tracer.INFO) # Set trace to info level

dep = DeployAPI(common.gw_deployURL, common.defUserName, common.defPassword)
es = dep.getStore('')

deployLocation = es.get('/[NetService]name=Service/[HTTP]name=Default Services')
wsGroup = es.get('/[WebServiceRepository]name=Web Service Repository/[WebServiceGroup]name=Web Services')

aws = AddWebServiceServletProcessor(
file = open("wsdls.txt", "r")
for line in file.readlines():
 print line
 deploymentPks = ArrayList()
 aws.addWebService(wsGroup, line.strip(), deploymentPks, 60)
 res = dep.setStore(es)
 if res.getStatus() != True:
     t.error("Failed to deploy: " + res.getFailureReason())
     t.error("Failures: "+ Integer.toString(res.getErrorCount())) 


Next step is to register web service and assign some global policy on them. P.S. Thank's to Mark O'Neill for pointing me about new OEG version

1 comment :

acnu said...

Thanks Shamim

Nice article. can you explain import process please.