You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by "Jürgen Mangler (JIRA)" <ji...@apache.org> on 2006/12/14 19:35:20 UTC

[jira] Created: (MUSE-164) OperationalStatus not changeable?

OperationalStatus not changeable?
---------------------------------

                 Key: MUSE-164
                 URL: http://issues.apache.org/jira/browse/MUSE-164
             Project: Muse
          Issue Type: Bug
          Components: WSDM MUWS OperationalStatus
    Affects Versions: 2.1.0
         Environment: Ubuntu Edgy, JDK 2.5.0, Tomcat 5.5, Manual calling of wsdl2java, and manual build (no eclipse used)
            Reporter: Jürgen Mangler
         Assigned To: Dan Jemiolo


I added the following to MyCapability.java

public void initialize() throws SoapFault {
  super.initialize();
  WsResource res = this.getWsResource();

 OperationalStatus stat = (OperationalStatus)res.getCapability(MuwsConstants.OP_STATUS_URI);
 stat.setOperationalStatus(OperationalStatus.AVAILABLE);
 this.getLog().info(stat.getOperationalStatus());
...
}

Which results in an AVAILABLE entry in the log file. However running a client an querying operational status results in the following:

<soapenv:Body>
<wsrf-rp:GetResourcePropertyResponse xmlns:tns="http://ws.apache.org/axis2" xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2">
<pfx0:OperationalStatus xmlns:pfx0="http://docs.oasis-open.org/wsdm/muws2-2.xsd">Unknown</pfx0:OperationalStatus>
</wsrf-rp:GetResourcePropertyResponse>
</soapenv:Body> 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


[jira] Closed: (MUSE-164) OperationalStatus not changeable?

Posted by "Dan Jemiolo (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/MUSE-164?page=all ]

Dan Jemiolo closed MUSE-164.
----------------------------

    Resolution: Fixed

> OperationalStatus not changeable?
> ---------------------------------
>
>                 Key: MUSE-164
>                 URL: http://issues.apache.org/jira/browse/MUSE-164
>             Project: Muse
>          Issue Type: Bug
>          Components: WSDM MUWS OperationalStatus
>    Affects Versions: 2.1.0
>         Environment: Ubuntu Edgy, JDK 2.5.0, Tomcat 5.5, Manual calling of wsdl2java, and manual build (no eclipse used)
>            Reporter: Jürgen Mangler
>         Assigned To: Dan Jemiolo
>
> I added the following to MyCapability.java
> public void initialize() throws SoapFault {
>   super.initialize();
>   WsResource res = this.getWsResource();
>  OperationalStatus stat = (OperationalStatus)res.getCapability(MuwsConstants.OP_STATUS_URI);
>  stat.setOperationalStatus(OperationalStatus.AVAILABLE);
>  this.getLog().info(stat.getOperationalStatus());
> ...
> }
> Which results in an AVAILABLE entry in the log file. However running a client an querying operational status results in the following:
> <soapenv:Body>
> <wsrf-rp:GetResourcePropertyResponse xmlns:tns="http://ws.apache.org/axis2" xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2">
> <pfx0:OperationalStatus xmlns:pfx0="http://docs.oasis-open.org/wsdm/muws2-2.xsd">Unknown</pfx0:OperationalStatus>
> </wsrf-rp:GetResourcePropertyResponse>
> </soapenv:Body> 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


[jira] Commented: (MUSE-164) OperationalStatus not changeable?

Posted by "Jürgen Mangler (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/MUSE-164?page=comments#action_12458618 ] 
            
Jürgen Mangler commented on MUSE-164:
-------------------------------------

Yes, you are true.

public void initializeCompleted() throws SoapFault {
      super.initializeCompleted();
      WsResource res = this.getWsResource();

      OperationalStatus stat = (OperationalStatus)res.getCapability(MuwsConstants.OP_STATUS_URI);
      stat.setOperationalStatus(OperationalStatus.AVAILABLE);
      this.getLog().info(stat.getOperationalStatus());

      ...
}

This solves the problem. Thanks.

