[Débutant] call.invoke et pièce jointe
Bonjour,
J'utilise une application java fessant appel à un web service.
Lorsque le web service n'a pas de pièce jointe, les information sont bien récupérée, mais lorsqu'une pièce jointe est ajoutée, j'ai une exception sur le call.invoke.
voici le code d'appel au web service:
Code:
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
|
public java.lang.String getData(
java.lang.String userId,
java.lang.String pwd,
java.lang.String streamId,
java.lang.String xmlParams) throws java.rmi.RemoteException
{
if (super.cachedEndpoint == null)
{
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[1]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("http://www.site.fr/pfa#getData");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://www.site.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);
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;
}
} |
A savoir que le web service utilise soap, et utilise un encodage mime.
Comment faire pour récupérer une pièce jointe?
merci.