Newbie question to java web services....

hi,
I used to be a .net programmer for a few years, and am have done web services in .net.... (using IIS, of course)
And i moved onto Java side recently - and am pretty new to tomcat / axis..etc..
I looked at the netbeans ide tutorial, and it covered on how to create a web services and a client using the IDE - with that is with the sun app server. Since I want to stick with Tomcat (which is a servlet container, i believe), the compilation complained that the HelloWSImpl.java is not a servlet, and will not let me run the web app. I have tried the WSDP 2.0 tutorial as well, but I first got the FastSetsource.jar not found? Then I got some other classes not found..etc... so, until now - i still am not able to create a web service, and a cliet to talk back and forth.
I have the following questions..
1. I am confused that how come tomcat itself is already a webserver, why would people use it on top of apache http server, which is another web server?
2. To create a web services, (I am thinking of the .net web services that i have done - that once you deploy it with IIS, and you browse to that service, if the function takes 2 parameter, there will be 2 textboxes waiting for you to put data to, then once you post - the xml response will come back...), does java allow front end interface automatically like that in .net? Or you have to code the JSP pages to include those textboxes yourself, and do a manual post to the web services address?
3. Are there any book out there, explains how to use tomcat for webservices? I have looked thru some of the java books that talks about web services, they mainly explain what webservices are, what is xml..etc... and of course, they did talk about the differenct type of messaging format available. (JAX-RPC..etc..)
4. In the java world - how do you use webservices? Is it the same way that i am familiar with? Like, that we have a front end gui, that it will call the web services, pass it a few param, and get the xml result back, and parse it and display / store.. it? Or that is not the correct way to consume the web services in java world?
5. In .net - as long as i have the .net framework sdk, and a IIS - i am good to go. In java - what do i need in order to deploy a web services?? I already have tomcat / jdk / wsdp / IDE - do i have enough to create a simple ws? if so, can you show me a basic tutorial??
based on some reading, i understand that the ws on the service side, needs an SEI implementing java.rmi.remote, and we need another class implementing this SEI. But I would really want to see more example, or downloads, where i can just download / view the whole thing all at once... I googled "java web service", "jax-rpc example"..etc.. most of the return links are from either java.sun.com, or ibm, or some other vendor's web site, explaining the architecture... I really want to look at the code, to get a better understand, what is the relationship between each of these softwares (tomcat, apache http server, axis...)
Any suggestions??
Thanks,
T

I think I can answer your Q1
Apache is very good at serving simple HTML pages
Tomcat is capable of serving active content
So the two complement each other
Or that's how I understand it.
Steaker

