Re: jsp client for axis2 webservice



On 31 Okt., 00:22, Lew <l...@xxxxxxxxxxxxx> wrote:
cod3nam3 wrote:
Actually this is my problem. I generated the stub code and it created
two java [sic] classes: webservice2stub.java and

Are you sure it wasn't "WebService2Stub.java"?

webservice2callbackhandler.java. If i [sic] use WTP webservice client wizard

and "WebService2CallbackHandler.java"?

in Eclipse i [sic] only get the webservice2stub.java so i [sic] assume i [sic] dont need
the webservice2callbackhandler.java. But what do i [sic] do with the
webservice2stub.java. Where exactly do i [sic] have to put it and more
importand how do ich call the stub code from the jsp [sic] page and what
functions do i [sic] call to do that.
I know thats a lot of stuff i [sic] am asking here, so if you know some how
to with code examples... that would help me a lot. Or if you habe the
time, could you write some short example.

Please do not top-post. Use trim-and-inline posting.

Read the Java EE tutorial on the Sun web site. It talks generally about how
to call logic from a JSP.

Essentially, all the JSP does is POST an HTTP request to the application
server. A servlet on the app server receives the request, parses out the
request parameters, and passes them along to an instance of a regular Java
class, usually a Bean. That object in turn will perform some processing, say,
calling one of the stub methods that you have. This will be just a series of
regular method calls, like

Result result = invokeService( ParmType parameter, ArgType argument );

where invokeService() is one of the methods in a logic or web-service stub class.

The object that the servlet called will produce a result. Using that result
and some identifier for what JSP made the request, the servlet decides what
JSP to show next, extracts a RequestDispatcher from the request and does a
call to the RequestDispatcher forward() method to invoke the new JSP. Usually
some result from the business logic will be embedded into a request attribute
or the session for the new JSP to use.

Google or search Sun for "Model 2 architecture" and the
"model-view-controller" paradigm, also called the "front-controller pattern",
as they apply to web apps. Read the Sun Java EE tutorial. Learn how to use
JSPs to call business logic, then it will be obvious how to call the
particular variety of business logic called a "web service client stub".

Examples abound on the Web. You don't need us to break our fingers coming up
with one when a few minutes search on your part will turn up so much better
stuff. GIYF.

--
Lew

I still don't get it. I've now done all that u suggested, but i still
don't get it. And using Google i still haven't found one decent
example that is actually proper explained.
I reduced everything to that:
Webservice:

package pack;

public class Wser {
public double test(double a){

return a+a;

}
}

I have deployed it as a webservice with the name webs2.
So please can someone write a simple jsp client to that, so i finally
can get an idea how this works.
I read the Java EE Tutorial, i tried the examples and a lot of other
examples on the net. I can't get this working.

.



Relevant Pages

  • Re: jsp client for axis2 webservice
    ... Read the Java EE tutorial on the Sun web site. ... It talks generally about how to call logic from a JSP. ... A servlet on the app server receives the request, parses out the request parameters, and passes them along to an instance of a regular Java class, usually a Bean. ... That object in turn will perform some processing, say, calling one of the stub methods that you have. ...
    (comp.lang.java.programmer)
  • Web Site Attack...!!!
    ... hello all, i am new to networking in java, i work mainly on jsp and ... servlet, but i want to know how could I send a request to a specific ...
    (comp.lang.java.programmer)
  • Web services ,google maps API interface via jsp and java.
    ... hi all---i'm developing an web service using google maps API ... interface, via jsp and java. ... sending a request will visualize restaurants and after pubs..etc ...
    (comp.lang.java.help)
  • Java / J2EE Interview questions
    ... Core Java and OOP's Interview questions ... Servlets / JSP Interview questions ... What’s an interface and how will you go about implementing an ... Servlets and JSP ...
    (comp.lang.java.gui)
  • Re: Discussion: PHP versus JSP
    ... We used MySQL, Tomcat, and JSP. ... > re-doing the app using PHP. ... JSP is an attempt from the Java camp to achieve an ASP/PHP like programming ...
    (comp.lang.java)