> OperationalStatus not changeable?
> ---------------------------------
>
>                 Key: MUSE-164
>                 URL: http://issues.apache.org/jira/browse/MUSE-164
>             Project: Muse
>          Issue Type: Bug
>          Components: WSDM MUWS OperationalStatus
>    Affects Versions: 2.1.0
>         Environment: Ubuntu Edgy, JDK 2.5.0, Tomcat 5.5, Manual calling of wsdl2java, and manual build (no eclipse used)
>            Reporter: Jürgen Mangler
>         Assigned To: Dan Jemiolo
>
> I added the following to MyCapability.java
> public void initialize() throws SoapFault {
>   super.initialize();
>   WsResource res = this.getWsResource();
>  OperationalStatus stat = (OperationalStatus)res.getCapability(MuwsConstants.OP_STATUS_URI);
>  stat.setOperationalStatus(OperationalStatus.AVAILABLE);
>  this.getLog().info(stat.getOperationalStatus());
> ...
> }
> Which results in an AVAILABLE entry in the log file. However running a client an querying operational status results in the following:
> <soapenv:Body>
> <wsrf-rp:GetResourcePropertyResponse xmlns:tns="http://ws.apache.org/axis2" xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2">
> <pfx0:OperationalStatus xmlns:pfx0="http://docs.oasis-open.org/wsdm/muws2-2.xsd">Unknown</pfx0:OperationalStatus>
> </wsrf-rp:GetResourcePropertyResponse>
> </soapenv:Body> 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


[jira] Commented: (MUSE-164) OperationalStatus not changeable?

Posted by "Dan Jemiolo (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/MUSE-164?page=comments#action_12458589 ] 
            
Dan Jemiolo commented on MUSE-164:
----------------------------------

I think I know what the issue is - you're setting the status in the initialize() method, before all of the capabilities are guaranteed to be initialized. The initialize() method is only for tasks that are specific to your capability (don't involved other capabilities). This is covered in the programming model docs - see


http://ws.apache.org/muse/docs/2.1.0/manual/architecture/programming-model.html#capabilities

and

http://ws.apache.org/muse/docs/2.1.0/javadoc/org/apache/muse/core/Capability.html#initializeCompleted()


What's happening is that you're setting the status to AVAILABLE, and the after that, the OperationalStatus capability's initialize() is called, and it sets it to UNKNOWN.

If you move your code to initializeCompleted() instead of initialize(), the problem will go away. Let me know if this switch works.


> OperationalStatus not changeable?
> ---------------------------------
>
>                 Key: MUSE-164
>                 URL: http://issues.apache.org/jira/browse/MUSE-164
>             Project: Muse
>          Issue Type: Bug
>          Components: WSDM MUWS OperationalStatus
>    Affects Versions: 2.1.0
>         Environment: Ubuntu Edgy, JDK 2.5.0, Tomcat 5.5, Manual calling of wsdl2java, and manual build (no eclipse used)
>            Reporter: Jürgen Mangler
>         Assigned To: Dan Jemiolo
>
> I added the following to MyCapability.java
> public void initialize() throws SoapFault {
>   super.initialize();
>   WsResource res = this.getWsResource();
>  OperationalStatus stat = (OperationalStatus)res.getCapability(MuwsConstants.OP_STATUS_URI);
>  stat.setOperationalStatus(OperationalStatus.AVAILABLE);
>  this.getLog().info(stat.getOperationalStatus());
> ...
> }
> Which results in an AVAILABLE entry in the log file. However running a client an querying operational status results in the following:
> <soapenv:Body>
> <wsrf-rp:GetResourcePropertyResponse xmlns:tns="http://ws.apache.org/axis2" xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2">
> <pfx0:OperationalStatus xmlns:pfx0="http://docs.oasis-open.org/wsdm/muws2-2.xsd">Unknown</pfx0:OperationalStatus>
> </wsrf-rp:GetResourcePropertyResponse>
> </soapenv:Body> 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


Re: [jira] Commented: (MUSE-164) OperationalStatus not changeable?

Posted by Christian Ewers <1e...@informatik.uni-hamburg.de>.
Hi,

I'm using the OperationalStatus capability and changing the property is no problem. I think when I 
first tried I had the exact same problem, but I'm not sure (it was last year). I'm using a factory 
resource to initialize new resources and it sets the OperationalStatus to 'Available' after calling 
the initialize()-method on the newly created resources. Maybe the problem is that the resource is 
not fully initialized, although calling the initializeCompleted() method? Changing the status within 
the resource itself during runtime works fine.

