IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Services Web Java Discussion :

AxisFault Server.userException et InvocationTargetException


Sujet :

Services Web Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    372
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2006
    Messages : 372
    Par défaut AxisFault Server.userException et InvocationTargetException
    J'ai une erreur lorsque mon client axis appelle la méthode invoke :

    Dans mon client j'ai ca :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
     
    if (super.cachedEndpoint == null) {
                throw new org.apache.axis.NoEndPointException();
            }
            org.apache.axis.client.Call _call = createCall();
            _call.setOperation(_operations[3]);
            _call.setEncodingStyle(null);
            _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
            _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
            _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
            _call.setOperationName(new javax.xml.namespace.QName("urn:Reflet/G3", "rechercherAdresse"));
     
            setRequestHeaders(_call);
            setAttachments(_call);
     try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {request});
     
            if (_resp instanceof java.rmi.RemoteException) {
                throw (java.rmi.RemoteException)_resp;
            }
            else {
                extractAttachments(_call);
                try {
                    return (com.francetelecom.reflet.clientRechercheAdresse.wsdlgen.AdresseReponseBean) _resp;
                } catch (java.lang.Exception _exception) {
                    return (com.francetelecom.reflet.clientRechercheAdresse.wsdlgen.AdresseReponseBean) org.apache.axis.utils.JavaUtils.convert(_resp, com.francetelecom.reflet.clientRechercheAdresse.wsdlgen.AdresseReponseBean.class);
                }
            }
      } catch (org.apache.axis.AxisFault axisFaultException) {
      throw axisFaultException;
    }


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    AxisFault
     faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
     faultSubcode: 
     faultString: java.lang.reflect.InvocationTargetException
     faultActor: 
     faultNode: 
     faultDetail: 
    	{http://xml.apache.org/axis/}hostname:FT-YBSMMVUHCR9E
     
    java.lang.reflect.InvocationTargetException
    	at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
    	at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
    	at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
    	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
    	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
    	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    	at javax.xml.parsers.SAXParser.parse(Unknown Source)
    	at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
    	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
    	at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
    	at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
    	at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
    	at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    	at org.apache.axis.client.Call.invoke(Call.java:2767)
    	at org.apache.axis.client.Call.invoke(Call.java:2443)
    	at org.apache.axis.client.Call.invoke(Call.java:2366)
    	at org.apache.axis.client.Call.invoke(Call.java:1812)
    	at com.francetelecom.reflet.clientRechercheAdresse.wsdlgen.RechercheAdresseSoapBindingStub.rechercherAdresse(RechercheAdresseSoapBindingStub.java:368)
    	at com.francetelecom.reflet.clientRechercheAdresse.single.SingleRequestClient.run(SingleRequestClient.java:186)
    	at com.francetelecom.reflet.ihm.commun.RefletConnexion.getRechercheAdresse(RefletConnexion.java:771)
    	at com.francetelecom.reflet.ihm.commun.RefletImpl.getRechercheAdresse(RefletImpl.java:225)
    	at com.francetelecom.reflet.ihm.action.maintienNumero.ValiderSaisieMDNAction.execute(ValiderSaisieMDNAction.java:293)
    	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
    	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
    	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    	at java.lang.Thread.run(Unknown Source)
    Je ne comprend pas d'ou ca peut venir :
    J'ai fais quelques vérifs en débug et j'ai trouvé ca :
    - l'attribut "transport"(objet de type HTTPTransport) de mon objet _call (objet de type Call) contient bien dans son attribut "url" l'url du webservice.
    J'ai vérifié que l'on accede bien à ce service en copiant-collant cette url dans IE et en effet il me trouve bien mon webservice.

    J'ai cherché sur google mais mes recherches se sont avérées infructueuses.

    Si ca peut vous aider à y voir plus clair mon environnement est le suivant :
    j'ai mis mon webservice dans le dossier apps/autoload de jonas, et j'ai démarré celui ci. Je travaille avec Eclipse et je démarre également Tomcat pour mon appli J2EE qui va interroger mon websevice. J'ai développé un Client webservice, et la méthode dont j'ai mis le code dans le premier paragraphe de code est la méthode appelée apres un submit de mon formulaire dans mon ihm j2ee. Et jusqu'à l'appel de la méthode invoke, je n'ai aucun problème....

    Quelqu'un a une idée du pourquoi du comment svp?

  2. #2
    Membre éclairé
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    372
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2006
    Messages : 372
    Par défaut
    J'ai essayé un truc :
    Je suis allée dans Internet Explorer et j'ai tapé mon url pour accéder à mon webservice en mettant en paramètre la méthode que je souhaite appeler :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    http://localhost:9000/wscom/RechercheAdresse?method=rechercherAdresse
    Bah en gros j'ai la même erreur en plus court et en version xml :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
     
      <?xml version="1.0" encoding="UTF-8" ?> 
    - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    - <soapenv:Body>
    - <soapenv:Fault>
      <faultcode>soapenv:Server.userException</faultcode> 
      <faultstring>java.lang.reflect.InvocationTargetException</faultstring> 
    - <detail>
      <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">LE NOM DE MON PC</ns1:hostname> 
      </detail>
      </soapenv:Fault>
      </soapenv:Body>
      </soapenv:Envelope>
    Alors que tout marche bien dans le cas ou je fais ca :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    http://localhost:9000/wscom/RechercheAdresse
    Alors j'ai mon service qui me répond "Hi there, this is an AXIS service!"

    et si je fais :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    http://localhost:9000/wscom/RechercheAdresse?wsdl
    j'ai bien mon xml qui s'affiche et qui me parait tout à fait correct


    NOTE : normalement ma méthode rechercherAdresse prend en paramètre un type complexe créé pour les besoins du dev un type AdresseDemandeBean qui comporte :
    - un code département (String)
    - une Commune (type Commune composée de deux String : le codeCommune et le libelleCommune)
    - une Voie (type Voie composée de deux String : le codeVoie et le libelleVoie)
    - un numero dans la voie (String)
    - un code de retour
    - un code application etc

    donc je voulais essayer d'appeler ma méthode avec les paramètres mais je ne sais pas comment faire pour passer un type complexe.
    Mais paralèllement je suis en débug avec Eclipse et j'ai mis un point d'arrêt dans la méthode que j'invoke au tout début de celle ci et il ne va même pas jusque là....

    Vous y voyer clair vous ?

  3. #3
    Membre éclairé
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    372
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2006
    Messages : 372
    Par défaut
    Je ne pourrais pas dire le pourquoi ca ne marchait pas. On a tout refait le wsdl du début et on a redéployé dans l'appli et la tout fonctionne ...

    Bizarre...

    Mais c'est comme ca

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 0
    Dernier message: 19/08/2009, 12h12
  2. axis Server userException
    Par khabot dans le forum Services Web
    Réponses: 2
    Dernier message: 29/11/2007, 16h05
  3. Pb migration Access / SQL server
    Par yoyo dans le forum MS SQL Server
    Réponses: 10
    Dernier message: 25/04/2005, 10h39
  4. Backup BD SQL Server
    Par Ethmane dans le forum Administration
    Réponses: 3
    Dernier message: 07/06/2002, 00h42

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo