<
smruti.photo@xxxxxxxxx> wrote:
> Hi,
> I am trying to use around advice for a particular webservice method. I have
> written a aspect class with advice with point cut.
> even I have written an aop.xml file specifying aspect and weaver elements.
> Kept this available to webservice's class path.
> while running I can see the message of weaving the calss, but not able to
> get the the message which I want to be printed during advice execution.
>
> My code is as follow
>
>
> /////////////aspect class///////////////////////
> public aspect LogViewer
> {
> before(): execution(public *
> com.gcp.gdb.contact..ContactObjectSoapHttpPortImpl.*(..) ) //this is my web
> service call
> {
> System.err.println("About to call " +
> thisJoinPoint.getSignature().toShortString() + ", args:" +
> Arrays.toString(thisJoinPoint.getArgs()) );
> }
>
> Object around() : execution( *
> com.att.gcp.gdb.contact..ContactObjectSoapHttpPortImpl.echo(..))
> {
> final long startTimeMs = System.currentTimeMillis();
> Object result = proceed();
> final long endTimeMs = System.currentTimeMillis();
> final long execTimeMs = endTimeMs - startTimeMs;
> System.out.println(getClass().getName() + ": time taken is :"
> +execTimeMs );
> return result;
>
> }
>
> }
> ////////////////////aop.xml/////////////////////////
>
> <aspectj>
>
> <aspects options="-verbose">
>
> <aspect name="com.gcp.aspectj.LogViewer" />
> </aspects>
>
> <weaver options="-verbose, -showWeaveInfo">
>
> <include within="com.gcp.gdb.contact.v1.*" />
>
>
> <include within="com.gcp.aspectj.LogViewer"/>
> </weaver>
>
> </aspectj>
>
>
> ///////////////////webservice console log//////
>
> [ChangeAwareClassLoader@129d101] debug weaving
> 'com.att.gcp.gdb.geoaddr.v1.GeographicAddressObjectSoapHttpPortImpl'
> [GenericClassLoader@1a0fd6d] info AspectJ Weaver Version 1.6.8 built on
> Friday Jan 8, 2010 at 21:53:37 GMT
> [GenericClassLoader@1a0fd6d] info register classloader
> weblogic.utils.classloaders.GenericClassLoader@1a0fd6d
> [GenericClassLoader@1a0fd6d] info using configuration
> C:/bea/user_projects/domains/aspectjtest/servers/AdminServer/tmp/.appmergegen_1352907090515/gcp_gdb.ear/yfkpbj/WEB-I
> NF/lib/gdbAspectLog.jar!/META-INF/aop.xml
> [GenericClassLoader@1a0fd6d] info register aspect
> com.app.test.aspect.log.LogFormattingAspect
> [GenericClassLoader@1a0fd6d] warning at
> com\app\test\aspect\log\LogFormattingAspect.java::0 no match for this type
> name: com.gcp.gdb.contact.v1.ContactObjectSoapHttpP
> ortImpl [Xlint:invalidAbsoluteTypeName]
> [GenericClassLoader@1a0fd6d] debug weaving
> 'com.gcp.gdb.geoaddr.v1.GeographicAddressObjectSoapHttpPortImpl'
>
>
>
>
>
> Thanks,
> Smrutiranjan
>
>