Hi!
    Thanks for your reply!
    I can use java.io with no problem on Session Bean methods.  I need to know if this is the best way to do this (although violatung the spec), or is there a better way to do what I neeed?
 
    Thanks in advance,
        Victor Batista


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maffeo Gaetano
Sent: sexta-feira, 5 de Março de 2004 13:18
To: [EMAIL PROTECTED]
Subject: R: [JBoss-user] Web Service and file access

    See to my code inside an EJB, that's my webservice server side:
dhDoc is my file!!!!
 
  public DatiRegistrazione InserimentoAllegato(String user, String password, String ente,
      String NomeDoc, DataHandler dhDoc, String NoteDoc, String progressivo,
      String dataRegistrazione) throws Exception {
    DatiRegistrazione datiRegistrazione = new DatiRegistrazione();
    IObjectsPool                profile = "">    Utente                     MyUtente = new Utente();
    Protocollo             MyProtocollo = new Protocollo();
    java.sql.Date   MydataRegistrazione = null;
 
    try {
     ................... 
      File MyFile = new java.io.File(dhDoc.getName());
     .....................
    } catch(AppException ex) {
      throw(ex);
    } catch(Exception ex1) {
      throw(ex1);
    }
    return datiRegistrazione;
  }
Pay only attention so that the WDD contains:
 
  <typeMapping
    xmlns:ns="http://activation.javax"
    qname="ns:DataHandler"
    type="java:javax.activation.DataHandler"
    serializer="org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory"
    deserializer="org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory"
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  />
That's all and works fine under Jboss 3.2.3
 
gaetano
-----Messaggio originale-----
Da: Victor Batista [mailto:[EMAIL PROTECTED]
Inviato: venerdì 5 marzo 2004 13.41
A: [EMAIL PROTECTED]
Oggetto: [JBoss-user] Web Service and file access

Hello!
    I need to develop one web service which must manage file uploads. If I use axis under JBoss, I can export SessionBean methods as web service methods. Although, under the EJB spec, Enterprise Beans must not access files:

Reply via email to