|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Error using WsnConsumerClientI try to use the WS notification client WsnConsumerClient to send a data publication.
Unfortunatly I obtain an error : "wsa:InvalidAddressingHeader / wsa:MissingAddressInEPR /A header representing a Message Addressing Property is not valid and the message cannot be processed" If you have an idea of the issue... Thanks for your help. Below you can see the 'tcpmon' log of my request and the related respose. Richard. the SOAP request from my WS client is : <?xml version='1.0' encoding='utf-8'?> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Header> <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://10.222.144.171:8080/petals/services/TopicSample</wsa:To> <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">http://10.222.144.171:9999/notif/Consumer</wsa:From> <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing" /> <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/NotifyRequest</wsa:Action> </soapenv:Header> <soapenv:Body> <wsnt:Notify xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"> <wsnt:NotificationMessage> <wsnt:Topic Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete">TopicSample</wsnt:Topic> <wsnt:ProducerReference> <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://10.222.144.171:9999/notif/Consumer</wsa:Address> </wsnt:ProducerReference> <wsnt:Message> <text>hi !</text> </wsnt:Message> </wsnt:NotificationMessage> </wsnt:Notify> </soapenv:Body> </soapenv:Envelope> the response is : <?xml version='1.0' encoding='UTF-8'?> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://www.w3.org/2005/08/addressing"> <soapenv:Header> <wsa:Action>http://www.w3.org/2005/08/addressing/fault</wsa:Action> </soapenv:Header> <soapenv:Body> <soapenv:Fault> <soapenv:Code> <soapenv:Value>soapenv:Sender</soapenv:Value> <soapenv:Subcode> <soapenv:Value>wsa:InvalidAddressingHeader</soapenv:Value> <soapenv:Subcode> <soapenv:Value>wsa:MissingAddressInEPR</soapenv:Value> </soapenv:Subcode> </soapenv:Subcode> </soapenv:Code> <soapenv:Reason> <soapenv:Text xml:lang="en-US">A header representing a Message Addressing Property is not valid and the message cannot be processed</soapenv:Text> </soapenv:Reason> <soapenv:Detail> <Exception>org.apache.axis2.AxisFault: A header representing a Message Addressing Property is not valid and the message cannot be processed at org.apache.axis2.addressing.AddressingFaultsHelper.triggerAddressingFault(AddressingFaultsHelper.java:355) at org.apache.axis2.addressing.AddressingFaultsHelper.triggerMissingAddressInEPRFault(AddressingFaultsHelper.java:180) at org.apache.axis2.handlers.addressing.AddressingInHandler.extractEPRInformation(AddressingInHandler.java:408) at org.apache.axis2.handlers.addressing.AddressingInHandler.extractFromEPRInformation(AddressingInHandler.java:298) at org.apache.axis2.handlers.addressing.AddressingInHandler.extractAddressingInformation(AddressingInHandler.java:173) at org.apache.axis2.handlers.addressing.AddressingInHandler.invoke(AddressingInHandler.java:97) at org.apache.axis2.engine.Phase.invoke(Phase.java:292) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120) at org.ow2.petals.binding.soap.listener.incoming.servlet.SoapServlet.doPost(SoapServlet.java:108) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:295) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:841) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:639) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:361) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) </Exception> <wsa:ProblemHeaderQName>wsa:From</wsa:ProblemHeaderQName> </soapenv:Detail> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope> |
|
|
Re: Error using WsnConsumerClientthe code of my client class is :
public class PublisherClient { public static final int PORT = 9999; public static final String SUFFIX = "/notif/Consumer"; /** * @param args */ public static void main(String[] args) { final PublisherClient client = new PublisherClient(); Runtime.getRuntime().addShutdownHook(new Thread() { /* * (non-Javadoc) * @see java.lang.Thread#run() */ @Override public void run() { } }); client.publish(); System.out.println("Type Control-C to quit"); } /** * Subscribe to topic */ public void publish() { // The notification producer EPR EndpointReference destinationEPR = new EndpointReference(URI .create("http://10.222.144.171:8080/petals/services/TopicSample")); // the notification receiver (me) EndpointReference consumer1EPR = new EndpointReference(URI.create("http://10.222.144.171:" + PORT + SUFFIX)); WsnConsumerClient client = new WsnConsumerClient(consumer1EPR, destinationEPR); QName topic = new QName("TopicSample"); try { System.out.println("Publishing to topic " + topic + " on WSN consumer " + destinationEPR); NotificationMessage message = new NotificationMessage(); OMFactory fac = OMAbstractFactory.getOMFactory(); OMElement element; OMNamespace omNs = fac.createOMNamespace("", ""); element = fac.createOMElement("text", omNs); element.setText("hi !"); message.addMessageContent(element); message.setTopic(topic); client.notify(message); } catch (WsnFault e) { e.printStackTrace(); } } }
|
|
|
Re: Error using WsnConsumerClientHi Richard,
Sorry, I need to take time to check all these WSN issues. On Thu, Sep 25, 2008 at 12:51 PM, aillet <richard.aillet@...> wrote:
-- Christophe Hamerling PEtALS ESB Research Engineer / Product Manager @ eBM WebSourcing http://petals.ow2.org http://petals.ebmwebsourcing.com Phone : +33534320314 Skype : christophe.hamerling -- You receive this message as a subscriber of the petals-users@... mailing list. To unsubscribe: mailto:petals-users-unsubscribe@... For general help: mailto:sympa@...?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
| Free embeddable forum powered by Nabble | Forum Help |