Web service java

hanachaabani Messages postés 51 Date d'inscription   Statut Membre Dernière intervention   -  
KX Messages postés 16761 Date d'inscription   Statut Modérateur Dernière intervention   -
bonsoir ,
svp au secours ... je viens de developper un web service en java et lorsque je le deploye sur le serveur ca passe pas .. il me genere un erreur class not found exception ..voila mes codes

import java.util.ArrayList;

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

/**
 *
* @author Hana
*/
public class ArrayOfTeamInfo {
     ArrayList<TeamInfo> L1 = new ArrayList<> () ;

 public ArrayOfTeamInfo()
 {
   L1.add(new TeamInfo(1,"FcBarcelone","Espagne","[https://fr.wikipedia.org/wiki/FC_Barcelone_(football)]","big"));
   L1.add(new TeamInfo(1,"Real Madrid","Madrid","[https://fr.wikipedia.org/wiki/Real_Madrid_Club_de_F%C3%BAtbol]","big"));
   L1.add(new TeamInfo(1,"Manchester-United","Manchester","[https://fr.wikipedia.org/wiki/Manchester_United_Football_Club]","big"));
   L1.add(new TeamInfo(1,"Chelsia Fc","Londres","[https://fr.wikipedia.org/wiki/Chelsea_Football_Club]","big")); 
   L1.add(new TeamInfo(1,"Arcenal FC","Londres","[https://fr.wikipedia.org/wiki/Arsenal_Football_Club]","big")); 
 }

  
 public int Size(){
     return L1.size() ;
 }
   
  public TeamInfo getPN(int i)
  {
      return L1.get(i);
  }
}



import java.util.ArrayList;

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
/

/**
 *
* @author Hana
*/
public class ArrayOftPlayerNames {
    
   ArrayList<PlayerNames> L = new ArrayList<> () ;

 public ArrayOftPlayerNames()
 {
   L.add(new PlayerNames(1,"Cristiano Ronaldo","Portugal","rouge/vert/jaune/bleu","big",true));
   L.add(new PlayerNames(2,"LionelMessi","Argentine","bleu/blanc/jaune","big",true));
   L.add(new PlayerNames(3,"Gerard Piqué","Barcelone","rouge/bleu/jaune/noir/blanc","big",true));
   L.add(new PlayerNames(4,"Fernando Torres","Fuenlabrada","bleu/blanc/rouge/jaune","big",false)); 
   L.add(new PlayerNames(5,"Wayne Rooney","Liverpool","rouge/vert/blanc/jaune","big",false)); 
 }

  
 public int Size(){
     return L.size() ;
 }
   
  public PlayerNames getPN(int i)
  {
      return L.get(i);
  }
}


import javax.jws.WebParam;
import javax.jws.WebService;

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

/**
 *
* @author Hana
*/
@WebService(serviceName = "Info", portName = "InfoSoap", endpointInterface = "eu.dataaccess.footballpool.InfoSoapType", targetNamespace = "[http://footballpool.dataaccess.eu]", wsdlLocation = "WEB-INF/wsdl/NewWebServiceFromWSDL/footballpool.dataaccess.eu/data/info.wso.wsdl")
public class FootPool implements I_FootPool {
 /**
* Web service operation
* @param bSelected
* @return 
*/ 
    
    @Override
    public ArrayOftPlayerNames allPlayerNames(@WebParam(name = "bSlected")boolean bSelected) {
     if (false == bSelected ) {
         throw new NullPointerException("nullable value");
        }
      System.out.println("getArrayOftPlayerNames where method was invoqued ");
    return (new ArrayOftPlayerNames()) ;  
      }


   
  
    @Override
    public ArrayOfTeamInfo teams() {
        ArrayOfTeamInfo L1 = new ArrayOfTeamInfo() ;
        return L1 ;
       
    }
    
    
    @Override
    public int playedAtWorldCup(String sTeamName) {
       
      ArrayOfTeamInfo A = new ArrayOfTeamInfo () ;
      return A.Size();
    }

   
}



import javax.jws.WebService;

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

/**
 *
* @author Hana
*/
@WebService (name = "I_FootPool", targetNamespace = "[http://Soa.FootPool2]")
public interface I_FootPool {
    
    
    public ArrayOftPlayerNames allPlayerNames(boolean bSelected) ;
    public ArrayOfTeamInfo teams() ;
    public int playedAtWorldCup(String sTeamName) ;
    
}

   
/**
 *
* @author Hana
*/
class PlayerNames {
      private int Id ;
     private String Name  ;
     private String CountryName ;
     private String CountryFlag ;
     private String CountryFlagLarge ;
     private boolean Selected ; 

    public PlayerNames(int Id, String Name, String CountryName, String CountryFlag, String CountryFlagLarge, boolean Selected) {
        this.Id = Id;
        this.Name = Name;
        this.CountryName = CountryName;
        this.CountryFlag = CountryFlag;
        this.CountryFlagLarge = CountryFlagLarge;
        this.Selected = Selected;
    }

    
    public PlayerNames() {
    }

    public int getId() {
        return Id;
    }

    public String getName() {
        return Name;
    }

    public String getCountryName() {
        return CountryName;
    }

    public String getCountryFlag() {
        return CountryFlag;
    }

    public String getCountryFlagLarge() {
        return CountryFlagLarge;
    }

    public void setId(int Id) {
        this.Id = Id;
    }

    public void setName(String Name) {
        this.Name = Name;
    }

    public void setCountryName(String CountryName) {
        this.CountryName = CountryName;
    }

    public void setCountryFlag(String CountryFlag) {
        this.CountryFlag = CountryFlag;
    }

    public void setCountryFlagLarge(String CountryFlagLarge) {
        this.CountryFlagLarge = CountryFlagLarge;
    }

    public boolean isSelected() {
        return Selected;
    }

    public void setSelected(boolean Selected) {
        this.Selected = Selected;
    }
     
     
     
    
}



/**
 *
* @author Hana
*/
public class TeamInfo {
 private int  Id ;
private String Name ;
private String CountryFlag ;
private String WikipediaURL ;
private String CountryFlagLarge ;

    public TeamInfo(int Id, String Name, String CountryFlag, String WikipediaURL, String CountryFlagLarge) {
        this.Id = Id;
        this.Name = Name;
        this.CountryFlag = CountryFlag;
        this.WikipediaURL = WikipediaURL;
        this.CountryFlagLarge = CountryFlagLarge;
    }

    public TeamInfo() {
    }

    public int getId() {
        return Id;
    }

    public String getName() {
        return Name;
    }

    public String getCountryFlag() {
        return CountryFlag;
    }

    public String getWikipediaURL() {
        return WikipediaURL;
    }

    public String getCountryFlagLarge() {
        return CountryFlagLarge;
    }

    public void setId(int Id) {
        this.Id = Id;
    }

    public void setName(String Name) {
        this.Name = Name;
    }

    public void setCountryFlag(String CountryFlag) {
        this.CountryFlag = CountryFlag;
    }

    public void setWikipediaURL(String WikipediaURL) {
        this.WikipediaURL = WikipediaURL;
    }

    public void setCountryFlagLarge(String CountryFlagLarge) {
        this.CountryFlagLarge = CountryFlagLarge;
    }
    


}


et voila l'erreur qui s'affiche lorsque je veux tester le service


unable to open web service tester pagemake sure the service has been deployed sucessfully.and the server is runing .

merci de me repondre et m'aider à resoudre le probleme :)
A voir également:

1 réponse

KX Messages postés 16761 Date d'inscription   Statut Modérateur Dernière intervention   3 020
 
Bonjour,

"il me genere un erreur class not found exception"
Laquelle ? Dans quel code ?
0