Similar Messages

  • Java Web Services Newbie Questions

    I have some questions concerning developing Web Services in java. I understand the basic technology and concepts, but am not familiar with the available Java pieces to accomplish what I need to.
    1. What application do I need to service a Web Service? I would prefer to run apache (running on an AS/400). Can apache do this? What in addition to apache (plug-in?) do I need to service the Web Service?
    2. What application (plug-in?) do I need to provide the UDDI lookup for my Web Services? Again, I would prefer to do this in apache. Do I need a plug-in, etc.
    3. Is there an IDE or package that will make creating the Web Service easier. I am currently using Eclipse for some other java work, so it would be nice if this IDE would work well for this. I am hoping for some plug-in that will make it easy for me to provide a method prototype, and the WSDL and perhaps client proxy classes get generated from this?
    4. How should I create my WSDL? (this may be answered by the previous question)
    5. How should I create the client proxy classes? (this may be answered by the previous question)
    6. Anything else (tools, API's, plug-ins) I need to know how to make this happen quickly. I need to implement a couple web services in just a few weeks.
    Thanks.

    1. There are 3 ways i can think of:
    a. J2EE 1.4 App Server (e.g., 1.4 Beta 2 from Sun)
    b. JWSDP
    c. 1.3 IDE with Web Services support (WebShere, Sun One...)
    2. You need to register with a public registry, such as those by IBM, Microsoft, etc.
    3. Partly answered in 1... I prefer working with 1.4, because that is a new standard coming up, so no serious changes will be needed later.
    WSDL and stubs/ties are generated for you by tools like wscompile, but you do have to code the client itself :)
    4. wscompile, etc. can be invoked by tools like ant based on your build file, or by IDE.
    5. Automatically done...
    6. I think i covered the tools above. For the rest, I'd recommend going through J2EE 1.4 Tutorial, or cases like those provided by some IDEs.
    HTH,
    Reshat.

  • JDeveloper 10g 10.1.3 Web Service Question: java web service calls another

    I am looking for what I think should be a simple example/tutorial but so far no luck. I am using JDeveloper 10g 10.1.3 and the Oracle Application Server.
    I want to do this:
    - create a simple Java web service
    - deploy it
    - create another simple Java web service, that makes a call to a method on the first service
    - deploy it
    client->WSfront->WSback
    I want to keep this as basic as possible.
    Although I have found examples of how to create a web service proxy, there are no examples that I have found that show how to use that proxy in another web service:
    I did what I thought were the right things; generated a proxy for the first web service, and used that proxy in the second web service's source Java class. However when I deployed and tested many classes were missing: all the classes the proxy class depends on.
    I actually managed to get something like this working but had to manually create the .ear and .war files for WSfront, explode the archives, and manually add the missing classes to its WEB-INF/classes.
    I am comparing this to things like Weblogic Workshop in which doing this exercise is a snap.
    Is there a simple graphical way to do this in JDeveloper?

    Hello again,
    I am quite surprised I got no responses to my query below.
    Can anyone explain how I might do this?
    Please feel free to respond to [email protected]
    I am looking for what I think should be a simple
    example/tutorial but so far no luck. I am using
    JDeveloper 10g 10.1.3 and the Oracle Application
    Server.
    want to do this:
    create a simple Java web service
    deploy it
    create another simple Java web service, that makes a
    call to a method on the first service
    deploy it
    client->WSfront->WSback
    want to keep this as basic as possible.
    lthough I have found examples of how to create a web
    service proxy, there are no examples that I have
    found that show how to use that proxy in another web
    service:
    I did what I thought were the right things; generated
    a proxy for the first web service, and used that
    proxy in the second web service's source Java class.
    However when I deployed and tested many classes were
    missing: all the classes the proxy class depends
    on.
    I actually managed to get something like this working
    but had to manually create the .ear and .war files
    for WSfront, explode the archives, and manually add
    the missing classes to its WEB-INF/classes.

  • Java web service question

    I am trying to create a java web service using the wizard in Jdeveloper, but I am not able to pick up the java class I want. I already setup the classpath and library to include the java class files. but seems the wizard doesn't look at the classpath. what's the right way to do it?
    Is there any demo or tutorial code about how to create java web service ?

    Hello again,
    I am quite surprised I got no responses to my query below.
    Can anyone explain how I might do this?
    Please feel free to respond to [email protected]
    I am looking for what I think should be a simple
    example/tutorial but so far no luck. I am using
    JDeveloper 10g 10.1.3 and the Oracle Application
    Server.
    want to do this:
    create a simple Java web service
    deploy it
    create another simple Java web service, that makes a
    call to a method on the first service
    deploy it
    client->WSfront->WSback
    want to keep this as basic as possible.
    lthough I have found examples of how to create a web
    service proxy, there are no examples that I have
    found that show how to use that proxy in another web
    service:
    I did what I thought were the right things; generated
    a proxy for the first web service, and used that
    proxy in the second web service's source Java class.
    However when I deployed and tested many classes were
    missing: all the classes the proxy class depends
    on.
    I actually managed to get something like this working
    but had to manually create the .ear and .war files
    for WSfront, explode the archives, and manually add
    the missing classes to its WEB-INF/classes.

  • Generation Error - when trying to publish a Java web service

    Hi All,
    I keep getting the following Generation Error -- java.util.NoSuchElementException_ when I'm trying to create a Java Web Service using the jdeveloper wizard.
    I have 2 entities and 2 stateless session beans acting as their facades. One entity has a One-One(FK) relationship with the other entity. I test out the entities and session beans using the test client and the OC4J embedded container and everything seems to work. When I try to generate a Java WebService from one of the entities I keep getting the "Generation Error". Could someone please provide me with some insight into why I'm facing this problem, because it seemed fine when I published J2EE web services previously and now this happens and I cant seem to publish web services anymore. Everytime I keep getting the same GenerationError. Thanks in advance.

    Without going into any technical discussion about the code, my first question is what JDK version was used to create this which was imported into the form? Understand that Forms 10 runs on JDK 1.4.2, so if you used any newer JDK version, likely there will be problems.

  • Java web services tutorial.

    Hi i have seen and tried the Java web services JAX-RPC tutorial.
    And i have a question here.
    If i want to invoke lets say a web service on a .NET platform, can i still use JAX-RPC to invoke it?
    Must the server implement JAX-RPC if i want to use it on the client side?
    sorry i still not clear about it.

    once you are done creating .war files having WSDL and all, deploy it on Tomcat or any other web container.
    create .vb (or which ever language) stub for the JAX-RPC service using WSDL.exe for the .NET enviornment.
    In your .NET enviornment, import this stub in your project. In your code, you can define a local varible as a "JavaService" object and assign the instance of your jax-rpc service and use the local variable methods as any other object method calls.

  • "The Java Web Services" - ant install

    Hi, I recently downloaded "The Java Web Services" and "The Java Web Services Tutorial".
    And I've reached the Creating the Build Properties File portion of the tutorial:
    http://java.sun.com/webservices/docs/1.0/tutorial/doc/GettingStarted2.html#73059
    I'm using Windows ME and I have no idea where to put the build.properties file.
    Can anyone give me any suggestions? I am successfully able to
    ant compile
    but I can't get
    ant install
    to work once I have done the ant compile and I suspect this is because of me not having the build.properties file set... although it could be unrelated to that.
    when I try to use:
    ant install
    I get the following error at the command prompt:
    C:\tim\programs\jwsdp-1_0\docs\tutorial\examples\gs\build.xml:46: java.io.IOExce
    ption: Server returned HTTP response code: 401 for URL: http://localhost:8080/ma
    nager/install?path=%2Fgs&war=file%3AC%3A%5Ctim%5Cprograms%5Cjwsdp-1_0%2Fdocs%2Ft
    utorial%2Fexamples%2Fgs%2Fbuild
    Now tomcat is running on the correct port (8080) and the directory being referenced in the above URL exists. Am I supposed to map tomcat to a particular file system or something?
    Thanks,
    Tim
    PS I have another post in this forum (it contains only my first question concerning the build.properties file), so if you would like the Duke dollars for both posts, feel free to post in both threads and if your answer helps me out, I'll give you the Dollars from both threads.

    Hi Tim
    I have the same problem with the build.properties file. i am not able to solve the problem. did u find any solution for that problem u had. so plz let me knpow about that. i would appreciate if u could mail mne at [email protected]
    thanks in ADV.

  • "java Web Service from WSDL" just hands me a SOAPElement, no java mappings

    Another beginner question. I've used jdev and built a WSDL starting from a somewhat complex xsd. I've used the wizard "Java Web Service From WSDL" taking defaults. It seems to correctly generate class files for all my xsd types. It produces a fancy looking java-wsdl-mapping.xml But the generated stub service implementation just gets handed a SOAPElement object. Why generate all that mapping stuff and then make me parse the incoming data myself with SOAPElement methods? How am I supposed to make use of the mapping work that the wizard seems to have done for me?
    Thanks,
    Steve

    Dear Tugdual,
    Thanks for your intrest in my issue. I narrowed it down to the following type in my xsd
    <complexType name="PersonInfoType">
    <sequence >
    <element name="FamilyName" type="string"/>
    <element name="IndividualName" type="string"/>
    <element name="SpouseName" type="string"/>
    <element name="BirthDate" type="dateTime"/>
    </sequence>
    </complexType>
    This works fine - the "WebSerice From WSDL" wizard "knows" how to generate a class for PersonInfoType (with geters and seters) as well as useful stub implementation:
    public class PersonInfoImpl {
    public PersonInfoType processPersonInfo(String entityCode) {
    return null;
    However, if I make my type multiple occuring (to represnt e.g. rows from a db)
    <complexType name="PersonInfoType">
    <sequence maxOccurs="unbounded" >
    <element name="FamilyName" type="string"/>
    <element name="IndividualName" type="string"/>
    <element name="SpouseName" type="string"/>
    <element name="BirthDate" type="dateTime"/>
    </sequence>
    </complexType>
    Now the Web Service generator runs, but just doesn't generate any PersonInfoType class at all. For a stub implementation it genertes the following:
    public class PersonInfoImpl {
    public SOAPElement processPersonInfo(String entityCode) {
    return null;
    Now I'm stuck with the container just expecting from me a Soap Object and I have to build all the pieces myself with no java mappings to my xsd at all. Not very useful.
    Is there another xml structure I can use to represent data rows that is better supported by the wizard?
    Thanks,
    Steve

  • Java web service (jwsdp)

    Hi,
    I am a newbie to java web service. In my currect project [ using jsf, j2se5.x and tomcat 5.5.17 and Oracle as DB ] I need to update an external system's database (Clarity,CA). So far I read, I understand that I need to use web services to do that. One of colleague has already used jwsdp-2 to a different system. Clarity's web service system uses XOG(Xml open gateway) which uses wsdl.
    In this stage, I am totally confused. How can I connect to jwsdp with clarity's web service ? Can anyone help me how to proceed with this ? How can I start writing a web service ?
    Please help me.
    Thanks,
    njan.

    sun.njan wrote:
    Hi,
    I am a newbie to java web service. In my currect project [ using jsf, j2se5.x and tomcat 5.5.17 and Oracle as DB ] I need to update an external system's database (Clarity,CA). So far I read, I understand that I need to use web services to do that. One of colleague has already used jwsdp-2 to a different system. Clarity's web service system uses XOG(Xml open gateway) which uses wsdl.
    In this stage, I am totally confused. How can I connect to jwsdp with clarity's web service ? Can anyone help me how to proceed with this ? How can I start writing a web service ?
    Please help me.
    Thanks,
    njan.You need to study SOAP first in order for them to pass values.

  • How consume java web services

    Hello,
    I want to use java webservices.
    I read WSDL file but i don't know how to implement and to use method of this service.
    Can you help me ?
    Thanks
    Moderator Message: Frequently Asked Question. Please search for available information before posting.
    Edited by: kishan P on Dec 6, 2010 2:20 PM

    From your post it is not clear what kind of Java web service client (JAX-WS, JAX-RPC, Axis) you are using. The problem being faced is also not clear in the post. Some more elaboration may help others in providing inputs.

  • Calling a java web service from R/3 6.0

    hi experts,
    can anyone please tell me how to call a java web service from R/3 6.0?
    i found some answers to this question but all those were for 6.4 or 6.2 but not for 6.0.
    i want to generate a outbound flow from ERP system. so please tell me something about web service in that context.
    Thanks in advance,
    Sagar.

    Hi!!!
    I would do this scenario as a synchronous one:
    [SAP R/3][ABAP proxy objects] <-> [XI]<->[SOAP Adapter]<--->[external java app]
    In your ABAP transaction you will have to execute ABAP proxy method to send a message to XI. If it's not your transaction, you can use user-exit.
    BTW, I have an experience with XI 2.0, not with 3.0, so I used a XI 2.0 terminology.
    Regards,
    Andrzej Filusz

  • Publishing a stateless java web service

    Hi All,
    Two questions:
    1 - Does Oracle still support publishing java web services (stateless and stateful) just by declaring it in the web.xml file? I see that there are instructions on how to do this in an old whitepaper but any recent programmer documentation does not have it.
    2 - I tried declaring a java class as a web service in the web.xml and it seems to do something (ie., when I go to the URI, there is actually the wsdl, and the various methods that can be invoked). However, when invoking one of the methods (which should just return "Hello World" without any processing at all), I get the following exception. Any ideas?
    javax.servlet.ServletException
         at oracle.j2ee.ws.RpcWebService.doGetRequest(RpcWebService.java:632)
         at oracle.j2ee.ws.BaseWebService.doGet(BaseWebService.java:1117)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:292)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:606)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:312)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:779)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:264)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:107)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:536)
    Thanks,
    Johnny

    hello Jonathan
    In Jdev903 doc it is given that (pl/sql web service)
    Limitations
    On Oracle9i Database release 2, when a stored procedure or function of the same name and the same package name is accessible in more than one schema, then the SQLJ translator invoked during publication of PL/SQL web services will fail. In order to resolve this problem, ensure that packages to be published are visible only in one schema, and that no other packages in other schemas share the same name.
    The problem u explained come into the same category.Which database version u r using ? .
    regards
    Mangesh

  • Creating Java web service Proxies in  nwds 7.3

    Hi Experts,
    I'm trying to consume the WSDL (Which has been generated from PI. ESR) by following the below thread in NWDS 7.3 but I'm not successful in doing so.
    https://help.sap.com/saphelp_nwesrce/helpdata/en/45/100c6be9f87201e10000000a155369/content.htm
    In NWDS 7.0 I could able to do generate Java proxy by creating the project File-->new -->project-->web services-->Deployable Proxy Project--> and Proj name and Finish. Once created it will open in Web services Prospective and appears in Client Explorer and we can create the proxy by right clicking --> new--> client Proxy Definition. I want the same thing in NWDS 7.3 also, but in 7.3 I'm struggling to have the similar steps, I found above help document but it is not that clear. Appreciate if any one has document or point to the right thread which has document/example in performing the sa,e thing in NWDS7.3.
    Below is the screenshot from NWDS7.0. But want to do the same in NWDS 7.3

    Thank you so much Durga, for providing the documents, really helpful. However I have created the Web dynpro DC as below and had few questions when doing it in NW 7.3 version.
    Points which I have performed.
    1) Created the Web dynpro Java (Web services) DC and application in NWDS 7.3 version.
    2) Created the Model's and imported the WSDL from local/ESR (SAP PI web service)
    3) created the Service Groups and which populated Service references
    4) Deployed the DC in the AS Java 7.3 and configured the Consumer Service Groups for interacting during run time.
    Now my question is can we import multiple WSDL's by creating multiple models as shown in the picture? along with the multiple service groups in the same web dynpro java DC? Will it work?
    And if yes, If want to use this model from this (Web services) DC to another DC if I add this as dependency and model to the public parts that will do the trick? or will I have do any other configuration/ settings to use this DC in any other DC? Appreciate  if you could take a look at this and advise?

  • What is java web services?

    Hi all,
    I would like to know what is java web services?What can be done using java webservices?
    I just go through the link
    http://java.sun.com/webservices/docs/1.6/tutorial/doc/index.html but i couldnt able to get an idea what is web services is?

    makpandian wrote:
    It describes about web services in common .I want to know what web service is in java platform..
    Thanking You.That is a slightly odd question.
    There's nothing special about web services in Java against web services in any other language...there are, after all, several web service frameworks in Java, so it's not as if there's even a single answer to it.
    Do you understand what a web service is and the associated standards around one? If you do then you should realise that your question doesn't make much sense...unless you're actually asking what ws packages there are around.

  • Serialization error while invoking a Java web service

    Hi,
    I've a requirement where I need to create a Java web service, which returns a collection (a set of records).
    The way I've created a web service is by having a Java Class, which internally calls a Pl/sql package returning Ref cursors and a bean Class, which wraps the method of the Java Class, to return the collection. I could create the web service successfully and could invoke the end point. The end point looks like this: http://localhost:8988/MyJavaWebService-New_JWS-context-root/MyWebService_finalSoapHttpPort
    The method exposed for the web service in my Java class is of type ArrayList, to fetch the collection element.
    After giving the input at the end point, while I say invoke, for the web service, I get the following error:
    <env:Envelope
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ns0="http://mypkg/types/"
    xmlns:ns1="http://www.oracle.com/webservices/internal/literal">
    <env:Body>
    <env:Fault>
    <faultcode>env:Server</faultcode>
    <faultstring>Internal Server Error (serialization error: no serializer is registered for (class mypkg.EmpBean, null))</faultstring>
    </env:Fault>
    </env:Body>
    </env:Envelope>
    I've tried making my exposed method of type Vector as well and re-generated the web service. But still I face the same issue at invocation.
    Can anybody help me out and hint me on how I should proceed? I'm not sure if my approach is correct and so please correct me if I'm wrong.
    Thanks in Advance,
    Gayathri

    Hi,
    do you use 10.1.2 or 10.1.3?
    Take a look at:
    Re: How to create a web service with ArrayList or Collection

Maybe you are looking for