Hi Sara, what logs are produced? This kind of error usually implies that the servlet hasn't started, there should be some log files to go with this.
Regarding the simple metrics capability: http://ws.apache.org/muse/docs/2.2.0/manual/capabilities/wsdm-metrics.html and http://www.ibm.com/developerworks/library/ac-musemetric/index.html cheers, Chris On Tue, Apr 14, 2009 at 3:30 PM, SARA1232007 <[email protected]> wrote: > > Hi, > > I've tried to realize a metric capability following the guidiance provided > by muse refernce manual, but failed to do this. > > I have defined my metric in rmd file as following: > > <?xml version="1.0"?> > <Definitions xmlns="http://docs.oasis-open.org/wsrf/rmd-1" > > > <MetadataDescriptor xmlns:wsrl="http://docs.oasis-open.org/wsrf/rl-2" > > xmlns:muws2="http://docs.oasis-open.org/wsdm/muws2-2.xsd" > > xmlns:myns="http://www.30wish.com/muse/ManagementInterface" > name="WsrMEPMBeanMetadata" > interface="myns:WsrMEPMBeanPortType" > > wsdlLocation="http://www.30wish.com/muse/ManagementInterface > WsrMEPMBean.wsdl" > > > <Property name="muws2:CurrentTime" modifiability="read-only" > mutability="mutable" /> > > <!-- > <Property name="wsrl:TerminationTime" modifiability="read-only" > mutability="mutable" /> > --> > > <Property name="myns:MEPMBeanMetrics" modifiability="read-only" > mutability="mutable"> > > <muws2:Capability>http://docs.oasis-open.org/wsdm/muws/capabilities/Metrics</muws2:Capability> > <muws2:TimeScope>Interval</muws2:TimeScope> > <muws2:GatheringTime>Periodic</muws2:GatheringTime> > <muws2:CalculationInterval>1 > Minute</muws2:CalculationInterval> > </Property> > > </MetadataDescriptor> > > </Definitions> > > Also, my wsdl definition is as following: > > ... ... > <wsdl:types> > ... ... > <xsd:schema > elementFormDefault="qualified" > > targetNamespace="http://www.30wish.com/muse/ManagementInterface"> > > <xsd:element name="MEPMBeanMetrics"> > <xsd:complexType> > <xsd:sequence> > <xsd:element name="Metrics" > > <xsd:complexType> > <xsd:sequence> > > <xsd:element name="MaxProcessingTime" type="xsd:long" /> > > <xsd:element name="AverageProcessingTime" type="xsd:long" /> > > <xsd:element name="StartTime" type="xsd:date" /> > > <xsd:element name="ResponseCount" type="xsd:long" /> > > <xsd:element name="MinProcessingTime" type="xsd:long" /> > > <!--xsd:element name="RecordProcessors" type="xsd:long" /--> > > <xsd:element name="TotalProcessingTime" type="xsd:long" /> > > <xsd:element name="RequestCount" type="xsd:long" /> > > <xsd:element name="FaultCount" type="xsd:long" /> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > > <xsd:element name="WsrMEPMBeanProperties"> > <xsd:complexType> > <xsd:sequence> > <xsd:element name="Identity" > type="xsd:string" /> > <xsd:element > xmlns:muws2="http://docs.oasis-open.org/wsdm/muws2-2.xsd" > ref="muws2:CurrentTime"/> > <xsd:element > ref="wsrf-rl:TerminationTime" /> > <xsd:element > ref="wsrf-rp:QueryExpressionDialect" minOccurs="0" > maxOccurs="unbounded"/> > <xsd:element > ref="tns:MEPMBeanMetrics"/> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > </xsd:schema> > </wsdl:types> > ... ... > <wsdl:service name="WsrMEPMBeanService"> > <wsdl:port name="WsrMEPMBeanPort" binding="tns:WsrMEPMBeanBinding"> > <wsdl-soap:address > location="http://localhost:8086/ManagementService/WsrMEPMBean"/> > </wsdl:port> > </wsdl:service> > > > My client code: > > URI address = > "http://127.0.0.1:8086/ManagementService/WsrMEPMBean"; > EndpointReference epr = new EndpointReference(address); > > MetricsClient client = new MetricsClient(epr); > client.setTrace(true); > Map metrics = new HashMap(); > > QName name = new QName( > "http://www.30wish.com/muse/ManagementInterface", > "MEPMBeanMetrics", "myns"); > String[] values = (String[]) > client.getPropertyAsObjectAndMetrics( > name, String.class, metrics); > > System.out.println("The property values are: "); > > for (int n = 0; n < values.length; ++n) > System.out.println(values[n]); > > > I have deployed the war onto JBoss successfully. After I run client, I get > trace information from client but there is no response information I get > from the JBoss server. The information get I from client is following: > > [CLIENT TRACE] SOAP envelope contents (outgoing): > > <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> > <soap:Header> > <wsa:To > xmlns:wsa="http://www.w3.org/2005/08/addressing">http://127.0.0.1:8086/ManagementService/WsrMEPMBean</wsa:To> > <wsa:Action > xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/GetResourcePropertyRequest</wsa:Action> > <wsa:MessageID > xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:6045ae9d-5edf-f156-489c-c2f8d2fe013a</wsa:MessageID> > <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing"> > > <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address> > </wsa:From> > </soap:Header> > <soap:Body> > <wsrf-rp:GetResourceProperty > xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2" > xmlns:myns="http://www.30wish.com/muse/ManagementInterface">myns:MEPMBeanMetrics</wsrf-rp:GetResourceProperty> > </soap:Body> > </soap:Envelope> > > [Fatal Error] :1:1025: The element type "HR" must be terminated by the > matching end-tag "</HR>". > org.apache.muse.ws.addressing.soap.SoapFault: The element type "HR" must be > terminated by the matching end-tag "</HR>". > at > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:298) > at > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:254) > at > org.apache.muse.ws.resource.remote.WsResourceClient.getResourceProperty(WsResourceClient.java:138) > at > org.apache.muse.ws.dm.muws.remote.MetricsClient.getResourcePropertyAndMetrics(MetricsClient.java:103) > at > org.apache.muse.ws.dm.muws.remote.MetricsClient.getPropertyAsObjectAndMetrics(MetricsClient.java:84) > at > org.apache.muse.test.wsrServer.WsrServerClient.main(WsrServerClient.java:203) > > Also what needs to be mention is the muse.xml generated by wsdl file does > not contain the metrics capability. > > Could anyone tell me what's wrong? Also, what should be done if I want to > provide my own metrics capability implementation class? > > Any help is very much appreicated! > > Sara > -- > View this message in context: > http://www.nabble.com/Question-of-realizing-Metric-Capability-tp23039515p23039515.html > Sent from the Muse - Dev mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
