Sanjiv,
There are many ways to invoke an IS Flow or java service from a J2EE app server like BEA Weblogic including:
- use the IS java API to connect to IS and invoke the service
- publish a JMS message to a queue that is being monitored by an IS JMS adapter polling notification
- use JAXM and JAX-RPC to invoke an IS service that has been exposed as a soap-rpc or soap-msg (document/literal web service)
Weblogic provides several web services examples to show how to expose web services hosted in Weblogic and to consume web services hosted elsewhere. You can find information on these example on BEA’s DEV2DEV site at this address: [URL=“https://web-service.projects.dev2dev.bea.com/”]https://web-service.projects.dev2dev.bea.com/[/URL].
The portions of the example that do the work are:
[highlight=java]
// Setup the global JAXM message factory
System.setProperty(“javax.xml.soap.MessageFactory”,
“weblogic.webservice.core.soap.MessageFactoryImpl”);
// Setup the global JAX-RPC service factory
System.setProperty( “javax.xml.rpc.ServiceFactory”,
“weblogic.webservice.core.rpc.ServiceFactoryImpl”);
// create service factory
ServiceFactory factory = ServiceFactory.newInstance();
// define qnames
String targetNamespace =
"http://www.themindelectric.com/"
+ "wsdl/net.xmethods.services.stockquote.StockQuote/";
QName serviceName =
new QName(targetNamespace,
"net.xmethods.services.stockquote.StockQuoteService");
QName portName =
new QName(targetNamespace,
"net.xmethods.services.stockquote.StockQuotePort");
QName operationName = new QName("urn:xmethods-delayed-quotes",
"getQuote");
URL wsdlLocation =
new URL("http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl");
// create service
Service service = factory.createService(wsdlLocation, serviceName);
// create call
Call call = service.createCall(portName, operationName);
// invoke the remote web service
Float result = (Float) call.invoke(new Object[] {
"BEAS"
});
[/highlight]
Hope that helps,
Mark
#soa#API-Management#webMethods