• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Passing info between J2EE and DOTNET web-apps.

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have J2EE Websphere based secure web application. I am using IBM LDAP server for initial user authentication. On successful login, I have list different J2EE web apps available for user. User can access by pressing any buttons on main screen.

I have an existing .Net based application available. I also have web-url for this application. I wanted to add this entry point in our J2EE based main screen.

My question is I wanted to pass some secure information to DOT NET application so that they can utilise this information in their app.

I have one solution for this:
I can call sendRedirect(DOTNETAPPURL) and append some additional info to URL. Dotnet app can decode this URL to get passed information. problem with this method is, secured information being appended as browser URL. I know cookies is not useful.

Let me know if gurus have any other idea of passing info between different applications or any other leads ....


Thanks,
Lance
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can only use request parameters (in case you use POST requests) and URL parameters.
Your best bet is to use HTTPS for communications and (if this is possible) have the servers set up to accept only requests from trusted sources.

As the IP addresses of the current users and their credentials are known on the J2EE server (after all, they logged in through it in the first place) any request from elsewhere can be blocked and if user credentials are sent with the requests originating through .NET they can be checked against logged in users as well, eliminating the possibility of one user requesting information only another is allowed to see.

Always use POST requests when dealing with situations like this, it eliminates the request parameters from the URL.
And remember that only strings can be passed this way.
 
Lance Clinton
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeroen,

Thanks for your quick valuable reply. I have one more quick question:

When I use sendRedirect(DOTNETURL) --> It is going as HTTP Get but not as post. Is there any settings I can make to send it as HHTP POST action instead of get.

Thanks a lot
 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you could use database to share the secured information or maybe xml serialize the data and have the dotnet read it.

You might have additional overhead of cleaning up the info in database or deleting the data from file system.
[ March 04, 2005: Message edited by: rahul V kumar ]
 
Lance Clinton
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rahul,

DOTNET application is completely developed and matained by different group which is located different city and we do not have any shared database access between J2EE apps and dotnet apps. And we wanted to leave like that if possible.

So only left option for me is to utilise the options avaible in HTTP/HTTPS and Servlet APIs. Can you further explain me how can I pass serialized XML object to dotnet app.

Thanks

 
rahul V kumar
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can't use open a HttpConnection or a HttpsConnection and post the data to their url and have a response (Some token) from their server. Now you could redirect the user to their Application and send that token.

.Net Application could use the token you have supplied and pull out the data that you have sent through using HttpConnection or HttpsConnection.

By doing so you are not embedding your data in the URL.

I am not sure if this is the best way around ..but just throwing some ideas.

I have some questions for you. Maybe it will help find the best solution to address your issue.

1) But how often you need to send data from J2EE to .Net ?
2) Is it always one way communication. Does .Net send information to J2EE?
3) How do you make sure that sure that your sessions are active on J2EE & .Net as I guess its possible for the users to go back and forth between the applications.
[ March 04, 2005: Message edited by: rahul V kumar ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lance Clinton:
Hi Rahul,

DOTNET application is completely developed and matained by different group which is located different city and we do not have any shared database access between J2EE apps and dotnet apps. And we wanted to leave like that if possible.

So only left option for me is to utilise the options avaible in HTTP/HTTPS and Servlet APIs. Can you further explain me how can I pass serialized XML object to dotnet app.

Thanks





I've had pretty good luck using Apache Axis (the web service engine) with .NET. Both have tools to autogenerate code for you from the other's WSDL.
Http://xml.apache.org/axis
 
reply
    Bookmark Topic Watch Topic
  • New Topic