Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Tuesday, March 27, 2012

Calling SSRS web services from Java using Axis

Hi,

I'm working on a project where I'll need to call the SSRS web services from a java servlet. We are using the Axis implementation of the SOAP protocol.

I've previously used SSRS web services from C#, but not from Java. Before I start this endeavor does anyone have any bits of wisdom they'd like to share that's going to make this easier?

Also, I've searched for tutorials, samples, source code, etc.. for this situation (that is, using java to call SSRS web services), but can't find anything available. Does anyone know where I can find resources such as these for this particular technology pairing?

Thanks for the help.

-M

Try WSDL2Java tool to create a java proxy to the reporting services.

The WSDL is accessible from one of these url depending on the version(2000 or 2005) and flavor (management or execution) of the service

http://<server>/reportserver/reportservice.asmx?wsdl

http://<server>/reportserver/reportservice2005.asmx?wsdl

http://<server>/reportserver/reportexecution2005.asmx?wsdl

An example on accessing .NET web services (not SSRS specific) from Java is available here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/jdni_ch08.asp

Thursday, March 22, 2012

Calling Java Application from PL/SQL code

Colleagues,

I am not an expert in PL/SQL neither Java, so I require a help here:

What I am planning to do is to use PL/SQL to call a Java application (pass 3 arguments).

The Java application is used to make call to an API that resides on a Bea Weblogic application/web server (its not used to access database).

I got already the PL/SQL Trigger, but I need to add to it the call to the Java application (the Java application already exists)

Simply, would any one provide an example of how to make that call.

Do I need to load Java classes into the Oracle database or not?

I am using Oracle 9i database, and the Java application is compiled using Java SDK 1.4.2

Many thanksHi,

To call java class from a pl/sql, you need to follow the steps.

1. First create a java file and compile it.

2. Load the java class file to the database using 'loadjava' utility.

Ex: loadjava -u scott/tiger abc.class

3. Create a pl/sql wrapper aroung the java class like

CREATE OR REPLACE PROCEDURE test (a1 VARCHAR2) AS LANGUAGE JAVA name 'abc.main(java.lang.String[])';

4. Then execute the stored procedure

exec test(<input>);|||HI,

Invoking the java stored procedures from any PL/SQL block or stored module works the same way it would for any other PL/SQL stored function.

For example:

SQLPLUS> set serveroutput on size 5000;

SQLPLUS> declare
2> temp varchar2(100);
3> begin
4> temp := ConcatTwo('Hello','World');
5> DBMS_OUTPUT.PUT_LINE(temp);
6> end;
7> /|||Thanks... suneel.kumar and satish_ct

you realy give me some ideas...|||These examples provide the capability to load specific "classes" to the
database and most will work however Oracle will have problems with
classes that import from GUI packages such as AWT or Swing.|||HI,