Christian

maehome@yahoo.com (JIRA) schrieb:
>     [ https://issues.apache.org/jira/browse/MUSE-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506299 ] 
> 
> maehome@yahoo.com commented on MUSE-164:
> ----------------------------------------
> 
> Hi,
> I am having the same problem that you experienced.  See topic "OperationalStatus displays as null" by MUSEME.
> 
> I tried the exact recommendation as you did i.e put the following code in initializeCompleted()
> 
> OperationalStatus status = (OperationalStatus)resource.getCapability(MuwsConstants.OP_STATUS_URI);
> 	//OperationalStatus status = (OperationalStatus)getResource.getCapability(MuwsConstants.OP_STATUS_URI);
> 	status.setOperationalStatus(OperationalStatus.AVAILABLE);
> this.getLog().info("Apache httpd is " + status.getOperationalStatus());
> 
> The Tomcat log displayed the status as AVAILABLE but when I queried it from my test client, using the following code, the status is displayed as null.  I would be interested in how you got it working.  Thanks.
> Testclient code snippet follows:
> 
> System.out.println("    Operational Status: " + http.getOperationalStatus());
> 
> Output from testclient follows:
> 
> Operational Status: [pfx1:OperationalStatus: null]
> 
> The getOperationalStatus() is in my http_serverProxy and follows:
> 
> public Element getOperationalStatus()
>         throws SoapFault
>     {
>         Element[] results = (Element[])getPropertyAsObject(PROPERTIES[3], Element.class);
>         return results.length == 0 ? null : results[0];
>     }
> 
> Quoted from: 
> http://www.nabble.com/-jira--Created%3A-%28MUSE-164%29-OperationalStatus-not-changeable--tf2822655.html#a7882142
> 
> 
> 
>> OperationalStatus not changeable?
>> ---------------------------------
>>
>>                 Key: MUSE-164
>>                 URL: https://issues.apache.org/jira/browse/MUSE-164
>>             Project: Muse
>>          Issue Type: Bug
>>          Components: WSDM MUWS OperationalStatus
>>    Affects Versions: 2.1.0
>>         Environment: Ubuntu Edgy, JDK 2.5.0, Tomcat 5.5, Manual calling of wsdl2java, and manual build (no eclipse used)
>>            Reporter: Jürgen Mangler
>>            Assignee: Dan Jemiolo
>>
>> I added the following to MyCapability.java
>> public void initialize() throws SoapFault {
>>   super.initialize();
>>   WsResource res = this.getWsResource();
>>  OperationalStatus stat = (OperationalStatus)res.getCapability(MuwsConstants.OP_STATUS_URI);
>>  stat.setOperationalStatus(OperationalStatus.AVAILABLE);
>>  this.getLog().info(stat.getOperationalStatus());
>> ...
>> }
>> Which results in an AVAILABLE entry in the log file. However running a client an querying operational status results in the following:
>> <soapenv:Body>
>> <wsrf-rp:GetResourcePropertyResponse xmlns:tns="http://ws.apache.org/axis2" xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2">
>> <pfx0:OperationalStatus xmlns:pfx0="http://docs.oasis-open.org/wsdm/muws2-2.xsd">Unknown</pfx0:OperationalStatus>
>> </wsrf-rp:GetResourcePropertyResponse>
>> </soapenv:Body> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


[jira] Commented: (MUSE-164) OperationalStatus not changeable?

Posted by "maehome@yahoo.com (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MUSE-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506299 ] 

maehome@yahoo.com commented on MUSE-164:
----------------------------------------

Hi,
I am having the same problem that you experienced.  See topic "OperationalStatus displays as null" by MUSEME.

I tried the exact recommendation as you did i.e put the following code in initializeCompleted()

OperationalStatus status = (OperationalStatus)resource.getCapability(MuwsConstants.OP_STATUS_URI);
	//OperationalStatus status = (OperationalStatus)getResource.getCapability(MuwsConstants.OP_STATUS_URI);
	status.setOperationalStatus(OperationalStatus.AVAILABLE);
this.getLog().info("Apache httpd is " + status.getOperationalStatus());

The Tomcat log displayed the status as AVAILABLE but when I queried it from my test client, using the following code, the status is displayed as null.  I would be interested in how you got it working.  Thanks.
Testclient code snippet follows:

System.out.println("    Operational Status: " + http.getOperationalStatus());

Output from testclient follows:

Operational Status: [pfx1:OperationalStatus: null]

The getOperationalStatus() is in my http_serverProxy and follows:

public Element getOperationalStatus()
        throws SoapFault
    {
        Element[] results = (Element[])getPropertyAsObject(PROPERTIES[3], Element.class);
        return results.length == 0 ? null : results[0];
    }

Quoted from: 
http://www.nabble.com/-jira--Created%3A-%28MUSE-164%29-OperationalStatus-not-changeable--tf2822655.html#a7882142



> OperationalStatus not changeable?
> ---------------------------------
>
>                 Key: MUSE-164
>                 URL: https://issues.apache.org/jira/browse/MUSE-164
>             Project: Muse
>          Issue Type: Bug
>          Components: WSDM MUWS OperationalStatus
>    Affects Versions: 2.1.0
>         Environment: Ubuntu Edgy, JDK 2.5.0, Tomcat 5.5, Manual calling of wsdl2java, and manual build (no eclipse used)
>            Reporter: Jürgen Mangler
>            Assignee: Dan Jemiolo
>
> I added the following to MyCapability.java
> public void initialize() throws SoapFault {
>   super.initialize();
>   WsResource res = this.getWsResource();
>  OperationalStatus stat = (OperationalStatus)res.getCapability(MuwsConstants.OP_STATUS_URI);
>  stat.setOperationalStatus(OperationalStatus.AVAILABLE);
>  this.getLog().info(stat.getOperationalStatus());
> ...
> }
> Which results in an AVAILABLE entry in the log file. However running a client an querying operational status results in the following:
> <soapenv:Body>
> <wsrf-rp:GetResourcePropertyResponse xmlns:tns="http://ws.apache.org/axis2" xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2">
> <pfx0:OperationalStatus xmlns:pfx0="http://docs.oasis-open.org/wsdm/muws2-2.xsd">Unknown</pfx0:OperationalStatus>
> </wsrf-rp:GetResourcePropertyResponse>
> </soapenv:Body> 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


[jira] Commented: (MUSE-164) OperationalStatus not changeable?

Posted by "Jürgen Mangler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MUSE-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506468 ] 

Jürgen Mangler commented on MUSE-164:
-------------------------------------

you have to use "public void initializeCompleted() throws SoapFault" 
instead of initialize. Its not a bug, its a design issue. At the point 
where initialize is called, the Properties are not yet initialized by 
the system, and though can not be set.

regards

Jürgen




> OperationalStatus not changeable?
> ---------------------------------
>
>                 Key: MUSE-164
>                 URL: https://issues.apache.org/jira/browse/MUSE-164
>             Project: Muse
>          Issue Type: Bug
>          Components: WSDM MUWS OperationalStatus
>    Affects Versions: 2.1.0
>         Environment: Ubuntu Edgy, JDK 2.5.0, Tomcat 5.5, Manual calling of wsdl2java, and manual build (no eclipse used)
>            Reporter: Jürgen Mangler
>            Assignee: Dan Jemiolo
>
> I added the following to MyCapability.java
> public void initialize() throws SoapFault {
>   super.initialize();
>   WsResource res = this.getWsResource();
>  OperationalStatus stat = (OperationalStatus)res.getCapability(MuwsConstants.OP_STATUS_URI);
>  stat.setOperationalStatus(OperationalStatus.AVAILABLE);
>  this.getLog().info(stat.getOperationalStatus());
> ...
> }
> Which results in an AVAILABLE entry in the log file. However running a client an querying operational status results in the following:
> <soapenv:Body>
> <wsrf-rp:GetResourcePropertyResponse xmlns:tns="http://ws.apache.org/axis2" xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2">
> <pfx0:OperationalStatus xmlns:pfx0="http://docs.oasis-open.org/wsdm/muws2-2.xsd">Unknown</pfx0:OperationalStatus>
> </wsrf-rp:GetResourcePropertyResponse>
> </soapenv:Body> 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org