How to call an external web-service from Joomla - java

I am going to create a webservice (I think in java) which role is to treat a picture (IN) and to return a result (OUT). I would like to use that web service from my Joomla website.
The process will be :
1- upload of a picture from the website
2- we call the web service to treat the picture
3- we receive the result and display it in a new page
I really don't know how to proceed to do these 3 steps. My first question is : how do I call a web service with Joomla (2.5)?
Thanks

You can always use a wrapper which basically means have external websites appear inside where the article/components usually are.
Simply create a new menu item, change the type to "wrapper" and select the URL.
I think this is what you are looking for, if not please explain in more detail.

Maelkun,
I tried the example below in Joomla! using Jumi and it worked. If you have php 5.3 you can try with Sourcerer too.
http://www.vankouteren.eu/blog/2009/03/simple-php-soap-example/

Related

Autocomplete functionality for contacts module

I have an application which has a contacts module and I am using JAVA for the same.I have to implement the "Auto complete" functionality for the same. I.e., as i start typing the alphabets, search results start appearing and will eventually narrow down to the matching letter after entering the same.
Please help me with some reference JAVA code, API's and some cool stuffs to go as an add-on.
If you are looking for some example see this
http://viralpatel.net/blogs/2009/06/tutorial-create-autocomplete-feature-with-java-jsp-jquery.html
This one is basic example to make a auto complete.
And if you want some jazzy look and field then you can use jquery plug in client side
http://jqueryui.com/demos/autocomplete/
http://www.devbridge.com/projects/autocomplete/jquery/
http://www.ajaxdaddy.com/demo-jquery-autocomplete.html
I think this will help you.
I think you need to use Ajax for the same . Check out irctc.co.in , they use Ajax for station completion , quite effortlessly

Component for select friends to invite add my app

I'm trying to build component to select friends and send an invitation from my application to them. The following image displays the component provided by Facebook (in this example is another kind of invitation, but the component is the same).
http://facebook-developer.net/wp-content/uploads/2008/02/invite-form-output.jpg
I tried to use the site instructions: http://developers.facebook.com/docs/reference/fbml/request-form/
But the content is confusing. I need to implement this component in Java and in the case of the site there is a call to the getFacebookUtils () without explanation of what library it belongs in addition to a more concrete explanation.
Need help using this component provided by facebook in Java.
Thank you.
Thats under the Legacy API and you should not use it for something that is new. Also, to be clear, you cannot send invites, you can only prompt the user to send "invites". What you should use is the Request Dialog (2.0/Frictionless), which is the replacement for "invites". You implement it using javascript on the front end, assuming you are using a web interface.
https://developers.facebook.com/docs/reference/dialogs/requests/

Passing Variable from one website page to another website page without using QueryString

This question is related to a previous question
Passing Variable from page to page using ASP.NET (C#) without using QueryString
The difference in my case is that the request is coming from a different website (in java) to my website (in asp.net). I do not want the variable to appear in url.
Any suggestions !!
To explain my scenario, we are making a webpage(plugin), which can be called from any other website. To authenticate request, i am looking for a mechanism when other website will pass id & auth-key to my page. This i can use to authenticate the request. I do not want these variable to be visible.
A POST operation would work. The variable would still be part of the request, but it would not be readily visible to the user. I say "readily" visible because it won't be part of the requested URL, but it would be visible if they were to use a tool like Firebug. Short of sharing a database or some other form of "out-of-band" communication, I'm not sure it can be done any other way...
Well as chris mentioned doing a POST is the best way to achieve this. Else you can look at using javascript to achieve the same. Its pretty easy to use JS libraries to achieve the same.
Some of them that come to my mind are
a) Jquery
b) YUI
c) EXT (now Sencha i guess)
But I would definitely recommend jquery.
With jquery you have apis to do post operations. here is more on how to achieve the same.
http://api.jquery.com/jQuery.post/
Hope that helps.
I don't think it can be done without a query string. I know sessions won't work because sessions cannot be shared between Java, Asp, Asp.net, Php etc..., at least not nativly. If you have a database where you store the sessions, you can always use a session id in a query string and therefore simulate cross-language-sessions.

How to retrieve query parameter in Wicket

I am using wicket application to initiate my Java method in my code. I have the url as follows
http://localhost:8080/web/resources/org.apache.wicket.Application/StartMethod
I want to add an extra option at the end client=cutomser1
http://localhost:8080/web/resources/org.apache.wicket.Application/StartMethod?client=customer1
As I want these use the same code but for different customers
So when I run this URL from command promte it should fetch the Customer1 into my Java code
in this way..
String client = customer1
How can I implement this in Java. I mean I want to fetch this String name customer1
Wicket is strong in data binding and you should take advantage of that.
If you display in the browser data from Customer1, the Wicket knows that when you do requests from that page.
The translation of request parameters to variables happens behind the scene.
That is disconcerting at first but really powerful when used as intended.
I would suggest you select a good tutorial from the answer to this question and go through a couple of examples to see how things are done. This may take an afternoon but this will pay back for itself before the week is out.
I think I am a bit too late, but still I will say that you can use PageParameters in your page and you should make the page bookmarkable.

Java Web Application

I am interested in creating a simple web application that will take in user input, convert it to an XML file and send the file to a database.
Coding wise I feel I am okay, it is just the general setup and what implementation to use I am a bit unsure of.
At the moment I have a JSP page containing a form, the user fills out the form and on submit a POST method is sent to a servlet, in the servlet doPost() method the servlet is instantiating a java object and passing it the user inputted data. The java object then writes that data to an XML file and sends it to the database via REST.
All I would be interested to know is if this the standard/optimal way of creating such a web application.
Any and all feedback is appreciated.
Thanks
For a "simple webapplication" this high level approach looks fine in general. However, if you want more critical feedback, you'd need to give more details about the low-level approach. It may for example happen that it isn't memory efficient and thus may break when the webapp is been used by over 10 users concurrently, just to give an example.
I only question the choice for the GET method. You'd normally only use it to retrieve data (SELECT), not to create/alter data (INSERT/UPDATE/DELETE). For that you'd normally use POST, so that no one can execute it "accidently" by just clicking a (bookmarked) link. Changing GET to POST isn't that hard, add method="post" to the <form> element and rename doGet() to doPost().

Categories

Resources