[Profile Register/Log In] (What's This?)

From: RONALD BICH Owner <ronaldjbich@q.com>
Subject: [techies] Fwd: Forms web.show_document calls http through a browser is there a web. to call the http as a web service?
Date: Fri Feb 14 17:58:45 2014

Not sure what happened to text in my original send but here it is below.

----- Forwarded Message -----
From: RONALD BICH Owner <ronaldjbich@q.com>
To: Techies Mail <techies@rmoug.org>
Sent: Thu, 05 Sep 2013 14:02:01 -0400 (EDT)
Subject: Forms web.show_document calls http through a browser is there a web.[function] to call the http as a web service?

All I have a call to a url with http for an adobe forms merger java application to print business forms combined with data extracted from the database based on parameters passed into the url called.  I am currently using web.show_document and this prints the document called using the http with the parameter values.   However I am getting a blank browser page that pops up or one with the following message:

The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

XML document must have a top level element. Error processing resource '

The java developer I am working with is telling me this comes up because I am calling their url (http) using web.show_document which will return the web service in a browser and that I need to call the web service directly not using a call through the browser. 
1) Can anyone verify that is what web.show_document does.  
2) Is there another function available to use in Forms to replace the web.show_document that will call the url (http) as a web service not through the browser.

I did find reference to calling a web service through Forms here http://www.oracle.com/webfolder/technetwork/tutorials/obe/forms/11g/sms_webservice/webservices_forms_11g.htm
with preliminary setup for the web service, which is already setup.   Then it provides the information below on calling the web service in Forms.  

I can print the form by using web.show_document by just passing the url in an http call, is there a matching Oracle function I can use to call that web service just passing the http like I do using the show_document?  or do I need to import the java code and call the java class as identified below?  So I would think there is a way to substantiate the web service call without opening a browser page or having to code the information below.   I am going to look a little further out on My Support, but I thought I would throw this out here to see if anyone might know if there is a function available to make a call to the web service by passing a url that will not open a browser.

Thanks, in advance.  If anyone is interested in the answer let me know I will post it here when I find it if no one from this list has the answer.


Importing the Java Code


Open Forms Builder and select Program | Import Java Classes to import the Java code. Expand the tree until you get to the respective class.

Show Screenshot for Step

Select Options in java importer dialog, uncheck Generate persistent names then check Include inherited methods/fields. Click Close and then click Import in the Import Java Classes screen.


Repeat for java.lang.Exception.
Hint: also reference in the CLASSPATH the path to ORACLE_HOME/<jdk_home>/jre/lib/rt.jar and just fill in the Import Classes field wih java.lang.Exception.

Calling the imported Java class


Add the follwing PL/SQL code in a trigger:

 jo ora_java.jobject;
 xo ora_java.jobject;
 rv varchar2(100);
 ex ora_java.jobject;
 JO := SendServiceSoapClient.new;
 RV := SendServiceSoapClient.sendMessage(JO,:BLOCK3.PHONE_NUMBER, :BLOCK3.MESSAGE_BODY, xo, xo);
  message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);