Posts

Showing posts from June, 2012

How to create JAX-WS web service client

Image
In this post we will explain how to create JAX WS client stub to make a web service call from JAVA. First, Use the below command to create JAVA stub from WSDL. wsimport -d $PATH_FOR_JAVA_CLIENT $FULL_WSDL_PATH -keep -Xnocompile -verbose $PATH_FOR_JAVA_CLIENT--Location where the client code will get generated $FULL_WSDL_PATH--Location of the WSDL  To run the above command follow the below steps: 1. open cmd prompt. 2. Goto directory "$MiddlewareHome\user_projects\domains\base_domain\bin" . 3. Run "setDomainEnv.cmd" for windows and "setDomainEnv.sh" for Linux 4. Run the below command wsimport -d C:\wsdl\code http://10.180.90.79:7777/Simple/Porduct/ProductInfo?wsdl -keep -Xnocompile -verbose Note: http://10.180.90.79:7777/Simple/Porduct/ProductInfo?wsdl is the dummy webservice that will return dummy product details. Next, 1. Create new JAVA project say "JAXBClient" in eclipse. 2. Copy entire folder under ' C:\wsdl\code &#

Connect OSB (Oracle Service Bus) to Oracle Database using Weblogic Datasource

Image
In this post I will try to explain how to connect OSB to Oracle Database with out using DB adapter. With Weblogic datasource we can directly execute the SQL select queries. We will first create weblogic datasource. Below are the steps to create Weblogic DataSource: Login into Weblogic console. eg.  http://localhost:7777/console Go to Services->Data Sources Click on   new generic datasources Give Data source name, JNDI name, Database Type. 4. Click next 5. Select Oracle Driver and click next. 6. Give database connection details ie. ServiceName, IP, Schema, Password, port. 7. Click Next, and click Test Configuration. If everything is okay then you will see " Connection test succeeded ." message. Click on Finish 8. Next Click on Data Source 'OSBDB' and click on Targets. Select admin server and click save.  You have a data source ready to use. Next, We will show how to use this