Thanks for your help

No this is not the case.
The place where I call this
getResource().getEnvironment().getAddressingContext() is in the
initializeCompleted()
I call the super.initializeCompleted() before trying to retrieve the
getAddressingContext().
this is the wsn-producer code from which I try to retrieve the
SubscribeRequest message Content.

Am I on the right way ?

Thanks for your help

Th code is the following:

public class MyCapabilityImpl extends AbstractWsResourceCapability
implements MyCapability
{
    private static final QName[] _PROPERTIES = new QName[] {
            new QName(NAMESPACE_URI, "MessageInterval", PREFIX),
            new QName(NAMESPACE_URI, "ServerName", PREFIX) 
    };

    private static final QName _TOPIC_NAME = new QName(NAMESPACE_URI,
"MyTopic", PREFIX);
    
    private static final QName _TOPIC_VPL = new QName(NAMESPACE_URI,
"/*/*/muws1:ManagementEvent", PREFIX);

    
    public QName[] getPropertyNames()
    {
        return _PROPERTIES;
    }

    private int _MessageInterval = 10;

    private String _ServerName = "16.16.235.174";

    public int getMessageInterval()
    {
        return _MessageInterval;
    }

    public void setMessageInterval(int param0)
    {
        _MessageInterval = param0;
    }

    public String getServerName()
    {
        return _ServerName;
    }

    public void setServerName(String param0)
    {
        _ServerName = param0;
    }


    
    public void initializeCompleted() 
        throws SoapFault
    {
        super.initializeCompleted();
        
        //
        // access resource's WSN capability and create a new topic
        //
        final NotificationProducer wsn =
(NotificationProducer)getResource().getCapability(WsnConstants.PRODUCER_URI);
        wsn.addTopic(_TOPIC_NAME);

        if (getResource().getEnvironment().getAddressingContext() == null)
                getLog().info("Vpl --
getResource().getEnvironment().getAddressingContext()  null");
        else
                getLog().info("Vpl -- 
getResource()getEnvironment().getAddressingContext() 
not null");
    }
}

                




Daniel Jemiolo wrote:
> 
> 
> A common cause of that is if you override the capability class' initialize
> () method but don't call super.initialize(). Is this the case?
> 
> Dan
> 
> 
> 
> vpl <[EMAIL PROTECTED]> wrote on 10/01/2007 08:28:51 AM:
> 
>>
>> Hi,
>>
>> facing a problem. Did not find any clue in the distribution list. So I
> post
>> it.,...
>>
>> I'm extending the wsn-producer (sample) and would like to anayse the
> content
>> of the Filter value set by the Client
>> when it sends its SubscribeRequest
>>
>> MyCapabilityImpl extends AbstractWsResourceCapability. So I've tried a
>> getResource().getEnvironment().getAddressingContext() in my code and get
> a
>> null pointer, where getResource().getEnvironment() is not null. I'm
>> wondering:
>> - Is it normal as it seems to be the right way to get the messageHeader
>> values from the received message
>> - What is the good way to get this filter value set in the
> Subscriberequest
>> ?
>>
>> Thanks for your support
>>
>> Cheers
>>
>>
>>
>> --
>> View this message in context: http://www.nabble.com/getResource%28%
>> 29.getEnvironment%28%29.getAddressingContext%28%29-null-tf4548030.
>> html#a12978303
>> Sent from the Muse User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
> 

-- 
View this message in context: 
http://www.nabble.com/getResource%28%29.getEnvironment%28%29.getAddressingContext%28%29-null-tf4548030.html#a12979284
Sent from the Muse User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to