Did U come across any such error?|||My class is only initiate a request or call to another system API (my class doesn't import from any GUI Packages).

Many thanks to you all|||when I've tried to load the java class, but I got the following error:

ORA-04031: unable to allocate 4032 bytes of shared memory ("shared pool","unknown object","joxs heap init","ioc_allocate_pal")

would some one told me what I should do.

I think that the shared pool is out of memory so should I consult the DBA, system Admin or is it from my PC, where I am making a conection to the server/Database.

Monday, March 19, 2012

Calling a Web Service from DTS

Hi,
I created a DTS Package that is running a Java Script:
var xmlHttp=3Dnew ActiveXObject("Microsoft.XMLHT=ADTP")
xmlHttp.open("POST","http://crm01/InstallName/Ch=ADeckContractExpire.asmx/C=
heckCo=ADntracts",false,"DOMAINNAME\USERNAME",=AD"PWD")
xmlHttp.send()
When running the script from the package it runs fine, and processes
the data as expected. When I convert this to a scheduled job, it fails
with the following error:
Executed as user: CRM02\SYSTEM. DTSRun: Loading... DTSRun:
Executing... DTSRun OnStart: DTSStep_DTSActiveScriptTask_1 DTSRun
OnError: DTSStep_DTSActiveScriptTask_1, Error =3D -2147220482 (800403FE)
Error string: Error Code: 0 Error Source=3D msxml3.dll Error
Description: The download of the specified resource has failed.
Error on Line 9 Error source: Microsoft Data Transformation
Services (DTS) Package Help file: sqldts80.hlp Help context:
4500 Error Detail Records: Error: -2147220482 (800403FE);
Provider Error: 0 (0) Error string: Error Code: 0 Error
Source=3D msxml3.dll Error Description: The download of the specified
resource has failed. Error on Line 9 Error source:
Microsoft Data Transformation Services (DTS) Package Help file:
sqldts80.hlp Help context: 4500 DTSRun OnFinish:
DTSStep_DTSActiveScriptTask_1 DTSRun: Package execution complete.
Process Exit Code 1. The step failed.
Any Suggestions? =20
Thanks=20
BillHi All,
I deleted the step out of the Job, and recreated a new step and
change the type to ActiveX, and selected the JScript. I dropped the
code that I generated from the Packaged and executed the Job with No
Errors. I then scheduled the Job and it works fine. Not sure what's
going on, but I have it working.
Bill

Thursday, March 8, 2012

Callable statements, SQLServer and JRun

Hi,

I'm developing a java application which uses SQL Server as the
database. I use Callable Statements to connect to the database. I use
JRun as the app server. When
running the application I want to be able to monitor locks/process
info etc in the 'Current Activity' section in the 'Management'
section
in SQL Server.

The problem is that at the moment if I look at the 'Last TSQL command
batch' in the process or lock, it does not display the sql for the
current call. It displays what seems to be the precompiled call:
#jdbc#9;1

Anyone know how to get it to display the sql?

Is it a driver issue or is there a SQL Server setting to get it to do
this?

Thanks(cormac.foley@.gmail.com) writes:

Quote:

Originally Posted by

I'm developing a java application which uses SQL Server as the
database. I use Callable Statements to connect to the database. I use
JRun as the app server. When
running the application I want to be able to monitor locks/process
info etc in the 'Current Activity' section in the 'Management'
section
in SQL Server.
>
>
The problem is that at the moment if I look at the 'Last TSQL command
batch' in the process or lock, it does not display the sql for the
current call. It displays what seems to be the precompiled call:
#jdbc#9;1
>
>
Anyone know how to get it to display the sql?
>
>
Is it a driver issue or is there a SQL Server setting to get it to do
this?


Didn't you ask the same question a week ago or two? Yes, that was
another newsgroup, but at least you should have learnt by now that it
is a driver issue. And I hope that you should know that you should
use parameterised statements.

Well, I see on Google Groups that you also have posted your
question to comp.lang.java.programmer. Too that you did not cross-post.
It would have been interesting to see the answers from the Java folks.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||On Feb 12, 10:29 pm, Erland Sommarskog <esq...@.sommarskog.sewrote:

Quote:

Originally Posted by

(cormac.fo...@.gmail.com) writes:

Quote:

Originally Posted by

I'm developing a java application which uses SQL Server as the
database. I use Callable Statements to connect to the database. I use
JRun as the app server. When
running the application I want to be able to monitor locks/process
info etc in the 'Current Activity' section in the 'Management'
section
in SQL Server.


>

Quote:

Originally Posted by

The problem is that at the moment if I look at the 'Last TSQL command
batch' in the process or lock, it does not display the sql for the
current call. It displays what seems to be the precompiled call:
#jdbc#9;1


>

Quote:

Originally Posted by

Anyone know how to get it to display the sql?


>

Quote:

Originally Posted by

Is it a driver issue or is there a SQL Server setting to get it to do
this?


>
Didn't you ask the same question a week ago or two? Yes, that was
another newsgroup, but at least you should have learnt by now that it
is a driver issue. And I hope that you should know that you should
use parameterised statements.
>
Well, I see on Google Groups that you also have posted your
question to comp.lang.java.programmer. Too that you did not cross-post.
It would have been interesting to see the answers from the Java folks.
>
--
Erland Sommarskog, SQL Server MVP, esq...@.sommarskog.se
>
Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx- Hide quoted text -
>
- Show quoted text -


He he..u the newsgroup police or something? Yes I asked the same
question last week on Yahoo. Am interested in getting numerous
opinions on this.

I have tried a number of different types of driver and all of them
still result in the compiled sql in the 'Last TSQL command batch'
value. Interestingly when I use Microsoft drivers they seem to compile
everything..and Macromedia drivers just seem to compile stored
procedure calls which have parameters.

I need to use stored procedures/CallableStatements - it may be that is
not possible to have the uncompiled sql available in the log when
using CallableStatements no matter what driver I use.

Friday, February 24, 2012

Calendar Control issues

Hi all,

When I click on a calendar control for date parameters the page will freeze or throw a java script error. This does not happen all the time, and is not isolated to one PC. It happens randomly on several PCs. Is there any known issue with this control?

regards,

Bill

The only issue that I have seen is if you try to open the calendar control while it is still loading the iframe for the calendar. Next time it happens see if the IE status bar is still showing the page loading.|||It is in the process of loading. There are times though, when it takes 10 seconds or more to load locally, and much longer if a user is accessing the page outside of the local LAN. If the user clicks on the control during the load, a java error occurs and the page is disabled. This cant be by design , could it? :-)|||

No it is not by design. :) I am surprised that it does take so long to load. Is this happening the first time you view the report or when navigating through calendar months? If it is the first time, the calendar is one of the last things loaded on the page, if the entire page is still loading (IE will render objects and allow interaction even though the page hasn't finished loading) the calander may not be loaded until the page is loaded. Are you viewing the reports through Report Manager or your own pages? If they are your own pages, perhaps there is some improvement that can be made there to speed up the page load.

As far as anything you can do to Report Server, there isn't anything that can currently be done to affect this behavior. We are aware of the issue and are looking to fix it in a future version. In the meantime users need to be aware of the issue and wait to open the drop down until the page has fully loaded.

|||Thank you for your answer. The page is displayed through report services, not my own page. I hope you have a fix soon, as it is making report services for my company very difficult to use. On a side note, report services displayed in IE7 with a calendar control will not work at all.|||

There have been quite a few reports of problems with the calendar control (just search the forums) and the basic answer seems to be "we cant replicate any problem" so I think MS dont know what to fix.

Certainly I have the same issue as you, the calendar controls throwing script errors and taking ages to load.

|||I am just hoping that some sort of hot fix is available soon. Like I said though, it does not work at all with IE7 so if MS is planning to release IE7 as a critical update like it is rumored, it will break all RS sites.|||IE7 is only in beta 3 mode, I believe the issues with IE7 and RS will be resolved but there is no fix for IE7 Beta 3.|||So I guess the answer is "deal with it" At least most companies dont use parameters in reporting , so it should not be a big issue. |||Just to clarify, we are aware of the issue with the script errors and how to fix it. In order to be fixed in a QFE, a customer will need to contact CSS and request the fix, otherwise look for the fix in a future release. If your are hindered by this issue, your best course of action is to contact Customer Support and request a fix.|||It appears it is an IE issue. I am able to work with the calendar control fine with Firefox. Can anyone verify this?

Calendar Control issues

Hi all,

When I click on a calendar control for date parameters the page will freeze or throw a java script error. This does not happen all the time, and is not isolated to one PC. It happens randomly on several PCs. Is there any known issue with this control?

regards,

Bill

The only issue that I have seen is if you try to open the calendar control while it is still loading the iframe for the calendar. Next time it happens see if the IE status bar is still showing the page loading.|||It is in the process of loading. There are times though, when it takes 10 seconds or more to load locally, and much longer if a user is accessing the page outside of the local LAN. If the user clicks on the control during the load, a java error occurs and the page is disabled. This cant be by design , could it? :-)|||

