Results 1 to 2 of 2
  1. #1
    dayton is offline Member
    Join Date
    Jan 2012
    Posts
    1
    Rep Power
    0

    Default Web services help

    i am new to java and i need to create web services. i am trying to create WS to a maven project ( blog application creating
    articles. etc) i am not sure if i am doing it right. I created a web service and a web client. when i call the service from client (simple method hello) is working but when i am trying to call articles from database i get an error.

    here is the WS code:
    import edu.city.set.eia.citypress.beans.ArticleFacadeLoca l;
    import edu.city.set.eia.citypress.model.RegisUser;
    import java.util.List;
    import javax.ejb.EJB;
    import javax.jws.Oneway;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    import javax.ejb.Stateless;


    @WebService(serviceName = "Article")
    @Stateless()
    public class Article {
    @EJB
    private ArticleFacadeLocal artBean;

    @WebMethod(operationName = "findByAuthor")
    public @WebResult(name="byAuthor") List<Article> findByAuthor(@WebParam(name = "id") RegisUser id) {

    return artBean.findByAuthor(id);
    }



    and the web client code:

    Article_Service client = new Article_Service();
    Article port = client.getArticlePort();

    System.out.println(port.findByAuthor());

    Thanks in advance
    Last edited by dayton; 01-21-2012 at 03:54 AM.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default Re: Web services help

    i get an error.
    Please copy and paste here the full test of the error message.

Similar Threads

  1. Web Services
    By nikosdi in forum Web Frameworks
    Replies: 3
    Last Post: 06-04-2011, 01:28 PM
  2. Web Services
    By Cbani in forum Advanced Java
    Replies: 6
    Last Post: 01-24-2010, 02:15 PM
  3. web services
    By k_paramesh82 in forum Java Software
    Replies: 5
    Last Post: 04-02-2009, 12:03 PM
  4. Web Services: Axis vs Metro vs Spring Web Services
    By davidbaker29 in forum Advanced Java
    Replies: 0
    Last Post: 01-28-2009, 11:20 AM
  5. Web services
    By Sharmistha in forum Web Frameworks
    Replies: 0
    Last Post: 06-02-2008, 01:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •