Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1522 connectés 

  FORUM HardWare.fr
  Programmation
  Java

  [Web Services] There's no ObjectFactory with an @XmlElementDecl

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[Web Services] There's no ObjectFactory with an @XmlElementDecl

n°1643500
Trailx ori​ginal
Posté le 15-11-2007 à 16:50:16  profilanswer
 

Bonjour,
 
Des que je lance un wsimport pour utiliser mon webservice depuis un client et ceci depuis que j'ai rajouté une méthode qui retourne un tableau de byte sur mon webservice j'ai There's no ObjectFactory with an @XmlElementDecl for the element   :pfff:  
 
J'utilise Sun java application server (dernière version) et donc glassfish.
 
Voici la méthode en question :  
 
 

Code :
  1. @WebMethod
  2.     public byte[] getFichier(@WebParam(name = "idChanson" ) long idChanson) {
  3.         FileInputStream fis;
  4.         byte[] fichier=null;
  5.         try {
  6.             fis = new FileInputStream("path" );
  7.        
  8.    FileChannel fc = fis.getChannel();
  9.    fichier = new byte[(int)fc.size()];   // fc.size returns the size of the file which backs the channel
  10.    ByteBuffer bb = ByteBuffer.wrap(fichier);
  11.    fc.read(bb);
  12.         } catch (IOException ex) {
  13.             ex.printStackTrace();
  14.         }
  15.         return fichier;
  16.     }


 
 Et l'erreur un peu mieux détaillée
 
Caused by: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
There's no ObjectFactory with an @XmlElementDecl for the element {http://webservices/}return.
this problem is related to the following location:
at protected javax.xml.bind.JAXBElement ws.chanson.GetFichierResponse._return
at ws.chanson.GetFichierResponse
 
 
Je n'ai aucun soucis sur le serveur lorsque je déploie mon ws.
 
Si quelqu'un a une idée je suis preneur !!!

mood
Publicité
Posté le 15-11-2007 à 16:50:16  profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  Java

  [Web Services] There's no ObjectFactory with an @XmlElementDecl

 

Sujets relatifs
Web Service et Envoie de fichierVBA + page WEB
Ressources et Imagestraduction de with en php
Netbeans Visual Web PackUtilisation des web services avec Visual Studio 2008 (.NET frwk 3.5)
Web MessengerEJB - Choix pertinent pour une application Web?
[Perl] Liaison LDAP et Site Web[Java Web Start]Appli sur un serveur sans faire du http
Plus de sujets relatifs à : [Web Services] There's no ObjectFactory with an @XmlElementDecl


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR