Web services and forms
I´m very new at this... I want to use a web service in an Oracle Forms9i application, I have created a stub in JDeveloper, added path to CLASSPATH and used the Java Importer in Forms to create a PL/SQL package. So far so good. Now to my problem, I dont understand how to use the PL/SQL package... The web service I want to use is http://webservices.scandinavian.net/flightstatus/FlightService.asmx?WSDL, it is a web service that returns information about flights.
So is there anyone who knows how to use this web service?
The PL/SQL code that was generated looks like this:
PACKAGE FlightServiceStub /* SAS.FlightServiceStub */ IS
-- DO NOT EDIT THIS FILE - it is machine generated!
-- Constructor for signature ()V
FUNCTION new RETURN ORA_JAVA.JOBJECT;
-- Method: GetFlightStatus (Lorg/w3c/dom/Element;)Ljava/util/Vector;
FUNCTION GetFlightStatus(
obj ORA_JAVA.JOBJECT,
a0 ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT;
END;
PACKAGE BODY FlightServiceStub IS
-- DO NOT EDIT THIS FILE - it is machine generated!
cls ORA_JAVA.JCLASS;
fid ORA_JAVA.JFIELD;
mid ORA_JAVA.JMETHOD;
args JNI.ARGLIST;
-- Constructor for signature ()V
FUNCTION new RETURN ORA_JAVA.JOBJECT IS
BEGIN
cls := JNI.GET_CLASS('SAS/FlightServiceStub');
mid := JNI.GET_METHOD(FALSE, cls, '<init>', '()V');
args := NULL;
RETURN (JNI.NEW_OBJECT(cls, mid, args));
END;
-- Method: GetFlightStatus (Lorg/w3c/dom/Element;)Ljava/util/Vector;
FUNCTION GetFlightStatus(
obj ORA_JAVA.JOBJECT,
a0 ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
BEGIN
cls := JNI.GET_CLASS('SAS/FlightServiceStub');
mid := JNI.GET_METHOD(FALSE, cls, 'GetFlightStatus', '(Lorg/w3c/dom/Element;)Ljava/util/Vector;');
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_OBJECT_ARG(args, a0, JNI.GET_CLASS('org/w3c/dom/Element'));
RETURN JNI.CALL_OBJECT_METHOD(obj, mid, args);
END;
BEGIN
cls := JNI.GET_CLASS('SAS/FlightServiceStub');
END;
Hi Rajesh,
The WSDL you have mentioned in your original email is not available; getting back some .NET error page:
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed
If you can use our latest Developer Preview drop (DP4), take a look at the How-To documents [1] - How-To Develop a Web Service From a WSDL Document should help you.
You can also take a look at the genProxy command, in chapter 16 of the User Guide [2]. Chapter 13 is also a good place to get started.
Hope this helps,
Eric
[1] http://www.oracle.com/technology/tech/java/oc4j/1013/howtos/index.html
[2] http://download-west.oracle.com/otn_hosted_doc/ias/preview/web.1013/b14434.pdf
Message was edited by:
erajkovi
Similar Messages
-
How do i contact a web service using forms 6.0?
I need my application (using Forms [32 Bit] Version 6.0.8.13.0 (Production) and oracle 8) to get some informations from a web service. Does anybody have a suggestion?
I thought I could make a java bean to contact the web service and then put a java bean in a bean area but it doesn't seem to work for a client service application (either that or i did something wrong trying, but the result of a google search claims that "Javabean integration in Oracle Forms is a Forms on the Web feature only. It won't work in client server mode.")
Please, I would appreciate any suggestion to allow the form to colloquiate with the web service.That's not the answer I was hoping for (1) but I have to admit that's pretty much what I expected. I did some google search and every hint was in that direction.
I'll see if I can put put together a activex or ole2 to get the same result, even if i have next to no experience on building such components. If everything else fails I'll just have my form call a separate executable via "host" command and wait for the answer either on the db or on a file.
Thanks
(1) the answer I was hoping for was something among the lines of "Who cares? I've got this truckload of money I don't know what to do of, so I'll just give it to you. Quit that boring job and retire in luxury on some private island with a harem of perfect looking women". Quite unlikely,I know, but since I'm hoping, why shouldn't I hope for the best possible outcome? -
Get xml data from a web service into Forms?
Hello folks! I am reading active directory info from a web service into forms via imported java classes. I can read from functions that return strings just fine, but I have to get the output from getGroupUsers which returns an XmlDataDocument. How do I read this in and parse it in Forms?
I will be grateful if y'all could point me to an example.
Thank you,
Gary
P.S. Here is a snippet of how I get the full name by passing an ID:
DECLARE
jo ora_java.jobject;
rv varchar2(100);
BEGIN
jo := ADSoapClient.new;
rv := ADSoapClient.getUserName(jo, 'user_ID');
:block3.fullname := rv;Hello,
Since you are already dealing with server-side JAVA, I would suggest you create a method that would do the parsing server-side and what your PL/SQL will be dealing with is just the return string.
Here is a method I use to read an XML file (actually, it is an Oracle Reports file converted to XML) and from the string version, I will do search, replace and other things.
So, from getGroupUsers which returns an XmlDataDocument, you can adapt this method to get your data server-side and let the form module read the output data.
<blockquote>
private String processFileXml(String fileName, int iFile) throws ParserConfigurationException, SAXException,
IOException, XPathExpressionException{
try{
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
domFactory.setNamespaceAware(true);
InputStream inputStream = new FileInputStream(new File(fileName));
DocumentBuilder builder = domFactory.newDocumentBuilder();
Document doc = builder.parse(inputStream);
StringWriter stw = new StringWriter();
Transformer serializer = TransformerFactory.newInstance().newTransformer();
serializer.transform(new DOMSource(doc), new StreamResult(stw));
return stw.toString();
catch (Exception e){
System.err.println(e);
System.exit(0);
return "OK";
</blockquote>
Let me know if this is of nay help.
Thanks. -
Error while calling web service from Forms 10g
Hi,
I have defined a web service and deployed at OracleAS 10g 10.1.2.0.2. Web services is working fine as per standalone invocation URL and also using a Web Service source in Portal (OmniPortlet).
I have created a web service proxy and imported the JAR file into Forms module via Java Importer. Created a button to invoke a web service and show results on message bar.
Code for WHEN-BUTTON-PRESSED:
declare
v_javaObject ora_java.jobject;
xo ora_java.jobject;
v_name varchar2(30);
javaException ORA_JAVA.JOBJECT;
v_BigDecimalObject ORA_JAVA.JOBJECT;
begin
v_javaObject := EmpServicePortClient.new;
v_BigDecimalObject := BigDecimal.new(101);
v_name := EmpServicePortClient.getName(v_javaObject,v_BigDecimalObject);
message(v_name);
exception
WHEN ORA_JAVA.JAVA_ERROR THEN
-- In this case, the error would be
-- Argument 1 can not be null
message(ORA_JAVA.LAST_ERROR,acknowledge);
--Clean up
ORA_JAVA.CLEAR_ERROR;
WHEN ORA_JAVA.EXCEPTION_THROWN THEN
javaException := ORA_JAVA.LAST_EXCEPTION;
-- Print out the Exception by using the toString()
-- Method of the exception Object
message(Exception_.toString(javaException),acknowledge);
-- and clean up
ORA_JAVA.CLEAR_EXCEPTION;
END;
Forms got compiled successfully.
However, while invoking a service by pressing a button, getting following error at message bar:
java.rmi.RemoteException:; nested exception is: HTTP transport error: javaxml.soap.SOAPException: java.security.PrivilegedAction
Is there anything that I have missed in the configuration? or what else is causing it?
Regards,
PreetHi,
I have defined a web service and deployed at OracleAS 10g 10.1.2.0.2. Web services is working fine as per standalone invocation URL and also using a Web Service source in Portal (OmniPortlet).
I have created a web service proxy and imported the JAR file into Forms module via Java Importer. Created a button to invoke a web service and show results on message bar.
Code for WHEN-BUTTON-PRESSED:
declare
v_javaObject ora_java.jobject;
xo ora_java.jobject;
v_name varchar2(30);
javaException ORA_JAVA.JOBJECT;
v_BigDecimalObject ORA_JAVA.JOBJECT;
begin
v_javaObject := EmpServicePortClient.new;
v_BigDecimalObject := BigDecimal.new(101);
v_name := EmpServicePortClient.getName(v_javaObject,v_BigDecimalObject);
message(v_name);
exception
WHEN ORA_JAVA.JAVA_ERROR THEN
-- In this case, the error would be
-- Argument 1 can not be null
message(ORA_JAVA.LAST_ERROR,acknowledge);
--Clean up
ORA_JAVA.CLEAR_ERROR;
WHEN ORA_JAVA.EXCEPTION_THROWN THEN
javaException := ORA_JAVA.LAST_EXCEPTION;
-- Print out the Exception by using the toString()
-- Method of the exception Object
message(Exception_.toString(javaException),acknowledge);
-- and clean up
ORA_JAVA.CLEAR_EXCEPTION;
END;
Forms got compiled successfully.
However, while invoking a service by pressing a button, getting following error at message bar:
java.rmi.RemoteException:; nested exception is: HTTP transport error: javaxml.soap.SOAPException: java.security.PrivilegedAction
Is there anything that I have missed in the configuration? or what else is causing it?
Regards,
Preet -
Last Chance to Weigh In On Web Services and SOA
<p>
IDC is conducting a worldwide survey to get a developer's perspective on Web Services and Service-Oriented Architecture (SOA) in collaboration with several large IT vendors, including SAP. Originally the survey was scheduled to close on January 22; however the deadline for participating has been extended until January 31, 2007.
</p>
<p>
We invite members of the SDN community to participate in this survey regardless of what role you may play in the software development life cycle, and whether you are an individual contributor or a manager.
</p>
<p>
The results of this survey will be made available in a variety of forms to information technology vendors. Please be assured that the information you provide is intended to be used only in aggregation with the answers of other respondents.
</p>
If you complete the survey and provide your email address, the following incentives will be made available to you:
<p>
<UL type="sqaure">
<li>Access later to a pre-selected IDC publication</li>
<li>Access to a selected subset of this survey's results when they become available</li>
<li>20 contribution points on SDN</li>
</UL>
</p>
<p>
The survey is Web-based, and should take approximately 30 minutes to complete.
</p>
<p>
Click <a href=http://www.idcswdc.com/cgi-bin/survey?id=306cft target="_blank">"here"</a> to take the survey.
</p>
Thank you for your participation.hi user572206
If you don't get an answer here, there is also a "BPEL" forum:
BPEL
(tip : You can use "Your Control Panel" to make your name visible in forum posts.)
success
Jan Vervecken -
Weigh In On Web Services and SOA
IDC, an independent world-wide market research company, is conducting a worldwide survey to get a developer's perspective on Web Services and Service-Oriented Architecture (SOA) in collaboration with several large IT vendors, including SAP.
We are inviting members of the SDN community to participate in this survey regardless of what role you may play in the software development life cycle, and whether you are an individual contributor or a manager.
The results of this survey will be made available in a variety of forms to information technology vendors. Please be assured that the information you provide is intended to be used only in aggregation with the answers of other respondents.
If you complete the survey and provide your email address you will be awarded 20 contribution points on SDN, in addition to the incentives that IDC is offering as outlined in the survey introduction.
The survey, which is open until January 22, is Web-based and should take approximately 30 minutes to complete.
Click <a href="http://www.idcswdc.com/cgi-bin/survey?id=306cft">here</a> to take the survey.hi user572206
If you don't get an answer here, there is also a "BPEL" forum:
BPEL
(tip : You can use "Your Control Panel" to make your name visible in forum posts.)
success
Jan Vervecken -
Hi, Can anybody explain how to use web services in forms 10g. I have a wsdl url with me which I need to call. I also heard that I can use utl_http and utl_url package. Anbody knows what it is. So basically there are two ways to call web services into the form, either use Jdeveloper to create a stub and import it into the forms or I can use the utl_http and utl_url package. Is that right?
Please advise in details. All this is confusing.
Thanks.http://groundside.com/blog/GrantRonald?title=calling_a_web_service_from_oracle_forms__2&more=1&c=1&tb=1&pb=1 tells you exactly what to do.
-
Forms services and form builder
Hi,
We are installing Oracle Forms 10g Application Server 10.1.2.0.2. What is difference between
Form Services and Form Builder. Which one developer should be used for migration,qa purpose?
Thanks
sandySandy,
Oracle Forms Services is a part of the Oracle Application Server and is used by the apps server to display a Form built with Oracle Forms. Forms run inside a Java container in a Web Browser (Internet Explorer, etc.).
Oracle Forms Builder is a Rapid Application Development (RAD) tool used for creating user interface applications. Your developer will use the Forms Builder to create new or modify existing Forms applications.
I'm not sure what you mean by Migration and QA. Are you migrating from an older version of the Forms Builder? As to QA, who ever is performing the QA would need the Forms Builder only if they need to look at the PL/SQL code in a Form for standards compliance, proper logic, etc.
Hope this helps.
Craig... -
MDM web services and the MDM BP services
Hi *,
I need to know what is the difference between the standard MDM web services and the MDM BP services. How do I decide which set to use?
- KrisSorry but what are BP services? Do you mean Business package?
If yes the approaches are completely different - you use Web Services when you have to customise the application and build your logic/functionality into the app. CRUD operations are procided by Web Services - you need to form your wrapper application from scratch and develop!
With BP - it involves least development effort bearing in mind that its all standard content and not yet completely customizable. So based on your requirements plan whether to go for Business Package or Web Services or Java API completely... -
B1 Web Services and license?
hi all,
Does anyone know about B1 Web Services and license?
How does the license calculated?
Meaning that each time user login to B1 Web Services need license same as SAP B1 2007?
Or any user can login as free?
Thank you.
Best Regards,
dannyHi Danny,
here is the license request link and the link provides info about your question:
1. https://websmp202.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000548322&_SCENARIO=01100035870000000183
2.
https://websmp202.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000705857&_SCENARIO=01100035870000000183&_ADDINC=011000358700001192682007E&_OBJECT=011000358700000406422008E
3.FAQ
https://websmp202.sap-ag.de/~sapidb/011000358700001571522005E
you could also read the license guide that can also be downloaded from the link.
Another info from 1st link is ;
* Effective: May 1st 2008
New limited user licenses
Entry-level user remains
Add-On Access User is being replaced by the new Indirect Access User
No changes to the professional user
No changes to 'named user' concept
No changes to the existing CRM Web User, E-Commerce server and existing development tools
New discount model aligned with drive to SAP Business One sweet spot
Existing Professional user price remain
Rgds, -
Enabling Usage Rights for Web Service and Database connectivity
We are looking for code that allows us to enable web service and database connectivity rights into a form. We are using LiveCycle Forms 7.2 to render the XDP and merge data. Because we are merging data into the form, it has to be reader enabled through the code everytime it is presented to the user in our application.
usageRights[0] = com.adobe.document.pdf.DOCUMENT_SAVE.value;
usageRights[1] = com.adobe.document.pdf.FORM_FILL_IN.value;
usageRights[2] = com.adobe.document.pdf.FORM_EXPORT.value;
usageRights[3] = com.adobe.document.pdf.FORM_IMPORT.value;
usageRights[4] = com.adobe.document.pdf.FORM_ONLINE.value;
Anyone's help would be greatly appreciatedThis topic was cross posted. See responses here:
http://forums.adobe.com/message/2111421#2111421 -
Web services and wsdl for beginners
Hi, I wonder if someone could help me, I need a guide on how to create, consume and publish web services and wsdl in jboss for beginners, using the tools of eclipse or netbeans.
Thank you very muchMy intention is to create web services to consume from PDF forms, I thought it was the right way from eclipse, this is good practice or is there a better way?
Thanks. -
Diff b/w Web service and window service
What is the difference between web service and window service, whether the both are same or not, Give some explain about that each one and give some examples also.
An XML Web service is a component that implements program
logic and provides functionality for diseparate
applications. These applications use standard protocols,
such as HTTP, XML, and SOAP, to access the functionality.
XML Web services use XML-based messaging to send and
receive data, which enables heterogeneous applications to
interoperate with each other. You can use XML Web services
to integrate applications that are written in different
programming languages and deployed on different platforms.
In addition, you can deploy XML Web services within an
intranet as well as on the Internet. While the Internet
brings users closer to organizations, XML Web services
allow organizations to integrate their applications.
A Windows service starts much before any user logs in to
the system (if it has been setup to start at boot up
process). A Windows service can also be setup in such a way
that it requires a user to start it manually ? the ultimate
customization!
Windows services run as background processes. These
applications do not have a user interface, which makes them
ideal for tasks that do not require any user interaction.
You can install a Windows service on any server or computer
that is running Windows 2000, Windows XP, or Windows NT.
You can also specify a Windows service to run in the
security context of a specific user account that is
different from the logged on user account or the default
computer account. For example, you can create a Windows
service to monitor performance counter data and react to
threshold values in a database. -
Pl/Sql web service and collections not working
Hello
I'm trying to create a web service from a function in a package which returns a collection. The creation of the web service and its deployment seem to work correctly. I do get the following warning :
WARNING: OWS-00077 The Value Type class: pxWsLang.PamLanguagerecordBase does not have a valid JAVA Bean pattern
but I don't think this is the source of the problem.
When I try to test the web service using the endpoint in the wsdl I get the following answer in the browser:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>env:Server</faultcode><faultstring>Error creating target: pxWsLang.WsLangUser</faultstring><faultactor></faultactor></env:Fault></env:Body></env:Envelope>
In the DOS window for the OC4J I get the following error :
2006-11-15 09:21:25.852 ERROR OWS-04005 An error occurred for port: {http://pxWs
Lang/WsLang.wsdl}wsLangSoapHttpPort: javax.xml.rpc.JAXRPCException: Error creati
ng target: pxWsLang.WsLangUser.
The PL/SQL code is as follows :
Object:
CREATE OR REPLACE TYPE PAM_LanguageRecord as OBJECT
NR NUMBER(3),
SYMBOL VARCHAR2(2)
Collection:
CREATE OR REPLACE Type PAM_LanguageTable as Table of PAM_LanguageRecord;
Package body :
create or replace package body PAM_TEST is
function CursorTest return Pam_LanguageTable is
Res_LangTable PAM_LanguageTable;
cursor cur is select * from stc_languages;
begin
Res_LangTable := new PAM_LanguageTable();
for Rec in cur loop
Res_LangTable.Extend(1);
Res_LangTable(cur%ROWCOUNT) := new PAM_LanguageRecord
(Rec.NR,
Rec.SYMBOL
end loop;
Return Res_LangTable;
end;
end;
I'm using JDeveloper version 10.1.3.1.0.3984
How can I get this to work ? (without using Apache Axis or other tools :-)
Is it supposed to work ?
Many Thanks
PaulHi,
for the "error creating target" problem I found the solution here:
[WS from a PL/SQL package]: Error creating target
Hope this helps.
Regards,
Patrik -
Web service and servlets in the same project...web.xml?
Hello, I have a problem with my web service.
I have a server, which displays a web service. I programmed this service with JAXRPC.
I have a client, in another directory. I succeded in compiling, deploying and running the web service.
The problem is that after I tried to integrate this service in an existing project. This project contains servlets. In these servlets, I'm using sessions.
These servlets are on the same side as the server of the web service. Because of the implementation of my code, I'd like to use in the class that represents the server of the service, the same session as the one I'm using in the servlets.
But of course, it's not working by itself. I know there's something to do with the web.xml files.
The thing is that I created a web.xml file for the service, and another for the servlets.
I was thinking of joining both of them in one xml file, but everything crashes then...
Could someone tell me how to create a project with a web service and servlets, and mostly how to configure the xml file??
Thanks for any help
PhilippeHello, I have a problem with my web service.
I have a server, which displays a web service. I programmed this service with JAXRPC.
I have a client, in another directory. I succeded in compiling, deploying and running the web service.
The problem is that after I tried to integrate this service in an existing project. This project contains servlets. In these servlets, I'm using sessions.
These servlets are on the same side as the server of the web service. Because of the implementation of my code, I'd like to use in the class that represents the server of the service, the same session as the one I'm using in the servlets.
But of course, it's not working by itself. I know there's something to do with the web.xml files.
The thing is that I created a web.xml file for the service, and another for the servlets.
I was thinking of joining both of them in one xml file, but everything crashes then...
Could someone tell me how to create a project with a web service and servlets, and mostly how to configure the xml file??
Thanks for any help
Philippe
Maybe you are looking for
-
hi When i created a SO, Payment Guarantee Procedure's value in Billing Document tab was '000001'(Letters of credit) automatically, and there is one error log when clicking on the 'Finance Doc. List' button. Now, anyone can tell me why the error log w
-
A Mighty Mouse and a Mighty 1 year Old Clash
I've got a mouse question about, uh, the Mighty Mouse (the one that allows has five buttons, and a scroll dot. it was included in my quad purchase a couple of months back). My one year old son likes the red light underneath my mouse, and will try to
-
How to send the output of one step as input to next step
Hello All, I have a question that how to send the output of the first step as the input to the next step. for e.g consider a test sequence as below, 1.battery ON. 2. read Voltage 3. Check battery voltage. as initi
-
Custom SQL in Webi reports reverting to gerenated SQL when exporting univ
Hi all - I've searched the forum and didn't find any posts of the sorts regarding my issue. I was wondering if anyone has experienced the following behavior in WebI XI R2. We have a few reports that run on a scheduled daily basis. The report writer
-
System description 1. Oracle BI Standard Edition One (OWB 10.2 + Oracle Std. Ed. One 10.1) 2. Windows Server 2003 R2 3. Oracle 9.2 (External server) Problem description We have a database Oracle 9.2 as a source database module in our Oracle Warehouse