|
View:
New views
13 Messages
—
Rating Filter:
Alert me
|
|
|
trouble with WsnTestClient after new wsn-producer.war fileHello,
I am able to drop the sample wsn-producer.war and wsn-consumer.war files into my Tomcat and they run fine when I run the WsnTestClient. However, when I do a wsdl2java build in the wsn-producer directory then build a new war using Ant. I get an error message with this newly created wsn-producer.war. I have changed no code. Only performed wsdl2java and ant. The steps and error I get when I run the WsnTestClient is as follows: $wsdl2java -j2ee axis2 -overwrite -wsdl wsdl/WsResource.wsdl $ ant-1.6.5/bin/ant I then run the test client, WsnTestClient and get the following output: [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://166.21.9.161:8080/wsn-producer/services/WsResource</wsa:To> <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action> <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:f6255f7a-9b73-1057-4620-a4ec2be5ff0a</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> <wsnt:Subscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"> <wsnt:ConsumerReference> <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://166.21.9.175:8060/wsn-consumer/services/consumer</wsa:Address> </wsnt:ConsumerReference> </wsnt:Subscribe> </soap:Body> </soap:Envelope> [Fatal Error] :1:1040: 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.notification.remote.NotificationProducerClient.subscribe(NotificationProducerClient.java:97) at org.apache.muse.test.wsn.WsnTestClient.main(Unknown Source) Does anyone have any idea what I am doing wrong? I have changed no code. I just wanted to try and build a new war with the method outlined in the tutorial. Any help would be appreciated. Thanks, Dave |
|
|
Re: trouble with WsnTestClient after new wsn-producer.war fileI had the same problem, infact I still have it.
I used muse 2.2.0's wsdl2java in ubuntu linux (7.10 and 8.04) both to no avail but it worked under windows XP in my advisors computer. First I change the binding in sample-wsn-producer.wsdl to point to my producer (wsn-srv) then I change the source of wsn-consumers test class to point to my producer. Then I issue wsdl2java command and deploy services. I get the same error message you are getting (the one with HR). I also deployed one with default settings, it was a no go also. I issue: $ sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl sample-wsn-producer.wsdl -output wsn-srv/ -overwrite I get a : [: 38: cygwin: unexpected operator but everything seems to be in place and I run ant and copy the resulting war files to my tomcat webapps folder. These war files however, once deployed do not act as axis2 services. When I click on one in tomcat manager I see the following message instead of the usual axis2 web interface: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: java.lang.NullPointerException org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:356) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968) org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) root cause java.lang.NullPointerException org.apache.jsp.axis2_002dweb.include.httpbase_jsp.jspInit(httpbase_jsp.java:22) org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:51) org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968) org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs. Apache Tomcat/6.0.16 I really would appreciate if it would just run under ubuntu. I guess the problem might be related to the cygwin problem I stated earlier. Does any one have any clue?
|
|
|
SV: trouble with WsnTestClient after new wsn-producer.war fileHi there
Could you attach your wsdl file? It might be something fairly simple and therefore easy to overlook in the wsdl, I know I've missed small important stuff time and time again. [Fatal Error] :1:1040: 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>". This error comes when you're trying to use a wrong or incomplete EndpointReference. The error message is very generic. /Lenni -----Oprindelig meddelelse----- Fra: dulbirakan [mailto:iekanat@...] Sendt: 27. april 2008 23:19 Til: muse-user@... Emne: Re: trouble with WsnTestClient after new wsn-producer.war file I had the same problem, infact I still have it. I used muse 2.2.0's wsdl2java in ubuntu linux (7.10 and 8.04) both to no avail but it worked under windows XP in my advisors computer. First I change the binding in sample-wsn-producer.wsdl to point to my producer (wsn-srv) then I change the source of wsn-consumers test class to point to my producer. Then I issue wsdl2java command and deploy services. I get the same error message you are getting (the one with HR). I also deployed one with default settings, it was a no go also. I issue: $ sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl sample-wsn-producer.wsdl -output wsn-srv/ -overwrite I get a : [: 38: cygwin: unexpected operator but everything seems to be in place and I run ant and copy the resulting war files to my tomcat webapps folder. These war files however, once deployed do not act as axis2 services. When I click on one in tomcat manager I see the following message instead of the usual axis2 web interface: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: java.lang.NullPointerException org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWra pper.java:522) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 56) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:9 68) org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 74) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) root cause java.lang.NullPointerException org.apache.jsp.axis2_002dweb.include.httpbase_jsp.jspInit(httpbase_jsp.java: 22) org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:51) org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.jav a:159) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 29) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:9 68) org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 74) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs. Apache Tomcat/6.0.16 I really would appreciate if it would just run under ubuntu. I guess the problem might be related to the cygwin problem I stated earlier. Does any one have any clue? dchou wrote: > > Hello, > > I am able to drop the sample wsn-producer.war and wsn-consumer.war files > into my Tomcat and they run fine when I run the WsnTestClient. However, > when I do a wsdl2java build in the wsn-producer directory then build a new > war using Ant. I get an error message with this newly created > wsn-producer.war. I have changed no code. Only performed wsdl2java and > ant. The steps and error I get when I run the WsnTestClient is as follows: > > $wsdl2java -j2ee axis2 -overwrite -wsdl wsdl/WsResource.wsdl > > $ ant-1.6.5/bin/ant > > I then run the test client, WsnTestClient and get the following output: > > [CLIENT TRACE] SOAP envelope contents (outgoing): > > <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> > <soap:Header> > <wsa:To > n-producer/services/WsResource</wsa:To> > <wsa:Action > xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/ wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action> > <wsa:MessageID > xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:f6255f7a-9b73-1057-462 0-a4ec2be5ff0a</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:Addres s> > </wsa:From> > </soap:Header> > <soap:Body> > <wsnt:Subscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"> > <wsnt:ConsumerReference> > <wsa:Address > xmlns:wsa="http://www.w3.org/2005/08/addressing">http://166.21.9.175:8060/ws n-consumer/services/consumer</wsa:Address> > </wsnt:ConsumerReference> > </wsnt:Subscribe> > </soap:Body> > </soap:Envelope> > > [Fatal Error] :1:1040: 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 > va:298) > at > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.ja va:254) > at > org.apache.muse.ws.notification.remote.NotificationProducerClient.subscribe( NotificationProducerClient.java:97) > at org.apache.muse.test.wsn.WsnTestClient.main(Unknown Source) > > Does anyone have any idea what I am doing wrong? I have changed no code. I > just wanted to try and build a new war with the method outlined in the > tutorial. Any help would be appreciated. > > Thanks, > Dave > -- View this message in context: http://www.nabble.com/trouble-with-WsnTestClient-after-new-wsn-producer.war- file-tp10191599p16928534.html Sent from the Muse User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: muse-user-unsubscribe@... For additional commands, e-mail: muse-user-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: muse-user-unsubscribe@... For additional commands, e-mail: muse-user-help@... |
|
|
RE: trouble with WsnTestClient after new wsn-producer.war fileHi,
The "HR" error also occurs when the server app didn't startup successfully for some reason, like if one capability class failed to initialize properly. This leaves the entire app in an unstable state. In addition to checking the Tomcat logs, also check the runtime muse.log file. The latter usually gives a better idea of which resource/capability failed to initialize. -Vinh -----Original Message----- From: Lenni Madsen [mailto:l.madsen@...] Sent: Sunday, April 27, 2008 11:09 PM To: muse-user@... Subject: SV: trouble with WsnTestClient after new wsn-producer.war file Hi there Could you attach your wsdl file? It might be something fairly simple and therefore easy to overlook in the wsdl, I know I've missed small important stuff time and time again. [Fatal Error] :1:1040: 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>". This error comes when you're trying to use a wrong or incomplete EndpointReference. The error message is very generic. /Lenni -----Oprindelig meddelelse----- Fra: dulbirakan [mailto:iekanat@...] Sendt: 27. april 2008 23:19 Til: muse-user@... Emne: Re: trouble with WsnTestClient after new wsn-producer.war file I had the same problem, infact I still have it. I used muse 2.2.0's wsdl2java in ubuntu linux (7.10 and 8.04) both to no avail but it worked under windows XP in my advisors computer. First I change the binding in sample-wsn-producer.wsdl to point to my producer (wsn-srv) then I change the source of wsn-consumers test class to point to my producer. Then I issue wsdl2java command and deploy services. I get the same error message you are getting (the one with HR). I also deployed one with default settings, it was a no go also. I issue: $ sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl sample-wsn-producer.wsdl -output wsn-srv/ -overwrite I get a : [: 38: cygwin: unexpected operator but everything seems to be in place and I run ant and copy the resulting war files to my tomcat webapps folder. These war files however, once deployed do not act as axis2 services. When I click on one in tomcat manager I see the following message instead of the usual axis2 web interface: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: java.lang.NullPointerException org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServle tWra pper.java:522) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:3 56) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.ja va:9 68) org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:3 74) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) root cause java.lang.NullPointerException org.apache.jsp.axis2_002dweb.include.httpbase_jsp.jspInit(httpbase_jsp.j ava: 22) org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:51) org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper .jav a:159) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:3 29) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.ja va:9 68) org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:3 74) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs. Apache Tomcat/6.0.16 I really would appreciate if it would just run under ubuntu. I guess the problem might be related to the cygwin problem I stated earlier. Does any one have any clue? dchou wrote: > > Hello, > > I am able to drop the sample wsn-producer.war and wsn-consumer.war files > into my Tomcat and they run fine when I run the WsnTestClient. However, > when I do a wsdl2java build in the wsn-producer directory then build a new > war using Ant. I get an error message with this newly created > wsn-producer.war. I have changed no code. Only performed wsdl2java and > ant. The steps and error I get when I run the WsnTestClient is as follows: > > $wsdl2java -j2ee axis2 -overwrite -wsdl wsdl/WsResource.wsdl > > $ ant-1.6.5/bin/ant > > I then run the test client, WsnTestClient and get the following output: > > [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://166.21.9.161:808 0/ws n-producer/services/WsResource</wsa:To> > <wsa:Action > xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open. org/ wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action> > <wsa:MessageID > xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:f6255f7a-9b73-1057 -462 0-a4ec2be5ff0a</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:Ad dres s> > </wsa:From> > </soap:Header> > <soap:Body> > <wsnt:Subscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"> > <wsnt:ConsumerReference> > <wsa:Address > xmlns:wsa="http://www.w3.org/2005/08/addressing">http://166.21.9.175:806 0/ws n-consumer/services/consumer</wsa:Address> > </wsnt:ConsumerReference> > </wsnt:Subscribe> > </soap:Body> > </soap:Envelope> > > [Fatal Error] :1:1040: 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(AbstractResourceClien t.ja va:298) > at > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien t.ja va:254) > at > org.apache.muse.ws.notification.remote.NotificationProducerClient.subscr ibe( NotificationProducerClient.java:97) > at org.apache.muse.test.wsn.WsnTestClient.main(Unknown Source) > > Does anyone have any idea what I am doing wrong? I have changed no code. I > just wanted to try and build a new war with the method outlined in the > tutorial. Any help would be appreciated. > > Thanks, > Dave > -- View this message in context: http://www.nabble.com/trouble-with-WsnTestClient-after-new-wsn-producer. war- file-tp10191599p16928534.html Sent from the Muse User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: muse-user-unsubscribe@... For additional commands, e-mail: muse-user-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: muse-user-unsubscribe@... For additional commands, e-mail: muse-user-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: muse-user-unsubscribe@... For additional commands, e-mail: muse-user-help@... |
|
|
Re: trouble with WsnTestClient after new wsn-producer.war fileI am not sure if this is the right way to reply to a mail group message but it is my first time so forgive me just this once.
I set the binding in wsdl file as I stated earlier but here, I am attaching my wsdl file here. There is also another problem. I guess Mr. Nguyen is right as my app does not seem to be starting up. As I posted in my previous post, I build it as an axis2 app. but in tomcat manager I can not see the usual web interface of axis2. I get an HTTP Status 500 error. It seems to me that my app is not built correctly. The fact that I am getting a cygwin error alleviates my belief. Here is the command I issue and the error message I get: dulbirakan@chibi:~/Desktop/samp$ sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl sample-wsn-producer.wsdl -output wsn-srv/ -overwrite [: 38: cygwin: unexpected operator dulbirakan@chibi:~/Desktop/samp$ If there is anything else I can provide please let me know...
On Mon, Apr 28, 2008 at 9:08 AM, Lenni Madsen <l.madsen@...> wrote: Hi there <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://ws.apache.org/muse/test/wsrf" xmlns:tns="http://ws.apache.org/muse/test/wsrf" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl-soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsrf-r="http://docs.oasis-open.org/wsrf/r-2" xmlns:wsrf-rl="http://docs.oasis-open.org/wsrf/rl-2" xmlns:wsrf-bf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsntw="http://docs.oasis-open.org/wsn/bw-2" xmlns:wst="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrmd="http://docs.oasis-open.org/wsrf/rmd-1" xmlns:muws1="http://docs.oasis-open.org/wsdm/muws1-2.xsd" xmlns:muws2="http://docs.oasis-open.org/wsdm/muws2-2.xsd" name="WsResource"> <wsdl:types> <xsd:schema elementFormDefault="qualified" targetNamespace="http://www.w3.org/2005/08/addressing"> <xsd:include schemaLocation="WS-Addressing-2005_08.xsd" /> </xsd:schema> <xsd:schema elementFormDefault="qualified" targetNamespace="http://schemas.xmlsoap.org/ws/2004/09/mex"> <xsd:include schemaLocation="WS-MetadataExchange-2004_09.xsd" /> </xsd:schema> <xsd:schema elementFormDefault="qualified" targetNamespace="http://docs.oasis-open.org/wsrf/rl-2"> <xsd:include schemaLocation="WS-ResourceLifetime-1_2.xsd" /> </xsd:schema> <xsd:schema elementFormDefault="qualified" targetNamespace="http://docs.oasis-open.org/wsrf/rp-2"> <xsd:include schemaLocation="WS-ResourceProperties-1_2.xsd" /> </xsd:schema> <xsd:schema elementFormDefault="qualified" targetNamespace="http://docs.oasis-open.org/wsrf/r-2"> <xsd:include schemaLocation="WS-Resource-1_2.xsd" /> </xsd:schema> <xsd:schema elementFormDefault="qualified" targetNamespace="http://docs.oasis-open.org/wsrf/rmd-1"> <xsd:include schemaLocation="WS-ResourceMetadataDescriptor-CD-01.xsd" /> </xsd:schema> <xsd:schema elementFormDefault="qualified" targetNamespace="http://docs.oasis-open.org/wsdm/muws1-2.xsd"> <xsd:include schemaLocation="WSDM-MUWS-Part1-1_1.xsd" /> </xsd:schema> <xsd:schema elementFormDefault="qualified" targetNamespace="http://docs.oasis-open.org/wsdm/muws2-2.xsd"> <xsd:include schemaLocation="WSDM-MUWS-Part2-1_1.xsd" /> </xsd:schema> <xsd:schema elementFormDefault="qualified" targetNamespace="http://docs.oasis-open.org/wsn/b-2"> <xsd:include schemaLocation="WS-BaseNotification-1_3.xsd" /> </xsd:schema> <xsd:schema elementFormDefault="qualified" targetNamespace="http://docs.oasis-open.org/wsn/t-1"> <xsd:include schemaLocation="WS-Topics-1_3.xsd" /> </xsd:schema> <xsd:schema elementFormDefault="qualified" targetNamespace="http://ws.apache.org/muse/test/wsrf"> <xsd:element name="ServerName" type="xsd:string" /> <xsd:element name="MessageInterval" type="xsd:integer" /> <xsd:element name="WsResourceProperties"> <xsd:complexType> <xsd:sequence> <xsd:element ref="wsrf-rl:CurrentTime" /> <xsd:element ref="wsrf-rl:TerminationTime" /> <xsd:element ref="wsrf-rp:QueryExpressionDialect" minOccurs="0" maxOccurs="unbounded" /> <xsd:element ref="wsnt:FixedTopicSet" /> <xsd:element ref="wst:TopicSet" minOccurs="0" /> <xsd:element ref="wsnt:TopicExpression" minOccurs="0" maxOccurs="unbounded" /> <xsd:element ref="wsnt:TopicExpressionDialect" minOccurs="0" maxOccurs="unbounded" /> <xsd:element ref="muws1:ResourceId" /> <xsd:element ref="muws1:ManageabilityCapability" minOccurs="0" maxOccurs="unbounded" /> <xsd:element ref="muws2:Caption" minOccurs="0" maxOccurs="unbounded" /> <xsd:element ref="muws2:Description" minOccurs="0" maxOccurs="unbounded" /> <xsd:element ref="muws2:Version" minOccurs="0" /> <xsd:element ref="muws2:OperationalStatus" /> <xsd:element ref="tns:ServerName" /> <xsd:element ref="tns:MessageInterval" /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> <wsdl:message name="GetMetadataMsg"> <wsdl:part name="GetMetadataMsg" element="wsx:GetMetadata" /> </wsdl:message> <wsdl:message name="GetMetadataResponseMsg"> <wsdl:part name="GetMetadataResponseMsg" element="wsx:Metadata" /> </wsdl:message> <wsdl:message name="DestroyRequest"> <wsdl:part name="DestroyRequest" element="wsrf-rl:Destroy" /> </wsdl:message> <wsdl:message name="DestroyResponse"> <wsdl:part name="DestroyResponse" element="wsrf-rl:DestroyResponse" /> </wsdl:message> <wsdl:message name="ResourceNotDestroyedFault"> <wsdl:part name="ResourceNotDestroyedFault" element="wsrf-rl:ResourceNotDestroyedFault" /> </wsdl:message> <wsdl:message name="ResourceUnknownFault"> <wsdl:part name="ResourceUnknownFault" element="wsrf-r:ResourceUnknownFault" /> </wsdl:message> <wsdl:message name="ResourceUnavailableFault"> <wsdl:part name="ResourceUnavailableFault" element="wsrf-r:ResourceUnavailableFault" /> </wsdl:message> <wsdl:message name="SetTerminationTimeRequest"> <wsdl:part name="SetTerminationTimeRequest" element="wsrf-rl:SetTerminationTime" /> </wsdl:message> <wsdl:message name="SetTerminationTimeResponse"> <wsdl:part name="SetTerminationTimeResponse" element="wsrf-rl:SetTerminationTimeResponse" /> </wsdl:message> <wsdl:message name="UnableToSetTerminationTimeFault"> <wsdl:part name="UnableToSetTerminationTimeFault" element="wsrf-rl:UnableToSetTerminationTimeFault" /> </wsdl:message> <wsdl:message name="TerminationTimeChangeRejectedFault"> <wsdl:part name="TerminationTimeChangeRejectedFault" element="wsrf-rl:TerminationTimeChangeRejectedFault" /> </wsdl:message> <wsdl:message name="GetResourcePropertyDocumentRequest"> <wsdl:part name="GetResourcePropertyDocumentRequest" element="wsrf-rp:GetResourcePropertyDocument" /> </wsdl:message> <wsdl:message name="GetResourcePropertyDocumentResponse"> <wsdl:part name="GetResourcePropertyDocumentResponse" element="wsrf-rp:GetResourcePropertyDocumentResponse" /> </wsdl:message> <wsdl:message name="GetResourcePropertyRequest"> <wsdl:part name="GetResourcePropertyRequest" element="wsrf-rp:GetResourceProperty" /> </wsdl:message> <wsdl:message name="GetResourcePropertyResponse"> <wsdl:part name="GetResourcePropertyResponse" element="wsrf-rp:GetResourcePropertyResponse" /> </wsdl:message> <wsdl:message name="InvalidResourcePropertyQNameFault"> <wsdl:part name="InvalidResourcePropertyQNameFault" element="wsrf-rp:InvalidResourcePropertyQNameFault" /> </wsdl:message> <wsdl:message name="GetMultipleResourcePropertiesRequest"> <wsdl:part name="GetMultipleResourcePropertiesRequest" element="wsrf-rp:GetMultipleResourceProperties" /> </wsdl:message> <wsdl:message name="GetMultipleResourcePropertiesResponse"> <wsdl:part name="GetMultipleResourcePropertiesResponse" element="wsrf-rp:GetMultipleResourcePropertiesResponse" /> </wsdl:message> <wsdl:message name="QueryResourcePropertiesRequest"> <wsdl:part name="QueryResourcePropertiesRequest" element="wsrf-rp:QueryResourceProperties" /> </wsdl:message> <wsdl:message name="QueryResourcePropertiesResponse"> <wsdl:part name="QueryResourcePropertiesResponse" element="wsrf-rp:QueryResourcePropertiesResponse" /> </wsdl:message> <wsdl:message name="UnknownQueryExpressionDialectFault"> <wsdl:part name="UnknownQueryExpressionDialectFault" element="wsrf-rp:UnknownQueryExpressionDialectFault" /> </wsdl:message> <wsdl:message name="InvalidQueryExpressionFault"> <wsdl:part name="InvalidQueryExpressionFault" element="wsrf-rp:InvalidQueryExpressionFault" /> </wsdl:message> <wsdl:message name="QueryEvaluationErrorFault"> <wsdl:part name="QueryEvaluationErrorFault" element="wsrf-rp:QueryEvaluationErrorFault" /> </wsdl:message> <wsdl:message name="SetResourcePropertiesRequest"> <wsdl:part name="SetResourcePropertiesRequest" element="wsrf-rp:SetResourceProperties" /> </wsdl:message> <wsdl:message name="SetResourcePropertiesResponse"> <wsdl:part name="SetResourcePropertiesResponse" element="wsrf-rp:SetResourcePropertiesResponse" /> </wsdl:message> <wsdl:message name="InvalidModificationFault"> <wsdl:part name="InvalidModificationFault" element="wsrf-rp:InvalidModificationFault" /> </wsdl:message> <wsdl:message name="UnableToModifyResourcePropertyFault"> <wsdl:part name="UnableToModifyResourcePropertyFault" element="wsrf-rp:UnableToModifyResourcePropertyFault" /> </wsdl:message> <wsdl:message name="SetResourcePropertyRequestFailedFault"> <wsdl:part name="SetResourcePropertyRequestFailedFault" element="wsrf-rp:SetResourcePropertyRequestFailedFault" /> </wsdl:message> <wsdl:message name="SubscribeRequest"> <wsdl:part name="SubscribeRequest" element="wsnt:Subscribe" /> </wsdl:message> <wsdl:message name="SubscribeResponse"> <wsdl:part name="SubscribeResponse" element="wsnt:SubscribeResponse" /> </wsdl:message> <wsdl:message name="SubscribeCreationFailedFault"> <wsdl:part name="SubscribeCreationFailedFault" element="wsnt:SubscribeCreationFailedFault" /> </wsdl:message> <wsdl:message name="TopicExpressionDialectUnknownFault"> <wsdl:part name="TopicExpressionDialectUnknownFault" element="wsnt:TopicExpressionDialectUnknownFault" /> </wsdl:message> <wsdl:message name="InvalidFilterFault"> <wsdl:part name="InvalidFilterFault" element="wsnt:InvalidFilterFault" /> </wsdl:message> <wsdl:message name="InvalidProducerPropertiesExpressionFault"> <wsdl:part name="InvalidProducerPropertiesExpressionFault" element="wsnt:InvalidProducerPropertiesExpressionFault" /> </wsdl:message> <wsdl:message name="InvalidMessageContentExpressionFault"> <wsdl:part name="InvalidMessageContentExpressionFault" element="wsnt:InvalidMessageContentExpressionFault" /> </wsdl:message> <wsdl:message name="UnrecognizedPolicyRequestFault"> <wsdl:part name="UnrecognizedPolicyRequestFault" element="wsnt:UnrecognizedPolicyRequestFault" /> </wsdl:message> <wsdl:message name="UnsupportedPolicyRequestFault"> <wsdl:part name="UnsupportedPolicyRequestFault" element="wsnt:UnsupportedPolicyRequestFault" /> </wsdl:message> <wsdl:message name="NotifyMessageNotSupportedFault"> <wsdl:part name="NotifyMessageNotSupportedFault" element="wsnt:NotifyMessageNotSupportedFault" /> </wsdl:message> <wsdl:message name="UnacceptableInitialTerminationTimeFault"> <wsdl:part name="UnacceptableInitialTerminationTimeFault" element="wsnt:UnacceptableInitialTerminationTimeFault" /> </wsdl:message> <!-- ========== NotificationProducer::GetCurrentMessage =========== GetCurrentMessage(topicExpression) returns: a NotificationMessage (xsd:any) --> <wsdl:message name="GetCurrentMessageRequest"> <wsdl:part name="GetCurrentMessageRequest" element="wsnt:GetCurrentMessage" /> </wsdl:message> <wsdl:message name="GetCurrentMessageResponse"> <wsdl:part name="GetCurrentMessageResponse" element="wsnt:GetCurrentMessageResponse" /> </wsdl:message> <wsdl:message name="InvalidTopicExpressionFault"> <wsdl:part name="InvalidTopicExpressionFault" element="wsnt:InvalidTopicExpressionFault" /> </wsdl:message> <wsdl:message name="TopicNotSupportedFault"> <wsdl:part name="TopicNotSupportedFault" element="wsnt:TopicNotSupportedFault" /> </wsdl:message> <wsdl:message name="MultipleTopicsSpecifiedFault"> <wsdl:part name="MultipleTopicsSpecifiedFault" element="wsnt:MultipleTopicsSpecifiedFault" /> </wsdl:message> <wsdl:message name="NoCurrentMessageOnTopicFault"> <wsdl:part name="NoCurrentMessageOnTopicFault" element="wsnt:NoCurrentMessageOnTopicFault" /> </wsdl:message> <wsdl:portType name="WsResourcePortType" wsrf-rp:ResourceProperties="tns:WsResourceProperties"> <wsdl:operation name="GetMetadata"> <wsdl:input wsa:Action="http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata" name="GetMetadataMsg" message="tns:GetMetadataMsg" /> <wsdl:output wsa:Action="http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadataResponse" name="GetMetadataResponseMsg" message="tns:GetMetadataResponseMsg" /> </wsdl:operation> <wsdl:operation name="Destroy"> <wsdl:input wsa:Action="http://docs.oasis-open.org/wsrf/rlw-2/ImmediateResourceTermination/DestroyRequest" name="DestroyRequest" message="tns:DestroyRequest" /> <wsdl:output wsa:Action="http://docs.oasis-open.org/wsrf/rlw-2/ImmediateResourceTermination/DestroyResponse" name="DestroyResponse" message="tns:DestroyResponse" /> <wsdl:fault name="ResourceNotDestroyedFault" message="tns:ResourceNotDestroyedFault" /> <wsdl:fault name="ResourceUnknownFault" message="tns:ResourceUnknownFault" /> <wsdl:fault name="ResourceUnavailableFault" message="tns:ResourceUnavailableFault" /> </wsdl:operation> <wsdl:operation name="SetTerminationTime"> <wsdl:input wsa:Action="http://docs.oasis-open.org/wsrf/rlw-2/ScheduledResourceTermination/SetTerminationTimeRequest" name="SetTerminationTimeRequest" message="tns:SetTerminationTimeRequest" /> <wsdl:output wsa:Action="http://docs.oasis-open.org/wsrf/rlw-2/ScheduledResourceTermination/SetTerminationTimeResponse" name="SetTerminationTimeResponse" message="tns:SetTerminationTimeResponse" /> <wsdl:fault name="UnableToSetTerminationTimeFault" message="tns:UnableToSetTerminationTimeFault" /> <wsdl:fault name="ResourceUnknownFault" message="tns:ResourceUnknownFault" /> <wsdl:fault name="ResourceUnavailableFault" message="tns:ResourceUnavailableFault" /> <wsdl:fault name="TerminationTimeChangeRejectedFault" message="tns:TerminationTimeChangeRejectedFault" /> </wsdl:operation> <wsdl:operation name="GetResourcePropertyDocument"> <wsdl:input wsa:Action="http://docs.oasis-open.org/wsrf/rpw-2/GetResourcePropertyDocument/GetResourcePropertyDocumentRequest" name="GetResourcePropertyDocumentRequest" message="tns:GetResourcePropertyDocumentRequest" /> <wsdl:output wsa:Action="http://docs.oasis-open.org/wsrf/rpw-2/GetResourcePropertyDocument/GetResourcePropertyDocumentResponse" name="GetResourcePropertyDocumentResponse" message="tns:GetResourcePropertyDocumentResponse" /> <wsdl:fault name="ResourceUnknownFault" message="tns:ResourceUnknownFault" /> <wsdl:fault name="ResourceUnavailableFault" message="tns:ResourceUnavailableFault" /> </wsdl:operation> <wsdl:operation name="GetResourceProperty"> <wsdl:input wsa:Action="http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/GetResourcePropertyRequest" name="GetResourcePropertyRequest" message="tns:GetResourcePropertyRequest" /> <wsdl:output wsa:Action="http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/GetResourcePropertyResponse" name="GetResourcePropertyResponse" message="tns:GetResourcePropertyResponse" /> <wsdl:fault name="ResourceUnknownFault" message="tns:ResourceUnknownFault" /> <wsdl:fault name="ResourceUnavailableFault" message="tns:ResourceUnavailableFault" /> <wsdl:fault name="InvalidResourcePropertyQNameFault" message="tns:InvalidResourcePropertyQNameFault" /> </wsdl:operation> <wsdl:operation name="GetMultipleResourceProperties"> <wsdl:input wsa:Action="http://docs.oasis-open.org/wsrf/rpw-2/GetMultipleResourceProperties/GetMultipleResourcePropertiesRequest" name="GetMultipleResourcePropertiesRequest" message="tns:GetMultipleResourcePropertiesRequest" /> <wsdl:output wsa:Action="http://docs.oasis-open.org/wsrf/rpw-2/GetMultipleResourceProperties/GetMultipleResourcePropertiesResponse" name="GetMultipleResourcePropertiesResponse" message="tns:GetMultipleResourcePropertiesResponse" /> <wsdl:fault name="ResourceUnknownFault" message="tns:ResourceUnknownFault" /> <wsdl:fault name="ResourceUnavailableFault" message="tns:ResourceUnavailableFault" /> <wsdl:fault name="InvalidResourcePropertyQNameFault" message="tns:InvalidResourcePropertyQNameFault" /> </wsdl:operation> <wsdl:operation name="QueryResourceProperties"> <wsdl:input wsa:Action="http://docs.oasis-open.org/wsrf/rpw-2/QueryResourceProperties/QueryResourcePropertiesRequest" name="QueryResourcePropertiesRequest" message="tns:QueryResourcePropertiesRequest" /> <wsdl:output wsa:Action="http://docs.oasis-open.org/wsrf/rpw-2/QueryResourceProperties/QueryResourcePropertiesResponse" name="QueryResourcePropertiesResponse" message="tns:QueryResourcePropertiesResponse" /> <wsdl:fault name="ResourceUnknownFault" message="tns:ResourceUnknownFault" /> <wsdl:fault name="ResourceUnavailableFault" message="tns:ResourceUnavailableFault" /> <wsdl:fault name="UnknownQueryExpressionDialectFault" message="tns:UnknownQueryExpressionDialectFault" /> <wsdl:fault name="InvalidQueryExpressionFault" message="tns:InvalidQueryExpressionFault" /> <wsdl:fault name="QueryEvaluationErrorFault" message="tns:QueryEvaluationErrorFault" /> </wsdl:operation> <wsdl:operation name="SetResourceProperties"> <wsdl:input wsa:Action="http://docs.oasis-open.org/wsrf/rpw-2/SetResourceProperties/SetResourcePropertiesRequest" name="SetResourcePropertiesRequest" message="tns:SetResourcePropertiesRequest" /> <wsdl:output wsa:Action="http://docs.oasis-open.org/wsrf/rpw-2/SetResourceProperties/SetResourcePropertiesResponse" name="SetResourcePropertiesResponse" message="tns:SetResourcePropertiesResponse" /> <wsdl:fault name="ResourceUnknownFault" message="tns:ResourceUnknownFault" /> <wsdl:fault name="ResourceUnavailableFault" message="tns:ResourceUnavailableFault" /> <wsdl:fault name="InvalidModificationFault" message="tns:InvalidModificationFault" /> <wsdl:fault name="UnableToModifyResourcePropertyFault" message="tns:UnableToModifyResourcePropertyFault" /> <wsdl:fault name="InvalidResourcePropertyQNameFault" message="tns:InvalidResourcePropertyQNameFault" /> <wsdl:fault name="SetResourcePropertyRequestFailedFault" message="tns:SetResourcePropertyRequestFailedFault" /> </wsdl:operation> <wsdl:operation name="Subscribe"> <wsdl:input wsa:Action="http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest" message="tns:SubscribeRequest" /> <wsdl:output wsa:Action="http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeResponse" message="tns:SubscribeResponse" /> <wsdl:fault name="ResourceUnknownFault" message="tns:ResourceUnknownFault" /> <wsdl:fault name="InvalidFilterFault" message="tns:InvalidFilterFault" /> <wsdl:fault name="TopicExpressionDialectUnknownFault" message="tns:TopicExpressionDialectUnknownFault" /> <wsdl:fault name="InvalidTopicExpressionFault" message="tns:InvalidTopicExpressionFault" /> <wsdl:fault name="TopicNotSupportedFault" message="tns:TopicNotSupportedFault" /> <wsdl:fault name="InvalidProducerPropertiesExpressionFault" message="tns:InvalidProducerPropertiesExpressionFault" /> <wsdl:fault name="InvalidMessageContentExpressionFault" message="tns:InvalidMessageContentExpressionFault" /> <wsdl:fault name="UnacceptableInitialTerminationTimeFault" message="tns:UnacceptableInitialTerminationTimeFault" /> <wsdl:fault name="UnrecognizedPolicyRequestFault" message="tns:UnrecognizedPolicyRequestFault" /> <wsdl:fault name="UnsupportedPolicyRequestFault" message="tns:UnsupportedPolicyRequestFault" /> <wsdl:fault name="NotifyMessageNotSupportedFault" message="tns:NotifyMessageNotSupportedFault" /> <wsdl:fault name="SubscribeCreationFailedFault" message="tns:SubscribeCreationFailedFault" /> </wsdl:operation> <wsdl:operation name="GetCurrentMessage"> <wsdl:input wsa:Action="http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/GetCurrentMessageRequest" message="tns:GetCurrentMessageRequest" /> <wsdl:output wsa:Action="http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/GetCurrentMessageResponse" message="tns:GetCurrentMessageResponse" /> <wsdl:fault name="ResourceUnknownFault" message="tns:ResourceUnknownFault" /> <wsdl:fault name="TopicExpressionDialectUnknownFault" message="tns:TopicExpressionDialectUnknownFault" /> <wsdl:fault name="InvalidTopicExpressionFault" message="tns:InvalidTopicExpressionFault" /> <wsdl:fault name="TopicNotSupportedFault" message="tns:TopicNotSupportedFault" /> <wsdl:fault name="NoCurrentMessageOnTopicFault" message="tns:NoCurrentMessageOnTopicFault" /> <wsdl:fault name="MultipleTopicsSpecifiedFault" message="tns:MultipleTopicsSpecifiedFault" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="WsResourceBinding" type="tns:WsResourcePortType"> <wsdl-soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="GetMetadata"> <wsdl-soap:operation soapAction="GetMetadata" /> <wsdl:input> <wsdl-soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:input> <wsdl:output> <wsdl-soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:output> </wsdl:operation> <wsdl:operation name="Destroy"> <wsdl-soap:operation soapAction="Destroy" /> <wsdl:input name="DestroyRequest"> <wsdl-soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:input> <wsdl:output name="DestroyResponse"> <wsdl-soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:output> <wsdl:fault name="ResourceNotDestroyedFault"> <wsdl-soap:fault use="encoded" name="ResourceNotDestroyedFault" /> </wsdl:fault> <wsdl:fault name="ResourceUnknownFault"> <wsdl-soap:fault use="encoded" name="ResourceUnknownFault" /> </wsdl:fault> <wsdl:fault name="ResourceUnavailableFault"> <wsdl-soap:fault use="encoded" name="ResourceUnavailableFault" /> </wsdl:fault> </wsdl:operation> <wsdl:operation name="SetTerminationTime"> <wsdl-soap:operation soapAction="SetTerminationTime" /> <wsdl:input name="SetTerminationTimeRequest"> <wsdl-soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:input> <wsdl:output name="SetTerminationTimeResponse"> <wsdl-soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:output> <wsdl:fault name="UnableToSetTerminationTimeFault"> <wsdl-soap:fault use="encoded" name="UnableToSetTerminationTimeFault" /> </wsdl:fault> <wsdl:fault name="ResourceUnknownFault"> <wsdl-soap:fault use="encoded" name="ResourceUnknownFault" /> </wsdl:fault> <wsdl:fault name="ResourceUnavailableFault"> <wsdl-soap:fault use="encoded" name="ResourceUnavailableFault" /> </wsdl:fault> <wsdl:fault name="TerminationTimeChangeRejectedFault"> <wsdl-soap:fault use="encoded" name="TerminationTimeChangeRejectedFault" /> </wsdl:fault> </wsdl:operation> <wsdl:operation name="GetResourcePropertyDocument"> <wsdl-soap:operation soapAction="GetResourcePropertyDocument" /> <wsdl:input name="GetResourcePropertyDocumentRequest"> <wsdl-soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:input> <wsdl:output name="GetResourcePropertyDocumentResponse"> <wsdl-soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:output> <wsdl:fault name="ResourceUnknownFault"> <wsdl-soap:fault use="encoded" name="ResourceUnknownFault" /> </wsdl:fault> <wsdl:fault name="ResourceUnavailableFault"> <wsdl-soap:fault use="encoded" name="ResourceUnavailableFault" /> </wsdl:fault> </wsdl:operation> <wsdl:operation name="GetResourceProperty"> <wsdl-soap:operation soapAction="GetResourceProperty" /> <wsdl:input name="GetResourcePropertyRequest"> <wsdl-soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:input> <wsdl:output name="GetResourcePropertyResponse"> <wsdl-soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:output> <wsdl:fault name="ResourceUnknownFault"> <wsdl-soap:fault use="encoded" name="ResourceUnknownFault" /> </wsdl:fault> <wsdl:fault name="ResourceUnavailableFault"> <wsdl-soap:fault use="encoded" name="ResourceUnavailableFault" /> </wsdl:fault> <wsdl:fault name="InvalidResourcePropertyQNameFault"> <wsdl-soap:fault use="encoded" name="InvalidResourcePropertyQNameFault" /> </wsdl:fault> </wsdl:operation> <wsdl:operation name="GetMultipleResourceProperties"> <wsdl-soap:operation soapAction="GetMultipleResourceProperties" /> <wsdl:input name="GetMultipleResourcePropertiesRequest"> <wsdl-soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:input> <wsdl:output name="GetMultipleResourcePropertiesResponse"> <wsdl-soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:output> <wsdl:fault name="ResourceUnknownFault"> <wsdl-soap:fault use="encoded" name="ResourceUnknownFault" /> </wsdl:fault> <wsdl:fault name="ResourceUnavailableFault"> <wsdl-soap:fault use="encoded" name="ResourceUnavailableFault" /> </wsdl:fault> <wsdl:fault name="InvalidResourcePropertyQNameFault"> <wsdl-soap:fault use="encoded" name="InvalidResourcePropertyQNameFault" /> </wsdl:fault> </wsdl:operation> <wsdl:operation name="QueryResourceProperties"> <wsdl-soap:operation soapAction="QueryResourceProperties" /> <wsdl:input name="QueryResourcePropertiesRequest"> <wsdl-soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:input> <wsdl:output name="QueryResourcePropertiesResponse"> <wsdl-soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:output> <wsdl:fault name="ResourceUnknownFault"> <wsdl-soap:fault use="encoded" name="ResourceUnknownFault" /> </wsdl:fault> <wsdl:fault name="ResourceUnavailableFault"> <wsdl-soap:fault use="encoded" name="ResourceUnavailableFault" /> </wsdl:fault> <wsdl:fault name="UnknownQueryExpressionDialectFault"> <wsdl-soap:fault use="encoded" name="UnknownQueryExpressionDialectFault" /> </wsdl:fault> <wsdl:fault name="InvalidQueryExpressionFault"> <wsdl-soap:fault use="encoded" name="InvalidQueryExpressionFault" /> </wsdl:fault> <wsdl:fault name="QueryEvaluationErrorFault"> <wsdl-soap:fault use="encoded" name="QueryEvaluationErrorFault" /> </wsdl:fault> </wsdl:operation> <wsdl:operation name="SetResourceProperties"> <wsdl-soap:operation soapAction="http://oasis.org/SetResourceProperties" /> <wsdl:input name="SetResourcePropertiesRequest"> <wsdl-soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:input> <wsdl:output name="SetResourcePropertiesResponse"> <wsdl-soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:output> <wsdl:fault name="ResourceUnknownFault"> <wsdl-soap:fault use="encoded" name="ResourceUnknownFault" /> </wsdl:fault> <wsdl:fault name="ResourceUnavailableFault"> <wsdl-soap:fault use="encoded" name="ResourceUnavailableFault" /> </wsdl:fault> <wsdl:fault name="InvalidModificationFault"> <wsdl-soap:fault use="encoded" name="InvalidModificationFault" /> </wsdl:fault> <wsdl:fault name="UnableToModifyResourcePropertyFault"> <wsdl-soap:fault use="encoded" name="UnableToModifyResourcePropertyFault" /> </wsdl:fault> <wsdl:fault name="InvalidResourcePropertyQNameFault"> <wsdl-soap:fault use="encoded" name="InvalidResourcePropertyQNameFault" /> </wsdl:fault> <wsdl:fault name="SetResourcePropertyRequestFailedFault"> <wsdl-soap:fault use="encoded" name="SetResourcePropertyRequestFailedFault" /> </wsdl:fault> </wsdl:operation> <wsdl:operation name="Subscribe"> <wsdl-soap:operation soapAction="http://ws.apache.org/muse/test/wsrf/Subscribe" /> <wsdl:input> <wsdl-soap:body use="encoded" /> </wsdl:input> <wsdl:output> <wsdl-soap:body use="encoded" /> </wsdl:output> <wsdl:fault name="ResourceUnknownFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="ResourceUnknownFault" /> </wsdl:fault> <wsdl:fault name="InvalidFilterFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="InvalidFilterFault" /> </wsdl:fault> <wsdl:fault name="TopicExpressionDialectUnknownFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="TopicExpressionDialectUnknownFault" /> </wsdl:fault> <wsdl:fault name="InvalidTopicExpressionFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="InvalidTopicExpressionFault" /> </wsdl:fault> <wsdl:fault name="TopicNotSupportedFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="TopicNotSupportedFault" /> </wsdl:fault> <wsdl:fault name="InvalidProducerPropertiesExpressionFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="InvalidProducerPropertiesExpressionFault" /> </wsdl:fault> <wsdl:fault name="InvalidMessageContentExpressionFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="InvalidMessageContentExpressionFault" /> </wsdl:fault> <wsdl:fault name="UnacceptableInitialTerminationTimeFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="UnacceptableInitialTerminationTimeFault" /> </wsdl:fault> <wsdl:fault name="UnrecognizedPolicyRequestFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="UnrecognizedPolicyRequestFault" /> </wsdl:fault> <wsdl:fault name="UnsupportedPolicyRequestFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="UnsupportedPolicyRequestFault" /> </wsdl:fault> <wsdl:fault name="NotifyMessageNotSupportedFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="NotifyMessageNotSupportedFault" /> </wsdl:fault> <wsdl:fault name="SubscribeCreationFailedFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="SubscribeCreationFailedFault" /> </wsdl:fault> </wsdl:operation> <wsdl:operation name="GetCurrentMessage"> <wsdl-soap:operation soapAction="http://ws.apache.org/muse/test/wsrf/GetCurrentMessage" /> <wsdl:input> <wsdl-soap:body use="encoded" /> </wsdl:input> <wsdl:output> <wsdl-soap:body use="encoded" /> </wsdl:output> <wsdl:fault name="ResourceUnknownFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="ResourceUnknownFault" /> </wsdl:fault> <wsdl:fault name="TopicExpressionDialectUnknownFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="TopicExpressionDialectUnknownFault" /> </wsdl:fault> <wsdl:fault name="InvalidTopicExpressionFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="InvalidTopicExpressionFault" /> </wsdl:fault> <wsdl:fault name="TopicNotSupportedFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="TopicNotSupportedFault" /> </wsdl:fault> <wsdl:fault name="NoCurrentMessageOnTopicFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="NoCurrentMessageOnTopicFault" /> </wsdl:fault> <wsdl:fault name="MultipleTopicsSpecifiedFault"> <wsdl-soap:fault namespace="http://ws.apache.org/muse/test/wsrf" use="encoded" name="MultipleTopicsSpecifiedFault" /> </wsdl:fault> </wsdl:operation> </wsdl:binding> <wsdl:service name="WsResourceService"> <wsdl:port name="WsResourcePort" binding="tns:WsResourceBinding"> <wsdl-soap:address location="http://localhost:8080/wsn-srv/services/WsResource" /> </wsdl:port> </wsdl:service> </wsdl:definitions> --------------------------------------------------------------------- To unsubscribe, e-mail: muse-user-unsubscribe@... For additional commands, e-mail: muse-user-help@... |
|
|
SV: trouble with WsnTestClient after new wsn-producer.war fileA thing just occurred to me, the people affected by this issue seems to
follow the following approach (please correct me when/if I'm wrong, I'll assume this is correctly understood until further notice): 1) wsdl2java is called on one or more wsdl's from the sample-wsn project 2) no code is edited after wsdl2java is called (no files are copied to the project after wsdl2java is called either) 3) the war file is deployed 4) the project experiences one or more errors from my past experiences with the sample-wsn project and indeed any further development issues I have had with wsn, one needs to make sure that the generated code is edited to be up to spec, for one thing some important wsn-producer code is not put in the MyCapability.java (might have another name if you're using the more advance naming options) initialize function. *** what you get *** public void initialize() throws SoapFault { // //The following call is necessary to property initialize the resource // super.initialize(); // //TODO perform intitialization of the following non-primitive properties // // ServerName // throw new RuntimeException("User needs to update initialization code"); } *** what you need for the sample-wsn *** public void initialize() throws SoapFault { // //The following call is necessary to property initialize the resource // super.initialize(); // //TODO perform intitialization of the following non-primitive properties // // ServerName // // throw new RuntimeException("User needs to update initialization code"); _ServerName = "sample-wsn-producer"; wsn = (NotificationProducer)getResource().getCapability(WsnConstants.PRODUCER_URI) ; // move this code below to a function if you wish to use it when called and not continuously QName topicName = new QName("http://example.com/server-product", "ServerUpdates"); wsn.addTopic(topicName); QName messageName = new QName("http://example.com/server-product", "UpdateMessage"); String updateMessage = "Something important happened!"; Element payload = XmlUtils.createElement(messageName, updateMessage); wsn.publish(topicName, payload); } Not sure if it helps at all, but at least it closes one possible issue related to starting up the application and initialization of the producer. Mr. Kanat, please don't worry about replying to the mail group message it's here for questions and debate regarding the use of the Muse framework and I find I learn new things every time I have a look at other peoples issues with Muse. sometimes a solution for a problems ends up enhancing my own projects. /Lenni _____ Fra: Irfan Emrah Kanat [mailto:iekanat@...] Sendt: 28. april 2008 10:56 Til: muse-user@... Emne: Re: trouble with WsnTestClient after new wsn-producer.war file I am not sure if this is the right way to reply to a mail group message but it is my first time so forgive me just this once. I set the binding in wsdl file as I stated earlier but here, I am attaching my wsdl file here. There is also another problem. I guess Mr. Nguyen is right as my app does not seem to be starting up. As I posted in my previous post, I build it as an axis2 app. but in tomcat manager I can not see the usual web interface of axis2. I get an HTTP Status 500 error. It seems to me that my app is not built correctly. The fact that I am getting a cygwin error alleviates my belief. Here is the command I issue and the error message I get: dulbirakan@chibi:~/Desktop/samp$ sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl sample-wsn-producer.wsdl -output wsn-srv/ -overwrite [: 38: cygwin: unexpected operator dulbirakan@chibi:~/Desktop/samp$ If there is anything else I can provide please let me know... On Mon, Apr 28, 2008 at 9:08 AM, Lenni Madsen <l.madsen@...> wrote: Hi there Could you attach your wsdl file? It might be something fairly simple and therefore easy to overlook in the wsdl, I know I've missed small important stuff time and time again. [Fatal Error] :1:1040: 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>". This error comes when you're trying to use a wrong or incomplete EndpointReference. The error message is very generic. /Lenni -----Oprindelig meddelelse----- Fra: dulbirakan [mailto:iekanat@...] Sendt: 27. april 2008 23:19 Til: muse-user@... Emne: Re: trouble with WsnTestClient after new wsn-producer.war file I had the same problem, infact I still have it. I used muse 2.2.0's wsdl2java in ubuntu linux (7.10 and 8.04) both to no avail but it worked under windows XP in my advisors computer. First I change the binding in sample-wsn-producer.wsdl to point to my producer (wsn-srv) then I change the source of wsn-consumers test class to point to my producer. Then I issue wsdl2java command and deploy services. I get the same error message you are getting (the one with HR). I also deployed one with default settings, it was a no go also. I issue: $ sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl sample-wsn-producer.wsdl -output wsn-srv/ -overwrite I get a : [: 38: cygwin: unexpected operator but everything seems to be in place and I run ant and copy the resulting war files to my tomcat webapps folder. These war files however, once deployed do not act as axis2 services. When I click on one in tomcat manager I see the following message instead of the usual axis2 web interface: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: java.lang.NullPointerException org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWra pper.java:522) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 56) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:9 68) org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 74) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) root cause java.lang.NullPointerException org.apache.jsp.axis2_002dweb.include.httpbase_jsp.jspInit(httpbase_jsp.java: 22) org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:51) org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.jav a:159) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 29) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:9 68) org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 74) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs. Apache Tomcat/6.0.16 I really would appreciate if it would just run under ubuntu. I guess the problem might be related to the cygwin problem I stated earlier. Does any one have any clue? dchou wrote: > > Hello, > > I am able to drop the sample wsn-producer.war and wsn-consumer.war files > into my Tomcat and they run fine when I run the WsnTestClient. However, > when I do a wsdl2java build in the wsn-producer directory then build a new > war using Ant. I get an error message with this newly created > wsn-producer.war. I have changed no code. Only performed wsdl2java and > ant. The steps and error I get when I run the WsnTestClient is as follows: > > $wsdl2java -j2ee axis2 -overwrite -wsdl wsdl/WsResource.wsdl > > $ ant-1.6.5/bin/ant > > I then run the test client, WsnTestClient and get the following output: > > [CLIENT TRACE] SOAP envelope contents (outgoing): > > <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> > <soap:Header> > <wsa:To > <http://166.21.9.161:8080/wsn-producer/services/WsResource> n-producer/services/WsResource</wsa:To> > <wsa:Action > xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/ <http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest> wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action> > <wsa:MessageID > xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:f6255f7a-9b73-1057-462 0-a4ec2be5ff0a</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:Addres s> > </wsa:From> > </soap:Header> > <soap:Body> > <wsnt:Subscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"> > <wsnt:ConsumerReference> > <wsa:Address > xmlns:wsa="http://www.w3.org/2005/08/addressing">http://166.21.9.175:8060/ws <http://166.21.9.175:8060/wsn-consumer/services/consumer> n-consumer/services/consumer</wsa:Address> > </wsnt:ConsumerReference> > </wsnt:Subscribe> > </soap:Body> > </soap:Envelope> > > [Fatal Error] :1:1040: 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 > va:298) > at > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.ja va:254) > at > org.apache.muse.ws.notification.remote.NotificationProducerClient.subscribe( NotificationProducerClient.java:97) > at org.apache.muse.test.wsn.WsnTestClient.main(Unknown Source) > > Does anyone have any idea what I am doing wrong? I have changed no code. I > just wanted to try and build a new war with the method outlined in the > tutorial. Any help would be appreciated. > > Thanks, > Dave > -- View this message in context: http://www.nabble.com/trouble-with-WsnTestClient-after-new-wsn-producer.war- <http://www.nabble.com/trouble-with-WsnTestClient-after-new-wsn-producer.war -file-tp10191599p16928534.html> file-tp10191599p16928534.html Sent from the Muse User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: muse-user-unsubscribe@... For additional commands, e-mail: muse-user-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: muse-user-unsubscribe@... For additional commands, e-mail: muse-user-help@... |
|
|
Re: trouble with WsnTestClient after new wsn-producer.war fileThanks for your prompt reply Mr. Madsen
The below approach does not fit me as I modified the MyCapability.java as given below: // // MyCapability.java // Tue Apr 22 16:45:01 EEST 2008 // Generated by the Apache Muse Code Generation Tool // package org.apache.ws.muse.test.wsrf; import javax.xml.namespace.QName; import org.w3c.dom.Element; import org.apache.muse.util.xml.XmlUtils; import org.apache.muse.ws.addressing.soap.SoapFault; import org.apache.muse.ws.notification.NotificationProducer; import org.apache.muse.ws.notification.WsnConstants; import org.apache.muse.ws.resource.impl.AbstractWsResourceCapability; public class MyCapability extends AbstractWsResourceCapability implements IMyCapability { 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); public QName[] getPropertyNames() { return _PROPERTIES; } // You can assign any value you may want to the two variables below. private int _MessageInterval = 10; private String _ServerName = "muse-test.apache.org"; 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); Thread producer = new Thread() { public void run() { // // for this example, reuse one payload for every notification // QName messageName = new QName(NAMESPACE_URI, "MyMessage", PREFIX); String message = "This is a message from " + getServerName(); Element payload = XmlUtils.createElement(messageName, message); while (true) { try { // // read current value - property is mutable // int currentInterval = getMessageInterval(); getLog().info("Waiting " + currentInterval + " seconds before sending message..."); Thread.currentThread().sleep(currentInterval * 1000); // // use WSN capability to send message to any subscribers // getLog().info("Sending message to consumers..."); wsn.publish(_TOPIC_NAME, payload); } catch (Throwable error) { error.printStackTrace(); } } } }; producer.start(); } } It is almost identical to the source code given with muse. On Mon, Apr 28, 2008 at 12:43 PM, Lenni Madsen <l.madsen@...> wrote: > A thing just occurred to me, the people affected by this issue seems to > follow the following approach (please correct me when/if I'm wrong, I'll > assume this is correctly understood until further notice): > > > > 1) wsdl2java is called on one or more wsdl's from the sample-wsn > project > > 2) no code is edited after wsdl2java is called (no files are copied > to > the project after wsdl2java is called either) > > 3) the war file is deployed > > 4) the project experiences one or more errors > > > > from my past experiences with the sample-wsn project and indeed any > further > development issues I have had with wsn, one needs to make sure that the > generated code is edited to be up to spec, for one thing some important > wsn-producer code is not put in the MyCapability.java (might have another > name if you're using the more advance naming options) initialize function. > > > > *** what you get *** > > public void initialize() throws SoapFault > > { > > // > > //The following call is necessary to property initialize the > resource > > // > > super.initialize(); > > > > // > > //TODO perform intitialization of the following non-primitive > properties > > // > > // ServerName > > // > > > > throw new RuntimeException("User needs to update initialization > code"); > > } > > > > *** what you need for the sample-wsn *** > > public void initialize() throws SoapFault > > { > > // > > //The following call is necessary to property initialize the > resource > > // > > super.initialize(); > > > > // > > //TODO perform intitialization of the following non-primitive > properties > > // > > // ServerName > > // > > > > // throw new RuntimeException("User needs to update initialization > code"); > > _ServerName = "sample-wsn-producer"; > > wsn = > > (NotificationProducer)getResource().getCapability(WsnConstants.PRODUCER_URI) > ; > > // move this code below to a function if you wish to use it when > called and not continuously > > QName topicName = new QName("http://example.com/server-product", > "ServerUpdates"); > > wsn.addTopic(topicName); > > QName messageName = new QName("http://example.com/server-product", > "UpdateMessage"); > > String updateMessage = "Something important happened!"; > > Element payload = XmlUtils.createElement(messageName, > updateMessage); > > wsn.publish(topicName, payload); > > } > > > > Not sure if it helps at all, but at least it closes one possible issue > related to starting up the application and initialization of the producer. > > > > Mr. Kanat, please don't worry about replying to the mail group message > it's > here for questions and debate regarding the use of the Muse framework and > I > find I learn new things every time I have a look at other peoples issues > with Muse. sometimes a solution for a problems ends up enhancing my own > projects. > > > > /Lenni > > _____ > > Fra: Irfan Emrah Kanat [mailto:iekanat@...] > Sendt: 28. april 2008 10:56 > Til: muse-user@... > Emne: Re: trouble with WsnTestClient after new wsn-producer.war file > > > > I am not sure if this is the right way to reply to a mail group message > but > it is my first time so forgive me just this once. > > I set the binding in wsdl file as I stated earlier but here, I am > attaching > my wsdl file here. > > There is also another problem. I guess Mr. Nguyen is right as my app does > not seem to be starting up. As I posted in my previous post, I build it as > an axis2 app. but in tomcat manager I can not see the usual web interface > of > axis2. I get an HTTP Status 500 error. It seems to me that my app is not > built correctly. The fact that I am getting a cygwin error alleviates my > belief. > > Here is the command I issue and the error message I get: > > dulbirakan@chibi:~/Desktop/samp$ sudo sh > /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl > sample-wsn-producer.wsdl -output wsn-srv/ -overwrite > [: 38: cygwin: unexpected operator > dulbirakan@chibi:~/Desktop/samp$ > > If there is anything else I can provide please let me know... > > > > > > > > On Mon, Apr 28, 2008 at 9:08 AM, Lenni Madsen <l.madsen@...> wrote: > > Hi there > > Could you attach your wsdl file? It might be something fairly simple and > therefore easy to overlook in the wsdl, I know I've missed small important > stuff time and time again. > > > [Fatal Error] :1:1040: 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>". > > This error comes when you're trying to use a wrong or incomplete > EndpointReference. The error message is very generic. > > /Lenni > > > -----Oprindelig meddelelse----- > Fra: dulbirakan [mailto:iekanat@...] > Sendt: 27. april 2008 23:19 > Til: muse-user@... > Emne: Re: trouble with WsnTestClient after new wsn-producer.war file > > > > I had the same problem, infact I still have it. > > I used muse 2.2.0's wsdl2java in ubuntu linux (7.10 and 8.04) both to no > avail but it worked under windows XP in my advisors computer. > > First I change the binding in sample-wsn-producer.wsdl to point to my > producer (wsn-srv) then I change the source of wsn-consumers test class to > point to my producer. Then I issue wsdl2java command and deploy services. > I > get the same error message you are getting (the one with HR). I also > deployed one with default settings, it was a no go also. > > I issue: > > $ sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl > sample-wsn-producer.wsdl -output wsn-srv/ -overwrite > > I get a : > [: 38: cygwin: unexpected operator > > but everything seems to be in place and I run ant and copy the resulting > war > files to my tomcat webapps folder. These war files however, once deployed > do > not act as axis2 services. When I click on one in tomcat manager I see the > following message instead of the usual axis2 web interface: > > HTTP Status 500 - > > type Exception report > > message > > description The server encountered an internal error () that prevented it > from fulfilling this request. > > exception > > org.apache.jasper.JasperException: java.lang.NullPointerException > > > org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWra > pper.java:522) > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 > 56) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:9 > 68) > > org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78) > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 > 74) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > root cause > > java.lang.NullPointerException > > > org.apache.jsp.axis2_002dweb.include.httpbase_jsp.jspInit(httpbase_jsp.java: > 22) > org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:51) > > > org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.jav > a:159) > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 > 29) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:9 > 68) > > org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78) > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 > 74) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > note The full stack trace of the root cause is available in the Apache > Tomcat/6.0.16 logs. > Apache Tomcat/6.0.16 > > > I really would appreciate if it would just run under ubuntu. > > I guess the problem might be related to the cygwin problem I stated > earlier. > Does any one have any clue? > > > dchou wrote: > > > > Hello, > > > > I am able to drop the sample wsn-producer.war and wsn-consumer.war files > > into my Tomcat and they run fine when I run the WsnTestClient. However, > > when I do a wsdl2java build in the wsn-producer directory then build a > new > > war using Ant. I get an error message with this newly created > > wsn-producer.war. I have changed no code. Only performed wsdl2java and > > ant. The steps and error I get when I run the WsnTestClient is as > follows: > > > > $wsdl2java -j2ee axis2 -overwrite -wsdl wsdl/WsResource.wsdl > > > > $ ant-1.6.5/bin/ant > > > > I then run the test client, WsnTestClient and get the following output: > > > > [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://166.21.9.161:8080/ws > <http://166.21.9.161:8080/wsn-producer/services/WsResource> > n-producer/services/WsResource</wsa:To> > > <wsa:Action > > > xmlns:wsa="http://www.w3.org/2005/08/addressing"> > http://docs.oasis-open.org/ > <http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest > > > wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action> > > <wsa:MessageID > > > xmlns:wsa="http://www.w3.org/2005/08/addressing > ">uuid:f6255f7a-9b73-1057-462 > 0-a4ec2be5ff0a</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:Addres > s> > > </wsa:From> > > </soap:Header> > > <soap:Body> > > <wsnt:Subscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"> > > <wsnt:ConsumerReference> > > <wsa:Address > > > xmlns:wsa="http://www.w3.org/2005/08/addressing"> > http://166.21.9.175:8060/ws > <http://166.21.9.175:8060/wsn-consumer/services/consumer> > n-consumer/services/consumer</wsa:Address> > > </wsnt:ConsumerReference> > > </wsnt:Subscribe> > > </soap:Body> > > </soap:Envelope> > > > > [Fatal Error] :1:1040: 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.ja > va:298) > > at > > > > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.ja > va:254) > > at > > > > org.apache.muse.ws.notification.remote.NotificationProducerClient.subscribe( > NotificationProducerClient.java:97) > > at org.apache.muse.test.wsn.WsnTestClient.main(Unknown Source) > > > > Does anyone have any idea what I am doing wrong? I have changed no code. > I > > just wanted to try and build a new war with the method outlined in the > > tutorial. Any help would be appreciated. > > > > Thanks, > > Dave > > > > -- > View this message in context: > > http://www.nabble.com/trouble-with-WsnTestClient-after-new-wsn-producer.war- > < > http://www.nabble.com/trouble-with-WsnTestClient-after-new-wsn-producer.war > -file-tp10191599p16928534.html<http://www.nabble.com/trouble-with-WsnTestClient-after-new-wsn-producer.war-file-tp10191599p16928534.html> > > > file-tp10191599p16928534.html > Sent from the Muse User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: muse-user-unsubscribe@... > For additional commands, e-mail: muse-user-help@... > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: muse-user-unsubscribe@... > For additional commands, e-mail: muse-user-help@... > > > > |
|
|
SV: trouble with WsnTestClient after new wsn-producer.war fileHmm... this issue warrants a bit more exploring from my side, for some
reason I seem to have problems with the subscription manager for muse-2.3.0-2008-04-07-02-00-bin, it keeps reporting: [Fatal Error] :12:184: 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.ja va:298) at org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.ja va:254) at org.apache.muse.ws.notification.remote.NotificationProducerClient.subscribe( NotificationProducerClient.java:97) at org.apache.muse.test.wsn.WsnTestClient.main(WsnTestClient.java:79) yet the subscription mechanism seems to work: *#*# message accepted #*#* 2008-04-28 15:47:28 org.apache.muse.test.wsn.impl.ConsumerCapabilityImpl process INFO: Received message: <wsnt:NotificationMessage xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:muse-wsa="http://ws.apache.org/muse/addressing" xmlns:tns="http://ws.apache.org/muse/test/wsrf" xmlns:wsa="http://www.w3.org /2005/08/addressing"> <wsnt:SubscriptionReference> <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://10. 0.19.16:8080/wsn-producer/services/SubscriptionManager</wsa:Address> <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing "> <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addre ssing">MuseResource-1</muse-wsa:ResourceId> </wsa:ReferenceParameters> </wsnt:SubscriptionReference> <wsnt:Topic Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete" xm lns:tns="http://ws.apache.org/muse/test/wsrf">tns:MyTopic</wsnt:Topic> <wsnt:ProducerReference> <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing "/> <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://10. 0.19.16:8080/wsn-producer/services/WsResource</wsa:Address> </wsnt:ProducerReference> <wsnt:Message> <tns:MyMessage xmlns:tns="http://ws.apache.org/muse/test/wsrf">This is a message from muse-test.apache.org</tns:MyMessage> </wsnt:Message> </wsnt:NotificationMessage> [Fatal Error] :12:184: The element type "HR" must be terminated by the matching end-tag "</HR>". 2008-04-28 15:47:29 org.apache.muse.util.LoggingUtils logError INFO: There was an error while processing a request: The element type "HR" must be terminated by the matching end-tag "</HR>". org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien t.java:298) org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien t.java:254) org.apache.muse.ws.notification.remote.NotificationConsumerClient.notify (NotificationConsumerClient.java:99) org.apache.muse.ws.notification.impl.SimpleSubscriptionManager.publish(S impleSubscriptionManager.java:267) org.apache.muse.ws.notification.impl.SimpleNotificationProducer.publish( SimpleNotificationProducer.java:525) org.apache.muse.ws.notification.impl.SimpleNotificationProducer.publish( SimpleNotificationProducer.java:500) org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1.run(MyCapabilityImpl.jav a:104) ------------------------------------------ I think I need to revert to a earlier version of my setup to make sure that it's not just a fault in my setup. FYI: if you use tomcat 6.0.16 you'll run into some warnings regarding listeners already registered http://forum.springframework.org/showthread.php?p=175433 -----Oprindelig meddelelse----- Fra: Irfan Emrah Kanat [mailto:iekanat@...] Sendt: 28. april 2008 11:48 Til: muse-user@... Emne: Re: trouble with WsnTestClient after new wsn-producer.war file Thanks for your prompt reply Mr. Madsen The below approach does not fit me as I modified the MyCapability.java as given below: // // MyCapability.java // Tue Apr 22 16:45:01 EEST 2008 // Generated by the Apache Muse Code Generation Tool // package org.apache.ws.muse.test.wsrf; import javax.xml.namespace.QName; import org.w3c.dom.Element; import org.apache.muse.util.xml.XmlUtils; import org.apache.muse.ws.addressing.soap.SoapFault; import org.apache.muse.ws.notification.NotificationProducer; import org.apache.muse.ws.notification.WsnConstants; import org.apache.muse.ws.resource.impl.AbstractWsResourceCapability; public class MyCapability extends AbstractWsResourceCapability implements IMyCapability { 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); public QName[] getPropertyNames() { return _PROPERTIES; } // You can assign any value you may want to the two variables below. private int _MessageInterval = 10; private String _ServerName = "muse-test.apache.org"; 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); Thread producer = new Thread() { public void run() { // // for this example, reuse one payload for every notification // QName messageName = new QName(NAMESPACE_URI, "MyMessage", PREFIX); String message = "This is a message from " + getServerName(); Element payload = XmlUtils.createElement(messageName, message); while (true) { try { // // read current value - property is mutable // int currentInterval = getMessageInterval(); getLog().info("Waiting " + currentInterval + " seconds before sending message..."); Thread.currentThread().sleep(currentInterval * 1000); // // use WSN capability to send message to any subscribers // getLog().info("Sending message to consumers..."); wsn.publish(_TOPIC_NAME, payload); } catch (Throwable error) { error.printStackTrace(); } } } }; producer.start(); } } It is almost identical to the source code given with muse. On Mon, Apr 28, 2008 at 12:43 PM, Lenni Madsen <l.madsen@...> wrote: > A thing just occurred to me, the people affected by this issue seems to > follow the following approach (please correct me when/if I'm wrong, I'll > assume this is correctly understood until further notice): > > > > 1) wsdl2java is called on one or more wsdl's from the sample-wsn > project > > 2) no code is edited after wsdl2java is called (no files are copied > to > the project after wsdl2java is called either) > > 3) the war file is deployed > > 4) the project experiences one or more errors > > > > from my past experiences with the sample-wsn project and indeed any > further > development issues I have had with wsn, one needs to make sure that the > generated code is edited to be up to spec, for one thing some important > wsn-producer code is not put in the MyCapability.java (might have another > name if you're using the more advance naming options) initialize function. > > > > *** what you get *** > > public void initialize() throws SoapFault > > { > > // > > //The following call is necessary to property initialize the > resource > > // > > super.initialize(); > > > > // > > //TODO perform intitialization of the following non-primitive > properties > > // > > // ServerName > > // > > > > throw new RuntimeException("User needs to update initialization > code"); > > } > > > > *** what you need for the sample-wsn *** > > public void initialize() throws SoapFault > > { > > // > > //The following call is necessary to property initialize the > resource > > // > > super.initialize(); > > > > // > > //TODO perform intitialization of the following non-primitive > properties > > // > > // ServerName > > // > > > > // throw new RuntimeException("User needs to update initialization > code"); > > _ServerName = "sample-wsn-producer"; > > wsn = > > > ; > > // move this code below to a function if you wish to use it when > called and not continuously > > QName topicName = new QName("http://example.com/server-product", > "ServerUpdates"); > > wsn.addTopic(topicName); > > QName messageName = new QName("http://example.com/server-product", > "UpdateMessage"); > > String updateMessage = "Something important happened!"; > > Element payload = XmlUtils.createElement(messageName, > updateMessage); > > wsn.publish(topicName, payload); > > } > > > > Not sure if it helps at all, but at least it closes one possible issue > related to starting up the application and initialization of the producer. > > > > Mr. Kanat, please don't worry about replying to the mail group message > it's > here for questions and debate regarding the use of the Muse framework and > I > find I learn new things every time I have a look at other peoples issues > with Muse. sometimes a solution for a problems ends up enhancing my own > projects. > > > > /Lenni > > _____ > > Fra: Irfan Emrah Kanat [mailto:iekanat@...] > Sendt: 28. april 2008 10:56 > Til: muse-user@... > Emne: Re: trouble with WsnTestClient after new wsn-producer.war file > > > > I am not sure if this is the right way to reply to a mail group message > but > it is my first time so forgive me just this once. > > I set the binding in wsdl file as I stated earlier but here, I am > attaching > my wsdl file here. > > There is also another problem. I guess Mr. Nguyen is right as my app does > not seem to be starting up. As I posted in my previous post, I build it as > an axis2 app. but in tomcat manager I can not see the usual web interface > of > axis2. I get an HTTP Status 500 error. It seems to me that my app is not > built correctly. The fact that I am getting a cygwin error alleviates my > belief. > > Here is the command I issue and the error message I get: > > dulbirakan@chibi:~/Desktop/samp$ sudo sh > /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl > sample-wsn-producer.wsdl -output wsn-srv/ -overwrite > [: 38: cygwin: unexpected operator > dulbirakan@chibi:~/Desktop/samp$ > > If there is anything else I can provide please let me know... > > > > > > > > On Mon, Apr 28, 2008 at 9:08 AM, Lenni Madsen <l.madsen@...> wrote: > > Hi there > > Could you attach your wsdl file? It might be something fairly simple and > therefore easy to overlook in the wsdl, I know I've missed small important > stuff time and time again. > > > [Fatal Error] :1:1040: 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>". > > This error comes when you're trying to use a wrong or incomplete > EndpointReference. The error message is very generic. > > /Lenni > > > -----Oprindelig meddelelse----- > Fra: dulbirakan [mailto:iekanat@...] > Sendt: 27. april 2008 23:19 > Til: muse-user@... > Emne: Re: trouble with WsnTestClient after new wsn-producer.war file > > > > I had the same problem, infact I still have it. > > I used muse 2.2.0's wsdl2java in ubuntu linux (7.10 and 8.04) both to no > avail but it worked under windows XP in my advisors computer. > > First I change the binding in sample-wsn-producer.wsdl to point to my > producer (wsn-srv) then I change the source of wsn-consumers test class to > point to my producer. Then I issue wsdl2java command and deploy services. > I > get the same error message you are getting (the one with HR). I also > deployed one with default settings, it was a no go also. > > I issue: > > $ sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl > sample-wsn-producer.wsdl -output wsn-srv/ -overwrite > > I get a : > [: 38: cygwin: unexpected operator > > but everything seems to be in place and I run ant and copy the resulting > war > files to my tomcat webapps folder. These war files however, once deployed > do > not act as axis2 services. When I click on one in tomcat manager I see the > following message instead of the usual axis2 web interface: > > HTTP Status 500 - > > type Exception report > > message > > description The server encountered an internal error () that prevented it > from fulfilling this request. > > exception > > org.apache.jasper.JasperException: java.lang.NullPointerException > > > > pper.java:522) > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 > 56) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:9 > 68) > > org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78) > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 > 74) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > root cause > > java.lang.NullPointerException > > > > 22) > org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:51) > > > org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.jav > a:159) > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 > 29) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:9 > 68) > > org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78) > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 > 74) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > note The full stack trace of the root cause is available in the Apache > Tomcat/6.0.16 logs. > Apache Tomcat/6.0.16 > > > I really would appreciate if it would just run under ubuntu. > > I guess the problem might be related to the cygwin problem I stated > earlier. > Does any one have any clue? > > > dchou wrote: > > > > Hello, > > > > I am able to drop the sample wsn-producer.war and wsn-consumer.war files > > into my Tomcat and they run fine when I run the WsnTestClient. However, > > when I do a wsdl2java build in the wsn-producer directory then build a > new > > war using Ant. I get an error message with this newly created > > wsn-producer.war. I have changed no code. Only performed wsdl2java and > > ant. The steps and error I get when I run the WsnTestClient is as > follows: > > > > $wsdl2java -j2ee axis2 -overwrite -wsdl wsdl/WsResource.wsdl > > > > $ ant-1.6.5/bin/ant > > > > I then run the test client, WsnTestClient and get the following output: > > > > [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://166.21.9.161:8080/ws > <http://166.21.9.161:8080/wsn-producer/services/WsResource> > n-producer/services/WsResource</wsa:To> > > <wsa:Action > > > xmlns:wsa="http://www.w3.org/2005/08/addressing"> > http://docs.oasis-open.org/ > <http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest > > > wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action> > > <wsa:MessageID > > > xmlns:wsa="http://www.w3.org/2005/08/addressing > ">uuid:f6255f7a-9b73-1057-462 > 0-a4ec2be5ff0a</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:Addres > s> > > </wsa:From> > > </soap:Header> > > <soap:Body> > > <wsnt:Subscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"> > > <wsnt:ConsumerReference> > > <wsa:Address > > > xmlns:wsa="http://www.w3.org/2005/08/addressing"> > http://166.21.9.175:8060/ws > <http://166.21.9.175:8060/wsn-consumer/services/consumer> > n-consumer/services/consumer</wsa:Address> > > </wsnt:ConsumerReference> > > </wsnt:Subscribe> > > </soap:Body> > > </soap:Envelope> > > > > [Fatal Error] :1:1040: 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 > > > > > va:298) > > at > > > > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.ja > va:254) > > at > > > > org.apache.muse.ws.notification.remote.NotificationProducerClient.subscribe( > NotificationProducerClient.java:97) > > at org.apache.muse.test.wsn.WsnTestClient.main(Unknown Source) > > > > Does anyone have any idea what I am doing wrong? I have changed no code. > I > > just wanted to try and build a new war with the method outlined in the > > tutorial. Any help would be appreciated. > > > > Thanks, > > Dave > > > > -- > View this message in context: > > > < > http://www.nabble.com/trouble-with-WsnTestClient-after-new-wsn-producer.war > -file-tp10191599p16928534.html<http://www.nabble.com/trouble-with-WsnTestCli ent-after-new-wsn-producer.war-file-tp10191599p16928534.html> > > > file-tp10191599p16928534.html > Sent from the Muse User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: muse-user-unsubscribe@... > For additional commands, e-mail: muse-user-help@... > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: muse-user-unsubscribe@... > For additional commands, e-mail: muse-user-help@... > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: muse-user-unsubscribe@... For additional commands, e-mail: muse-user-help@... |
|
|
RE: trouble with WsnTestClient after new wsn-producer.war fileHi,
I just redeployed the Muse 2.2.0 wsn-consumer and wsn-producer samples to a local Tomcat 5.5 server on Windows XP. Then I ran the WsnTestClient in wsn-consumer. Everything works fine for me, and notifictions are being received properly every 10 seconds. You shouldn't need to modify anything since the samples should be runnable "out of the box". Here's the steps to reproduce the test 1) In the wsn-producer project, do "ant". Then manually deploy the wsn-producer.war to C:\tomcat\webapps\ 2) In the wsn-consumer project, do "ant". Then manually deploy the wsn-consumer.war to C:\tomcat\webapps\ 3) Start your Tomcat. 4) In the wsn-consumer project, do "ant -Dmain=org.apache.muse.test.wsn.WsnTestClient run". The console should show the SOAP trace for the Subscribe request/response. 5) Check for notifications in C:\tomcat\webapps\wsn-consumer\WEB-INF\classes\log\muse.log Hope this helps... -Vinh -----Original Message----- From: Lenni Madsen [mailto:l.madsen@...] Sent: Monday, April 28, 2008 6:51 AM To: muse-user@... Subject: SV: trouble with WsnTestClient after new wsn-producer.war file Hmm... this issue warrants a bit more exploring from my side, for some reason I seem to have problems with the subscription manager for muse-2.3.0-2008-04-07-02-00-bin, it keeps reporting: [Fatal Error] :12:184: 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(AbstractResourceClien t.ja va:298) at org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien t.ja va:254) at org.apache.muse.ws.notification.remote.NotificationProducerClient.subscr ibe( NotificationProducerClient.java:97) at org.apache.muse.test.wsn.WsnTestClient.main(WsnTestClient.java:79) yet the subscription mechanism seems to work: *#*# message accepted #*#* 2008-04-28 15:47:28 org.apache.muse.test.wsn.impl.ConsumerCapabilityImpl process INFO: Received message: <wsnt:NotificationMessage xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:muse-wsa="http://ws.apache.org/muse/addressing" xmlns:tns="http://ws.apache.org/muse/test/wsrf" xmlns:wsa="http://www.w3.org /2005/08/addressing"> <wsnt:SubscriptionReference> <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://10. 0.19.16:8080/wsn-producer/services/SubscriptionManager</wsa:Address> <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing "> <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addre ssing">MuseResource-1</muse-wsa:ResourceId> </wsa:ReferenceParameters> </wsnt:SubscriptionReference> <wsnt:Topic Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete" xm lns:tns="http://ws.apache.org/muse/test/wsrf">tns:MyTopic</wsnt:Topic> <wsnt:ProducerReference> <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing "/> <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://10. 0.19.16:8080/wsn-producer/services/WsResource</wsa:Address> </wsnt:ProducerReference> <wsnt:Message> <tns:MyMessage xmlns:tns="http://ws.apache.org/muse/test/wsrf">This is a message from muse-test.apache.org</tns:MyMessage> </wsnt:Message> </wsnt:NotificationMessage> [Fatal Error] :12:184: The element type "HR" must be terminated by the matching end-tag "</HR>". 2008-04-28 15:47:29 org.apache.muse.util.LoggingUtils logError INFO: There was an error while processing a request: The element type "HR" must be terminated by the matching end-tag "</HR>". org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien t.java:298) org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien t.java:254) org.apache.muse.ws.notification.remote.NotificationConsumerClient.notify (NotificationConsumerClient.java:99) org.apache.muse.ws.notification.impl.SimpleSubscriptionManager.publish(S impleSubscriptionManager.java:267) org.apache.muse.ws.notification.impl.SimpleNotificationProducer.publish( SimpleNotificationProducer.java:525) org.apache.muse.ws.notification.impl.SimpleNotificationProducer.publish( SimpleNotificationProducer.java:500) org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1.run(MyCapabilityImpl.jav a:104) ------------------------------------------ I think I need to revert to a earlier version of my setup to make sure that it's not just a fault in my setup. FYI: if you use tomcat 6.0.16 you'll run into some warnings regarding listeners already registered http://forum.springframework.org/showthread.php?p=175433 -----Oprindelig meddelelse----- Fra: Irfan Emrah Kanat [mailto:iekanat@...] Sendt: 28. april 2008 11:48 Til: muse-user@... Emne: Re: trouble with WsnTestClient after new wsn-producer.war file Thanks for your prompt reply Mr. Madsen The below approach does not fit me as I modified the MyCapability.java as given below: // // MyCapability.java // Tue Apr 22 16:45:01 EEST 2008 // Generated by the Apache Muse Code Generation Tool // package org.apache.ws.muse.test.wsrf; import javax.xml.namespace.QName; import org.w3c.dom.Element; import org.apache.muse.util.xml.XmlUtils; import org.apache.muse.ws.addressing.soap.SoapFault; import org.apache.muse.ws.notification.NotificationProducer; import org.apache.muse.ws.notification.WsnConstants; import org.apache.muse.ws.resource.impl.AbstractWsResourceCapability; public class MyCapability extends AbstractWsResourceCapability implements IMyCapability { 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); public QName[] getPropertyNames() { return _PROPERTIES; } // You can assign any value you may want to the two variables below. private int _MessageInterval = 10; private String _ServerName = "muse-test.apache.org"; 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); Thread producer = new Thread() { public void run() { // // for this example, reuse one payload for every notification // QName messageName = new QName(NAMESPACE_URI, "MyMessage", PREFIX); String message = "This is a message from " + getServerName(); Element payload = XmlUtils.createElement(messageName, message); while (true) { try { // // read current value - property is mutable // int currentInterval = getMessageInterval(); getLog().info("Waiting " + currentInterval + " seconds before sending message..."); Thread.currentThread().sleep(currentInterval * 1000); // // use WSN capability to send message to any subscribers // getLog().info("Sending message to consumers..."); wsn.publish(_TOPIC_NAME, payload); } catch (Throwable error) { error.printStackTrace(); } } } }; producer.start(); } } It is almost identical to the source code given with muse. On Mon, Apr 28, 2008 at 12:43 PM, Lenni Madsen <l.madsen@...> wrote: > A thing just occurred to me, the people affected by this issue seems > to follow the following approach (please correct me when/if I'm wrong, > I'll assume this is correctly understood until further notice): > > > > 1) wsdl2java is called on one or more wsdl's from the sample-wsn > project > > 2) no code is edited after wsdl2java is called (no files are copied > to > the project after wsdl2java is called either) > > 3) the war file is deployed > > 4) the project experiences one or more errors > > > > from my past experiences with the sample-wsn project and indeed any > further development issues I have had with wsn, one needs to make sure > that the generated code is edited to be up to spec, for one thing some > important wsn-producer code is not put in the MyCapability.java (might > have another name if you're using the more advance naming options) > initialize function. > > > > *** what you get *** > > public void initialize() throws SoapFault > > { > > // > > //The following call is necessary to property initialize the > resource > > // > > super.initialize(); > > > > // > > //TODO perform intitialization of the following non-primitive > properties > > // > > // ServerName > > // > > > > throw new RuntimeException("User needs to update initialization > code"); > > } > > > > *** what you need for the sample-wsn *** > > public void initialize() throws SoapFault > > { > > // > > //The following call is necessary to property initialize the > resource > > // > > super.initialize(); > > > > // > > //TODO perform intitialization of the following non-primitive > properties > > // > > // ServerName > > // > > > > // throw new RuntimeException("User needs to update > code"); > > _ServerName = "sample-wsn-producer"; > > wsn = > > (NotificationProducer)getResource().getCapability(WsnConstants.PRODUCER_ URI) > ; > > // move this code below to a function if you wish to use it > when called and not continuously > > QName topicName = new > QName("http://example.com/server-product", > "ServerUpdates"); > > wsn.addTopic(topicName); > > QName messageName = new > QName("http://example.com/server-product", > "UpdateMessage"); > > String updateMessage = "Something important happened!"; > > Element payload = XmlUtils.createElement(messageName, > updateMessage); > > wsn.publish(topicName, payload); > > } > > > > Not sure if it helps at all, but at least it closes one possible issue > related to starting up the application and initialization of the producer. > > > > Mr. Kanat, please don't worry about replying to the mail group message > it's here for questions and debate regarding the use of the Muse > framework and I find I learn new things every time I have a look at > other peoples issues with Muse. sometimes a solution for a problems > ends up enhancing my own projects. > > > > /Lenni > > _____ > > Fra: Irfan Emrah Kanat [mailto:iekanat@...] > Sendt: 28. april 2008 10:56 > Til: muse-user@... > Emne: Re: trouble with WsnTestClient after new wsn-producer.war file > > > > I am not sure if this is the right way to reply to a mail group > message but it is my first time so forgive me just this once. > > I set the binding in wsdl file as I stated earlier but here, I am > attaching my wsdl file here. > > There is also another problem. I guess Mr. Nguyen is right as my app > does not seem to be starting up. As I posted in my previous post, I > build it as an axis2 app. but in tomcat manager I can not see the > usual web interface of axis2. I get an HTTP Status 500 error. It seems > to me that my app is not built correctly. The fact that I am getting a > cygwin error alleviates my belief. > > Here is the command I issue and the error message I get: > > dulbirakan@chibi:~/Desktop/samp$ sudo sh > /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl > sample-wsn-producer.wsdl -output wsn-srv/ -overwrite > [: 38: cygwin: unexpected operator > dulbirakan@chibi:~/Desktop/samp$ > > If there is anything else I can provide please let me know... > > > > > > > > On Mon, Apr 28, 2008 at 9:08 AM, Lenni Madsen <l.madsen@...> wrote: > > Hi there > > Could you attach your wsdl file? It might be something fairly simple > and therefore easy to overlook in the wsdl, I know I've missed small > important stuff time and time again. > > > [Fatal Error] :1:1040: 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>". > > This error comes when you're trying to use a wrong or incomplete > EndpointReference. The error message is very generic. > > /Lenni > > > -----Oprindelig meddelelse----- > Fra: dulbirakan [mailto:iekanat@...] > Sendt: 27. april 2008 23:19 > Til: muse-user@... > Emne: Re: trouble with WsnTestClient after new wsn-producer.war file > > > > I had the same problem, infact I still have it. > > I used muse 2.2.0's wsdl2java in ubuntu linux (7.10 and 8.04) both to > no avail but it worked under windows XP in my advisors computer. > > First I change the binding in sample-wsn-producer.wsdl to point to my > producer (wsn-srv) then I change the source of wsn-consumers test > class to point to my producer. Then I issue wsdl2java command and > I > get the same error message you are getting (the one with HR). I also > deployed one with default settings, it was a no go also. > > I issue: > > $ sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl > sample-wsn-producer.wsdl -output wsn-srv/ -overwrite > > I get a : > [: 38: cygwin: unexpected operator > > but everything seems to be in place and I run ant and copy the > resulting war files to my tomcat webapps folder. These war files > however, once deployed do not act as axis2 services. When I click on > one in tomcat manager I see the following message instead of the usual > axis2 web interface: > > HTTP Status 500 - > > type Exception report > > message > > description The server encountered an internal error () that prevented > it from fulfilling this request. > > exception > > org.apache.jasper.JasperException: java.lang.NullPointerException > > > org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServle tWra > pper.java:522) > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:3 > 56) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.ja va:9 > 68) > > org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78) > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:3 > 74) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > root cause > > java.lang.NullPointerException > > > org.apache.jsp.axis2_002dweb.include.httpbase_jsp.jspInit(httpbase_jsp.j ava: > 22) > org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:51) > > > org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper .jav > a:159) > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:3 > 29) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.ja va:9 > 68) > > org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78) > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:3 > 74) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > note The full stack trace of the root cause is available in the Apache > Tomcat/6.0.16 logs. > Apache Tomcat/6.0.16 > > > I really would appreciate if it would just run under ubuntu. > > I guess the problem might be related to the cygwin problem I stated > earlier. > Does any one have any clue? > > > dchou wrote: > > > > Hello, > > > > I am able to drop the sample wsn-producer.war and wsn-consumer.war > > files into my Tomcat and they run fine when I run the WsnTestClient. > > However, when I do a wsdl2java build in the wsn-producer directory > > then build a > new > > war using Ant. I get an error message with this newly created > > wsn-producer.war. I have changed no code. Only performed wsdl2java > > and ant. The steps and error I get when I run the WsnTestClient is > > as > follows: > > > > $wsdl2java -j2ee axis2 -overwrite -wsdl wsdl/WsResource.wsdl > > > > $ ant-1.6.5/bin/ant > > > > I then run the test client, WsnTestClient and get the 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://166.21.9.161:8080/ws > <http://166.21.9.161:8080/wsn-producer/services/WsResource> > n-producer/services/WsResource</wsa:To> > > <wsa:Action > > > xmlns:wsa="http://www.w3.org/2005/08/addressing"> > http://docs.oasis-open.org/ > <http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeReq > uest > > > wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action> > > <wsa:MessageID > > > xmlns:wsa="http://www.w3.org/2005/08/addressing > ">uuid:f6255f7a-9b73-1057-462 > 0-a4ec2be5ff0a</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:Addres > s> > > </wsa:From> > > </soap:Header> > > <soap:Body> > > <wsnt:Subscribe > > <wsnt:ConsumerReference> > > <wsa:Address > > > xmlns:wsa="http://www.w3.org/2005/08/addressing"> > http://166.21.9.175:8060/ws > <http://166.21.9.175:8060/wsn-consumer/services/consumer> > n-consumer/services/consumer</wsa:Address> > > </wsnt:ConsumerReference> > > </wsnt:Subscribe> > > </soap:Body> > > </soap:Envelope> > > > > [Fatal Error] :1:1040: 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 > > > > t.ja > va:298) > > at > > > > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien t.ja > va:254) > > at > > > > org.apache.muse.ws.notification.remote.NotificationProducerClient.subscr ibe( > NotificationProducerClient.java:97) > > at org.apache.muse.test.wsn.WsnTestClient.main(Unknown > > Source) > > > > Does anyone have any idea what I am doing wrong? I have changed no code. > I > > just wanted to try and build a new war with the method outlined in > > the tutorial. Any help would be appreciated. > > > > Thanks, > > Dave > > > > -- > View this message in context: > > war- > < > http://www.nabble.com/trouble-with-WsnTestClient-after-new-wsn-producer. war > -file-tp10191599p16928534.html<http://www.nabble.com/trouble-with-WsnTes tCli ent-after-new-wsn-producer.war-file-tp10191599p16928534.html> > > > file-tp10191599p16928534.html > Sent from the Muse User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: muse-user-unsubscribe@... > For additional commands, e-mail: muse-user-help@... > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: muse-user-unsubscribe@... > For additional commands, e-mail: muse-user-help@... > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: muse-user-unsubscribe@... For additional commands, e-mail: muse-user-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: muse-user-unsubscribe@... For additional commands, e-mail: muse-user-help@... |
|
|
Re: trouble with WsnTestClient after new wsn-producer.war fileThanks, but my problem is a bit different.
I can deploy the samples in ubuntu, no problem. But when I try to build the sample wsn producer from the wsdl file via wsdl2java provided with muse 2.2.0 in ubuntu I have some problems. I can build the same file in windows without any problems though... So I guess it is a linux specific problem. I am writing a tutorial for next years Web Services Class I am providing the last section which I have the problems so that you can see what steps I have taken so far... It is not completed yet... That is it about the environment, we now have the Muse to build our WSs and AXIS2 to deploy them. It would have been nice if we had Eclipse WTP in place but everything has its time. We will be using the samples from the tutorial and deploy the WS Notification producer and WS Notification consumer that come with Muse to test our environment. I assume you have a basic understanding of what a WSDL file describes, like the types, port types and bindings. * Get to the samples: The samples are in muse folder. "cd /opt/muse-2.2.0-bin/samples/j2ee" * First comes the producer: Let's build the producer first "cd /opt/muse-2.2.0-bin/samples/j2ee/wsn-producer" "sudo ant" You should see a 'BUILD SUCCESSFUL' and we should now have wsn-producer.war in build folder. Deploy the service into the container, Tomcat comes preconfigured to deploy any war files copied into its webapps folder. "sudo cp build/wsn-producer.war /opt/apache-tomcat-6.0.16/webapps/" Browse to the localhost:8080/manager to see if it is deployed, its display name should read 'Apache Muse Servlet'. Muse servlets have no interface to reach through your browser. * Now the consumer: Build the consumer "cd /opt/muse-2.2.0-bin/samples/j2ee/wsn-consumer" "sudo ant" Deploy the service into the container. "sudo cp build/wsn-consumer.war /opt/apache-tomcat-6.0.16/webapps/" Browse to the localhost:8080/manager to see if it is deployed. * Test: Run the command below to test the services you just deployed: "ant run -Dmain=org.apache.muse.test.wsn.WsnTestClient" The stdout should read: Buildfile: build.xml init: run: [java] [CLIENT TRACE] SOAP envelope contents (outgoing): [java] [java] <soap:Envelope xmlns:soap=" http://www.w3.org/2003/05/soap-envelope"> [java] <soap:Header> [java] <wsa:To xmlns:wsa=" http://www.w3.org/2005/08/addressing"> http://127.0.1.1:8080/wsn-producer/services/WsResource</wsa:To> [java] <wsa:Action xmlns:wsa=" http://www.w3.org/2005/08/addressing"> http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/ . . . [java] </soap:Body> [java] </soap:Envelope> [java] [java] [CLIENT TRACE] SOAP envelope contents (incoming): [java] [java] <soap:Envelope xmlns:soap=" http://www.w3.org/2003/05/soap-envelope"> [java] <soap:Header> [java] <wsa:To xmlns:wsa=" http://www.w3.org/2005/08/addressing"> http://www.w3.org/2005/08/addressing/role/anonymous</wsa:To> [java] <wsa:Action xmlns:wsa=" http://www.w3.org/2005/08/addressing"> http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/ . . . [java] </soap:Body> [java] </soap:Envelope> [java] BUILD SUCCESSFUL Total time: 4 seconds 13: First Cover Song In the previous section we tested our environment but did not use muse much. Now we will be covering the famous wsn-producer from the MUSE. This section will cover the use of wsdl2java tool and we will be editing some source code here as well. I used Apache Muse tutorial on http://ws.apache.org/muse/docs/2.2.0/tutorial/index.html it has some errors but is more detailed than this one here. * Get the sample WSDL file: Preparing a wsdl file is a tedious process, with only a text editor as tool it is a total nightmare, that is why we will be using the WSDL file provided in muse tutorial. We will test our environment with this sample WS. "cd ~" "wget http://ws.apache.org/muse/docs/2.2.0/tutorial/artifacts/sample-wsn-producer.wsdl " * Lets get this sample file to someplace cosy "cd Desktop" "mkdir samp" "cd samp" "cp ~/sample-wsn-producer ." * Generate the skeleton code We need war files that can be deployed into AXIS2 so we will stick with the J2EE. sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl sample-wsn-producer.wsdl Huh? What happened you say? Uh, I should have guessed... You see the wsdl file we placed there refers to other xml documents and the tool can't find them, so let's get them in place first. We don't have to look too hard as they are kindly provided with muse... "cp /opt/muse-2.2.0-bin/samples/j2ee/wsn-producer/wsdl/* ." We probably won't need all of them but it is simpler to just get them all in any case. Let's see what we have in the directory now: "ls" You should see a bunch of xsd and wsdl files, these should be the same with the files included in sample-wsn-producer.wsdl. We will create the server side of the code in a seperate folder, the name of the war file and thus the service will be same as the name of this folder. * At this point I must point to a critical issue; if you create your service in any folder except wsn-producer you should change the binding in WSDL file. Edit the sample-wsn-producer.wsdl: "gedit sample-wsn-producer.wsdl" At the very end of the file there is a binding that goes like <wsdl:port name="WsResourcePort" binding="tns:WsResourceBinding"> <wsdl-soap:address location=" http://localhost:8080/wsn-producer/services/WsResource" /> </wsdl:port> Replace the wsn-producer part with your directory address. I will use 'wsn-srv' as directory name so I would use: <wsdl:port name="WsResourcePort" binding="tns:WsResourceBinding"> <wsdl-soap:address location=" http://localhost:8080/wsn-srv/services/WsResource" /> </wsdl:port> * Let's create the server code. "mkdir wsn-srv" "sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl sample-wsn-producer.wsdl -output wsn-srv" !AT THIS POINT I AM GETTING A CYGWIN ERROR! There should be two folders (JavaSource and WebContent) and an build.xml file for ANT in wsn-srv directory now. Before running ANT we have a few stuff to clear though, the java files in JavaSource folder (yes I know there is a train of empty folders under those classes, that is the namespace URI defined in WSDL file) are only the skeleton classes and they need to be fleshed. At this stage I recommend you to see Apache Muse tutorial's Deployment Descriptor section to find out about the Resource URI: From what I found out my resource URI's context paths would be WsResource and SubscriptionManager. So the URI would be: "http://localhost:8080/wsn-srv/services/SubscriptionManager" * Get to Coding As I have been mentioning for a while we have to inject the business logic to the skeleton classes. Muse can only help us so far to generate the code, but it will help us once more in packaging the code before this tutorial is through. Muse samples already include the code we need to implement, so if you want to have a look just browse to the samples folder under the muse deployment and have a look at the source of wsn-producer. In my setup the address was "/opt/muse-2.2.0-bin/samples/j2ee/wsn-producer/src/org/apache/ws/muse/test/wsrf/" "sudo gedit ~/Desktop/samp/wsn-srv/JavaSource/org/apache/ws/muse/test/wsrf/MyCapability.java" In the end my source code ended up something like: // // MyCapability.java // Tue Apr 22 16:45:01 EEST 2008 // Generated by the Apache Muse Code Generation Tool // package org.apache.ws.muse.test.wsrf; import javax.xml.namespace.QName; import org.w3c.dom.Element; import org.apache.muse.util.xml.XmlUtils; import org.apache.muse.ws.addressing.soap.SoapFault; import org.apache.muse.ws.notification.NotificationProducer; import org.apache.muse.ws.notification.WsnConstants; import org.apache.muse.ws.resource.impl.AbstractWsResourceCapability; public class MyCapability extends AbstractWsResourceCapability implements IMyCapability { 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); public QName[] getPropertyNames() { return _PROPERTIES; } // You can assign any value you may want to the two variables below. private int _MessageInterval = 10; private String _ServerName = "muse-test.apache.org"; 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); Thread producer = new Thread() { public void run() { // // for this example, reuse one payload for every notification // QName messageName = new QName(NAMESPACE_URI, "MyMessage", PREFIX); String message = "This is a message from " + getServerName(); Element payload = XmlUtils.createElement(messageName, message); while (true) { try { // // read current value - property is mutable // int currentInterval = getMessageInterval(); getLog().info("Waiting " + currentInterval + " seconds before sending message..."); Thread.currentThread().sleep(currentInterval * 1000); // // use WSN capability to send message to any subscribers // getLog().info("Sending message to consumers..."); wsn.publish(_TOPIC_NAME, payload); } catch (Throwable error) { error.printStackTrace(); } } } }; producer.start(); } } It is almost identical to the source code given with muse. * Wrap it up We will use Apache Ant tool once more to create our war package. "cd ~/Desktop/samp/wsn-srv/" "sudo ant" * Deploy it You can either deploy the service through web interface of your server or through command line. If you choose to deploy it through web interface just make sure the server is running. "sudo cp wsn-srv.war /opt/apache-tomcat-6.0.16/webapps" THE SERVICE IS NOT DEPLOYED CORRECTLY I AM GETTING A HTTP STATUS 500 ERROR On Mon, Apr 28, 2008 at 11:03 PM, Vinh Nguyen (vinguye2) <vinguye2@...> wrote: > Hi, > I just redeployed the Muse 2.2.0 wsn-consumer and wsn-producer samples > to a local Tomcat 5.5 server on Windows XP. Then I ran the > WsnTestClient in wsn-consumer. Everything works fine for me, and > notifictions are being received properly every 10 seconds. > > You shouldn't need to modify anything since the samples should be > runnable "out of the box". > > Here's the steps to reproduce the test > 1) In the wsn-producer project, do "ant". > Then manually deploy the wsn-producer.war to C:\tomcat\webapps\ > 2) In the wsn-consumer project, do "ant". > Then manually deploy the wsn-consumer.war to C:\tomcat\webapps\ > 3) Start your Tomcat. > 4) In the wsn-consumer project, do "ant > -Dmain=org.apache.muse.test.wsn.WsnTestClient run". > The console should show the SOAP trace for the Subscribe > request/response. > 5) Check for notifications in > C:\tomcat\webapps\wsn-consumer\WEB-INF\classes\log\muse.log > > Hope this helps... > -Vinh > > > -----Original Message----- > From: Lenni Madsen [mailto:l.madsen@...] > Sent: Monday, April 28, 2008 6:51 AM > To: muse-user@... > Subject: SV: trouble with WsnTestClient after new wsn-producer.war file > > Hmm... this issue warrants a bit more exploring from my side, for some > reason I seem to have problems with the subscription manager for > muse-2.3.0-2008-04-07-02-00-bin, it keeps reporting: > > [Fatal Error] :12:184: 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(AbstractResourceClien > t.ja > va:298) > at > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien > t.ja > va:254) > at > org.apache.muse.ws.notification.remote.NotificationProducerClient.subscr > ibe( > NotificationProducerClient.java:97) > at > org.apache.muse.test.wsn.WsnTestClient.main(WsnTestClient.java:79) > > yet the subscription mechanism seems to work: > > *#*# message accepted #*#* > 2008-04-28 15:47:28 org.apache.muse.test.wsn.impl.ConsumerCapabilityImpl > process > > INFO: Received message: > > <wsnt:NotificationMessage > xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" > xmlns:muse-wsa="http://ws.apache.org/muse/addressing" > xmlns:tns="http://ws.apache.org/muse/test/wsrf" > xmlns:wsa="http://www.w3.org > /2005/08/addressing"> > <wsnt:SubscriptionReference> > <wsa:Address > xmlns:wsa="http://www.w3.org/2005/08/addressing">http://10. > 0.19.16:8080/wsn-producer/services/SubscriptionManager</wsa:Address> > <wsa:ReferenceParameters > xmlns:wsa="http://www.w3.org/2005/08/addressing > "> > <muse-wsa:ResourceId > xmlns:muse-wsa="http://ws.apache.org/muse/addre > ssing">MuseResource-1</muse-wsa:ResourceId> > </wsa:ReferenceParameters> > </wsnt:SubscriptionReference> > <wsnt:Topic > > Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete" xm > lns:tns="http://ws.apache.org/muse/test/wsrf">tns:MyTopic</wsnt:Topic> > <wsnt:ProducerReference> > <wsa:ReferenceParameters > xmlns:wsa="http://www.w3.org/2005/08/addressing > "/> > <wsa:Address > xmlns:wsa="http://www.w3.org/2005/08/addressing">http://10. > 0.19.16:8080/wsn-producer/services/WsResource</wsa:Address> > </wsnt:ProducerReference> > <wsnt:Message> > <tns:MyMessage > xmlns:tns="http://ws.apache.org/muse/test/wsrf">This > is a > message from muse-test.apache.org</tns:MyMessage> > </wsnt:Message> > </wsnt:NotificationMessage> > > [Fatal Error] :12:184: The element type "HR" must be terminated by the > matching end-tag "</HR>". > 2008-04-28 15:47:29 org.apache.muse.util.LoggingUtils logError > INFO: There was an error while processing a request: > > The element type "HR" must be terminated by the matching end-tag > "</HR>". > > > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien > t.java:298) > > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien > t.java:254) > > org.apache.muse.ws.notification.remote.NotificationConsumerClient.notify > (NotificationConsumerClient.java:99) > > org.apache.muse.ws.notification.impl.SimpleSubscriptionManager.publish(S > impleSubscriptionManager.java:267) > > org.apache.muse.ws.notification.impl.SimpleNotificationProducer.publish( > SimpleNotificationProducer.java:525) > > org.apache.muse.ws.notification.impl.SimpleNotificationProducer.publish( > SimpleNotificationProducer.java:500) > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1.run(MyCapabilityImpl.jav > a:104) > > ------------------------------------------ > > I think I need to revert to a earlier version of my setup to make sure > that it's not just a fault in my setup. > > FYI: if you use tomcat 6.0.16 you'll run into some warnings regarding > listeners already registered > http://forum.springframework.org/showthread.php?p=175433 > > > -----Oprindelig meddelelse----- > Fra: Irfan Emrah Kanat [mailto:iekanat@...] > Sendt: 28. april 2008 11:48 > Til: muse-user@... > Emne: Re: trouble with WsnTestClient after new wsn-producer.war file > > Thanks for your prompt reply Mr. Madsen > > The below approach does not fit me as I modified the MyCapability.java > as given below: > > // > // MyCapability.java > // Tue Apr 22 16:45:01 EEST 2008 > // Generated by the Apache Muse Code Generation Tool > // > package org.apache.ws.muse.test.wsrf; > > import javax.xml.namespace.QName; > > import org.w3c.dom.Element; > > import org.apache.muse.util.xml.XmlUtils; > import org.apache.muse.ws.addressing.soap.SoapFault; > import org.apache.muse.ws.notification.NotificationProducer; > import org.apache.muse.ws.notification.WsnConstants; > import > org.apache.muse.ws.resource.impl.AbstractWsResourceCapability; > > public class MyCapability extends AbstractWsResourceCapability > implements IMyCapability > { > 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); > > public QName[] getPropertyNames() > { > return _PROPERTIES; > } > > // You can assign any value you may want to the two variables below. > private int _MessageInterval = 10; > > private String _ServerName = "muse-test.apache.org"; > > 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); > > Thread producer = new Thread() { > public void run() > { > // > // for this example, reuse one payload for every > notification > // > QName messageName = new QName(NAMESPACE_URI, > "MyMessage", PREFIX); > String message = "This is a message from " + > getServerName(); > Element payload = > XmlUtils.createElement(messageName, > message); > > while (true) > { > try > { > // > // read current value - property is mutable > // > int currentInterval = getMessageInterval(); > > getLog().info("Waiting " + currentInterval + > " > seconds before sending message..."); > Thread.currentThread().sleep(currentInterval > * 1000); > > // > // use WSN capability to send message to any > subscribers > // > getLog().info("Sending message to > consumers..."); > wsn.publish(_TOPIC_NAME, payload); > } > > catch (Throwable error) > { > error.printStackTrace(); > } > } > } > }; > producer.start(); > } > } > > It is almost identical to the source code given with muse. > > On Mon, Apr 28, 2008 at 12:43 PM, Lenni Madsen <l.madsen@...> wrote: > > > A thing just occurred to me, the people affected by this issue seems > > to follow the following approach (please correct me when/if I'm wrong, > > > I'll assume this is correctly understood until further notice): > > > > > > > > 1) wsdl2java is called on one or more wsdl's from the sample-wsn > > project > > > > 2) no code is edited after wsdl2java is called (no files are > copied > > to > > the project after wsdl2java is called either) > > > > 3) the war file is deployed > > > > 4) the project experiences one or more errors > > > > > > > > from my past experiences with the sample-wsn project and indeed any > > further development issues I have had with wsn, one needs to make sure > > > that the generated code is edited to be up to spec, for one thing some > > > important wsn-producer code is not put in the MyCapability.java (might > > > have another name if you're using the more advance naming options) > > initialize function. > > > > > > > > *** what you get *** > > > > public void initialize() throws SoapFault > > > > { > > > > // > > > > //The following call is necessary to property initialize the > > resource > > > > // > > > > super.initialize(); > > > > > > > > // > > > > //TODO perform intitialization of the following non-primitive > > properties > > > > // > > > > // ServerName > > > > // > > > > > > > > throw new RuntimeException("User needs to update initialization > > > code"); > > > > } > > > > > > > > *** what you need for the sample-wsn *** > > > > public void initialize() throws SoapFault > > > > { > > > > // > > > > //The following call is necessary to property initialize the > > resource > > > > // > > > > super.initialize(); > > > > > > > > // > > > > //TODO perform intitialization of the following non-primitive > > properties > > > > // > > > > // ServerName > > > > // > > > > > > > > // throw new RuntimeException("User needs to update > initialization > > code"); > > > > _ServerName = "sample-wsn-producer"; > > > > wsn = > > > > > (NotificationProducer)getResource().getCapability(WsnConstants.PRODUCER_ > URI) > > ; > > > > // move this code below to a function if you wish to use it > > when called and not continuously > > > > QName topicName = new > > QName("http://example.com/server-product", > > "ServerUpdates"); > > > > wsn.addTopic(topicName); > > > > QName messageName = new > > QName("http://example.com/server-product", > > "UpdateMessage"); > > > > String updateMessage = "Something important happened!"; > > > > Element payload = XmlUtils.createElement(messageName, > > updateMessage); > > > > wsn.publish(topicName, payload); > > > > } > > > > > > > > Not sure if it helps at all, but at least it closes one possible issue > > > related to starting up the application and initialization of the > producer. > > > > > > > > Mr. Kanat, please don't worry about replying to the mail group message > > > it's here for questions and debate regarding the use of the Muse > > framework and I find I learn new things every time I have a look at > > other peoples issues with Muse. sometimes a solution for a problems > > ends up enhancing my own projects. > > > > > > > > /Lenni > > > > _____ > > > > Fra: Irfan Emrah Kanat [mailto:iekanat@...] > > Sendt: 28. april 2008 10:56 > > Til: muse-user@... > > Emne: Re: trouble with WsnTestClient after new wsn-producer.war file > > > > > > > > I am not sure if this is the right way to reply to a mail group > > message but it is my first time so forgive me just this once. > > > > I set the binding in wsdl file as I stated earlier but here, I am > > attaching my wsdl file here. > > > > There is also another problem. I guess Mr. Nguyen is right as my app > > does not seem to be starting up. As I posted in my previous post, I > > build it as an axis2 app. but in tomcat manager I can not see the > > usual web interface of axis2. I get an HTTP Status 500 error. It seems > > > to me that my app is not built correctly. The fact that I am getting a > > > cygwin error alleviates my belief. > > > > Here is the command I issue and the error message I get: > > > > dulbirakan@chibi:~/Desktop/samp$ sudo sh > > /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl > > sample-wsn-producer.wsdl -output wsn-srv/ -overwrite > > [: 38: cygwin: unexpected operator > > dulbirakan@chibi:~/Desktop/samp$ > > > > If there is anything else I can provide please let me know... > > > > > > > > > > > > > > > > On Mon, Apr 28, 2008 at 9:08 AM, Lenni Madsen <l.madsen@...> wrote: > > > > Hi there > > > > Could you attach your wsdl file? It might be something fairly simple > > and therefore easy to overlook in the wsdl, I know I've missed small > > important stuff time and time again. > > > > > > [Fatal Error] :1:1040: 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>". > > > > This error comes when you're trying to use a wrong or incomplete > > EndpointReference. The error message is very generic. > > > > /Lenni > > > > > > -----Oprindelig meddelelse----- > > Fra: dulbirakan [mailto:iekanat@...] > > Sendt: 27. april 2008 23:19 > > Til: muse-user@... > > Emne: Re: trouble with WsnTestClient after new wsn-producer.war file > > > > > > > > I had the same problem, infact I still have it. > > > > I used muse 2.2.0's wsdl2java in ubuntu linux (7.10 and 8.04) both to > > no avail but it worked under windows XP in my advisors computer. > > > > First I change the binding in sample-wsn-producer.wsdl to point to my > > producer (wsn-srv) then I change the source of wsn-consumers test > > class to point to my producer. Then I issue wsdl2java command and > deploy services. > > I > > get the same error message you are getting (the one with HR). I also > > deployed one with default settings, it was a no go also. > > > > I issue: > > > > $ sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl > > sample-wsn-producer.wsdl -output wsn-srv/ -overwrite > > > > I get a : > > [: 38: cygwin: unexpected operator > > > > but everything seems to be in place and I run ant and copy the > > resulting war files to my tomcat webapps folder. These war files > > however, once deployed do not act as axis2 services. When I click on > > one in tomcat manager I see the following message instead of the usual > > > axis2 web interface: > > > > HTTP Status 500 - > > > > type Exception report > > > > message > > > > description The server encountered an internal error () that prevented > > > it from fulfilling this request. > > > > exception > > > > org.apache.jasper.JasperException: java.lang.NullPointerException > > > > > > > org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServle > tWra > > pper.java:522) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja > va:3 > > 56) > > > > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) > > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > > > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.ja > va:9 > > 68) > > > > org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78) > > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja > va:3 > > 74) > > > > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) > > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > root cause > > > > java.lang.NullPointerException > > > > > > > org.apache.jsp.axis2_002dweb.include.httpbase_jsp.jspInit(httpbase_jsp.j > ava: > > 22) > > org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:51) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper > .jav > > a:159) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja > va:3 > > 29) > > > > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) > > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > > > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.ja > va:9 > > 68) > > > > org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78) > > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja > va:3 > > 74) > > > > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) > > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > note The full stack trace of the root cause is available in the Apache > > Tomcat/6.0.16 logs. > > Apache Tomcat/6.0.16 > > > > > > I really would appreciate if it would just run under ubuntu. > > > > I guess the problem might be related to the cygwin problem I stated > > earlier. > > Does any one have any clue? > > > > > > dchou wrote: > > > > > > Hello, > > > > > > I am able to drop the sample wsn-producer.war and wsn-consumer.war > > > files into my Tomcat and they run fine when I run the WsnTestClient. > > > > However, when I do a wsdl2java build in the wsn-producer directory > > > then build a > > new > > > war using Ant. I get an error message with this newly created > > > wsn-producer.war. I have changed no code. Only performed wsdl2java > > > and ant. The steps and error I get when I run the WsnTestClient is > > > as > > follows: > > > > > > $wsdl2java -j2ee axis2 -overwrite -wsdl wsdl/WsResource.wsdl > > > > > > $ ant-1.6.5/bin/ant > > > > > > I then run the test client, WsnTestClient and get the following > output: > > > > > > [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://166.21.9.161:8080/ws > > <http://166.21.9.161:8080/wsn-producer/services/WsResource> > > n-producer/services/WsResource</wsa:To> > > > <wsa:Action > > > > > xmlns:wsa="http://www.w3.org/2005/08/addressing"> > > http://docs.oasis-open.org/ > > <http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeReq > > uest > > > > > wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action> > > > <wsa:MessageID > > > > > xmlns:wsa="http://www.w3.org/2005/08/addressing > > ">uuid:f6255f7a-9b73-1057-462 > > 0-a4ec2be5ff0a</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:Addres > > s> > > > </wsa:From> > > > </soap:Header> > > > <soap:Body> > > > <wsnt:Subscribe > xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"> > > > <wsnt:ConsumerReference> > > > <wsa:Address > > > > > xmlns:wsa="http://www.w3.org/2005/08/addressing"> > > http://166.21.9.175:8060/ws > > <http://166.21.9.175:8060/wsn-consumer/services/consumer> > > n-consumer/services/consumer</wsa:Address> > > > </wsnt:ConsumerReference> > > > </wsnt:Subscribe> > > > </soap:Body> > > > </soap:Envelope> > > > > > > [Fatal Error] :1:1040: 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(AbstractResourceClien > t.ja > > va:298) > > > at > > > > > > > > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien > t.ja > > va:254) > > > at > > > > > > > > org.apache.muse.ws.notification.remote.NotificationProducerClient.subscr > ibe( > > NotificationProducerClient.java:97) > > > at org.apache.muse.test.wsn.WsnTestClient.main(Unknown > > > Source) > > > > > > Does anyone have any idea what I am doing wrong? I have changed no > code. > > I > > > just wanted to try and build a new war with the method outlined in > > > the tutorial. Any help would be appreciated. > > > > > > Thanks, > > > Dave > > > > > > > -- > > View this message in context: > > > > > http://www.nabble.com/trouble-with-WsnTestClient-after-new-wsn-producer. > war- > > < > > > http://www.nabble.com/trouble-with-WsnTestClient-after-new-wsn-producer. > war > > > -file-tp10191599p16928534.html<http://www.nabble.com/trouble-with-WsnTes > tCli > ent-after-new-wsn-producer.war-file-tp10191599p16928534.html> > > > > > file-tp10191599p16928534.html > > Sent from the Muse User mailing list archive at Nabble.com. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: muse-user-unsubscribe@... > > For additional commands, e-mail: muse-user-help@... > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: muse-user-unsubscribe@... > > For additional commands, e-mail: muse-user-help@... > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: muse-user-unsubscribe@... > For additional commands, e-mail: muse-user-help@... > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: muse-user-unsubscribe@... > For additional commands, e-mail: muse-user-help@... > > |
|
|
RE: trouble with WsnTestClient after new wsn-producer.war fileCan you paste your muse.xml and services.xml configurations? I suspect
the problems are here. -----Original Message----- From: Irfan Emrah Kanat [mailto:iekanat@...] Sent: Monday, April 28, 2008 1:18 PM To: muse-user@... Subject: Re: trouble with WsnTestClient after new wsn-producer.war file Thanks, but my problem is a bit different. I can deploy the samples in ubuntu, no problem. But when I try to build the sample wsn producer from the wsdl file via wsdl2java provided with muse 2.2.0 in ubuntu I have some problems. I can build the same file in windows without any problems though... So I guess it is a linux specific problem. I am writing a tutorial for next years Web Services Class I am providing the last section which I have the problems so that you can see what steps I have taken so far... It is not completed yet... That is it about the environment, we now have the Muse to build our WSs and AXIS2 to deploy them. It would have been nice if we had Eclipse WTP in place but everything has its time. We will be using the samples from the tutorial and deploy the WS Notification producer and WS Notification consumer that come with Muse to test our environment. I assume you have a basic understanding of what a WSDL file describes, like the types, port types and bindings. * Get to the samples: The samples are in muse folder. "cd /opt/muse-2.2.0-bin/samples/j2ee" * First comes the producer: Let's build the producer first "cd /opt/muse-2.2.0-bin/samples/j2ee/wsn-producer" "sudo ant" You should see a 'BUILD SUCCESSFUL' and we should now have wsn-producer.war in build folder. Deploy the service into the container, Tomcat comes preconfigured to deploy any war files copied into its webapps folder. "sudo cp build/wsn-producer.war /opt/apache-tomcat-6.0.16/webapps/" Browse to the localhost:8080/manager to see if it is deployed, its display name should read 'Apache Muse Servlet'. Muse servlets have no interface to reach through your browser. * Now the consumer: Build the consumer "cd /opt/muse-2.2.0-bin/samples/j2ee/wsn-consumer" "sudo ant" Deploy the service into the container. "sudo cp build/wsn-consumer.war /opt/apache-tomcat-6.0.16/webapps/" Browse to the localhost:8080/manager to see if it is deployed. * Test: Run the command below to test the services you just deployed: "ant run -Dmain=org.apache.muse.test.wsn.WsnTestClient" The stdout should read: Buildfile: build.xml init: run: [java] [CLIENT TRACE] SOAP envelope contents (outgoing): [java] [java] <soap:Envelope xmlns:soap=" http://www.w3.org/2003/05/soap-envelope"> [java] <soap:Header> [java] <wsa:To xmlns:wsa=" http://www.w3.org/2005/08/addressing"> http://127.0.1.1:8080/wsn-producer/services/WsResource</wsa:To> [java] <wsa:Action xmlns:wsa=" http://www.w3.org/2005/08/addressing"> http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/ . . . [java] </soap:Body> [java] </soap:Envelope> [java] [java] [CLIENT TRACE] SOAP envelope contents (incoming): [java] [java] <soap:Envelope xmlns:soap=" http://www.w3.org/2003/05/soap-envelope"> [java] <soap:Header> [java] <wsa:To xmlns:wsa=" http://www.w3.org/2005/08/addressing"> http://www.w3.org/2005/08/addressing/role/anonymous</wsa:To> [java] <wsa:Action xmlns:wsa=" http://www.w3.org/2005/08/addressing"> http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/ . . . [java] </soap:Body> [java] </soap:Envelope> [java] BUILD SUCCESSFUL Total time: 4 seconds 13: First Cover Song In the previous section we tested our environment but did not use muse much. Now we will be covering the famous wsn-producer from the MUSE. This section will cover the use of wsdl2java tool and we will be editing some source code here as well. I used Apache Muse tutorial on http://ws.apache.org/muse/docs/2.2.0/tutorial/index.html it has some errors but is more detailed than this one here. * Get the sample WSDL file: Preparing a wsdl file is a tedious process, with only a text editor as tool it is a total nightmare, that is why we will be using the WSDL file provided in muse tutorial. We will test our environment with this sample WS. "cd ~" "wget http://ws.apache.org/muse/docs/2.2.0/tutorial/artifacts/sample-wsn-produ cer.wsdl " * Lets get this sample file to someplace cosy "cd Desktop" "mkdir samp" "cd samp" "cp ~/sample-wsn-producer ." * Generate the skeleton code We need war files that can be deployed into AXIS2 so we will stick with the J2EE. sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl sample-wsn-producer.wsdl Huh? What happened you say? Uh, I should have guessed... You see the wsdl file we placed there refers to other xml documents and the tool can't find them, so let's get them in place first. We don't have to look too hard as they are kindly provided with muse... "cp /opt/muse-2.2.0-bin/samples/j2ee/wsn-producer/wsdl/* ." We probably won't need all of them but it is simpler to just get them all in any case. Let's see what we have in the directory now: "ls" You should see a bunch of xsd and wsdl files, these should be the same with the files included in sample-wsn-producer.wsdl. We will create the server side of the code in a seperate folder, the name of the war file and thus the service will be same as the name of this folder. * At this point I must point to a critical issue; if you create your service in any folder except wsn-producer you should change the binding in WSDL file. Edit the sample-wsn-producer.wsdl: "gedit sample-wsn-producer.wsdl" At the very end of the file there is a binding that goes like <wsdl:port name="WsResourcePort" binding="tns:WsResourceBinding"> <wsdl-soap:address location=" http://localhost:8080/wsn-producer/services/WsResource" /> </wsdl:port> Replace the wsn-producer part with your directory address. I will use 'wsn-srv' as directory name so I would use: <wsdl:port name="WsResourcePort" binding="tns:WsResourceBinding"> <wsdl-soap:address location=" http://localhost:8080/wsn-srv/services/WsResource" /> </wsdl:port> * Let's create the server code. "mkdir wsn-srv" "sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl sample-wsn-producer.wsdl -output wsn-srv" !AT THIS POINT I AM GETTING A CYGWIN ERROR! There should be two folders (JavaSource and WebContent) and an build.xml file for ANT in wsn-srv directory now. Before running ANT we have a few stuff to clear though, the java files in JavaSource folder (yes I know there is a train of empty folders under those classes, that is the namespace URI defined in WSDL file) are only the skeleton classes and they need to be fleshed. At this stage I recommend you to see Apache Muse tutorial's Deployment Descriptor section to find out about the Resource URI: From what I found out my resource URI's context paths would be WsResource and SubscriptionManager. So the URI would be: "http://localhost:8080/wsn-srv/services/SubscriptionManager" * Get to Coding As I have been mentioning for a while we have to inject the business logic to the skeleton classes. Muse can only help us so far to generate the code, but it will help us once more in packaging the code before this tutorial is through. Muse samples already include the code we need to implement, so if you want to have a look just browse to the samples folder under the muse deployment and have a look at the source of wsn-producer. In my setup the address was "/opt/muse-2.2.0-bin/samples/j2ee/wsn-producer/src/org/apache/ws/muse/te st/wsrf/" "sudo gedit ~/Desktop/samp/wsn-srv/JavaSource/org/apache/ws/muse/test/wsrf/MyCapabil ity.java" In the end my source code ended up something like: // // MyCapability.java // Tue Apr 22 16:45:01 EEST 2008 // Generated by the Apache Muse Code Generation Tool // package org.apache.ws.muse.test.wsrf; import javax.xml.namespace.QName; import org.w3c.dom.Element; import org.apache.muse.util.xml.XmlUtils; import org.apache.muse.ws.addressing.soap.SoapFault; import org.apache.muse.ws.notification.NotificationProducer; import org.apache.muse.ws.notification.WsnConstants; import org.apache.muse.ws.resource.impl.AbstractWsResourceCapability; public class MyCapability extends AbstractWsResourceCapability implements IMyCapability { 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); public QName[] getPropertyNames() { return _PROPERTIES; } // You can assign any value you may want to the two variables below. private int _MessageInterval = 10; private String _ServerName = "muse-test.apache.org"; 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); Thread producer = new Thread() { public void run() { // // for this example, reuse one payload for every notification // QName messageName = new QName(NAMESPACE_URI, "MyMessage", PREFIX); String message = "This is a message from " + getServerName(); Element payload = XmlUtils.createElement(messageName, message); while (true) { try { // // read current value - property is mutable // int currentInterval = getMessageInterval(); getLog().info("Waiting " + currentInterval + " seconds before sending message..."); Thread.currentThread().sleep(currentInterval * 1000); // // use WSN capability to send message to any subscribers // getLog().info("Sending message to consumers..."); wsn.publish(_TOPIC_NAME, payload); } catch (Throwable error) { error.printStackTrace(); } } } }; producer.start(); } } It is almost identical to the source code given with muse. * Wrap it up We will use Apache Ant tool once more to create our war package. "cd ~/Desktop/samp/wsn-srv/" "sudo ant" * Deploy it You can either deploy the service through web interface of your server or through command line. If you choose to deploy it through web interface just make sure the server is running. "sudo cp wsn-srv.war /opt/apache-tomcat-6.0.16/webapps" THE SERVICE IS NOT DEPLOYED CORRECTLY I AM GETTING A HTTP STATUS 500 ERROR On Mon, Apr 28, 2008 at 11:03 PM, Vinh Nguyen (vinguye2) <vinguye2@...> wrote: > Hi, > I just redeployed the Muse 2.2.0 wsn-consumer and wsn-producer samples > to a local Tomcat 5.5 server on Windows XP. Then I ran the > WsnTestClient in wsn-consumer. Everything works fine for me, and > notifictions are being received properly every 10 seconds. > > You shouldn't need to modify anything since the samples should be > runnable "out of the box". > > Here's the steps to reproduce the test > 1) In the wsn-producer project, do "ant". > Then manually deploy the wsn-producer.war to C:\tomcat\webapps\ > 2) In the wsn-consumer project, do "ant". > Then manually deploy the wsn-consumer.war to C:\tomcat\webapps\ > 3) Start your Tomcat. > 4) In the wsn-consumer project, do "ant > -Dmain=org.apache.muse.test.wsn.WsnTestClient run". > The console should show the SOAP trace for the Subscribe > request/response. > 5) Check for notifications in > C:\tomcat\webapps\wsn-consumer\WEB-INF\classes\log\muse.log > > Hope this helps... > -Vinh > > > -----Original Message----- > From: Lenni Madsen [mailto:l.madsen@...] > Sent: Monday, April 28, 2008 6:51 AM > To: muse-user@... > Subject: SV: trouble with WsnTestClient after new wsn-producer.war > file > > Hmm... this issue warrants a bit more exploring from my side, for some > reason I seem to have problems with the subscription manager for > muse-2.3.0-2008-04-07-02-00-bin, it keeps reporting: > > [Fatal Error] :12:184: 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(AbstractResourceCli > en > t.ja > va:298) > at > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceCli > en > t.ja > va:254) > at > org.apache.muse.ws.notification.remote.NotificationProducerClient.subs > cr > ibe( > NotificationProducerClient.java:97) > at > org.apache.muse.test.wsn.WsnTestClient.main(WsnTestClient.java:79) > > yet the subscription mechanism seems to work: > > *#*# message accepted #*#* > 2008-04-28 15:47:28 > org.apache.muse.test.wsn.impl.ConsumerCapabilityImpl > process > > INFO: Received message: > > <wsnt:NotificationMessage > xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" > xmlns:muse-wsa="http://ws.apache.org/muse/addressing" > xmlns:tns="http://ws.apache.org/muse/test/wsrf" > xmlns:wsa="http://www.w3.org > /2005/08/addressing"> > <wsnt:SubscriptionReference> > <wsa:Address > xmlns:wsa="http://www.w3.org/2005/08/addressing">http://10. > 0.19.16:8080/wsn-producer/services/SubscriptionManager</wsa:Address> > <wsa:ReferenceParameters > xmlns:wsa="http://www.w3.org/2005/08/addressing > "> > <muse-wsa:ResourceId > xmlns:muse-wsa="http://ws.apache.org/muse/addre > ssing">MuseResource-1</muse-wsa:ResourceId> > </wsa:ReferenceParameters> > </wsnt:SubscriptionReference> > <wsnt:Topic > > Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete" > xm > <wsnt:ProducerReference> > <wsa:ReferenceParameters > xmlns:wsa="http://www.w3.org/2005/08/addressing > "/> > <wsa:Address > xmlns:wsa="http://www.w3.org/2005/08/addressing">http://10. > 0.19.16:8080/wsn-producer/services/WsResource</wsa:Address> > </wsnt:ProducerReference> > <wsnt:Message> > <tns:MyMessage > xmlns:tns="http://ws.apache.org/muse/test/wsrf">This > is a > message from muse-test.apache.org</tns:MyMessage> > </wsnt:Message> > </wsnt:NotificationMessage> > > [Fatal Error] :12:184: The element type "HR" must be terminated by the > matching end-tag "</HR>". > 2008-04-28 15:47:29 org.apache.muse.util.LoggingUtils logError > INFO: There was an error while processing a request: > > The element type "HR" must be terminated by the matching end-tag > "</HR>". > > > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceCli > en > t.java:298) > > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceCli > en > t.java:254) > > org.apache.muse.ws.notification.remote.NotificationConsumerClient.noti > fy > (NotificationConsumerClient.java:99) > > org.apache.muse.ws.notification.impl.SimpleSubscriptionManager.publish > (S > impleSubscriptionManager.java:267) > > org.apache.muse.ws.notification.impl.SimpleNotificationProducer.publis > h( > SimpleNotificationProducer.java:525) > > org.apache.muse.ws.notification.impl.SimpleNotificationProducer.publis > h( > SimpleNotificationProducer.java:500) > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1.run(MyCapabilityImpl.j > av > a:104) > > ------------------------------------------ > > I think I need to revert to a earlier version of my setup to make sure > that it's not just a fault in my setup. > > FYI: if you use tomcat 6.0.16 you'll run into some warnings regarding > listeners already registered > http://forum.springframework.org/showthread.php?p=175433 > > > -----Oprindelig meddelelse----- > Fra: Irfan Emrah Kanat [mailto:iekanat@...] > Sendt: 28. april 2008 11:48 > Til: muse-user@... > Emne: Re: trouble with WsnTestClient after new wsn-producer.war file > > Thanks for your prompt reply Mr. Madsen > > The below approach does not fit me as I modified the MyCapability.java > as given below: > > // > // MyCapability.java > // Tue Apr 22 16:45:01 EEST 2008 > // Generated by the Apache Muse Code Generation Tool > // > package org.apache.ws.muse.test.wsrf; > > import javax.xml.namespace.QName; > > import org.w3c.dom.Element; > > import org.apache.muse.util.xml.XmlUtils; > import org.apache.muse.ws.addressing.soap.SoapFault; > import org.apache.muse.ws.notification.NotificationProducer; > import org.apache.muse.ws.notification.WsnConstants; > import > org.apache.muse.ws.resource.impl.AbstractWsResourceCapability; > > public class MyCapability extends AbstractWsResourceCapability > implements IMyCapability > { > 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); > > public QName[] getPropertyNames() > { > return _PROPERTIES; > } > > // You can assign any value you may want to the two variables > private int _MessageInterval = 10; > > private String _ServerName = "muse-test.apache.org"; > > 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.PRODUCE > R_ > URI) > ; > > wsn.addTopic(_TOPIC_NAME); > > Thread producer = new Thread() { > public void run() > { > // > // for this example, reuse one payload for every > notification > // > QName messageName = new QName(NAMESPACE_URI, > "MyMessage", PREFIX); > String message = "This is a message from " + > getServerName(); > Element payload = > XmlUtils.createElement(messageName, > message); > > while (true) > { > try > { > // > // read current value - property is mutable > // > int currentInterval = getMessageInterval(); > > getLog().info("Waiting " + currentInterval > + " > seconds before sending message..."); > > Thread.currentThread().sleep(currentInterval > * 1000); > > // > // use WSN capability to send message to > any subscribers > // > getLog().info("Sending message to > consumers..."); > wsn.publish(_TOPIC_NAME, payload); > } > > catch (Throwable error) > { > error.printStackTrace(); > } > } > } > }; > producer.start(); > } > } > > It is almost identical to the source code given with muse. > > On Mon, Apr 28, 2008 at 12:43 PM, Lenni Madsen <l.madsen@...> > > > A thing just occurred to me, the people affected by this issue seems > > to follow the following approach (please correct me when/if I'm > > wrong, > > > I'll assume this is correctly understood until further notice): > > > > > > > > 1) wsdl2java is called on one or more wsdl's from the sample-wsn > > project > > > > 2) no code is edited after wsdl2java is called (no files are > copied > > to > > the project after wsdl2java is called either) > > > > 3) the war file is deployed > > > > 4) the project experiences one or more errors > > > > > > > > from my past experiences with the sample-wsn project and indeed any > > further development issues I have had with wsn, one needs to make > > sure > > > that the generated code is edited to be up to spec, for one thing > > some > > > important wsn-producer code is not put in the MyCapability.java > > (might > > > have another name if you're using the more advance naming options) > > initialize function. > > > > > > > > *** what you get *** > > > > public void initialize() throws SoapFault > > > > { > > > > // > > > > //The following call is necessary to property initialize the > > resource > > > > // > > > > super.initialize(); > > > > > > > > // > > > > //TODO perform intitialization of the following non-primitive > > properties > > > > // > > > > // ServerName > > > > // > > > > > > > > throw new RuntimeException("User needs to update > > initialization > > > code"); > > > > } > > > > > > > > *** what you need for the sample-wsn *** > > > > public void initialize() throws SoapFault > > > > { > > > > // > > > > //The following call is necessary to property initialize the > > resource > > > > // > > > > super.initialize(); > > > > > > > > // > > > > //TODO perform intitialization of the following non-primitive > > properties > > > > // > > > > // ServerName > > > > // > > > > > > > > // throw new RuntimeException("User needs to update > initialization > > code"); > > > > _ServerName = "sample-wsn-producer"; > > > > wsn = > > > > > (NotificationProducer)getResource().getCapability(WsnConstants.PRODUCE > R_ > URI) > > ; > > > > // move this code below to a function if you wish to use it > > when called and not continuously > > > > QName topicName = new > > QName("http://example.com/server-product", > > "ServerUpdates"); > > > > wsn.addTopic(topicName); > > > > QName messageName = new > > QName("http://example.com/server-product", > > "UpdateMessage"); > > > > String updateMessage = "Something important happened!"; > > > > Element payload = XmlUtils.createElement(messageName, > > updateMessage); > > > > wsn.publish(topicName, payload); > > > > } > > > > > > > > Not sure if it helps at all, but at least it closes one possible > > issue > > > related to starting up the application and initialization of the > producer. > > > > > > > > Mr. Kanat, please don't worry about replying to the mail group > > message > > > it's here for questions and debate regarding the use of the Muse > > framework and I find I learn new things every time I have a look at > > other peoples issues with Muse. sometimes a solution for a problems > > ends up enhancing my own projects. > > > > > > > > /Lenni > > > > _____ > > > > Fra: Irfan Emrah Kanat [mailto:iekanat@...] > > Sendt: 28. april 2008 10:56 > > Til: muse-user@... > > Emne: Re: trouble with WsnTestClient after new wsn-producer.war file > > > > > > > > I am not sure if this is the right way to reply to a mail group > > message but it is my first time so forgive me just this once. > > > > I set the binding in wsdl file as I stated earlier but here, I am > > attaching my wsdl file here. > > > > There is also another problem. I guess Mr. Nguyen is right as my app > > does not seem to be starting up. As I posted in my previous post, I > > build it as an axis2 app. but in tomcat manager I can not see the > > usual web interface of axis2. I get an HTTP Status 500 error. It > > seems > > > to me that my app is not built correctly. The fact that I am getting > > a > > > cygwin error alleviates my belief. > > > > Here is the command I issue and the error message I get: > > > > dulbirakan@chibi:~/Desktop/samp$ sudo sh > > /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl > > sample-wsn-producer.wsdl -output wsn-srv/ -overwrite > > [: 38: cygwin: unexpected operator > > dulbirakan@chibi:~/Desktop/samp$ > > > > If there is anything else I can provide please let me know... > > > > > > > > > > > > > > > > On Mon, Apr 28, 2008 at 9:08 AM, Lenni Madsen <l.madsen@...> > > > > Hi there > > > > Could you attach your wsdl file? It might be something fairly simple > > and therefore easy to overlook in the wsdl, I know I've missed small > > important stuff time and time again. > > > > > > [Fatal Error] :1:1040: 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>". > > > > This error comes when you're trying to use a wrong or incomplete > > EndpointReference. The error message is very generic. > > > > /Lenni > > > > > > -----Oprindelig meddelelse----- > > Fra: dulbirakan [mailto:iekanat@...] > > Sendt: 27. april 2008 23:19 > > Til: muse-user@... > > Emne: Re: trouble with WsnTestClient after new wsn-producer.war file > > > > > > > > I had the same problem, infact I still have it. > > > > I used muse 2.2.0's wsdl2java in ubuntu linux (7.10 and 8.04) both > > to no avail but it worked under windows XP in my advisors computer. > > > > First I change the binding in sample-wsn-producer.wsdl to point to > > my producer (wsn-srv) then I change the source of wsn-consumers test > > class to point to my producer. Then I issue wsdl2java command and > deploy services. > > I > > get the same error message you are getting (the one with HR). I also > > deployed one with default settings, it was a no go also. > > > > I issue: > > > > $ sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl > > sample-wsn-producer.wsdl -output wsn-srv/ -overwrite > > > > I get a : > > [: 38: cygwin: unexpected operator > > > > but everything seems to be in place and I run ant and copy the > > resulting war files to my tomcat webapps folder. These war files > > however, once deployed do not act as axis2 services. When I click on > > one in tomcat manager I see the following message instead of the > > usual > > > axis2 web interface: > > > > HTTP Status 500 - > > > > type Exception report > > > > message > > > > description The server encountered an internal error () that > > prevented > > > it from fulfilling this request. > > > > exception > > > > org.apache.jasper.JasperException: java.lang.NullPointerException > > > > > > > org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServ > le > tWra > > pper.java:522) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper. > ja > va:3 > > 56) > > > > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:33 > 7) > > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > > > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary. > ja > va:9 > > 68) > > > > org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78 > > ) > > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper. > ja > va:3 > > 74) > > > > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:33 > 7) > > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > root cause > > > > java.lang.NullPointerException > > > > > > > org.apache.jsp.axis2_002dweb.include.httpbase_jsp.jspInit(httpbase_jsp > .j > ava: > > 22) > > > > org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:51) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapp > er > .jav > > a:159) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper. > ja > va:3 > > 29) > > > > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:33 > 7) > > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > > > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary. > ja > va:9 > > 68) > > > > org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78 > > ) > > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper. > ja > va:3 > > 74) > > > > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:33 > 7) > > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > note The full stack trace of the root cause is available in the > > Apache > > Tomcat/6.0.16 logs. > > Apache Tomcat/6.0.16 > > > > > > I really would appreciate if it would just run under ubuntu. > > > > I guess the problem might be related to the cygwin problem I stated > > earlier. > > Does any one have any clue? > > > > > > dchou wrote: > > > > > > Hello, > > > > > > I am able to drop the sample wsn-producer.war and wsn-consumer.war > > > files into my Tomcat and they run fine when I run the WsnTestClient. > > > > However, when I do a wsdl2java build in the wsn-producer directory > > > then build a > > new > > > war using Ant. I get an error message with this newly created > > > wsn-producer.war. I have changed no code. Only performed wsdl2java > > > and ant. The steps and error I get when I run the WsnTestClient is > > > as > > follows: > > > > > > $wsdl2java -j2ee axis2 -overwrite -wsdl wsdl/WsResource.wsdl > > > > > > $ ant-1.6.5/bin/ant > > > > > > I then run the test client, WsnTestClient and get the following > output: > > > > > > [CLIENT TRACE] SOAP envelope contents (outgoing): > > > > > > <soap:Envelope > > > <soap:Header> > > > <wsa:To > > > > > xmlns:wsa="http://www.w3.org/2005/08/addressing"> > > http://166.21.9.161:8080/ws > > <http://166.21.9.161:8080/wsn-producer/services/WsResource> > > n-producer/services/WsResource</wsa:To> > > > <wsa:Action > > > > > xmlns:wsa="http://www.w3.org/2005/08/addressing"> > > http://docs.oasis-open.org/ > > <http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeR > > eq > > uest > > > > > wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action> > > > <wsa:MessageID > > > > > xmlns:wsa="http://www.w3.org/2005/08/addressing > > ">uuid:f6255f7a-9b73-1057-462 > > 0-a4ec2be5ff0a</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:Addres > > s> > > > </wsa:From> > > > </soap:Header> > > > <soap:Body> > > > <wsnt:Subscribe > xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"> > > > <wsnt:ConsumerReference> > > > <wsa:Address > > > > > xmlns:wsa="http://www.w3.org/2005/08/addressing"> > > http://166.21.9.175:8060/ws > > <http://166.21.9.175:8060/wsn-consumer/services/consumer> > > n-consumer/services/consumer</wsa:Address> > > > </wsnt:ConsumerReference> > > > </wsnt:Subscribe> > > > </soap:Body> > > > </soap:Envelope> > > > > > > [Fatal Error] :1:1040: 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(AbstractResourceCli > en > t.ja > > va:298) > > > at > > > > > > > > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceCli > en > t.ja > > va:254) > > > at > > > > > > > > org.apache.muse.ws.notification.remote.NotificationProducerClient.subs > cr > ibe( > > NotificationProducerClient.java:97) > > > at org.apache.muse.test.wsn.WsnTestClient.main(Unknown > > > Source) > > > > > > Does anyone have any idea what I am doing wrong? I have changed no > code. > > I > > > just wanted to try and build a new war with the method outlined in > > > the tutorial. Any help would be appreciated. > > > > > > Thanks, > > > Dave > > > > > > > -- > > View this message in context: > > > > > > war- > > < > > > http://www.nabble.com/trouble-with-WsnTestClient-after-new-wsn-producer. > war > > > -file-tp10191599p16928534.html<http://www.nabble.com/trouble-with-WsnT > es > tCli > ent-after-new-wsn-producer.war-file-tp10191599p16928534.html> > > > > > file-tp10191599p16928534.html > > Sent from the Muse User mailing list archive at Nabble.com. > > > > > > -------------------------------------------------------------------- > > - To unsubscribe, e-mail: muse-user-unsubscribe@... > > For additional commands, e-mail: muse-user-help@... > > > > > > > > -------------------------------------------------------------------- > > - To unsubscribe, e-mail: muse-user-unsubscribe@... > > For additional commands, e-mail: muse-user-help@... > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: muse-user-unsubscribe@... > For additional commands, e-mail: muse-user-help@... > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: muse-user-unsubscribe@... > For additional commands, e-mail: muse-user-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: muse-user-unsubscribe@... For additional commands, e-mail: muse-user-help@... |
|
|
RE: trouble with WsnTestClient after new wsn-producer.war fileIf you ran wsdl2java on your sample-wsn-producer.wsdl and deployed the
generated muse.xml as-is, that's probably why you're getting errors. For example, the Tomcat logs would show this during initialization/testing: java.lang.RuntimeException: [ID = 'IncorrectCapabilityRoot'] org.apache.ws.muse.test.wsrf.MyCapability does not implement org.apache.muse.core.Capability, which is a required interface for all capability classes. at org.apache.muse.core.descriptor.CapabilityDefinition.setImplementationCl ass(CapabilityDefinition.java:110) at org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.load(SimpleCa pabilityDescriptor.java:104) at org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabilit yDefinitions(SimpleResourceDescriptor.java:99) at org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleReso urceDescriptor.java:401) at org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResourc eDefinitions(SimpleDeploymentDescriptor.java:78) at org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleDe ploymentDescriptor.java:177) at org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstract IsolationLayer.java:152) at org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Mini Servlet.java:55) at org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:6 9) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:252) ... You need to manually review and update the generated muse.xml first: 1) In the WsResource definition, change the <wsdl-file> value to "wsdl/sample-wsn-producer.wsdl". 2) Change the capability reference from MyCapability to MyCapabilityImpl. 3) In the SubscriptionManager definition, change the <wsdl-file> value to "wsdl/WS-BaseNotification-1_3.wsdl". Redeploy and test, and everything should be fine now. -Vinh -----Original Message----- From: Vinh Nguyen (vinguye2) Sent: Monday, April 28, 2008 1:43 PM To: muse-user@... Subject: RE: trouble with WsnTestClient after new wsn-producer.war file Can you paste your muse.xml and services.xml configurations? I suspect the problems are here. -----Original Message----- From: Irfan Emrah Kanat [mailto:iekanat@...] Sent: Monday, April 28, 2008 1:18 PM To: muse-user@... Subject: Re: trouble with WsnTestClient after new wsn-producer.war file Thanks, but my problem is a bit different. I can deploy the samples in ubuntu, no problem. But when I try to build the sample wsn producer from the wsdl file via wsdl2java provided with muse 2.2.0 in ubuntu I have some problems. I can build the same file in windows without any problems though... So I guess it is a linux specific problem. I am writing a tutorial for next years Web Services Class I am providing the last section which I have the problems so that you can see what steps I have taken so far... It is not completed yet... That is it about the environment, we now have the Muse to build our WSs and AXIS2 to deploy them. It would have been nice if we had Eclipse WTP in place but everything has its time. We will be using the samples from the tutorial and deploy the WS Notification producer and WS Notification consumer that come with Muse to test our environment. I assume you have a basic understanding of what a WSDL file describes, like the types, port types and bindings. * Get to the samples: The samples are in muse folder. "cd /opt/muse-2.2.0-bin/samples/j2ee" * First comes the producer: Let's build the producer first "cd /opt/muse-2.2.0-bin/samples/j2ee/wsn-producer" "sudo ant" You should see a 'BUILD SUCCESSFUL' and we should now have wsn-producer.war in build folder. Deploy the service into the container, Tomcat comes preconfigured to deploy any war files copied into its webapps folder. "sudo cp build/wsn-producer.war /opt/apache-tomcat-6.0.16/webapps/" Browse to the localhost:8080/manager to see if it is deployed, its display name should read 'Apache Muse Servlet'. Muse servlets have no interface to reach through your browser. * Now the consumer: Build the consumer "cd /opt/muse-2.2.0-bin/samples/j2ee/wsn-consumer" "sudo ant" Deploy the service into the container. "sudo cp build/wsn-consumer.war /opt/apache-tomcat-6.0.16/webapps/" Browse to the localhost:8080/manager to see if it is deployed. * Test: Run the command below to test the services you just deployed: "ant run -Dmain=org.apache.muse.test.wsn.WsnTestClient" The stdout should read: Buildfile: build.xml init: run: [java] [CLIENT TRACE] SOAP envelope contents (outgoing): [java] [java] <soap:Envelope xmlns:soap=" http://www.w3.org/2003/05/soap-envelope"> [java] <soap:Header> [java] <wsa:To xmlns:wsa=" http://www.w3.org/2005/08/addressing"> http://127.0.1.1:8080/wsn-producer/services/WsResource</wsa:To> [java] <wsa:Action xmlns:wsa=" http://www.w3.org/2005/08/addressing"> http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/ . . . [java] </soap:Body> [java] </soap:Envelope> [java] [java] [CLIENT TRACE] SOAP envelope contents (incoming): [java] [java] <soap:Envelope xmlns:soap=" http://www.w3.org/2003/05/soap-envelope"> [java] <soap:Header> [java] <wsa:To xmlns:wsa=" http://www.w3.org/2005/08/addressing"> http://www.w3.org/2005/08/addressing/role/anonymous</wsa:To> [java] <wsa:Action xmlns:wsa=" http://www.w3.org/2005/08/addressing"> http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/ . . . [java] </soap:Body> [java] </soap:Envelope> [java] BUILD SUCCESSFUL Total time: 4 seconds 13: First Cover Song In the previous section we tested our environment but did not use muse much. Now we will be covering the famous wsn-producer from the MUSE. This section will cover the use of wsdl2java tool and we will be editing some source code here as well. I used Apache Muse tutorial on http://ws.apache.org/muse/docs/2.2.0/tutorial/index.html it has some errors but is more detailed than this one here. * Get the sample WSDL file: Preparing a wsdl file is a tedious process, with only a text editor as tool it is a total nightmare, that is why we will be using the WSDL file provided in muse tutorial. We will test our environment with this sample WS. "cd ~" "wget http://ws.apache.org/muse/docs/2.2.0/tutorial/artifacts/sample-wsn-produ cer.wsdl " * Lets get this sample file to someplace cosy "cd Desktop" "mkdir samp" "cd samp" "cp ~/sample-wsn-producer ." * Generate the skeleton code We need war files that can be deployed into AXIS2 so we will stick with the J2EE. sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl sample-wsn-producer.wsdl Huh? What happened you say? Uh, I should have guessed... You see the wsdl file we placed there refers to other xml documents and the tool can't find them, so let's get them in place first. We don't have to look too hard as they are kindly provided with muse... "cp /opt/muse-2.2.0-bin/samples/j2ee/wsn-producer/wsdl/* ." We probably won't need all of them but it is simpler to just get them all in any case. Let's see what we have in the directory now: "ls" You should see a bunch of xsd and wsdl files, these should be the same with the files included in sample-wsn-producer.wsdl. We will create the server side of the code in a seperate folder, the name of the war file and thus the service will be same as the name of this folder. * At this point I must point to a critical issue; if you create your service in any folder except wsn-producer you should change the binding in WSDL file. Edit the sample-wsn-producer.wsdl: "gedit sample-wsn-producer.wsdl" At the very end of the file there is a binding that goes like <wsdl:port name="WsResourcePort" binding="tns:WsResourceBinding"> <wsdl-soap:address location=" http://localhost:8080/wsn-producer/services/WsResource" /> </wsdl:port> Replace the wsn-producer part with your directory address. I will use 'wsn-srv' as directory name so I would use: <wsdl:port name="WsResourcePort" binding="tns:WsResourceBinding"> <wsdl-soap:address location=" http://localhost:8080/wsn-srv/services/WsResource" /> </wsdl:port> * Let's create the server code. "mkdir wsn-srv" "sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl sample-wsn-producer.wsdl -output wsn-srv" !AT THIS POINT I AM GETTING A CYGWIN ERROR! There should be two folders (JavaSource and WebContent) and an build.xml file for ANT in wsn-srv directory now. Before running ANT we have a few stuff to clear though, the java files in JavaSource folder (yes I know there is a train of empty folders under those classes, that is the namespace URI defined in WSDL file) are only the skeleton classes and they need to be fleshed. At this stage I recommend you to see Apache Muse tutorial's Deployment Descriptor section to find out about the Resource URI: From what I found out my resource URI's context paths would be WsResource and SubscriptionManager. So the URI would be: "http://localhost:8080/wsn-srv/services/SubscriptionManager" * Get to Coding As I have been mentioning for a while we have to inject the business logic to the skeleton classes. Muse can only help us so far to generate the code, but it will help us once more in packaging the code before this tutorial is through. Muse samples already include the code we need to implement, so if you want to have a look just browse to the samples folder under the muse deployment and have a look at the source of wsn-producer. In my setup the address was "/opt/muse-2.2.0-bin/samples/j2ee/wsn-producer/src/org/apache/ws/muse/te st/wsrf/" "sudo gedit ~/Desktop/samp/wsn-srv/JavaSource/org/apache/ws/muse/test/wsrf/MyCapabil ity.java" In the end my source code ended up something like: // // MyCapability.java // Tue Apr 22 16:45:01 EEST 2008 // Generated by the Apache Muse Code Generation Tool // package org.apache.ws.muse.test.wsrf; import javax.xml.namespace.QName; import org.w3c.dom.Element; import org.apache.muse.util.xml.XmlUtils; import org.apache.muse.ws.addressing.soap.SoapFault; import org.apache.muse.ws.notification.NotificationProducer; import org.apache.muse.ws.notification.WsnConstants; import org.apache.muse.ws.resource.impl.AbstractWsResourceCapability; public class MyCapability extends AbstractWsResourceCapability implements IMyCapability { 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); public QName[] getPropertyNames() { return _PROPERTIES; } // You can assign any value you may want to the two variables below. private int _MessageInterval = 10; private String _ServerName = "muse-test.apache.org"; 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); Thread producer = new Thread() { public void run() { // // for this example, reuse one payload for every notification // QName messageName = new QName(NAMESPACE_URI, "MyMessage", PREFIX); String message = "This is a message from " + getServerName(); Element payload = XmlUtils.createElement(messageName, message); while (true) { try { // // read current value - property is mutable // int currentInterval = getMessageInterval(); getLog().info("Waiting " + currentInterval + " seconds before sending message..."); Thread.currentThread().sleep(currentInterval * 1000); // // use WSN capability to send message to any subscribers // getLog().info("Sending message to consumers..."); wsn.publish(_TOPIC_NAME, payload); } catch (Throwable error) { error.printStackTrace(); } } } }; producer.start(); } } It is almost identical to the source code given with muse. * Wrap it up We will use Apache Ant tool once more to create our war package. "cd ~/Desktop/samp/wsn-srv/" "sudo ant" * Deploy it You can either deploy the service through web interface of your server or through command line. If you choose to deploy it through web interface just make sure the server is running. "sudo cp wsn-srv.war /opt/apache-tomcat-6.0.16/webapps" THE SERVICE IS NOT DEPLOYED CORRECTLY I AM GETTING A HTTP STATUS 500 ERROR On Mon, Apr 28, 2008 at 11:03 PM, Vinh Nguyen (vinguye2) <vinguye2@...> wrote: > Hi, > I just redeployed the Muse 2.2.0 wsn-consumer and wsn-producer samples > to a local Tomcat 5.5 server on Windows XP. Then I ran the > WsnTestClient in wsn-consumer. Everything works fine for me, and > notifictions are being received properly every 10 seconds. > > You shouldn't need to modify anything since the samples should be > runnable "out of the box". > > Here's the steps to reproduce the test > 1) In the wsn-producer project, do "ant". > Then manually deploy the wsn-producer.war to C:\tomcat\webapps\ > 2) In the wsn-consumer project, do "ant". > Then manually deploy the wsn-consumer.war to C:\tomcat\webapps\ > 3) Start your Tomcat. > 4) In the wsn-consumer project, do "ant > -Dmain=org.apache.muse.test.wsn.WsnTestClient run". > The console should show the SOAP trace for the Subscribe > request/response. > 5) Check for notifications in > C:\tomcat\webapps\wsn-consumer\WEB-INF\classes\log\muse.log > > Hope this helps... > -Vinh > > > -----Original Message----- > From: Lenni Madsen [mailto:l.madsen@...] > Sent: Monday, April 28, 2008 6:51 AM > To: muse-user@... > Subject: SV: trouble with WsnTestClient after new wsn-producer.war > file > > Hmm... this issue warrants a bit more exploring from my side, for some > reason I seem to have problems with the subscription manager for > muse-2.3.0-2008-04-07-02-00-bin, it keeps reporting: > > [Fatal Error] :12:184: 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(AbstractResourceCli > en > t.ja > va:298) > at > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceCli > en > t.ja > va:254) > at > org.apache.muse.ws.notification.remote.NotificationProducerClient.subs > cr > ibe( > NotificationProducerClient.java:97) > at > org.apache.muse.test.wsn.WsnTestClient.main(WsnTestClient.java:79) > > yet the subscription mechanism seems to work: > > *#*# message accepted #*#* > 2008-04-28 15:47:28 > org.apache.muse.test.wsn.impl.ConsumerCapabilityImpl > process > > INFO: Received message: > > <wsnt:NotificationMessage > xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" > xmlns:muse-wsa="http://ws.apache.org/muse/addressing" > xmlns:tns="http://ws.apache.org/muse/test/wsrf" > xmlns:wsa="http://www.w3.org > /2005/08/addressing"> > <wsnt:SubscriptionReference> > <wsa:Address > xmlns:wsa="http://www.w3.org/2005/08/addressing">http://10. > 0.19.16:8080/wsn-producer/services/SubscriptionManager</wsa:Address> > <wsa:ReferenceParameters > xmlns:wsa="http://www.w3.org/2005/08/addressing > "> > <muse-wsa:ResourceId > xmlns:muse-wsa="http://ws.apache.org/muse/addre > ssing">MuseResource-1</muse-wsa:ResourceId> > </wsa:ReferenceParameters> > </wsnt:SubscriptionReference> > <wsnt:Topic > > Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete" > xm > <wsnt:ProducerReference> > <wsa:ReferenceParameters > xmlns:wsa="http://www.w3.org/2005/08/addressing > "/> > <wsa:Address > xmlns:wsa="http://www.w3.org/2005/08/addressing">http://10. > 0.19.16:8080/wsn-producer/services/WsResource</wsa:Address> > </wsnt:ProducerReference> > <wsnt:Message> > <tns:MyMessage > xmlns:tns="http://ws.apache.org/muse/test/wsrf">This > is a > message from muse-test.apache.org</tns:MyMessage> > </wsnt:Message> > </wsnt:NotificationMessage> > > [Fatal Error] :12:184: The element type "HR" must be terminated by the > matching end-tag "</HR>". > 2008-04-28 15:47:29 org.apache.muse.util.LoggingUtils logError > INFO: There was an error while processing a request: > > The element type "HR" must be terminated by the matching end-tag > "</HR>". > > > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceCli > en > t.java:298) > > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceCli > en > t.java:254) > > org.apache.muse.ws.notification.remote.NotificationConsumerClient.noti > fy > (NotificationConsumerClient.java:99) > > org.apache.muse.ws.notification.impl.SimpleSubscriptionManager.publish > (S > impleSubscriptionManager.java:267) > > org.apache.muse.ws.notification.impl.SimpleNotificationProducer.publis > h( > SimpleNotificationProducer.java:525) > > org.apache.muse.ws.notification.impl.SimpleNotificationProducer.publis > h( > SimpleNotificationProducer.java:500) > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1.run(MyCapabilityImpl.j > av > a:104) > > ------------------------------------------ > > I think I need to revert to a earlier version of my setup to make sure > that it's not just a fault in my setup. > > FYI: if you use tomcat 6.0.16 you'll run into some warnings regarding > listeners already registered > http://forum.springframework.org/showthread.php?p=175433 > > > -----Oprindelig meddelelse----- > Fra: Irfan Emrah Kanat [mailto:iekanat@...] > Sendt: 28. april 2008 11:48 > Til: muse-user@... > Emne: Re: trouble with WsnTestClient after new wsn-producer.war file > > Thanks for your prompt reply Mr. Madsen > > The below approach does not fit me as I modified the MyCapability.java > as given below: > > // > // MyCapability.java > // Tue Apr 22 16:45:01 EEST 2008 > // Generated by the Apache Muse Code Generation Tool > // > package org.apache.ws.muse.test.wsrf; > > import javax.xml.namespace.QName; > > import org.w3c.dom.Element; > > import org.apache.muse.util.xml.XmlUtils; > import org.apache.muse.ws.addressing.soap.SoapFault; > import org.apache.muse.ws.notification.NotificationProducer; > import org.apache.muse.ws.notification.WsnConstants; > import > org.apache.muse.ws.resource.impl.AbstractWsResourceCapability; > > public class MyCapability extends AbstractWsResourceCapability > implements IMyCapability > { > 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); > > public QName[] getPropertyNames() > { > return _PROPERTIES; > } > > // You can assign any value you may want to the two variables > private int _MessageInterval = 10; > > private String _ServerName = "muse-test.apache.org"; > > 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.PRODUCE > R_ > URI) > ; > > wsn.addTopic(_TOPIC_NAME); > > Thread producer = new Thread() { > public void run() > { > // > // for this example, reuse one payload for every > notification > // > QName messageName = new QName(NAMESPACE_URI, > "MyMessage", PREFIX); > String message = "This is a message from " + > getServerName(); > Element payload = > XmlUtils.createElement(messageName, > message); > > while (true) > { > try > { > // > // read current value - property is mutable > // > int currentInterval = getMessageInterval(); > > getLog().info("Waiting " + currentInterval > + " > seconds before sending message..."); > > Thread.currentThread().sleep(currentInterval > * 1000); > > // > // use WSN capability to send message to > any subscribers > // > getLog().info("Sending message to > consumers..."); > wsn.publish(_TOPIC_NAME, payload); > } > > catch (Throwable error) > { > error.printStackTrace(); > } > } > } > }; > producer.start(); > } > } > > It is almost identical to the source code given with muse. > > On Mon, Apr 28, 2008 at 12:43 PM, Lenni Madsen <l.madsen@...> > > > A thing just occurred to me, the people affected by this issue seems > > to follow the following approach (please correct me when/if I'm > > wrong, > > > I'll assume this is correctly understood until further notice): > > > > > > > > 1) wsdl2java is called on one or more wsdl's from the sample-wsn > > project > > > > 2) no code is edited after wsdl2java is called (no files are > copied > > to > > the project after wsdl2java is called either) > > > > 3) the war file is deployed > > > > 4) the project experiences one or more errors > > > > > > > > from my past experiences with the sample-wsn project and indeed any > > further development issues I have had with wsn, one needs to make > > sure > > > that the generated code is edited to be up to spec, for one thing > > some > > > important wsn-producer code is not put in the MyCapability.java > > (might > > > have another name if you're using the more advance naming options) > > initialize function. > > > > > > > > *** what you get *** > > > > public void initialize() throws SoapFault > > > > { > > > > // > > > > //The following call is necessary to property initialize the > > resource > > > > // > > > > super.initialize(); > > > > > > > > // > > > > //TODO perform intitialization of the following non-primitive > > properties > > > > // > > > > // ServerName > > > > // > > > > > > > > throw new RuntimeException("User needs to update > > initialization > > > code"); > > > > } > > > > > > > > *** what you need for the sample-wsn *** > > > > public void initialize() throws SoapFault > > > > { > > > > // > > > > //The following call is necessary to property initialize the > > resource > > > > // > > > > super.initialize(); > > > > > > > > // > > > > //TODO perform intitialization of the following non-primitive > > properties > > > > // > > > > // ServerName > > > > // > > > > > > > > // throw new RuntimeException("User needs to update > initialization > > code"); > > > > _ServerName = "sample-wsn-producer"; > > > > wsn = > > > > > (NotificationProducer)getResource().getCapability(WsnConstants.PRODUCE > R_ > URI) > > ; > > > > // move this code below to a function if you wish to use it > > when called and not continuously > > > > QName topicName = new > > QName("http://example.com/server-product", > > "ServerUpdates"); > > > > wsn.addTopic(topicName); > > > > QName messageName = new > > QName("http://example.com/server-product", > > "UpdateMessage"); > > > > String updateMessage = "Something important happened!"; > > > > Element payload = XmlUtils.createElement(messageName, > > updateMessage); > > > > wsn.publish(topicName, payload); > > > > } > > > > > > > > Not sure if it helps at all, but at least it closes one possible > > issue > > > related to starting up the application and initialization of the > producer. > > > > > > > > Mr. Kanat, please don't worry about replying to the mail group > > message > > > it's here for questions and debate regarding the use of the Muse > > framework and I find I learn new things every time I have a look at > > other peoples issues with Muse. sometimes a solution for a problems > > ends up enhancing my own projects. > > > > > > > > /Lenni > > > > _____ > > > > Fra: Irfan Emrah Kanat [mailto:iekanat@...] > > Sendt: 28. april 2008 10:56 > > Til: muse-user@... > > Emne: Re: trouble with WsnTestClient after new wsn-producer.war file > > > > > > > > I am not sure if this is the right way to reply to a mail group > > message but it is my first time so forgive me just this once. > > > > I set the binding in wsdl file as I stated earlier but here, I am > > attaching my wsdl file here. > > > > There is also another problem. I guess Mr. Nguyen is right as my app > > does not seem to be starting up. As I posted in my previous post, I > > build it as an axis2 app. but in tomcat manager I can not see the > > usual web interface of axis2. I get an HTTP Status 500 error. It > > seems > > > to me that my app is not built correctly. The fact that I am getting > > a > > > cygwin error alleviates my belief. > > > > Here is the command I issue and the error message I get: > > > > dulbirakan@chibi:~/Desktop/samp$ sudo sh > > /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl > > sample-wsn-producer.wsdl -output wsn-srv/ -overwrite > > [: 38: cygwin: unexpected operator > > dulbirakan@chibi:~/Desktop/samp$ > > > > If there is anything else I can provide please let me know... > > > > > > > > > > > > > > > > On Mon, Apr 28, 2008 at 9:08 AM, Lenni Madsen <l.madsen@...> > > > > Hi there > > > > Could you attach your wsdl file? It might be something fairly simple > > and therefore easy to overlook in the wsdl, I know I've missed small > > important stuff time and time again. > > > > > > [Fatal Error] :1:1040: 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>". > > > > This error comes when you're trying to use a wrong or incomplete > > EndpointReference. The error message is very generic. > > > > /Lenni > > > > > > -----Oprindelig meddelelse----- > > Fra: dulbirakan [mailto:iekanat@...] > > Sendt: 27. april 2008 23:19 > > Til: muse-user@... > > Emne: Re: trouble with WsnTestClient after new wsn-producer.war file > > > > > > > > I had the same problem, infact I still have it. > > > > I used muse 2.2.0's wsdl2java in ubuntu linux (7.10 and 8.04) both > > to no avail but it worked under windows XP in my advisors computer. > > > > First I change the binding in sample-wsn-producer.wsdl to point to > > my producer (wsn-srv) then I change the source of wsn-consumers test > > class to point to my producer. Then I issue wsdl2java command and > deploy services. > > I > > get the same error message you are getting (the one with HR). I also > > deployed one with default settings, it was a no go also. > > > > I issue: > > > > $ sudo sh /opt/muse-2.2.0-bin/bin/wsdl2java.sh -j2ee axis2 -wsdl > > sample-wsn-producer.wsdl -output wsn-srv/ -overwrite > > > > I get a : > > [: 38: cygwin: unexpected operator > > > > but everything seems to be in place and I run ant and copy the > > resulting war files to my tomcat webapps folder. These war files > > however, once deployed do not act as axis2 services. When I click on > > one in tomcat manager I see the following message instead of the > > usual > > > axis2 web interface: > > > > HTTP Status 500 - > > > > type Exception report > > > > message > > > > description The server encountered an internal error () that > > prevented > > > it from fulfilling this request. > > > > exception > > > > org.apache.jasper.JasperException: java.lang.NullPointerException > > > > > > > org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServ > le > tWra > > pper.java:522) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper. > ja > va:3 > > 56) > > > > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:33 > 7) > > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > > > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary. > ja > va:9 > > 68) > > > > org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78 > > ) > > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper. > ja > va:3 > > 74) > > > > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:33 > 7) > > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > root cause > > > > java.lang.NullPointerException > > > > > > > org.apache.jsp.axis2_002dweb.include.httpbase_jsp.jspInit(httpbase_jsp > .j > ava: > > 22) > > > > org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:51) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapp > er > .jav > > a:159) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper. > ja > va:3 > > 29) > > > > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:33 > 7) > > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > > > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary. > ja > va:9 > > 68) > > > > org.apache.jsp.axis2_002dweb.index_jsp._jspService(index_jsp.java:78 > > ) > > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper. > ja > va:3 > > 74) > > > > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:33 > 7) > > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > note The full stack trace of the root cause is available in the > > Apache > > Tomcat/6.0.16 logs. > > Apache Tomcat/6.0.16 > > > > > > I really would appreciate if it would just run under ubuntu. > > > > I guess the problem might be related to the cygwin problem I stated > > earlier. > > Does any one have any clue? > > > > > > dchou wrote: > > > > > > Hello, > > > > > > I am able to drop the sample wsn-producer.war and wsn-consumer.war > > > files into my Tomcat and they run fine when I run the WsnTestClient. > > > > However, when I do a wsdl2java build in the wsn-producer directory > > > then build a > > new > > > war using Ant. I get an error message with this newly created > > > wsn-producer.war. I have changed no code. Only performed wsdl2java > > > and ant. The steps and error I get when I run the WsnTestClient is > > > as > > follows: > > > > > > $wsdl2java -j2ee axis2 -overwrite -wsdl wsdl/WsResource.wsdl > > > > > > $ ant-1.6.5/bin/ant > > > > > > I then run the test client, WsnTestClient and get the following > output: > > > > > > [CLIENT TRACE] SOAP envelope contents (outgoing): > > > > > > <soap:Envelope > > > <soap:Header> > > > <wsa:To > > > > > xmlns:wsa="http://www.w3.org/2005/08/addressing"> > > http://166.21.9.161:8080/ws > > <http://166.21.9.161:8080/wsn-producer/services/WsResource> > > n-producer/services/WsResource</wsa:To> > > > <wsa:Action > > > > > xmlns:wsa="http://www.w3.org/2005/08/addressing"> > > http://docs.oasis-open.org/ > > <http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeR > > eq > > uest > > > > > wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action> > > > <wsa:MessageID > > > > > xmlns:wsa="http://www.w3.org/2005/08/addressing > > ">uuid:f6255f7a-9b73-1057-462 > > 0-a4ec2be5ff0a</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:Addres > > s> > > > </wsa:From> > > > </soap:Header> > > > <soap:Body> > > > <wsnt:Subscribe > xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"> > > > <wsnt:ConsumerReference> > > > <wsa:Address > > > > > xmlns:wsa="http://www.w3.org/2005/08/addressing"> > > http://166.21.9.175:8060/ws > > <http://166.21.9.175:8060/wsn-consumer/services/consumer> > > n-consumer/services/consumer</wsa:Address> > > > </wsnt:ConsumerReference> > > > </wsnt:Subscribe> > > > </soap:Body> > > > </soap:Envelope> > > > > > > [Fatal Error] :1:1040: 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(AbstractResourceCli > en > t.ja > > va:298) > > > at > > > > > > > > org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceCli > en > t.ja > > va:254) > > > at > > > > > > > > org.apache.muse.ws.notification.remote.NotificationProducerClient.subs > cr > ibe( > > NotificationProducerClient.java:97) > > > at org.apache.muse.test.wsn.WsnTestClient.main(Unknown > > > Source) > > > > > > Does anyone have any idea what I am doing wrong? I have changed no > code. > > I > > > just wanted to try and build a new war with the method outlined in > > > the tutorial. Any help would be appreciated. > > > > > > Thanks, > > > Dave > > > > > > > -- > > View this message in context: > > > > > > war- > > < > > > http://www.nabble.com/trouble-with-WsnTestClient-after-new-wsn-producer. > war > > > -file-tp10191599p16928534.html<http://www.nabble.com/trouble-with-WsnT > es > tCli > ent-after-new-wsn-producer.war-file-tp10191599p16928534.html> > > > > > file-tp10191599p16928534.html > > Sent from the Muse User mailing list archive at Nabble.com. > > > > > > -------------------------------------------------------------------- > > - To unsubscribe, e-mail: muse-user-unsubscribe@... > > For additional commands, e-mail: muse-user-help@... > > > > > > > > -------------------------------------------------------------------- > > - To unsubscribe, e-mail: muse-user-unsubscribe@... > > For additional commands, e-mail: muse-user-help@... > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: muse-user-unsubscribe@... > For additional commands, e-mail: muse-user-help@... > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: muse-user-unsubscribe@... > For additional commands, e-mail: muse-user-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: muse-user-unsubscribe@... For additional commands, e-mail: muse-user-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: muse-user-unsubscribe@... For additional commands, e-mail: muse-user-help@... |
|
|
Re: trouble with WsnTestClient after new wsn-producer.war fileI finally managed to workout what was wrong. I was using JDK 1.6 and it was
the culprit. Installing JDK 1.5 solved the problem. What a bummer.... Thanks to all for help On Mon, Apr 28, 2008 at 11:58 PM, Vinh Nguyen (vinguye2) <vinguye2@...> wrote: > If you ran wsdl2java on your sample-wsn-producer.wsdl and deployed the > generated muse.xml as-is, that's probably why you're getting errors. > For example, the Tomcat logs would show this during > initialization/testing: > > java.lang.RuntimeException: [ID = 'IncorrectCapabilityRoot'] > org.apache.ws.muse.test.wsrf.MyCapability does not implement > org.apache.muse.core.Capability, which is a required interface for all > capability classes. > at > org.apache.muse.core.descriptor.CapabilityDefinition.setImplementationCl > ass(CapabilityDefinition.java:110) > at > org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.load(SimpleCa > pabilityDescriptor.java:104) > at > org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabilit > yDefinitions(SimpleResourceDescriptor.java:99) > at > org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleReso > urceDescriptor.java:401) > at > org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResourc > eDefinitions(SimpleDeploymentDescriptor.java:78) > at > org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleDe > ploymentDescriptor.java:177) > at > org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstract > IsolationLayer.java:152) > at > org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Mini > Servlet.java:55) > at > org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:6 > 9) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica > tionFilterChain.java:252) > ... > > You need to manually review and update the generated muse.xml first: > > 1) In the WsResource definition, change the <wsdl-file> value to > "wsdl/sample-wsn-producer.wsdl". > 2) Change the capability reference from MyCapability to > MyCapabilityImpl. > 3) In the SubscriptionManager definition, change the <wsdl-file> value > to "wsdl/WS-BaseNotification-1_3.wsdl". > > Redeploy and test, and everything should be fine now. > -Vinh > > > -----Original Message----- > From: Vinh Nguyen (vinguye2) > Sent: Monday, April 28, 2008 1:43 PM > To: muse-user@... > Subject: RE: trouble with WsnTestClient after new wsn-producer.war file > > Can you paste your muse.xml and services.xml configurations? I suspect > the problems are here. > > > > -----Original Message----- > From: Irfan Emrah Kanat [mailto:iekanat@...] > Sent: Monday, April 28, 2008 1:18 PM > To: muse-user@... > Subject: Re: trouble with WsnTestClient after new wsn-producer.war file > > Thanks, but my problem is a bit different. > > I can deploy the samples in ubuntu, no problem. > > But when I try to build the sample wsn producer from the wsdl file via > wsdl2java provided with muse 2.2.0 in ubuntu I have some problems. I can > build the same file in windows without any problems though... So I guess > it is a linux specific problem. I am writing a tutorial for next years > Web Services Class I am providing the last section which I have the > problems so that you can see what steps I have taken so far... It is not > completed yet... > > |
| Free embeddable forum powered by Nabble | Forum Help |