Archivi tag: dynamic

Writing a Dynamic WebService Client with BEA Weblogic

Ecco come creare un client websevice dinamico con bea weblogic.

System.setProperty("javax.xml.soap.MessageFactory","weblogic.webservice.core.soap.MessageFactoryImpl");
System.setProperty( "javax.xml.rpc.ServiceFactory","weblogic.webservice.core.rpc.ServiceFactoryImpl");
ServiceFactory serviceFactory = ServiceFactory.newInstance();

URL wsdlURL = new URL("http://localhost:7001/Services/Hello/Hello.jws?WSDL");          
String targetNameSpace = "http://www.openuri.org/";          
QName serviceName = new QName(targetNameSpace, "Hello");
QName portName = new QName(targetNameSpace, "HelloSoap");
QName operationName = new QName("sayHello");
                
Service service = serviceFactory.createService(wsdlURL, serviceName);
Call call = service.createCall(portName, operationName);
String message = (String) call.invoke(new Object[] {"World"});

Fonte : CodeRanch

Fonte : Oracle

Fletto i muscoli e sono nel vuoto.