Hi again,
I forgot to mention that the service also worjçks with this same aspect
weaved at compile-time.
Suggestions welcomed ...
Thanks

2009/5/13 Guadalupe Ortiz <[email protected]>

> Hi Simone and Andy,
> InfoBook is the Interface implemented by the service, which offers one
> operation (giveMeInformationOF(String)) which returns
> ItemBook_0Mini (ItemBook_0Mini is a bean, which simply contains several
> Strings).
> The service works with this type without the aspect, so there shouldn´t be
> any problem with its serialization; it is when the around advice is included
> when it does not work any more.
> What could it be?
> Thanks a lot,
> Guadalupe
>
> 2009/5/13 Simone Gianni <[email protected]>
>
> Hi Guadalupe,
>> sorry, I missed your previous reply.
>>
>> The aspect seems right, as long as the method
>> InfoBook.giveMeInformationOF(String) is declared as :
>>
>> ItemBook_0Mini InfoBook.giveMeInformationOF(String s) { .. }
>>
>> What i see from the exception is :
>> - I don't manage to understand if the exception is complete, often the
>> InvocationTargetException is itself wrapping another inner exception, which
>> is the real cause of failure.
>> - The method is called on a SoapStub, so I suppose InfoBook is an
>> interface. Could it be that the Soap stub requires it to return a stub
>> subinterface? Therefore the book you are returning from the aspect is not
>> the correct type to return when the call is performed on the stub? This
>> would explain also why with strings it works correctly : strings are not
>> stubbed.
>>
>>
>> Simone
>>
>>
>> Guadalupe Ortiz wrote:
>>
>>> Hi all,
>>> Anybody had did problem with complex types? Any clue or sugestion?
>>> Thanks a lot,
>>> Guadalupe
>>>
>>> 2009/5/8 Guadalupe Ortiz <[email protected] <mailto:[email protected]>>
>>>
>>>
>>>
>>>    Hi Simone,
>>>    I paste below the full error code. I have also pasted the aspect
>>>    code and the class definition.
>>>    Thanks a lot,
>>>    Guadalupe
>>>    ASPECT CODE:
>>>    package mainpack;
>>>    import clases.ItemBook_0Mini;
>>>    import clases.ItemBook_1Base;
>>>    import clases.ItemBook_2Complete;
>>>    import clases.ItemBook_3Extended;
>>>    import bibliohandler.MyHandlerClass;
>>>    import bibliohandler.MyHandlerClass.tipos_dispositivos;
>>>
>>>    public aspect CheckDeviceType {
>>>     pointcut giveMeInformationOF_pointcut (String ISBN): execution(*
>>>    InfoBook.giveMeInformationOF(String))&&args(ISBN);
>>>         ItemBook_0Mini around(String ISBN):
>>>    giveMeInformationOF_pointcut(ISBN){
>>>      ItemBook_0Mini book=new ItemBook_0Mini ();
>>>      book.setTitle("Web Services: Principles and Technology");
>>>      book.setISBN("321155556");
>>>      book.setPrice("67.50 Euros");
>>>      System.out.println("ASPECT");
>>>      return book;       }        CLASS ITEMBOOK_0MINI:
>>>    *
>>>
>>>    package
>>>
>>>    * clases; *
>>>
>>>    public
>>>
>>>    * *class* ItemBook_0Mini { *private* String ISBN; *private* String
>>>    price; *private* String title;
>>>
>>>    [...]
>>>
>>>    ERROR:
>>>
>>>    xisFault
>>>
>>>    faultCode: {
>>>
>>>    
>>> _http://schemas.xmlsoap.org/soap/envelope/}Server.userException<http://schemas.xmlsoap.org/soap/envelope/%7DServer.userException>
>>>    <http://schemas.xmlsoap.org/soap/envelope/%7DServer.userException>_
>>>
>>>    faultSubcode:
>>>
>>>    faultString:
>>>
>>>    _java.lang.reflect.InvocationTargetException_
>>>
>>>    faultActor:
>>>
>>>    faultNode:
>>>
>>>    faultDetail:
>>>
>>>    
>>> {http://xml.apache.org/axis/}hostname:TheMachine<http://xml.apache.org/axis/%7Dhostname:TheMachine>
>>>    <http://xml.apache.org/axis/%7Dhostname:TheMachine>
>>>
>>>
>>>    _
>>>
>>>    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.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown
>>>    Source)
>>>
>>>    at
>>>
>>>  
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
>>>    Source)
>>>
>>>    at
>>>
>>>  com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
>>>    Source)
>>>
>>>    at
>>>
>>>  
>>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(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
>>>
>>>  
>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.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 mainpack.InfoBookSoapBindingStub.giveMeInformationOF(
>>>
>>>    _InfoBookSoapBindingStub.java:350_)
>>>
>>>    at mainclient.HeaderClientWin$1.actionPerformed(
>>>
>>>    _HeaderClientWin.java:49_)
>>>
>>>    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
>>>
>>>    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
>>>
>>>    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
>>>
>>>    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
>>>
>>>    at
>>>    javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown
>>>    Source)
>>>
>>>    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
>>>
>>>    at java.awt.Component.processMouseEvent(Unknown Source)
>>>
>>>    at javax.swing.JComponent.processMouseEvent(Unknown Source)
>>>
>>>    at java.awt.Component.processEvent(Unknown Source)
>>>
>>>    at java.awt.Container.processEvent(Unknown Source)
>>>
>>>    at java.awt.Component.dispatchEventImpl(Unknown Source)
>>>
>>>    at java.awt.Container.dispatchEventImpl(Unknown Source)
>>>
>>>    at java.awt.Component.dispatchEvent(Unknown Source)
>>>
>>>    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
>>>
>>>    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
>>>
>>>    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
>>>
>>>    at java.awt.Container.dispatchEventImpl(Unknown Source)
>>>
>>>    at java.awt.Window.dispatchEventImpl(Unknown Source)
>>>
>>>    at java.awt.Component.dispatchEvent(Unknown Source)
>>>
>>>    at java.awt.EventQueue.dispatchEvent(Unknown Source)
>>>
>>>    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
>>>
>>>    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
>>>
>>>    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
>>>
>>>    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>>>
>>>    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>>>
>>>    at java.awt.EventDispatchThread.run(Unknown Source)
>>>
>>>
>>>
>>>    2009/5/8 Simone Gianni <[email protected]
>>>    <mailto:[email protected]>>
>>>
>>>        Hi Guadalupe,
>>>        can you post the entire exception stack trace? It could be
>>>        that the return type of your around advice is not compatible
>>>        with the return type of the adviced methods.
>>>
>>>        Simone
>>>
>>>        Guadalupe Ortiz wrote:
>>>
>>>            Hi all,
>>>            I have tested LTW with a Web service and worked perfectly
>>>            well when the operation intercepted in the joinpoint
>>>            returned a basic type (such as a String).
>>>             However when the operation returns a complex type defined
>>>            by the user and I include an around advice in the aspect,
>>>            I get an error.
>>>            The error is
>>>            "java.lang.reflect.InvocationTargetException". (When doing
>>>            it with compile time weaving it works)
>>>             I have tried to include the classes in the classpath when
>>>            creating the jar and I have also created the jar also
>>>            compiling the classes. In any case I get the same error. I
>>>            guess it shouldnt be dificult to do this and I am probably
>>>            missing a silly step.
>>>             Thanks a lot for your help,
>>>             Guadalupe
>>>
>>>  ------------------------------------------------------------------------
>>>
>>>            _______________________________________________
>>>            aspectj-users mailing list
>>>            [email protected] <mailto:[email protected]>
>>>            https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>>
>>>
>>>
>>>        --        Simone Gianni            CEO Semeru s.r.l.
>>> Apache
>>>        Committer
>>>        http://www.simonegianni.it/
>>>
>>>        _______________________________________________
>>>        aspectj-users mailing list
>>>        [email protected] <mailto:[email protected]>
>>>        https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>>
>>>
>>>
>>>
>>>    --    Dr. Guadalupe Ortiz Bellot
>>>    Assistant Professor
>>>    Computer Science Department
>>>    University of Extremadura
>>>
>>>    [email protected] <mailto:[email protected]>
>>>    http://personales.ya.com/gobellot/
>>>
>>>    Quercus Software Engineering Group
>>>    http://quercusseg.unex.es
>>>
>>>
>>>
>>>
>>> --
>>> Dr. Guadalupe Ortiz Bellot
>>> Assistant Professor
>>> Computer Science Department
>>> University of Extremadura
>>>
>>> [email protected] <mailto:[email protected]>
>>> http://personales.ya.com/gobellot/
>>>
>>> Quercus Software Engineering Group
>>> http://quercusseg.unex.es
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> aspectj-users mailing list
>>> [email protected]
>>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>>
>>>
>>
>>
>> --
>> Simone Gianni            CEO Semeru s.r.l.           Apache Committer
>> http://www.simonegianni.it/
>>
>> _______________________________________________
>> aspectj-users mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>
>
>
> --
> Dr. Guadalupe Ortiz Bellot
> Assistant Professor
> Computer Science Department
> University of Extremadura
>
> [email protected]
>  http://personales.ya.com/gobellot/
>
> Quercus Software Engineering Group
> http://quercusseg.unex.es
>



-- 
Dr. Guadalupe Ortiz Bellot
Assistant Professor
Computer Science Department
University of Extremadura

[email protected]
http://personales.ya.com/gobellot/

Quercus Software Engineering Group
http://quercusseg.unex.es
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to