No it is not by design. :) I am surprised that it does take so long to load. Is this happening the first time you view the report or when navigating through calendar months? If it is the first time, the calendar is one of the last things loaded on the page, if the entire page is still loading (IE will render objects and allow interaction even though the page hasn't finished loading) the calander may not be loaded until the page is loaded. Are you viewing the reports through Report Manager or your own pages? If they are your own pages, perhaps there is some improvement that can be made there to speed up the page load.

As far as anything you can do to Report Server, there isn't anything that can currently be done to affect this behavior. We are aware of the issue and are looking to fix it in a future version. In the meantime users need to be aware of the issue and wait to open the drop down until the page has fully loaded.

|||Thank you for your answer. The page is displayed through report services, not my own page. I hope you have a fix soon, as it is making report services for my company very difficult to use. On a side note, report services displayed in IE7 with a calendar control will not work at all.|||

There have been quite a few reports of problems with the calendar control (just search the forums) and the basic answer seems to be "we cant replicate any problem" so I think MS dont know what to fix.

Certainly I have the same issue as you, the calendar controls throwing script errors and taking ages to load.

|||I am just hoping that some sort of hot fix is available soon. Like I said though, it does not work at all with IE7 so if MS is planning to release IE7 as a critical update like it is rumored, it will break all RS sites.|||IE7 is only in beta 3 mode, I believe the issues with IE7 and RS will be resolved but there is no fix for IE7 Beta 3.|||So I guess the answer is "deal with it" At least most companies dont use parameters in reporting , so it should not be a big issue. |||Just to clarify, we are aware of the issue with the script errors and how to fix it. In order to be fixed in a QFE, a customer will need to contact CSS and request the fix, otherwise look for the fix in a future release. If your are hindered by this issue, your best course of action is to contact Customer Support and request a fix.|||It appears it is an IE issue. I am able to work with the calendar control fine with Firefox. Can anyone verify this?