Unable to call a secure webservice after making a secure call over MQ - web-services

I am working on a j2ee project, which is a public website. The application has a lot of security built in.
It makes a call over MQs to a mainframe DB, i believe its a secure conversation. Everything works fine till this place.
My job is to make a call to a third party secure webservice, the url for the webservice is a https url.
When i make the first call from the application to the webservice, everything works well but if i place this call after the mainframe call, I get the following error.
the trust store located at "mynode" cannot be loaded. DerInputstream.getlength length tag=127 too big
Please pardon me, I cannot paste the code or config here, as its a client project.
The environment used is: IBM WAS 6.1 with webservices feature pack 6.0.15 & Spring Webservices 1.5.4
Any help would be appreciated. Thanks in advance

By default, there's only one keystore per JVM. Once you load the WMQ one, the web service will fail and vice versa. You can write code to manage multiple keystores as described in this post. In that case I suspect WMQ will need to use the JVM keystore while your app can select the alternate keystore through code.

Related

Jetty vs Weblogic Axis Response deserialization difference

I am testing my application with both Jetty(Eclipse) & Weblogic. I am calling an axis web service, receive a response and deserialize it. While everything works like a charm in Jetty, when I pack & deploy my application to weblogic I receive
org.xml.sax.SAXException: Invalid element in
com.xxx.yyyy.soa.schemas.INVOICE_ITEMType - CHARGE_TYPE
I am sure, both call the same Web service URL.
I decompiled the INVOICE_ITEMType class at war that I deploy to weblogic and made sure there is CHARGE_TYPE at INVOICE_ITEMType class.
What should I do to further investigate the case? I am stuck
Thank you
Finally realized that it is a classloader issue. My application unfortunately calls different web services from same third party company, whose interfaces re-uses same named-packeged objects with different implementations.

How to make Django pass cookies when communicating with Node.js server using socket.io?

I am currently developing an instant messaging feature for my apps (ideally cross platform mobile app/web app), and I am out of ideas to fix my issue.
So far, I have been able to make everything work locally, using a Node.js server with socket.io, django, and redis, following what most tutorials online suggest.
The step I am now at consists in putting all that in the cloud using amazon AWS. My Django server is up and running, I created a new separate Node.js server, and I am using Elasticache to handle the Redis part. I launch the different parts, and no error shows up.
However, whenever I try using my messaging feature on the web, I keep getting an error 500:
handshake error
I then used the console to check the request header, and I observed that the cookies are not in there, contrary to when I am on localhost. I know it is necessary to authorize the handshake, so I guess that's where my error is coming from..
Furthermore, I have also checked that the cookies do exist, they are just not set in the request header.
My question is then: How can I make sure Django or socket client (not sure who's responsible here..) puts the cookies in the header??
One of my ideas was that maybe I am supposed to put everything on the same server, with different ports, instead of 2 separate servers? Documentation on that specific architecture problem is surprisingly scarce, compared to the number of tutorials describing how to make it work on local.
I hope I described the problem accurately enough! :)
Important note: I am using socket.io v0.9.1-1, only one compatible with a titanium mobile app.
Thank you for any help!
All right, so I've made some progress.
The cookie problem came from the fact I was making cross-domain request, adding a few lines enabled CORS, which didn't solve the cookie issue, but allowed me to communicate between servers (basically I set the headers of the response using express. I then passed necessary data in the query, even if not the most secure way to do it, I'm just building an MVP, and it's enough for now.
I haven't been able to make the chat work from my Titanium mobile app, but since I can use a webview to handle it, I will be fine.
Hopefully that will help someone.. If anyone needs me to post some code snippets I will gladly do so upon request!
Cheers

Creating a New Web Service Consumer Domino

I am trying to import a WSDL in to my Domino Designer 9.0.1 client. I have downloaded the WSDL file and specify it in the Local File part of the wizard.
I click OK and get the error
"The requested operation failed. Server redirected too many times (20)"
I have imported other WSDL's without a problem and the only difference with the one I now need, is that I need to login to see the WSDL.
Does this stop the wizard?
If so, is the only option writing the java agent from scratch to access the data?
Obviously I cannot provide the actual wsdl I am trying to attach to as it is a paid service, so not sure what other information I can provide to help find a solution.
Thanks
Graeme

Building web services without a web server

OK, this is impossible, but I will try to explain the situation here.
Let's say we have cases, that we need a fast setup of a web server in order to have a simple soap web service running (querying a db and so on).
In VS though, upon debugging a web project, it creates a quick ASP.NET development server without relying on the actuall IIS that might be installed on the PC.
Is there any project that does something like that?
This would be ideal for small projects, where a simple executable would get a server ready to go and would allow web services to be executed right away.
I have looked at some stuff over the net like http://msdn.microsoft.com/en-us/magazine/cc163879.aspx and http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2004/05/24/4479.aspx but they seem to be quite outdated and i am not sure how well they work (havent tested them thoroughly)
EDIT: I have build an application like the one you suggest. However, how can i implement HTTP GET/POST requests to the service using this method? I tried using WebGet after my operationcontract but it didnt work. For example, my service is at http://localhost:8080/Service and i would like to use it such as http://localhost:8080/Service/getMethod?x=2.
I believe that the development server used by Visual Studio is based off of the Cassini code base (of which there is a fork here). I also found this article on hosting the asp.net runtime. It was also created a while back (2004), but has been updated since (2008). I think a lot of the core concepts are probably still the same.
Another approach would be a roll-your-own web server using the HttpListener class. This could take some work if you want to use it for hosting asmx type services, but if you were doing RESTful services, it isn't too bad of an option (this is actually how RavenDB works if you are not hosting it under IIS).
A WCF service can be hosted in almost any kind of application, including a Windows Service or a console application. There is no need for a web server at all.
Alright,
i've done it so im posting it here to help anyone who has issues with similar problems.
Create your WCF Service file as usual and then by using ServiceHost (or WebServiceHost) you can easily create a WCF service.
In order to use GET http requests to make it simple to communicate with mobile devices (such as iphone) you can use WebGet above your service methods and make sure you manually add a service endpoint using WebHttpBinding for WebServiceHost or WebHttpBinding with an WebHttpBehavior for ServiceHost.
Then you can call your service methods such as http://localhost:port/webhttpendpointaddress/mymethod?x=2.

Is it possible to integrate Kerberos authentication into Jetty 6?

We currently have an application that runs an embedded jetty 6.1.14 server to which we need to add authentication via Kerberos. I'm new to Kerberos, which makes the task about 100x harder that maybe it should be. I've scoured the internet and have found conflicting reports as to whether or not it is even possible but nothing much to provides guidance as to how to proceed.
I've managed to have the server basically be able to authenticate the users via kerberos but can't find away to have the client automatically send its kerberos ticket: I have to use the from auth-method, though there are hints that this may be using filters, which are very poorly documented.
My question - and I apologize for it being a bit vague, I've not been this exasperated in quite a long time - is to request some guidance for plugging in kerberos authentication without login forms in Jetty 6? Or am I just out of luck? Has anyone added this type of authentication to jetty 6?
If Jetty supports Servlet Filters (JSR-53), then this open source project http://spnego.sourceforge.net might be what you are looking for.
You have to prepare your domain environment first. Make sure that your server if part of your domain (joined it). Then you have to create an machine account and assign an SPN. If you have done that, create a keytab for that account. From now on a client will be able to search for the host in the domain and create a ticket for. Then comes Jetty into play.