Sql Server Reporting Service 2010 WITH JAVA ee application - java

I am trying to integrate Sql Server Reporting Service with Java EE application.
I can see 2 reports on the reporting server. I am trying to use the RS web service to access the server. Steps taken by me are
Created Dynamic project in Eclipse
Got to New - Web Service client and entered the Web service defination as
://serverName:port/ReportServer/reportservice2010.asmx?wsdl
I see in my project the below packages
com.microsoft.schemas.sqlserver.reporting._2010._03._01.ReportServer
com.microsoft.schemas.sqlserver.reporting._2010._03._01.ReportServer.holders
My code:
com.microsoft.schemas.sqlserver.reporting._2010._03._01.ReportServer.Reporting‌Service2010SoapProxy service = new com.microsoft.schemas.sqlserver.reporting._2010._03._01.ReportServer.ReportingSe‌​rvice2010SoapProxy();
String endPo="://serverName:port/ReportServer/reportservice2010.asmx?wsdl";
service.setEndpoint(endPo);
service.logonUser("serverName\\username", "password",null );
The error is:
AxisFault faultCode: {xml.apache.org/axis}HTTP faultSubcode: faultString: (401)Unauthorized
After this I am not sure what I need to do. Please help me.
I also tried to consume this web service using a proxy but I am getting an error.
Kindly help me on what should be exactly done in order to consume SSRS 2010 webservice in Java.
Regards,
Neel

My guess is that you've got incorrect authentication settings.
Your generated proxy is likely using HTTP Basic authentication, which by default isn't supported by reporting services. If you want to support it (if it's acceptable?) you need to enable the RSWindowsBasic authentication type.
Have a look at http://msdn.microsoft.com/en-us/library/bb283249.aspx for the documentation on how to do so.
Ongoing, you'll need to research how to make your java proxy work with NTLM.

Related

how to create a "https" secured REST API from a SOAP servies in java springboot

