Bonjour,

J'ai un problème de récupération de pièce jointe avec mon client axis.
Le webService générant la réponse est écrit en php à l'aide de nusoap. Une pièce jointe est attachée à cette réponse. Ce web service est fiable et à été testé avec un client php.

Si j'appelle ce WS avec mon client axis, il me sort une InvocationTargetException sur le invok mais uniquement si il y a une pièce jointe. Si le WS appelé ne génère pas de pièce jointe, tout se passe bien.

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
org.apache.axis.client.Call _call = createCall();
 
      _call.setOperation(_operations[1]);
      _call.setUseSOAPAction(true);
      _call.setSOAPActionURI("http://www.toot.fr/pfa#getData");
      _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
      _call.setOperationName(new javax.xml.namespace.QName("http://www.toot.fr/pfa", "getData"));
 
      _call.setProperty(Call.CHECK_MUST_UNDERSTAND, Boolean.FALSE);
 
      setRequestHeaders(_call);
      setAttachments(_call);
      try
      {
 
         java.lang.Object _resp = _call.invoke(new java.lang.Object[]
            { userId, pwd, streamId, xmlParams });
 
         if (_resp instanceof java.rmi.RemoteException)
         {
            throw (java.rmi.RemoteException) _resp;
         }
         else
         {
            extractAttachments(_call);
 
            Object[] attachments = getAttachments();
            for (int i = 0; i < attachments.length; i++)
            {
               AttachmentPart attachment = (AttachmentPart) attachments[i];
               // start cvidal 19.02.2009
               cachedAttachments.add(attachment);
               // end cvidal 19.02.2009
            }
 
            try
            {
               return (java.lang.String) _resp;
            }
            catch (java.lang.Exception _exception)
            {
               return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(
                  _resp,
                  java.lang.String.class);
            }
         }
      }
      catch (org.apache.axis.AxisFault axisFaultException)
      {
         throw axisFaultException;
      }
Ca fait des semaines que je cherche une solution mais je cale...

Quelqu'un pourrait-il m'aider?

merci