Thanks for your response. I am using axis 1.3. Following is my callback
handler generated from wsdl2java.
/**
 * DMTServiceCallbackHandler.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis2 version: 1.3  Built on : Aug 10, 2007 (04:45:47 LKT)
 */
package org.tempuri;


/**
 *  DMTServiceCallbackHandler Callback class, Users can extend this class
and implement
 *  their own receiveResult and receiveError methods.
 */
public abstract class DMTServiceCallbackHandler {
    protected Object clientData;

    /**
     * User can pass in any object that needs to be accessed once the
NonBlocking
     * Web service call is finished and appropriate method of this CallBack
is called.
     * @param clientData Object mechanism by which the user can pass in user
data
     * that will be avilable at the time this callback is called.
     */
    public DMTServiceCallbackHandler(Object clientData) {
        this.clientData = clientData;
    }

    /**
     * Please use this constructor if you don't want to set any clientData
     */
    public DMTServiceCallbackHandler() {
        this.clientData = null;
    }

    /**
     * Get the client data
     */
    public Object getClientData() {
        return clientData;
    }

    /**
     * auto generated Axis2 call back method for Hello method
     * override this method for handling normal response from Hello
operation
     */
    public void receiveResultHello(org.tempuri.HelloResponseDocument result)
{
    }

    /**
     * auto generated Axis2 Error handler
     * override this method for handling error response from Hello operation
     */
    public void receiveErrorHello(java.lang.Exception e) {
    }

    // No methods generated for meps other than in-out
}

I see there are methods for receiveResultHello and receiveErrorHello. My WCF
duplex webservice is
namespace DMTWCFService
{
    public interface IDMTServiceCallback
    {
        [OperationContract]
        void HelloCallback();
    }

    [ServiceContract(CallbackContract = typeof(IDMTServiceCallback))]
    public interface IDMTService
    {
        [OperationContract]
        string Hello(string message);

    }

    [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Reentrant)]
    public class DMTService : IDMTService
    {
        public string Hello(string message)
        {
            Console.WriteLine("Message received " + message);
            System.Threading.Thread.Sleep(5000);
            IDMTServiceCallback Callback =
OperationContext.Current.GetCallbackChannel<IDMTServiceCallback>();
            if(Callback!=null)
                Callback.HelloCallback();
            System.Threading.Thread.Sleep(5000);
            return message;
        }
    }
}

The WCF duplex contract also says that the client should implement the
interface IDMTServiceCallBack and should provide an implementation for
HelloCallback() method. Now when I generate my proxy code I dont get any
receiveResultHelloCallBack and receiveErrorHelloCallback. Which means I cant
do anything if the WCF webservice returns with a response. I am confused as
to how should this be done. Is this a limitation with the -xmlbeans
databinding? Should I use adb? I shall highly value your response. Thanks

On Thu, Jul 31, 2008 at 6:08 AM, Amila Suriarachchi <
[EMAIL PROTECTED]> wrote:

>
>
> On Wed, Jul 30, 2008 at 10:50 PM, Hasnain Badami <[EMAIL PROTECTED]>wrote:
>
>> Hi
>> I am trying to send asynchronous requests (true non blocking as discussed
>> at http://ws.apache.org/axis2/1_1/userguide.html) to a wcf service. The
>> wsdl is added as an attachment. When I try to generate java proxies using
>> wsdl2java specifying -d as xmlbeans, I dont get any proxy code for
>> implementing the callback. I mean the callbackhandler generated i.e.
>> DMTServiceCallBackHandler has no methods which listen for the callback
>> coming from the webservice
>>
> Aren't there some methods like
>
> /**
>             * auto generated Axis2 call back method for get method
>             * override this method for handling normal response from get
> operation
>             */
>            public void receiveResultget(
>                     au.gov.nsw.osr.pillar.gen.xsd.GetResponseDocument
> result
>                         ) {
>            }
>
>           /**
>            * auto generated Axis2 Error handler
>            * override this method for handling error response from get
> operation
>            */
>             public void receiveErrorget(java.lang.Exception e) {
>             }
>
> in this call back class. you should create a class extending this class and
> override methods.
>
> thanks,
> Amila.
>
>
>> (i.e. no receiveResultHelloCallback method is generated). It should be
>> more clear if you can please use wsdl2java on the attached wsdl.
>>
>> Thanks
>>
>> Waiting for your reply.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>

Reply via email to