We're writing a web application that is trying to replace all ReportManager functionality using calls to Reporting Services SOAP API.
We started working with SSRS 2008 and had our Java code working correctly. We've since had to downgrade to SSRS 2005 and now we're having problems connecting to the Server to get the list of reports available.
We make the following call:
catalog = _reportingService.listChildren(_reportCredentials.getFolder(), false);
which returns an exception - (401)Unauthorized
_reportCredentials just holds information from a properties file (like the folder to use, the username and password, etc.). _reportService is defined as:
private ReportingService2005Soap _reportingService;
...
_reportingServiceLocator = new ReportingService2005Locator();
_reportingServiceLocator.setReportingService2005SoapEndpointAddress(soapURL);
try {
_reportingService = _reportingServiceLocator.getReportingService2005Soap();
} catch (Exception e) {
throw new ReportServicesException("Could not retrieve SOAP Reporting Service.");
}
I can also connect to ReportManager as the user/password we're connecting with in the code.
All of the 'documentation' I can find is just .NET code that doesn't seem to apply to the Java code. Has anybody experienced problems like this, or know of a good resource for Java developers using these services?
We traced the problem back to having SSRS 2005 installed on Windows Server 2008. Following the steps here: http://www.omegaprojex.com/index.php/2008/10/10/ssrs-2005-on-windows-server-2008/ fixed our problem.
Related
One application to get details from an external system was developed and deployed in the IIB 10.0.0.10 version. Later, the application was moved to a new server in which IIB 10.0.0.14 was installed. The issue is that the application gives proper response after deployment or an EG restart, but giving parsing error after that. A java compute node is used for connecting to the external system and the parsing error occurs at the below line:
String response = getStringValue(detailsObject.getLastChild().getFirstElementByPath("./element1/element2/element3"));
The same service is working fine in the old server(IIB 10.0.0.10). Also, the first hit of the service after the deployment will give a proper response to the new server.
I've dowloaded and run the provided quickstat from github. It working well on a normal network but gives NPE if behind a proxy.
WARNING: An exception was thrown by com.microsoft.rest.v2.http.NettyClient$AcquisitionListener.operationComplete()
java.lang.NullPointerException
at com.microsoft.rest.v2.http.NettyClient$AcquisitionListener.emitError(NettyClient.java:426)
When I updated to v11 (11.0.1) a new error appears instead of NPE, but not working at all.
WARN NettyClient - Error emitted before channel is created. Message: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server
I've googled a lot and tried to set the default proxy in the operational context but no success.
OperationContext.setDefaultProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyIP, proxyPort)));
Could you give me an updated (corrected) quickstart which works behind a proxy? Or give me some clue how, what to set and where?
As I known, according to the Oracle document Java Networking and Proxies, the simple way to access outside the proxy is to set http[s].proxyHost and http[s].proxyPort via System.setProperty in Java to make all programs on the JVM work behind a proxy. It works in my answer using older Azure Storage SDK for the other SO thread Get Image from Azure Blob using Proxy In Java.
I designed a chat application to support a store. The chat is very important for the store because it sells and trade items, so there's lot of communication. There's two end-points, the website that contains the chat as an icon and the help desk which is accessed through a web page.
I designed a chat using the socket.io library. The system is basically a web chat. I want to make an android application that will perform the help desk tasks. Using the the javascript library was a piece of cake but I am having trouble using a java package . I using Netbeans as IDE I created a project set up as java Maven. I am just testing out and afterwards I want to build an Android App as said before.
I wrote a code like this to try to connect. I add console.log on the server to check if it was connecting but nothing happens.
io.socket.client.Socket socket = IO.socket("https://example.com.br:3009");
JSONObject obj = new JSONObject();
obj.put("id", "null");
obj.put("nome", "android");
IO.Options ops = new IO.Options();
ops.secure = true;
ops.reconnection = true;
socket.on(io.socket.client.Socket.EVENT_CONNECT, new Emitter.Listener(){
#Override
public void call(Object... os) {
socket.emit("join", obj);
System.out.println("executou");
}
});
socket.connect();
What am I doing wrong?
It turned out that I had okhttp as a dependency and the version that was using 3.9.1 generates this issue. I changed it to 3.4.1 on pom.xml and it worked. I was getting exception on the Netbeans Window but I was ignoring it "okHttp3 java.lang.NoSuchMethodError: No virtual method setCallWebSocket". I thought it was a minor issue.
Ok, I'm attempting unsuccessfully to connect to a remote datastore and populate from my local machine using the steps outlined here: https://cloud.google.com/appengine/docs/java/tools/remoteapi#Configuring_Remote_API_on_the_Client
public static void main(String[] args) {
String username = "myemail#gmail.com";
String password = "mygmailpassword";
RemoteApiOptions options = new RemoteApiOptions()
.server("myappname.appspot.com", 443)
.credentials(username, password);
RemoteApiInstaller installer = new RemoteApiInstaller();
installer.install(options);
try {
DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
...
I'm getting a 404 in installer.install(options):
java.io.IOException: can't get appId from remote api; status code = 404
Am I missing something here? I enabled the remote api in my web.xml and deployed to GAE. I am the owner of the project.
Run your service locally (with remote api enabled) and try running same code using 'localhost' and 8888 (port) and check if your code can access locally running service. Your code seems right. There are 2 possibilities -
1. RemoteApi is not enabled correctly.
2. app-name is not spelled correctly.
Other than this, I also use following code to access remote api-
installer.install(options);
try {
// Update the options with reusable credentials so we can skip
// authentication on subsequent calls.
options.reuseCredentials(username, installer.serializeCredentials());
} finally {
installer.uninstall();
}
However, that shouldn't give you the error you're getting.
I realize this is coming a bit late, but I just found this when googling because I had a similar problem, and I solved it for myself. For me the problem was, that my AppEngine app that was serving the remote API, was a python app, and the python docs instruct configuring the remote api endpoint as /remoteapi.*
However my remote api client is a java application, and apparently the remote api call it makes, goes to an endpoit like this: /remote_api. So adding that to the server route configuration (in my case app.yaml) solved the problem. Please note also, that if your remote api serving appengine app is not in the default module, the url should be something like my-module-name-dot-my-project.appspot.com
Also, you should use useApplicationDefaultCredential() instead of credentials(), it is deprecated.
Hi i am following the below link
http://oozie.apache.org/docs/4.0.1/DG_JMSNotifications.html
snippet
OozieClient oc = new OozieClient("http://IP:8888/oozie");
JMSConnectionInfo jmsInfo = oc.getJMSConnectionInfo();
Properties jndiProperties = jmsInfo.getJNDIProperties();
Context jndiContext = new InitialContext(jndiProperties);
however as per the sample code given as above when trying to see the debug information for getting JMSConnectionInfo it says
java.io.FileNotFoundException: http://[ip:8888]/oozie/versions
is it some configuration with oozie-4.0.0-cdh5.1.0 (i m using). One more info i am running the above code with separate jvm on eclipse and oozie is configured on some other machine.
I found the link http://archive.cloudera.com/cdh4/cdh/4/oozie/WebServicesAPI.html
this says
The Oozie Web Services API is a HTTP REST JSON API.
All responses are in UTF-8 .
Assuming Oozie is runing at OOZIE_URL , the following web services end points are supported:
/versions
/v1/admin
/v1/job
/v1/jobs
in my case /versions are not supported so this is the reason. however i am not sure how i
can make my oozieserver to support /versions. please help
The port that i was using was wrong it should be 11000 instead. Due to this the oozieclient was not able to establish HTTPConnection to oozie server to get the Rest call. I am adding this as might be this is useful for some other person.