getBean() to initialize Web Services

dcarb

New Member
sorry for the title of my question, but i didn't find an adequate title.Well, here is my problem:I'm creating some program, which will consume some web services, using SSL connection.Before use some methods of myService, i have to set up a SSL connection, so in my code, i proceed like this:\[code\]private SomeService myService;main{ ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( new String[]{"com/....../...../client/beans.xml"} ); myService = (SomeService) context.getBean("someID"); setupSSL(myService); String result = myService.aMethod(params); }setupTLS(SomeService myService){ HTTPConduit httpConduit = (HTTPConduit) ClientProxy.getClient(myService).getConduit(); ............... }\[/code\]And this way works very well, but I would like to avoid getBeans method, and replace this part:\[code\] ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( new String[]{"com/....../...../client/beans.xml"} ); myService = (SomeService) context.getBean("someID");\[/code\]by something else, but i don't know what, and that's what i would like to know, maybe something like this:\[code\] SomeService_Service ss = new SomeService_Service(wsdlURL, SERVICE_NAME); myService = ss.getSomeServiceSOAP();\[/code\]I tried that, but it didn't work..I hope you will understand my problem,thank you
 
Back
Top