Invoking A Web Service Using Web Service Proxy Client
Invoking A Web Service Using Web Service Proxy Client
Main: 91-80-41121700
Fax: 91-80-41122605
www.kbace.com
Change Record
Reviewers
Reviewer Position
Distribution
Note to Holders:
If you receive an electronic copy of this document and print it out, please write your name on the equivalent of the
cover page, for document control purposes.
If you receive a hard copy of this document, please write your name on the front cover, for document control
purposes.
Page ii
Copyright © 2013 KBACE
Table of Contents
Page iii
Copyright © 2013 KBACE
Steps
Steps:
Click Next
Page 4 of 17
Copyright © 2013 KBACE
2. Crete a generic Project and name the project . Ex ‘CurrencyRatesTest’. Give the Directory path.
Click Finish
Page 5 of 17
Copyright © 2013 KBACE
3. Right click on Project Name and click on New
Click Next
Page 6 of 17
Copyright © 2013 KBACE
5. Select JAX-WS Style and click Next
Page 7 of 17
Copyright © 2013 KBACE
6. Enter the URL of the WSDL in the format:
http://<HostName:PortNumber>/finGlCurrManageRate/CurrencyAPIService?WSDL
EX: http://erpfusionapp.kbace.com:23603/finGlCurrManageRate/CurrencyAPIService?WSDL
The Host and Port can be obtained from the Link : http://erpfusionidm.kbace.com:7777/URL/urllist.txt
The Host and Port is fetched for the Financial Domain, since this example is for Current Rates.
Click Next
Page 8 of 17
Copyright © 2013 KBACE
7. Click Next
Page 9 of 17
Copyright © 2013 KBACE
8. Click Next
Page 10 of 17
Copyright © 2013 KBACE
9. Click Next
Page 11 of 17
Copyright © 2013 KBACE
10. Select oracle/wss_username_token_client_policy and click Next
This means that the Webservice is protected by a policy ‘wss_username_token_client_policy’.
You will not get the desired response if you try to invoke a protected web service without providing proper
Username token on the client side.
Page 12 of 17
Copyright © 2013 KBACE
11. Click Next and Finish
Page 13 of 17
Copyright © 2013 KBACE
Page 14 of 17
Copyright © 2013 KBACE
12. Double click on CurrencyAPIServiceSoapHttpPortClient.java which is the file to be updated to invoke the
Currency Rates Web Service. The code should be as below. Add your custom code here.
package com.oracle.xmlns.apps.financials.generalledger.currencies.managerate.manageratepublicservice.applicationmodule;
import com.sun.xml.ws.api.addressing.AddressingVersion;
import com.sun.xml.ws.api.addressing.WSEndpointReference;
import com.sun.xml.ws.developer.WSBindingProvider;
import com.sun.xml.ws.message.StringHeader;
import java.util.UUID;
import javax.xml.ws.WebServiceRef;
import weblogic.wsee.jws.jaxws.owsm.SecurityPolicyFeature;
wsbp.setOutboundHeaders(new StringHeader(WS_ADDR_VER.messageIDTag,
uuid),
replyTo.createHeader(WS_ADDR_VER.replyToTag));
//Add security headers below if any authentication is required.Application Username and password
wsbp.getRequestContext().put(WSBindingProvider.USERNAME_PROPERTY,
Page 15 of 17
Copyright © 2013 KBACE
"kbadmin");
wsbp.getRequestContext().put(WSBindingProvider.PASSWORD_PROPERTY,
"Oracle12");
}
}
13. Create a java concurrent program by giving the execution file name as class file name of
‘CurrencyAPIServiceSoapHttpPortClient’ and execution file path as class file path where the class file is residing
in server (OR) use the classes and methods in program code to invoke particular method. Place the Project .jar
file in the CLASSPATH.
This java program can be called from various Application like ADF, OAF etc.
To test this from Jdev. Rebuild the Project and run the CurrencyAPIServiceSoapHttpPortClient.java file.
You should be able to see the response from the Web Service.
Page 16 of 17
Copyright © 2013 KBACE
Open and Closed Issues
Open Issues
Closed Issues
Page 17 of 17
Copyright © 2013 KBACE