So you have a TituloBO.aegis.xml file in the same package like the java code of TituloBO? If not, create one and put

<?xml version="1.0" encoding="UTF-8"?>
<mappings>
 <mapping>
     <property name="dao" ignore="true"/>
 </mapping>
</mappings>

in it. That should get you rid of the problems with hibernate.... (knock on wood)

Mika

Vinicius Carvalho schrieb:
yes I'm using aegis. Could you help me on how to hide these methods? My WSDL is displaying the get/set BO... :( We use BO in a different Manner here, as stated on Core J2EE Patterns by Deepak et. al ;)


On 4/20/06, *Mika Göckel* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Why do you have the DAO property on the BO (I assume Business Object)
    class? I would expect to have something like a Manager (see
    Appfuse) to
    handle the persistence rather than a BO to know how to persist itself.
    What I see is, if you don't let xfire ignore the getDAO, setDAO
    methods,
    it drags in the whole hierarchy of hibernate. But you'll have the same
    problem with axis.
    Do you use aegis.xml to control the mapping?

    Mika

    Vinicius Carvalho schrieb:
    > Hello folks! This is really strange. I can't get XFire to work with
    > any services that expose a class that has any relation to
    Hibernate at
    > all. I'll post all of my code here:
    >
    > <bean id="baseService" class="
    org.codehaus.xfire.spring.ServiceBean"
    > abstract="true">
    >         <property name="style" value="document"></property>
    >         <property name="use" value="literal"></property>
    >         <property name="inHandlers">
    >             <list>
    >                 <ref bean="addressingHandler"/>
    >             </list>
    >         </property>
    >     </bean>
    > <bean id="financeiroService" parent="baseService">
    >         <property name="implementationClass">
    >
    > <value>com.waybrasil.services.assinante.financeiro.FinanceiroService
    > </value>
    >         </property>
    >         <property name="serviceBean">
    >             <ref bean="financeiroServiceImpl"/>
    >         </property>
    >         <property name="namespace"><value>
    > http://com.waybrasil.services/FinanceiroService
    <http://com.waybrasil.services/FinanceiroService></value></property>
    >     </bean>
    >
    > public class FinanceiroServiceImpl implements FinanceiroService{
    >     private TituloBO tituloBO;
    >
    >     public List visualizarFaturas(Integer codigoCidade, Integer
    > contrato) {
    >         return
    tituloBO.obterTitulosAssinante(codigoCidade,contrato);
    >     }
    >
    >     public TituloBO getTituloBO() {
    >         return tituloBO;
    >     }
    >
    >     public void setTituloBO(TituloBO tituloBO) {
    >         this.tituloBO = tituloBO;
    >     }
    > }
    >
    > public class TituloBO {
    >     private TituloDAO dao;
    >
    >     public List obterTitulosAssinante(Integer codigoCidade, Integer
    > contrato){
    >         return dao.obterTitulos(codigoCidade,contrato);
    >     }
    >
    >     public TituloDAO getDao() {
    >         return dao;
    >     }
    >
    >     public void setDao(TituloDAO dao) {
    >         this.dao = dao;
    >     }
    > }
    >
    > --> This DAO is an Hibernate DAO it's the only place that we might
    > have SessionFactory related elements
    >
    > public class Titulo implements Entity {
    >     private TituloPK pk;
    >     private String formaPagamento;
    >     private Date dataEmissao;
    >     private Date dataVencimento;
    >     private String codigoBanco;
    >     private String contaCedente;
    >     private String numeroBoleto;
    >     private Double valor;
    >     private Date dataPagemento;
    >     private Date dataBaixa;
    >     private String carteira;
    >
    > FinanceiroServiceImpl.aegis.xml
    >
    > <mappings>
    >     <mapping>
    >         <method name="visualizarFaturas">
    >             <return-type componentType="
    > com.waybrasil.model.persistence.titulos.Titulo "/>
    >         </method>
    >     </mapping>
    > </mappings>
    >
    > Ok, couple of questions here as well. If I'm defining my
    serviceClass
    > as my interface and also my namespace maps to FinanceiroService,
    why
    > do I must access it using FinanceiroServiceImpl? and Why Aegis binds
    > must have the implementation name as well?
    >
    > The error I get is:
    > Couldn't create type for property definedFilterNames on
    interface org.hibernate.SessionFactory: Cannot create mapping for
    java.util.Set, unspecified component type for interface java.util.Set
    >
    >
    > When I try to access the WSDL, I just wonder why, as you can see
    there's no reference for any Set or Session Factory in my hierarchy.
    >
    > Dan could you please help me out here? I have till tomorrow to
    solve this, or they told me that I won't be allowed to use XFire
    anymore :( (I'll have to go back to Axis)
    >
    >
    > Best Regards
    >
    >


    --
    cyber:con gmbh
    Mika Göckel

    Rathausallee 10
    53757 Sankt Augustin

    tel (+49)2241 / 9350 0
    fax (+49)2241 / 9350 99
    mob (+49) 172 / 279 2771
    skype mika.goeckel
    email [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>




--
cyber:con gmbh
Mika Göckel

Rathausallee 10
53757 Sankt Augustin

tel (+49)2241 / 9350 0
fax (+49)2241 / 9350 99
mob (+49) 172 / 279 2771
skype mika.goeckel
email [EMAIL PROTECTED]

Reply via email to