2 Replies Latest reply on Jun 9, 2009 4:32 AM by chaitanya m

    invoking component from quartz -- problem

    chaitanya m Newbie

      Hi,

       

      I have created a component and wants to call it from quartz.

      following are the details.

       

      quartz.xml which i deployed in Deploy folder.

       

       

       

      attached is my component code.

       

      package com.nexant.mdm;

       

       

      /**

      *

       

      • Copyright © 2007-2008 IONA Technologies PLC.

       

      •           All Rights Reserved.

      *

       

      • Licensed under the Apache License, Version 2.0 (the "License");

       

      • you may not use this file except in compliance with the License.

       

      • You may obtain a copy of the License at

       

       

      • Unless required by applicable law or agreed to in writing, software

       

      • distributed under the License is distributed on an "AS IS" BASIS,

       

      • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

       

      • See the License for the specific language governing permissions and

       

      • limitations under the License.

      **/

       

      import javax.jbi.component.ComponentContext;

      import javax.jbi.messaging.DeliveryChannel;

      import javax.jbi.servicedesc.ServiceEndpoint;

      import javax.jws.WebMethod;

      import javax.jws.WebService;

       

       

       

      /**

       

      • The order web service implementation offered to Logisticx customers. Used to

       

      • place orders and checking orderStatus.

      *

       

      • @author bsnyder

      *

      */

      @WebService(name = "SchedularService",

                  serviceName = "SchedularServiceService",

                  portName = "SchedularServicePort",

                  targetNamespace = "http://mdm.nexant.com/SchedularService/")

      public class SchedularServiceImpl implements SchedularService {

       

          @WebMethod

           public void startScheduler(String message) {

       

                 System.out.println(" Message  :  ---  ");

       

          }

       

      }

       

      xbean.xml

       

       

       

      when i deploy these two. Scheduler is not able to invoke my component. please help me out.

       

      Edited by: chaitanya on Jun 8, 2009 1:52 PM

        • 1. Re: invoking component from quartz -- problem
          Dave Stanley Novice

          I think you might be missing a slash in the namespace definition of your quartz component.

           

          Can you try this instead:

           

          xmlns:scheduler="http://mdm.nexant.com/SchedularService/"
          

           

          Regards

          /Dave

          • 2. Re: invoking component from quartz -- problem
            chaitanya m Newbie

            Hi dave,

             

            i cahnged the quartz.xml, but still i am facing the same problem.

            i think i am doing some mistake in the creation of endpoint.Can you go through the following files.

             

            xbean.xml:

             

             

             

            Implementation class:

             

            package com.nexant.mdm;

             

            import javax.jws.WebMethod;

            import javax.jws.WebService;

            import javax.jbi.component.ComponentContext;

            import javax.jbi.messaging.DeliveryChannel;

            import javax.jbi.servicedesc.ServiceEndpoint;

            import java.util.logging.Logger;

             

             

            @WebService(name = "SchedularService",

                        serviceName = "SchedularServiceService",

                        portName = "SchedularServicePort",

                        targetNamespace = "http://mdm.nexant.com/SchedularService/")

            public class SchedularServiceImpl implements SchedularService {

             

                 private ComponentContext context;

             

                 @WebMethod

                 public void startScheduler() {

             

             

                        Logger log=Logger.getLogger(this.getClass().getName());

                        log.info("started 1");

             

             

                }

             

                 public void setContext(ComponentContext context) {

             

                      Logger log=Logger.getLogger(this.getClass().getName());

                      log.info("started  2");

                    this.context = context;

                }

            }