How can we call a WEB SERVICE from an Oracle DB?
<h2>
What the methods available to call a WEB SERVICE from the DB. I.e. through a DB Stored Procedure?
I was given this article by a colleague, but since it’s a 2005 one, I feel it could be outdated?
http://www.oracle.com/technology/pub/articles/mensah_dws.html
Also, is it possible to write ONE “Common” DB stored procedure to call ANY WEB SERVICE?
</h2>
<h2> No Girish, what I meant is, since it is 2005 article, the method it describes to call a WS is out of date.
Because I am quite sure in 2009, 4 years later Oracle must have added built-in packages and other methods to simplify it???
Also, I would be very grateful if you advice on the other issue: Is there a way to create a single DB stored procedure to call ANY WS?? i.e. a common routine to call any web service?
</h2>
Similar Messages
-
How can I call external web service from BPEL
1. I have "EmpService" webservice (simple webservice to get emp salary, not in BPEL domain) running in Oracle AS host1. If I want to call this web service from BPEL in another host2. How can I do this?
2. Is it a must to deploy this EmpService to Oracle BPEL domain in order to call it? If so, how can I deploy it. As many BPEL example tutorial demonstrate the "obant" command to deploy the BPEL process, but not show how to deploy a external web service not in BPEL project. Please help. ...Create a partner link in BPEL and point it to the WSDL deployed on external server.
this thread will also help
Axis generated WS to Bpel WS -
How can I call a web service via Adobe Reader XI?
Hi all,
I have created a document using LiveCycle (Trial) to get something from my custom web service, using Adobe Pro to open the file and its success to call the web service when clicking the call button, however, when I try to do the same thing using Adobe Reader XI, seems not work. Please help!
Best Regards,
Black LeongThe only way it can work with Reader is if the document is Reader-enabled with LiveCycle Reader Extensions or the similar product from Datalogics. Acrobat is not able to add the corresponding usage right.
-
How can I call a web service using JAVAscript in LCD
hi guys,
I know it can call a WSDL in LCD, but I have not any WSDL web service , and I have a REST web service ,how can I call this REST web service in LCD? I checked some documents and found nothing...if it's possible that it can call a REST web service using JAVAScript code, I mean I can program some code to call this web service ?
thanks,
JesseHi Jesse,
You can do GET, PUT and POST using FormCalc, so you should be able to access a REST web service.
There is a example of accessing a RSS feed in this thread, http://forums.adobe.com/message/5695433#5695433
Regards
Bruce -
How can I create a web Service from my Web Dynpro Application ?
Hi,
Kindly let me know How I could create a "Web Service" with my Web Dynpro DC project.
Awaiting your responses.
Regards,
MaheshHi Mahesh,
You can use the web services by creating the Model in web Dynpro
And if you want to publish your own web service then you have to create a EJB module and publish as a web service.
Thanks
Ninad -
WLI: Can't call synchronous web services from async business process?
I have three web services, X, Y, and Z, that I want to call from a business process B. X is asynchronous, Y and Z are synchronous. Therefore, B must be asynchronous. B is called from another business process, A, that must be synchronous. So, I have A call B synchronously using the SyncAsync pattern described in "Best Practices for Oracle WebLogic Integration Application Life Cycle". This worked fine in earlier development when I was only calling X from B. However, when I try to add synchronous calls to Y or Z and run A, I get the following error message from B:
com.bea.control.classic.ServiceControlException: Attempting to perform the client
callback 'doY' while servicing a blocking request from the same client. This can
result in a deadlock condition. An @jws:message-buffer tag should be placed on
the synchronous operation or on this callback.This is obviously an old error message, since it recommends an annotation in the old style. Anyway, what can I do? Shouldn't it be possible to invoke web services synchronously from process B? If so, then how? I don't know what synchronous operation it's talking about -- is it A's call to B? As for the callback, I don't see a separate callback. Annotating the SBControl's method with weblogic.jws.MessageBuffer did no good, and I can't use com.bea.control.annotations.MessageBuffer because the method doesn't return void. Can I make this work without rewriting B, and if so, how? It'd be nice if I could call X, and then call Y and Z while waiting for X's callback.
Alternatively, I could rewrite my processes so that A calls a new process C synchronously, which in turn calls B (which calls X), Y, and Z. That should work, right? Thanks for any help y'all can give me.Greetings everyone,
We have found a solution to this problem, and it is very much like one offered by Trinidad, except there was some confusion in my understanding.
http://sql-patch/B1WS/webreferences/LoginService.wsdl
Indeed, the url http://localhost/Service.asmx appears in the WSDL files, as well as the web.config.
I changed it to http://sql-patch/B1WS/webreferences/LoginService.wsdl in the WSDL files only. This did not work.
We then found it in the web.config file also, and changed it to http://sql-patch/B1WS/webreferences/LoginService.wsdl also.
The reason I was using this URL is because the files exist there. Looking at IIS, there is no Service.asmx anywhere in the B1WS path, and this confused me.
This got us one step further, but now a new error was showing itself -- 405 Method Not Allowed.
It turns out that the URL we needed to change it to is this:
http://sql-patch/B1WS/Service.asmx
That is, we replace localhost with the name of the machine, and NOTHING else.
This seems to have solved it for us, and is hopefully useful for you.
Thanks all,
Mike -
How Can I call a UCM service from SOAP request
Hi,
I have created one custom service and I would like to call that service from 3rd Party system via SOAP call. The 3rd Party system does not have the capability to call through RIDC.
Now I have exposed my service and tried to call but authentication exception was coming status code 401.
So I created one sample ADF application and tried to call the DocInfo service for testing (I thought let's try DocInfo then I will check my custom service). I downloaded the DocInfo service from UCM and uploaded the WSDL into the project and got the client DocInfoSoapClient.java file.
public class DocInfoSoapClient
@WebServiceRef
private static DocInfo docInfo;
public static void main(String [] args)
docInfo = new DocInfo();
DocInfoSoap docInfoSoap = docInfo.getDocInfoSoap();
DocInfoByNameResult res = docInfoSoap.docInfoByName("TEST_001603", null);
System.out.println(res.getContentInfo());
// Add your code to call the desired methods.
The error is coming like:
Exception in thread "main" com.sun.xml.ws.client.ClientTransportAccessException: The server sent HTTP status code 401: Unauthorized: http://xxxxxxxx:16200/_dav/cs/idcplg
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.getClientTransportException(HttpTransportPipe.java:340)
I tried a lot but same error. There should be some process by which I can send the userid and password but failed. Even I tried to send the properties as key value pair in IdcPropertyList but I know that is wrong.
I checked the Issue: https://community.oracle.com/thread/2424460
But there was no answer.
Can anyone help on it?
Regards,
SantanuHi Santanu,
You need to write SoapHandler in order to pass username and pwd. You will need 2 classes namely HeaderHandlerResolver & SoapHandler. This is how i do in in my JAX-WS clients. I generate stubs and then attach handler to webserviceinterface
PFA HeaderHandlerResolver.java and SoapHandler.java you would attach soap handler something like this in your code i have never done this via ADF so not sure.
HeaderHandlerResolver soapHandlerResolver = new HeaderHandlerResolver();
docInfo.setHandlerResolver(soapHandlerResolver);
In SoapHandler class you will mention username and pwd like this
soapMessageContext.put(BindingProvider.USERNAME_PROPERTY,"username");
soapMessageContext.put(BindingProvider.PASSWORD_PROPERTY,"pwd");
Regards,
Amol Gavali -
Can't call B1WS web services from other machines?
Hi Everyone,
We have come across a strange problem that I hope you might have the answer to.
We are using B1WS and DISERVER on a Windows 2003 Server machine. When I run code from within the machine that has DISERVER and B1WS running on it, it works fine. It's really nice actually. I register a web reference to the web service, and it connects and is able to process actions on SAP objects.
The problem I have come into is when I do the same thing, but from another machine. This means that I create a simple web app, make a web reference to the web service which is now running on another machine, and try to use the same code that works on the other machine. It fails from this other machine, and when I look at the inner exception, this is what it says:
"no connection could made because target machine actively refused 127.0 0.1 80"
I am not sure what is happening. We have reviewed the configuration, and it seems okay.
Another way of describing this problem, in case this isn't clear yet, is this:
Machine A runs DISERVER and B1WS
Running code which uses B1WS web service being hosted in Machine A works well.
Running code in Machine B, which uses B1WS web service being hosted in Machine A does not work at all.
Machine A and Machine B can see each other. They can talk on port 80, no problems.
IIS is running on Machine A, and is working fine.
I am not sure where to turn next. Please share your thoughts.
Thank you very much,
MikeGreetings everyone,
We have found a solution to this problem, and it is very much like one offered by Trinidad, except there was some confusion in my understanding.
http://sql-patch/B1WS/webreferences/LoginService.wsdl
Indeed, the url http://localhost/Service.asmx appears in the WSDL files, as well as the web.config.
I changed it to http://sql-patch/B1WS/webreferences/LoginService.wsdl in the WSDL files only. This did not work.
We then found it in the web.config file also, and changed it to http://sql-patch/B1WS/webreferences/LoginService.wsdl also.
The reason I was using this URL is because the files exist there. Looking at IIS, there is no Service.asmx anywhere in the B1WS path, and this confused me.
This got us one step further, but now a new error was showing itself -- 405 Method Not Allowed.
It turns out that the URL we needed to change it to is this:
http://sql-patch/B1WS/Service.asmx
That is, we replace localhost with the name of the machine, and NOTHING else.
This seems to have solved it for us, and is hopefully useful for you.
Thanks all,
Mike -
How can I call a Web Service in a Web Dynpro Application??
Hi All,
does anybody hav links, tutorials or what not??
Thanks, JJJHi Jesse,
You can do GET, PUT and POST using FormCalc, so you should be able to access a REST web service.
There is a example of accessing a RSS feed in this thread, http://forums.adobe.com/message/5695433#5695433
Regards
Bruce -
Calling a Web Service from PL/SQL Procedure
How can you call a web service from a pl/sql package , also is it valid to call a web service from pl/sql according to Fusion Standards..
Hi,
On way we can call a web service is to pass the Web Service URL to UTL_HTTP package:
Sample Web Service URL
===================
lv_url :=
'http://67.97.189.151:8888/plsqlsample/dbfunc?invoke=placeOrder'
|| '&'
|| 'param0=1'
|| '&'
|| 'param1=1'
|| '&'
|| 'param2=1';
Sample Call using UTL_HTTP
=====================
SELECT UTL_HTTP.request (lv_url)
INTO lv_result
FROM DUAL;
Thank you.
Regards,
Balu -
Calling a Web Service from Java
Our java guru (who is out sick....AHHHH) created all the calls that are needed to access the web service that he has running. For example the call getLongList(String user, String password) will return a list of all outstanding transactions. He made a jar file that has service has class files for PortType, Service, Service Locator and Soap Binding stub.
How do I call this web service from java? Do I have to import it into my classpath? or just call these parameters from within my java code?never mind...i got it
-
How to call COPY web service from sharepoint in SAP
Hello Experts,
I want to call COPY web service from SharePoint in SAP web dynpro / JAVA application.
However, when I try to connect to web service and download wsdl using http:// <hostname:port>/_vti_bin/copy.asmx?wsdl
it results in Unauthorized error and doesnt complete the setup. Detail error is :
Error occurred while downloading WSIL file. Error message: Deserializing xml stream http:// <hostname:port>/_vti_bin/copy.asmx?wsdl
failed.com.sap.engine.services.webservices.espbase.wsdl.exceptions.WSDLException: Invalid Response Code: (401) Unauthorized. The requested URL was:"Connect to
http:// <hostname:port>/_vti_bin/copy.asmx?wsdl , used user to connect: userid"
I am trying to connect with server user account. Any idea on what authorizations might be required or any help on the scenario .
-AbhijeetHere's an example on how to delete a list item, hopefully this helps
package com.jw.sharepoint.examples;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Properties;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.microsoft.sharepoint.webservices.CopySoap;
import com.microsoft.sharepoint.webservices.GetListItems;
import com.microsoft.sharepoint.webservices.GetListItemsResponse;
import com.microsoft.sharepoint.webservices.ListsSoap;
import com.microsoft.sharepoint.webservices.UpdateListItems.Updates;
import com.microsoft.sharepoint.webservices.UpdateListItemsResponse.UpdateListItemsResult;
public class SharePointDeleteListItemExample extends SharePointBaseExample {
private String delete = null;
private String deleteListItemQuery = null;
private String queryOptions = null;
private static final Log logger = LogFactory.getLog(SharePointUploadDocumentExample.class);
private static Properties properties = new Properties();
public Properties getProperties() {
return properties;
* @param args
public static void main(String[] args) {
logger.debug("main...");
SharePointDeleteListItemExample example = new SharePointDeleteListItemExample();
try {
example.initialize();
CopySoap cp = example.getCopySoap();
example.uploadDocument(cp, properties.getProperty("copy.sourceFile"));
ListsSoap ls = example.getListsSoap();
example.executeQueryAndDelete(ls);
} catch (Exception ex) {
logger.error("Error caught in main: ", ex);
public void executeQueryAndDelete(ListsSoap ls) throws Exception {
Date today = Calendar.getInstance().getTime();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String formattedDate = simpleDateFormat.format(today);
String queryFormatted = String.format(deleteListItemQuery,formattedDate);
GetListItems.QueryOptions msQueryOptions = new GetListItems.QueryOptions();
GetListItems.Query msQuery = new GetListItems.Query();
msQuery.getContent().add(createSharePointCAMLNode(queryFormatted));
msQueryOptions.getContent().add(createSharePointCAMLNode(this.queryOptions));
GetListItemsResponse.GetListItemsResult result = ls.getListItems(
properties.getProperty("folder"), "", msQuery, null, "",
msQueryOptions, "");
writeResult(result.getContent().get(0), System.out);
Element element = (Element) result.getContent().get(0);
NodeList nl = element.getElementsByTagName("z:row");
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
String id = node.getAttributes().getNamedItem("ows_ID").getNodeValue();
String fileRefRelativePath = node.getAttributes().getNamedItem("ows_FileRef").getNodeValue();
logger.debug("id: " + id);
logger.debug("fileRefRelativePath: " + fileRefRelativePath);
String fileRef = properties.getProperty("delete.FileRef.base") + fileRefRelativePath.split("#")[1];
logger.debug("fileRef: " + fileRef);
deleteListItem(ls, properties.getProperty("folder"), id, fileRef);
public void deleteListItem(ListsSoap ls, String listName, String listId, String fileRef) throws Exception {
String deleteFormatted = String.format(delete, listId, fileRef);
Updates u = new Updates();
u.getContent().add(createSharePointCAMLNode(deleteFormatted));
UpdateListItemsResult ret = ls.updateListItems(listName, u);
writeResult(ret.getContent().get(0), System.out);
public void initialize() throws Exception {
logger.info("initialize()...");
properties.load(getClass().getResourceAsStream("/SharePointDeleteListItemExample.properties"));
super.initialize();
this.delete = new String(readAll(new File(this.getClass().getResource("/Delete.xml").toURI())));
this.deleteListItemQuery = new String(readAll(new File(this.getClass().getResource("/DeleteListItemQuery.xml").toURI())));
this.queryOptions = new String(readAll(new File(this.getClass().getResource("/QueryOptions.xml").toURI())));
Brandon James SharePoint Developer/Administrator -
How to call a web Service from Oracle Applications?
Hi friends,
I've posted this question on OA Framework forum , but may be it's more appropiated put it here. Sorry for do it again:
It's about how to call a web service from a Form or a .sql (via Request) in Oracle Applications:
Could you please explain here the detailed steps (with code example if it's possible) to invoke a webservice from Oracle Applications?.. how did yo do it...?
I've read differents posts here and the 33097.1 metalink note (by the way, the first recommended link in this note is broken...), but there are lots of theorical concepts and no real examples to see how/from where invoke the WS
I'll have to call one webservice (I suppose the customer will give me the interface implementation)...but I've never did it with Applications so that's why I ask you for all the detailed steps...
I work with Forms 6i, Apps 11.5.10.2 and DB 9.2.0.7.
Thanks a lot.
Jose.Hello Jose,
I did using java program to call BPEL web services in 11.5.10.
I pasted below the metalink note for your reference (Note:250964.1)
The idea is first write a java program to call the webservice (in my case it is calling an BPEL web service, so this may not help directly), test it.
Then port the java program as specified in the note, so that you could call your web service through concurrent manager scheduler.
Is this ok?
Thanks
Arun.
======================================================
Checked for relevance on 25-Apr-2007
Application Install - Version: 11.5.8 to 11.5.10
Goal
====
How to register and create a Java concurrent program for Oracle Applications
Release 11i
Solution
========
1. Create your Java Concurrent Program (JCP) , using a text editor.
/*===========================================================================+
| Concurrent Processing Sample Code |
| |
| FILENAME |
| Hello.java |
| |
| DESCRIPTION |
| Sample Java concurrent program |
| About the simplest possible program, just writes a message to the |
| logfile and output file. |
| |
| HISTORY |
| $Log$ |
| |
+===========================================================================*/
package oracle.apps.fnd.cp.sample;
import oracle.apps.fnd.cp.request.*;
public class Hello implements JavaConcurrentProgram {
public static final String RCS_ID = "$Header$";
public void runProgram(CpContext ctx) {
ctx.getLogFile().writeln("-- Hello World! --", 0);
ctx.getOutFile().writeln("-- Hello World! --");
ctx.getReqCompletion().setCompletion(ReqCompletion.NORMAL, "");
=======================================
End Sample
=======================================
2. Create a sample directory under $JAVA_TOP:
$ mkdir $JAVA_TOPoracle/apps/fnd/cp/sample
3. Copy Hello.java into $JAVA_TOP/oracle/apps/fnd/cp/sample:
$ cp $HOME/Hello.java $JAVA_TOP/oracle/apps/fnd/cp/sample
4. Compile your java program:
javac $JAVA_TOP/oracle/apps/fnd/cp/sample/Hello.java
5. Test at the command line with following syntax:
jre -Ddbcfile=$FND_TOP/secure/your_dbc_file.dbc \
-Drequest.outfile=./outfile \
oracle.apps.fnd.cp.request.Run \
oracle.apps.fnd.cp.sample.Hello
6. Register your custom java concurrent program with Oracle Applications.
a. Navigate: Concurrent > Program > Executable
b. Enter details into the form
Executable: JCPHELLO
Shortname: JCPHELLO
Application: Application Object Library
Execution Method: Java Concurrent Program
Execution File Name: Hello (Insert a name that does not contain space or period)
Execution File Path: oracle.apps.fnd.cp.sample
c. Save the details
d. Navigate: Concurrent > Program > Define
e. Enter details into the form
Program Name: JCPHELLO
Program Shortname: JCPHELLO
Application: Application Object Library
Executable: Choose JCPHELLO from LOV
Executable Options :
f. Save the details
7. Add this new concurrent request to your responsibility request group.
a. Navigate > Security > Responsiblity > Request
b. Query System Administrator
c. Add new row and choose TestJava
d. Save the changes.
8. Run your new Hello Java Concurrent Program
Navigate: Request > Run
References
~~~~~~~~~~~
Oracle Applications Developers Manual for Release 11i A75545-01
==================================================== -
How to call a web service from BPEL that requires HTTP basic authentication
Hi All,
I need to calling some Web Services from BPEL (SOA 10.1.3.1 production running on XP machine). The services require HTTP basic authentication.
I have tried adding httpUsername and httpPassword properties to the ParnterLink, and I see in BPEL Console that they are deployed by checking the descriptor page. But I still get a SOAP fault, HTTP 401: Unathenticated.
I have also tried using basicHeaders (from memory) = credentials, httpBasicUsername, and httpBasicPassword. Same result.
I have done a packet trace using Ethereal, and the headers do not seem to contain the userid and password at all.
Can anyone help?
Thanks,
Mark NelsonThanks Bas,
I have resolved the issue. The provider of the Web Service had not configured if for Basic Authentication. For some reason it worked when they tested, or maybe the did not test. The only thing I had to change was to use:
<property name="basicHeaders">credentials</property>
<property name="basicUsername">WMDATA</property>
<property name="basicPassword">WMDATA</property>
Instead of:
<property name="httpUsername">WMDATA</property>
<property name="httpPassword">WMDATA</property>
I don’t know why this is, maybe because it is an Axis Web Service.
Sorry for wasting your time.
Regards Pete -
From Forms Product Management - New "HOW TO" on calling a Web Service
We've published a new "HOW TO" on how to call a Web Service from Forms.
Check out
http://otn.oracle.com/products/forms/htdocs/Forms_WebService_How_To.htm
Regards
Grant Ronald
Forms Product ManagementWe do not have a beta/pre-prodcution release of Forms9i
available for download, however the production version should be
available early in the new year.
Regards
Grant
Forms Product Management
Maybe you are looking for
-
Soap Adapter - XI_J2EE_ADAPTER_XI_HANDLER Error
Hello, we have a very informative error here for SOAP outbound adapter: Sending to the SOAP-Adapter address ..../SOAP_Adapter/MessageServlet.... with the test tool in RWB we have this error: Error category: XI_J2EE_ADAPTER_XI_HANDLER Error code: GEN
-
Adobe Flash Player does not run
I try to run a video and I get a message to download the most current version of Adobe Flash Player. I download the most current version and Adobe tells me the download was successful. I try to run a video and I get the same error message. Help; I
-
Hi Gurus I am checking the values in the faglflext, when trading partner is posted with the journal entry, the posting period is 16 (where i am posting in this period , so i need the period to be 11 ). while i check the same entry in faglflexa the tr
-
Hi All, While developing my JNI native methods, I have run across the following error: Unexpected Signal : 11 occurred at PC=0x40301743 Function=(null)+0x40301743 Library=/usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so NOTE: We are unable to lo
-
8830 4.5OS Upgrade Browser issuesm, Need help
Howdy! I'm a n00b here, first post looking for some help. I discovered the 4.5 OS upgrade when I was searching to find out how to watch youtube videos. I went through the upgrade and everything seemed to work fine. I had my company put me back on the