I am working on integrating a SOAP service provided by european VAT validation service VIES.
the SOAP service is hosted at following links
https://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl
http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl
I think both of them leads to pretty much same site with one being http and other https
(please let me know if there is a difference).
so I integrated the wsdl into our spring boot application and it worked fine when I tried in in my local host which was http. but as soon as I hosted it in to our live server which is https it started giving error reply.
I searched for possible reasons why it isn't working and ended up with the conclusion that the SOAP services provided by VTES works only in http sites.(let me know if I am wrong)
but when I searched for more solutions I found more sites that provide https secured REST application that uses same SOAP service (https://vatlayer.com/) . We tried to reason with our client to purchase one of those since they only allow a limited number of free VAT validations, but they are not happy with that,
but it got me thinking since they can built a https secured REST API with this thing it means I can do that to. so I searched for a solution but couldn't find any, can anyone please give a insight into it about how it is done.
Thanks and regards.
If you are calling the link from the web browser(client side) and if your live web application runs on HTTPS, then you should also call the SOAP service with HTTPS or otherwise the browser will see it as violating the Same Origin Policy and will block your request.

Spring Boot ADFS SAML Request Issues

I have been tasked with taking an existing Java Web application, using JSP, and add in Multi-factor authentication. We are using Microsoft ADFS. The trust relationship setup by our administrator looks like this:
I've tried using open source helper libraries such as Coveo/saml-client and Onelogin/java-saml. It may have been my understanding, but both proved to not work so well. No errors in the code, just when an error when submitting my request.
We have folks in Brazil who have successfully implemented the same, but they developed their application using Spring Boot and ulisesbocchio/spring-boot-security-saml. So I am trying to replicate that effort.
Using one of the sample applications from ulisesbocchio/spring-boot-security-saml and some of the configuration from our Brazil team, I have a spring boot application, but I am still receiving the same bland, generic ADFS error:
My AuthNRequest, as generated from the ulisesbocchio/spring-boot-security-saml is:
I think the error is caused by ADFS not finding the trust when I am using the Entity ID, or Relying Party Identifier, Mixing. I've also tried using http://machine name/Mixing with the same error.
Maybe this is not the issue, and if that is the case, then I have no idea where to look next.
Please help me figure out where I am going wrong.

How to authenticate with OIDC in JasperReports using Web Service Datasource?

We are using web service datasource to interact with REST data in Jasper Reports.
That Web Service data source has 2 methods of authentication:
Basic
Google Authentication key
So we cannot query it with our actual security implementation.
Security description:
We are using keycloak and Open ID Connect protocol for protecting the endpoints.
Therefore, if we would like to query http://<host>:<port>/endpoint we need to have signed JSON Web Tokenon the client (jasper server) side to access it.
Did somebody already had this issue?
Is it possible to solve it without modification in Web Service plugin source code?
Used JasperReports Server version: 6.4.2

RAD 8.5.5 and Websphere 8.5 - not creating *_Deser and *_ser classes for webservice

I have a web service, where I am required to make a contract change. The contract change is the easier part, and I was able to make the changes to service and deploy it on the WAS 8.5 application server.
When I triggered a sample request from SOAPUI to validate my changes, I saw that my request from SOAPUI could not be successfully parsed and that is when I noticed that *_Deser.class, *_ser.class and *_helper.class for my services objects are not created after the change. Due to this, the SOAPUI request could not be processed by the SAXParser.
Here is the technology stack that I am using:
Rational Application Developer : 8.5.5
Websphere Application Server: 8.5
Java: 1.6
Webservice Runtime: IBM Websphere JAX-RPC
Note: I have to stick to this runtime :(
Any idea, why these classes/java files to not be generated?
Thanks,
RS
Found the reason behind the issue after lot of research on internet :) . https://www.ibm.com/support/knowledgecenter/en/SS8PJ7_9.1.1/com.ibm.webservice.doc/topics/core/cruntimes.html

Creating an application with Google Web Toolkit that interacts with MySQL

I've created a web application in Java with Google Web Toolkit (GWT). On the client side, GWT generates an input box and (using the GWT search api) conducts a web search. I'd like to push some of the information from the web search into a MySQL database so that it can be analysed using a machine learning application (Weka). I've got an RPC running that interacts with server side code. In that server side code, I tried to establish a connection to the MySQL database.
I'm currently running the project locally, so, as far as I can tell, google app engine is hosting it. This is supported by the fact that when I run the application I get the following message:
Initializing AppEngine server
Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
The server is running at http://localhost:8888/
However, although I'm able to use the search part of the application, it throws an exception when trying to connect with my MySql database.
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
Caused by: java.security.AccessControlException: access denied (java.net.SocketPermission mysql.database.location resolve)
I've tested the database connection from a regular (non-web based) Java program and there's no problem connecting to it from outside of the web application. I believe that I'm getting this error because google app engine won't allow connections to outside databases.
In short my questions are:
1. Although I'm using Google App Engine, is it possible to use a server side code to connect to MySQL? (I'm assuming no, but this would be ideal).
2. Is it possible to switch to another server (like Tomcat)? If so, can anyone point me to references about how to do this? I found an old stackoverflow question about how to use tomcat (http://stackoverflow.com/questions/2208181/gwt-app-deploying-on-tomcat-or-any-other-servlet-container) but it no longer directs to a place that has information about using other servers.
Thanks for your help and please feel free to ask follow up questions if you'd like me to provide more info.
GAE disallow any access to other servers. You can use URLFetch service, but it's probably not what you want, and you cant use it for MySQL connection. BTW, you can create your own, http based protocol, for interacting with your other modules, but it's may be too complicated.
GWT compiles to javascript, and it works only on client-side, so it' doesn't matter what you're using on your server side, it could be used any programming language and any webserver (remember that you can use JSON to communicate, instead of default protocol). It's just default implementation of RPC build using java servlets, and you can use it inside any java web container, including tomcat. GWT was developed few years before GAE, it's totally independent projects, and it isn't requires to use GAE for server side.

Categories

Resources