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

[EMAIL PROTECTED] (JIRA) schrieb:
[ https://issues.apache.org/jira/browse/MUSE-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506299 ]
[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to