SV: Async service retrieving MTOM message -> Socket closed
Hi, I see it the exact same way. I'll create a local patch for our self that works for asynchronous MTOM requests only. Do you have any smart suggestions for preventing the call to TransportUtils#deleteAttachments(MessageContext) from AxisServlet? For my situation it would be nice if I only had to change the message receiver, I could for instance override the receive method and execute my own implementation of an asynchronous worker that calls TransportUtils#deleteAttachments() right after the business logic is invoked... Should I open a new JIRA? I'll unfortunately be offline the next 3 weeks (vacation), so I'll not be able create the JIRA right away. /Torben -Oprindelig meddelelse- Fra: Andreas Veithen [mailto:andreas.veit...@gmail.com] Sendt: 1. juli 2009 21:57 Til: axis-user@ws.apache.org Emne: Re: Async service retrieving MTOM message -> Socket closed I think there are several problems in the Axis2 architecture here: - Calling just build() and not buildWithAttachments() is definitely a bug. However, even buildWithAttachments() is not enough, because it would work for MTOM, but not for SwA (in MTOM, attachments are always linked to OMText nodes in the tree, but this is not the case for SwA). - AxisServlet calls TransportUtils#deleteAttachments(MessageContext) after the request has been injected into the Axis engine. This is incorrect if the engine processes the request asynchronously in a different thread (that is one of the problems you experience). On the other hand, it seems to be the only transport implementation using that method, meaning that other transports will not free the temporary files (in a timely manner). - LifeCycleManager is too tightly coupled to attachments. This is not relevant for your problem, but we will run into that issue once we implement the planned improvements to the message builder/formatter framework. E.g. if we want to support binary/octet-stream, then we should also be able to offload large payloads to a temporary file. Since these are not attachments, LifeCycleManager and TransportUtils#deleteAttachments(MessageContext) is of no use here. Probably this will not be fixed in the near future. Andreas On Wed, Jul 1, 2009 at 07:21, Torben Riis wrote: > > Hi, > > It helped a lot now the attachments are fully downloaded before the service > returns with the http status code 202. > But unfortunately if file caching is enabled, buildWithAttachments() also > adds the attachments to the LifeCycleManager (deleteOnExit) and that triggers > a delete when the service returns. And the attachments will therefore be gone > before the business logic is invoked... > > But for attachments stored in memory it works perfect. > > I'm wondering, wouldn't it be more correct if > AbstractMessageReceiver#receive() in general invoked buildWithAttachments() > instead of just build() in the part that handles asynchronous requests, in my > opinion it doesn't make sense to return before the service has retrieved the > whole http message... > > Or will the performance penalty be too high??? > > Torben Riis > > -Oprindelig meddelelse- > Fra: Andreas Veithen [mailto:andreas.veit...@gmail.com] > Sendt: 30. juni 2009 19:35 > Til: axis-user@ws.apache.org > Emne: Re: Async service retrieving MTOM message -> Socket closed > > > I think the problem is that messageCtx.getEnvelope().build() is not > enough in this case. It makes sure that the message has been entirely > parsed, but not the attachments. Can you replace build() by > buildWithAttachments() and retry this? > > Andreas > > On Tue, Jun 30, 2009 at 15:01, Torben Riis wrote: >> Hi, >> >> >> >> I'm struggling with an Axis2 client sending a MTOM message to an Axis2 >> service. The service returns a socket closed exception. >> >> The client uses separate listeners (addressing) and sends a soap message >> containing several MTOM attachments. >> >> >> >> The client and service works perfectly if MTOM is disabled and uses the >> fallback to Base64 encoded content or if just anonymous addressing is used >> instead (no asynchronous). >> >> >> >> The service is configured with a "RawXMLINOutMessageReceiver" message >> receiver and the parameter "messageReceiver.invokeOnSeparateThread" set to >> true. >> >> >> >> During debugging I noticed that the problem only occurred when the service >> returns with the HTTP status coded 202 before the business logic has called >> getDataHandler() on OMText element. >> >> For my implementation the socket closed exception first happens for the >> second or third attachment, but this can variate a lot. >> >> If I set a
SV: Async service retrieving MTOM message -> Socket closed
Hi, It helped a lot now the attachments are fully downloaded before the service returns with the http status code 202. But unfortunately if file caching is enabled, buildWithAttachments() also adds the attachments to the LifeCycleManager (deleteOnExit) and that triggers a delete when the service returns. And the attachments will therefore be gone before the business logic is invoked... But for attachments stored in memory it works perfect. I'm wondering, wouldn't it be more correct if AbstractMessageReceiver#receive() in general invoked buildWithAttachments() instead of just build() in the part that handles asynchronous requests, in my opinion it doesn't make sense to return before the service has retrieved the whole http message... Or will the performance penalty be too high??? Torben Riis -Oprindelig meddelelse- Fra: Andreas Veithen [mailto:andreas.veit...@gmail.com] Sendt: 30. juni 2009 19:35 Til: axis-user@ws.apache.org Emne: Re: Async service retrieving MTOM message -> Socket closed I think the problem is that messageCtx.getEnvelope().build() is not enough in this case. It makes sure that the message has been entirely parsed, but not the attachments. Can you replace build() by buildWithAttachments() and retry this? Andreas On Tue, Jun 30, 2009 at 15:01, Torben Riis wrote: > Hi, > > > > I'm struggling with an Axis2 client sending a MTOM message to an Axis2 > service. The service returns a socket closed exception. > > The client uses separate listeners (addressing) and sends a soap message > containing several MTOM attachments. > > > > The client and service works perfectly if MTOM is disabled and uses the > fallback to Base64 encoded content or if just anonymous addressing is used > instead (no asynchronous). > > > > The service is configured with a "RawXMLINOutMessageReceiver" message > receiver and the parameter "messageReceiver.invokeOnSeparateThread" set to > true. > > > > During debugging I noticed that the problem only occurred when the service > returns with the HTTP status coded 202 before the business logic has called > getDataHandler() on OMText element. > > For my implementation the socket closed exception first happens for the > second or third attachment, but this can variate a lot. > > If I set a breakpoint in AbstractMessageReceiver#receive() where > AsyncMessageReceiverWorker is created as a new thread and ensures that the > business logic is invoked before AbstractMessageReceiver#receive() returns > with http status coded 202 everything works as designed. I noticed as well > that messageCtx.getEnvelope().build() in the same method detects that the > message context contains all 3 MTOM attachments correctly. > > > > AbstractMessageReceiver#receive() > > . > > if ((!WSDLUtil.isOutputPresentForMEP(mep)) > > || (replyTo != null && !replyTo.hasAnonymousAddress())) { > > AsyncMessageReceiverWorker worker = new AsyncMessageReceiverWorker( > > messageCtx); > > messageCtx.getEnvelope().build(); > > messageCtx.getConfigurationContext().getThreadPool().execute( > > worker); > > return; > > } > > > > And the funny part here is, that it seems to work on Jetty but not on Tomcat > 5.5, Tomcat 6 or Websphere 6.1. > > > > As I see it, the reason why the socket closed exceptions occurs, is due to > that some servers closes the connection when the service returns with status > 202. > > But I'm not 100% sure. > > > > Any help would be appreciated, a lot. J > > > > Regards > > Multi-Support R&D A/S > > > > Torben Riis > > http://www.multi-support.com > > http://www.linkedin.com/in/mrtorbenriis
SV: Async service retrieving MTOM message -> Socket closed
I just found that the problem occurs for Jetty as well. I increased the size of the files a bit, and Jetty complains as well. /Torben Riis Fra: Torben Riis Sendt: 30. juni 2009 15:01 Til: axis-user@ws.apache.org Emne: Async service retrieving MTOM message -> Socket closed Hi, I'm struggling with an Axis2 client sending a MTOM message to an Axis2 service. The service returns a socket closed exception. The client uses separate listeners (addressing) and sends a soap message containing several MTOM attachments. The client and service works perfectly if MTOM is disabled and uses the fallback to Base64 encoded content or if just anonymous addressing is used instead (no asynchronous). The service is configured with a "RawXMLINOutMessageReceiver" message receiver and the parameter "messageReceiver.invokeOnSeparateThread" set to true. During debugging I noticed that the problem only occurred when the service returns with the HTTP status coded 202 before the business logic has called getDataHandler() on OMText element. For my implementation the socket closed exception first happens for the second or third attachment, but this can variate a lot. If I set a breakpoint in AbstractMessageReceiver#receive() where AsyncMessageReceiverWorker is created as a new thread and ensures that the business logic is invoked before AbstractMessageReceiver#receive() returns with http status coded 202 everything works as designed. I noticed as well that messageCtx.getEnvelope().build() in the same method detects that the message context contains all 3 MTOM attachments correctly. AbstractMessageReceiver#receive() ... if ((!WSDLUtil.isOutputPresentForMEP(mep)) || (replyTo != null && !replyTo.hasAnonymousAddress())) { AsyncMessageReceiverWorker worker = new AsyncMessageReceiverWorker( messageCtx); messageCtx.getEnvelope().build(); messageCtx.getConfigurationContext().getThreadPool().execute( worker); return; } And the funny part here is, that it seems to work on Jetty but not on Tomcat 5.5, Tomcat 6 or Websphere 6.1. As I see it, the reason why the socket closed exceptions occurs, is due to that some servers closes the connection when the service returns with status 202. But I'm not 100% sure. Any help would be appreciated, a lot. :) Regards Multi-Support R&D A/S Torben Riis http://www.multi-support.com http://www.linkedin.com/in/mrtorbenriis
Async service retrieving MTOM message -> Socket closed
Hi, I'm struggling with an Axis2 client sending a MTOM message to an Axis2 service. The service returns a socket closed exception. The client uses separate listeners (addressing) and sends a soap message containing several MTOM attachments. The client and service works perfectly if MTOM is disabled and uses the fallback to Base64 encoded content or if just anonymous addressing is used instead (no asynchronous). The service is configured with a "RawXMLINOutMessageReceiver" message receiver and the parameter "messageReceiver.invokeOnSeparateThread" set to true. During debugging I noticed that the problem only occurred when the service returns with the HTTP status coded 202 before the business logic has called getDataHandler() on OMText element. For my implementation the socket closed exception first happens for the second or third attachment, but this can variate a lot. If I set a breakpoint in AbstractMessageReceiver#receive() where AsyncMessageReceiverWorker is created as a new thread and ensures that the business logic is invoked before AbstractMessageReceiver#receive() returns with http status coded 202 everything works as designed. I noticed as well that messageCtx.getEnvelope().build() in the same method detects that the message context contains all 3 MTOM attachments correctly. AbstractMessageReceiver#receive() ... if ((!WSDLUtil.isOutputPresentForMEP(mep)) || (replyTo != null && !replyTo.hasAnonymousAddress())) { AsyncMessageReceiverWorker worker = new AsyncMessageReceiverWorker( messageCtx); messageCtx.getEnvelope().build(); messageCtx.getConfigurationContext().getThreadPool().execute( worker); return; } And the funny part here is, that it seems to work on Jetty but not on Tomcat 5.5, Tomcat 6 or Websphere 6.1. As I see it, the reason why the socket closed exceptions occurs, is due to that some servers closes the connection when the service returns with status 202. But I'm not 100% sure. Any help would be appreciated, a lot. :) Regards Multi-Support R&D A/S Torben Riis http://www.multi-support.com http://www.linkedin.com/in/mrtorbenriis
Torben Riis is out of the office.
I will be out of the office starting 13-07-2008 and will not return until 21-07-2008. In this period I might not get a chance to read my mail. If you cannot wait for a reply until my return, please send your request to [EMAIL PROTECTED] for a more pompt response. Otherwise I will respond to your message when I return or if I get a chance to look at it during my absence. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: MTOM endpoint backward compatibility with SwA
Hi Thilina Thank you for answering. I didn't know that there wasn't defined any standard for binding the attachment to the xml content for SwA. I thought the "href="cid:urn:uuid" in SwA was a standard like xop:include. :-) Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "Thilina Gunarathne" <[EMAIL PROTECTED] To m>axis-user@ws.apache.org cc 19-02-2008 14:58 Subject Re: MTOM endpoint backward Please respond to compatibility with SwA [EMAIL PROTECTED] he.org > Okey, but if I generate a .net client without WSE3 (.net should by standard > understand SwA), it complains about it couldn't parse the > tag. Interoperability is not in the WSDL level... On the other hand, AFAIK there isn't a standard universal accepted way to define SwA attachments in the WSDL.. > By good reason since the wsdl doesn't define any xop:include elements. > Actually I thought it was MTOM that knew xop:include tags shouldn't be > parsed and handled special. yes,.it is.. The special case I was talking about is the wire level.. SwA does not define a standard element like to bind the attachments to the XML content of the message. People are free to embed the content-id of Attachment in any way they like.. Hence it is application specific. But MTOM introduced the standardized element to bind the attachment content to the Xml content in the appropriate location. That's y I called MTOM as a special case of SwA.. If you need to receive MTOM messages in a SwA client together with a WSDL, make sure to define th explicitly.. > > Have I totally missed it? ;-) > > Do you know how other wsdl2java tools works if they only support SwA and > not MTOM. > Would they just ignore the returned xop:include and find the attachments > anyway? I thought we are talking about web service engines and message level support.. AFAIK not many wsdl2java tools support SwA.. thanks, Thilina > > > Regards > Multi-Support A/S > > Torben Riis > > Phone +45 96 600 600, Fax +45 96 600 601 > E-mail: [EMAIL PROTECTED] > http://www.multi-support.com > > > > "Thilina > Gunarathne" > <[EMAIL PROTECTED] To > m>axis-user@ws.apache.org > cc > 19-02-2008 13:34 > Subject >Re: MTOM endpoint backward > Please respond to compatibility with SwA > [EMAIL PROTECTED] > he.org > > > > > > > > > > Hi, > It's not in the way you create the message. It is how the message > looks like in the wire.. MTOM can be considered as a special case of > SwA.. Even though MTOM includes tags, it is possible to > extract the attachment using SwA enabled web service processor. > > See here[1] too.. > > thanks, > Thilina > > [1]http://ws.apache.org/axis2/1_3/mtom-guide.html#33 > > On Feb 19, 2008 3:18 AM, <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > Is it possible to create an endpoint operation that can respond either > MTOM > > or SwA depending on the request? > > > > I read the Attachments/MTOM guide and first I understood it as MTOM was > > already backward compatible with SwA. > > But if I enable MTOM for my endpoint it always returns a xop:include > (mtom) > > no matter how i call the service. > > And if I enable SwA instead of MTOM for the endpoint it still returns a > > xop:include but with an empty attachment. > > > >
Re: MTOM endpoint backward compatibility with SwA
Hi, Okey, but if I generate a .net client without WSE3 (.net should by standard understand SwA), it complains about it couldn't parse the tag. By good reason since the wsdl doesn't define any xop:include elements. Actually I thought it was MTOM that knew xop:include tags shouldn't be parsed and handled special. Have I totally missed it? ;-) Do you know how other wsdl2java tools works if they only support SwA and not MTOM. Would they just ignore the returned xop:include and find the attachments anyway? Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "Thilina Gunarathne" <[EMAIL PROTECTED] To m>axis-user@ws.apache.org cc 19-02-2008 13:34 Subject Re: MTOM endpoint backward Please respond to compatibility with SwA [EMAIL PROTECTED] he.org Hi, It's not in the way you create the message. It is how the message looks like in the wire.. MTOM can be considered as a special case of SwA.. Even though MTOM includes tags, it is possible to extract the attachment using SwA enabled web service processor. See here[1] too.. thanks, Thilina [1]http://ws.apache.org/axis2/1_3/mtom-guide.html#33 On Feb 19, 2008 3:18 AM, <[EMAIL PROTECTED]> wrote: > > Hi, > > Is it possible to create an endpoint operation that can respond either MTOM > or SwA depending on the request? > > I read the Attachments/MTOM guide and first I understood it as MTOM was > already backward compatible with SwA. > But if I enable MTOM for my endpoint it always returns a xop:include (mtom) > no matter how i call the service. > And if I enable SwA instead of MTOM for the endpoint it still returns a > xop:include but with an empty attachment. > > Afterwards I read the following article "http://wso2.org/library/1675"; and > I could then see the implementation for > SwA was different from MTOM. You manually add your attachment to the > outgoing MessageContext where as MTOM > uses OMText on OMFactory. > > Can I conclude that it isn't possible to create an MTOM endpoint operation > that is backward compatible with SwA? > > Regards > Multi-Support A/S > > Torben Riis > > Phone +45 96 600 600, Fax +45 96 600 601 > E-mail: [EMAIL PROTECTED] > http://www.multi-support.com > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
MTOM endpoint backward compatibility with SwA
Hi, Is it possible to create an endpoint operation that can respond either MTOM or SwA depending on the request? I read the Attachments/MTOM guide and first I understood it as MTOM was already backward compatible with SwA. But if I enable MTOM for my endpoint it always returns a xop:include (mtom) no matter how i call the service. And if I enable SwA instead of MTOM for the endpoint it still returns a xop:include but with an empty attachment. Afterwards I read the following article "http://wso2.org/library/1675"; and I could then see the implementation for SwA was different from MTOM. You manually add your attachment to the outgoing MessageContext where as MTOM uses OMText on OMFactory. Can I conclude that it isn't possible to create an MTOM endpoint operation that is backward compatible with SwA? Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2: Configure Axis dynamicly (SpringAware)
Hi, I have looked at this for a while now but I still have some problems figuring it out. Hope someone is able to help me here! ;-) I can see that makeNewServiceObject(ctx) in AbstractMessageReceiver tests on AxisService parameters to determine whether to receive its service object by a ServiceObjectSupplier or to create it with reflection. I thought it then would be possible to use AxisService.createService() to obtain a basic AxisService where I removed the parameter Constants. SERVICE_CLASS and added Constants.SERVICE_OBJECT_SUPPLIER& SpringAppContextAwareObjectSupplier.SERVICE_SPRING_BEANNAME. But it doesn't seam to be the right way to do this. Do I need to instantiate the AxisService by my self and in such case, what must be set on this object as minimum? //My guess ConfigurationContext config = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,null); AxisService service = AxisService.createService("com.firm.MyService", config.getAxisConfiguration()); service.removeParameter(service.getParameter(Constants.SERVICE_CLASS)); service.addParameter(Constants.SERVICE_OBJECT_SUPPLIER, "org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier"); service.addParameter(SpringAppContextAwareObjectSupplier.SERVICE_SPRING_BEANNAME, "myBeanName"); config.getAxisConfiguration().addService(service); Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "robert lazarski" <[EMAIL PROTECTED] mail.com> To axis-user@ws.apache.org 20-08-2007 14:38 cc Subject Please respond to Re: Axis2: Configure Axis dynamicly [EMAIL PROTECTED] (SpringAware) he.org Using SpringAppContextAwareObjectSupplier, you have the option of using the the same ApplicationContextHolder class that axis2 uses. Also, take a look at the AbstractMessageReceiver, ie, looking at the source in this part of axis2 should point you in the right direction. HTH, Robert On 8/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > I would like hear if it some how is possible to configure Axis2 dynamic as > the following in my service descriptor. > > > > > org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier > > myService > > "org.apache.axis2.rpc.receivers.RPCMessageReceiver" /> > > > "org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" /> > > > > > I now it is possible configure Axis2 dynamic with ordinary services using > AxisService.createService(...), but how do I do it with Spring enabled > services? > > //Configure Axis2 dynamic without spring support. > Map mep = new HashMap(); > mep.put("http://www.w3.org/2004/08/wsdl/in-only";, RPCInOnlyMessageReceiver. > class.newInstance()); > mep.put("http://www.w3.org/2004/08/wsdl/in-out";, RPCMessageReceiver.class > .newInstance()); > ConfigurationContext config = ConfigurationContextFactory. > createConfigurationContextFromFileSystem(null,null); > AxisService service = AxisService.createService("MyService.class", > config.getAxisConfiguration(), mep, null, null, BufferFactory.class > .getClassLoader()); > config.getAxisConfiguration().addService(service); > > > Regards > Multi-Support A/S > > Torben Riis > > Phone +45 96 600 600, Fax +45 96 600 601 > E-mail: [EMAIL PROTECTED] > http://www.multi-support.com > > > --
Axis2: Configure Axis dynamicly (SpringAware)
Hi, I would like hear if it some how is possible to configure Axis2 dynamic as the following in my service descriptor. org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier myService I now it is possible configure Axis2 dynamic with ordinary services using AxisService.createService(...), but how do I do it with Spring enabled services? //Configure Axis2 dynamic without spring support. Map mep = new HashMap(); mep.put("http://www.w3.org/2004/08/wsdl/in-only";, RPCInOnlyMessageReceiver. class.newInstance()); mep.put("http://www.w3.org/2004/08/wsdl/in-out";, RPCMessageReceiver.class .newInstance()); ConfigurationContext config = ConfigurationContextFactory. createConfigurationContextFromFileSystem(null,null); AxisService service = AxisService.createService("MyService.class", config.getAxisConfiguration(), mep, null, null, BufferFactory.class .getClassLoader()); config.getAxisConfiguration().addService(service); Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Torben Riis is out of the office.
I will be out of the office starting 23-07-2007 and will not return until 14-08-2007. In this period I might not get a chance to read my mail. If you cannot wait for a reply until my return, please send your request to [EMAIL PROTECTED] for a more pompt response. Otherwise I will respond to your message when I return or if I get a chance to look at it during my absence. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2: RESTful implementation with Axis2
Hi Keith, I still have problems with the WeatherService. I tried the below changes in the wsdl but with no success. Now it gives a "HTTP 500 - Internal Server Error" Can you verify that my url is correct? http://localhost:8080/axis2/services/WeatherService/Weather/Denmark/Herning Have you tried to generate skeleton code for the wsdl by your self? Generated services.xml: http://www.w3.org/ns/wsdl/in-out"; class= "org.example.webservice.WeatherServiceMessageReceiverInOut"/> org.example.webservice.WeatherServiceSkeleton true true http://www.w3.org/ns/wsdl/in-out"; > \"\" urn:getWeatherResponse urn:getWeatherweatherFault http://www.w3.org/ns/wsdl/in-out"; > \"\" urn:setWeatherResponse urn:setWeatherweatherFault Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "keith chapman" <[EMAIL PROTECTED] ail.com> To axis-user@ws.apache.org 13-07-2007 07:08 cc Subject Please respond to Re: Axis2: RESTful implementation [EMAIL PROTECTED] with Axis2 he.org Yes there is a mistake in the WSDL (obvious copy and paste error :)) update the relavant sections as follows, http://example.org/WeatherService "/> It was due to the above that you got the dispatching error. Should work now. Thanks, Keith. On 7/12/07, Sanjiva Weerawarana <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: > > Should I not be able to reach it with the following url? > http://localhost:8080/axis2/services/WeatherService/Weather/Denmark/Herning > > Or have I misunderstood the new HTTPBinding. >"WeatherServiceHTTPEndpoint/Weather/{country}/{city}"/> These two statements are not matching .. you've put WeatherService*HTTPEndpoint* in the whttp:location attribute but the URL doesn't have that. Sanjiva. -- Sanjiva Weerawarana, Ph.D. Founder & Director; Lanka Software Foundation; http://www.opensource.lk/ Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/ Director; Open Source Initiative; http://www.opensource.org/ Member; Apache Software Foundation; http://www.apache.org/ Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Keith Chapman WSO2 Inc. Oxygen for Web Services Developers. http://wso2.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2: RESTful implementation with Axis2
Hi, I tried with the below urls and got different responses. http://localhost:8080/axis2/services/WeatherService/Weather/Denmark/Herning org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found is /axis2/services/WeatherService/Weather/Denmark/Herning and the WSA Action = null at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:85) at org.apache.axis2.engine.Phase.invoke(Phase.java:308) 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.util.RESTUtil.invokeAxisEngine(RESTUtil.java:125) at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:119) at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:229) at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:256) at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:163) at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:85) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:803) http://localhost:8080/axis2/services/WeatherService/getWeather java.lang.StringIndexOutOfBoundsException at java.lang.StringBuffer.substring(StringBuffer.java:881) at org.apache.axis2.builder.XFormURLEncodedBuilder.extractParametersUsingHttpLocation(XFormURLEncodedBuilder.java:284) at org.apache.axis2.builder.XFormURLEncodedBuilder.processDocument(XFormURLEncodedBuilder.java:99) at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:150) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:105) at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:101) at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:229) at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:256) at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:163) at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:85) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:803) Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "keith chapman" <[EMAIL PROTECTED] ail.com> To axis-user@ws.apache.org 12-07-2007 11:31 cc Subject Please respond to Re: Axis2: RESTful implementation [EMAIL PROTECTED] with Axis2 he.org You should be able to, provided that the system has the relavant data to return. Did you get back any error or anyhing as such? Thanks, Keith. On 7/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi Keith, I tried 1.3 RC1, and with success. Axis2 now starts without any errors. But I can't activate the REST service from an url. Should I not be able to reach it with the following url? http://localhost:8080/axis2/services/WeatherService/Weather/Denmark/Herning Or have I misunderstood the new HTTPBinding. I have attached my generated code if it can be any help. (See attached file: WeatherService.zip) Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 6
Re: Axis2: RESTful implementation with Axis2
Hi Keith, I forgot specify the argument (-wv) on wsdl2java. My mistake. :-) I can see that eclipse gives another validation, than the one from Rational Application Developer 7. Maybe it just doesn't support WSDL 2.0 validation But anyway, wsdl2java generates skeleton code without errors now. But I get another error during startup of Axis2 now. org.apache.axis2.deployment.repository.util.ArchiveReader - Trouble processing wsdl file :Illegal character in opaque part at index 2: .\webapps\WeatherService\WEB-INF\services\weather\META-INF Should I try the nightly build instead? Right now I'm using Axis2 1.2. Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "keith chapman" <[EMAIL PROTECTED] ail.com> To axis-user@ws.apache.org 11-07-2007 11:08 cc Subject Please respond to Re: Axis2: RESTful implementation [EMAIL PROTECTED] with Axis2 he.org Which version of Axis2 are you using? I would recoment 1.2 or even a nightly or the 1.3 RC Thanks, Keith. On 7/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi Keith, I have some problems generating stub/skeletons for your wsdl. My IDE gives the following validation error for WeatherHTTPBinding. WSDL: Missing port type for binding { http://example.axis2.apache.org} WeatherHTTPBinding What does I miss? Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "keith chapman" < [EMAIL PROTECTED] ail.com> To axis-user@ws.apache.org 11-07-2007 09:27 cc Subject Please respond to Re: Axis2: RESTful implementation [EMAIL PROTECTED] with Axis2 he.org here is a sample Weather.wsdl2. Please let me know if you need any clarifications. http://www.w3.org/ns/wsdl"; targetNamespace=" http://example.axis2.apache.org " xmlns:tns="http://example.axis2.apache.org"; xmlns:wsoap=" http://www.w3.org/ns/wsdl/soap " xmlns:whttp="http://www.w3.org/ns/wsdl/http"; xmlns:xsd1=" http://example.axis2.apache.org/xsd " xmlns:xs="http://www.w3.org/2001/XMLSchema";> Just a sample service to explain WSDL 2.0 semantics http://example.axis2.apache.org/xsd " xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:xsd1=" http://example.axis2.apache.org/xsd "> This is where the abstract descriptions of the operations are
Re: Axis2: RESTful implementation with Axis2
Hi Keith, I have some problems generating stub/skeletons for your wsdl. My IDE gives the following validation error for WeatherHTTPBinding. WSDL: Missing port type for binding {http://example.axis2.apache.org} WeatherHTTPBinding What does I miss? Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "keith chapman" <[EMAIL PROTECTED] ail.com> To axis-user@ws.apache.org 11-07-2007 09:27 cc Subject Please respond to Re: Axis2: RESTful implementation [EMAIL PROTECTED] with Axis2 he.org here is a sample Weather.wsdl2. Please let me know if you need any clarifications. http://www.w3.org/ns/wsdl"; targetNamespace=" http://example.axis2.apache.org"; xmlns:tns="http://example.axis2.apache.org"; xmlns:wsoap=" http://www.w3.org/ns/wsdl/soap"; xmlns:whttp="http://www.w3.org/ns/wsdl/http"; xmlns:xsd1=" http://example.axis2.apache.org/xsd"; xmlns:xs="http://www.w3.org/2001/XMLSchema";> Just a sample service to explain WSDL 2.0 semantics http://example.axis2.apache.org/xsd"; xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:xsd1=" http://example.axis2.apache.org/xsd";> This is where the abstract descriptions of the operations are given. Note that WSDL 2.0 has the concept of reusing faults, hence they are described at the interface level. http://www.w3.org/ns/wsdl/in-out";> http://www.w3.org/ns/wsdl/in-out";> http://www.w3.org/ns/wsdl/http";> This binding binds the weather interface to RESTish style invocations. NOTE : The URL for the operation is constracted by resolving the httplocation against the base uri. e.g. If the country was srilanka and the city was colombo then the URL will be http://example.org/WeatherService/WeatherServiceSOAPEndpoint/Weather/srilanka/colombo http://example.org/WeatherService/WeatherServiceHTTPEndpoint/ "/> Thanks, Keith. On 7/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi Keith, An example would be very nice. ;-) An example where you format the URL in a RESTish style would be perfect. Maybe with both GET & POST if it isn't too much trouble. Thanks a lot. Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "keith chapman" <[EMAIL PROTECTED] ail.com > To axis-user@ws.apache.org 11-07-2007 07:40 cc Subject Please respond to Re: Axis2: RESTful implementation
Re: Axis2: RESTful implementation with Axis2
Hi Keith, An example would be very nice. ;-) An example where you format the URL in a RESTish style would be perfect. Maybe with both GET & POST if it isn't too much trouble. Thanks a lot. Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "keith chapman" <[EMAIL PROTECTED] ail.com> To axis-user@ws.apache.org 11-07-2007 07:40 cc Subject Please respond to Re: Axis2: RESTful implementation [EMAIL PROTECTED] with Axis2 he.org The WSDL 2.0 primer is a good starting place. It takes you through the concepts of WSDL 2.0 very nicely (without making things too complex). WSDL 2.0 is a whole lot clean and easy to understand. If you like I can write a sample WSDL 2.0 doc for you if you have an example in mind :). And yes you can use the http methods GET, POST, PUT & DELETE in the same service. Its just that you cant use them on the same operation. Thanks, Keith. On 7/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi Keith, Thank you for answering. When I earlier talked about using the http methods GET, POST, PUT & DELETE, I actually meant using them in the same service. WSDL 2.0 really sounds interesting. I have a little knowledge about WSDL 1.1/1.2, because I'm studying for the SCDJWS exam, but I doesn't know anything about WSDL 2.0. I guess a lot has changed since it is possible to describe how the URL should be formatted and whether to use http methods GET, POST, PUT or DELETE. Do you have or know a place where I can find simple example WSDL describing such a service? Or would it be best just start reading WSDL 2.0 HTTPBinding. Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "keith chapman" < [EMAIL PROTECTED] ail.com> To axis-user@ws.apache.org 11-07-2007 06:45 cc Subject Please respond to Re: Axis2: RESTful implementation [EMAIL PROTECTED] with Axis2 he.org See comments inline. On 7/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote: Hi, I have some questions regarding implementing a RESTfull service. After reading a lot of previous RESTish threads I got quite confused. So I hope someone can help me straightened it out. If I want to create a RESTful service with Axis2 would it then require that the service is implemented as RPC, or can other message receivers be used? Is it possible to create a RESTful service with Axis2 that can be reached in the following way: http://www.boeing.com/rest/aircraft/747 instead of http://www.boeing.com/rest/MyAircraftServices/getAircraft?model=747 Yes this can be done. REST support in Axis2 was achieved via the WSDL 2.0 HTTPBinding (If you are not familiar with WSDL this might sound a bit strange). The kind of question you asked can easily be done by deploying your service via a WSDL 2.0 description. Please have a look at the primer it has some easy to understand examples. First i actually thought that a RESTful service should implement some sort of interface with methods corresponding to GET
Re: Axis2: RESTful implementation with Axis2
Hi Keith, Thank you for answering. When I earlier talked about using the http methods GET, POST, PUT & DELETE, I actually meant using them in the same service. WSDL 2.0 really sounds interesting. I have a little knowledge about WSDL 1.1/1.2, because I'm studying for the SCDJWS exam, but I doesn't know anything about WSDL 2.0. I guess a lot has changed since it is possible to describe how the URL should be formatted and whether to use http methods GET, POST, PUT or DELETE. Do you have or know a place where I can find simple example WSDL describing such a service? Or would it be best just start reading WSDL 2.0 HTTPBinding. Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "keith chapman" <[EMAIL PROTECTED] ail.com> To axis-user@ws.apache.org 11-07-2007 06:45 cc Subject Please respond to Re: Axis2: RESTful implementation [EMAIL PROTECTED] with Axis2 he.org See comments inline. On 7/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote: Hi, I have some questions regarding implementing a RESTfull service. After reading a lot of previous RESTish threads I got quite confused. So I hope someone can help me straightened it out. If I want to create a RESTful service with Axis2 would it then require that the service is implemented as RPC, or can other message receivers be used? Is it possible to create a RESTful service with Axis2 that can be reached in the following way: http://www.boeing.com/rest/aircraft/747 instead of http://www.boeing.com/rest/MyAircraftServices/getAircraft?model=747 Yes this can be done. REST support in Axis2 was achieved via the WSDL 2.0 HTTPBinding (If you are not familiar with WSDL this might sound a bit strange). The kind of question you asked can easily be done by deploying your service via a WSDL 2.0 description. Please have a look at the primer it has some easy to understand examples. First i actually thought that a RESTful service should implement some sort of interface with methods corresponding to GET, POST, PUT & DELETE. But I read in some of the other threads that a RESTful service should only have one method. Isn't that a problem if you try to accomplice the syntax that the following articles describes. Yes you can use all 4 HTTP methods described above, depending on your requirement. Its all about using the appropriate method (Not that you must use just one method) http://www.innoq.com/blog/st/2006/06/30/rest_vs_soap_oh_no_not_again.html http://www.xfront.com/REST-Web-Services.html Where the same url has different functionality depending on how it is called (GET, POST). GET /order/{id} Get order details POST /order/{id} Add item the current version of Axis2 does not support this (But it can be included, I will file a JIRA on this and try to get it into the 1.3 release.) Please let us know if you need more help (Can even assist you in writing down the WSDL 2.0 description) Thanks, Keith. Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Keith Chapman WSO2 Inc. Oxygen for Web Services Developers. http://wso2.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Axis2: RESTful implementation with Axis2
Hi, I have some questions regarding implementing a RESTfull service. After reading a lot of previous RESTish threads I got quite confused. So I hope someone can help me straightened it out. If I want to create a RESTful service with Axis2 would it then require that the service is implemented as RPC, or can other message receivers be used? Is it possible to create a RESTful service with Axis2 that can be reached in the following way: http://www.boeing.com/rest/aircraft/747 instead of http://www.boeing.com/rest/MyAircraftServices/getAircraft?model=747 First i actually thought that a RESTful service should implement some sort of interface with methods corresponding to GET, POST, PUT & DELETE. But I read in some of the other threads that a RESTful service should only have one method. Isn't that a problem if you try to accomplice the syntax that the following articles describes. http://www.innoq.com/blog/st/2006/06/30/rest_vs_soap_oh_no_not_again.html http://www.xfront.com/REST-Web-Services.html Where the same url has different functionality depending on how it is called (GET, POST). GET /order/{id} Get order details POST /order/{id} Add item Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Rampart 1.1 - Sample07 as policy
Hi Dimuthu, Thanks for the answer. Yes, I'm sure that your are right that I'll be able to find all my questions in that specification, and I have also decided to read it now. The reason why I didn't do it from the start, was properly a hope about, that it wasn't necessary for changing from the old style to policies. With the old style of configuring, you could enable use of X.509 Token Profile without knowing much about the WSS specification, and I properly hoped that the same applied for use of policies. :-) But I still think it would be nice to have the same samples with policies as with the old style of configuring. It would ease the migration a bit and not require that you have read and understood the specification. But anyway, thank you for the effort. Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "Dimuthu Leelaratne" axis-user@ws.apache.org cc 19-02-2007 10:19 Subject Re: Rampart 1.1 - Sample07 as Please respond to policy [EMAIL PROTECTED] he.org Hi riis, Monitor the SOAP message using a TCP monitor. Then you can find answers to most of your questions. > Sample07 did it use TripleDesRsa15 or Basic128Rsa15? It uses Rsa15 for encryption. > Do you know which part of the document that was signed? SOAP Body - this is the default. I realized this by studying the SOAP message. As for the question below, please refer Security Policy specification at [1] > Did it use a Asymmetric binding? Yes. The Securit policy specification states. "The AsymmetricBinding assertion is used in scenarios in which message protection is provided by means defined in WSS: SOAP Message Security." When we used client.axis2.xml file for configuration what we did was configure WSS. > Would it be possible at all to change my service to use policies without > changing the clients. The clients are already > running with the old configuration style and it would be hard work changing > them. But it would be nice to support policies > for new clients. Yes. Cheers, Dimuthu http://wso2.org [1]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0.pdf On 2/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi Dimuthu, > > Thank you for answering. I have already tried to compare the samples from > the basic and policy folder. > But I still have some problems figuring it out. > > In the old way you didn't specify encryption protocol or whether it was > header, body or the entire soap message that should be signed. > > I have some questions then. > > Sample07 did it use TripleDesRsa15 or Basic128Rsa15? > Do you know which part of the document that was signed? > Did it use a Asymmetric binding? > > Would it be possible at all to change my service to use policies without > changing the clients. The clients are already > running with the old configuration style and it would be hard work changing > them. But it would be nice to support policies > for new clients. > > Hope you can help me! > > Regards > Multi-Support A/S > > Torben Riis > > Phone +45 96 600 600, Fax +45 96 600 601 > E-mail: [EMAIL PROTECTED] > http://www.multi-support.com > > > > "Dimuthu > Leelaratne" >[EMAIL PROTECTED]> axis-user@ws.apache.org > cc > 19-02-2007 04:37 > Subject >Re: Rampart 1.1 - Sample07 as > Please respond to policy > [EMAIL PROTECTED] > he.org > > > > > > > > > Hi Riis, > > Please have a look at samples/polic
Re: SoapMonitor NullPointerException
Hi, Where have you placed the soapmonitorPhase? You can get a NPE if it is placed with the system phases! Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "Kang, Kamaljeet K." <[EMAIL PROTECTED] To labs.com> cc 16-02-2007 09:22 Subject SoapMonitor NullPointerException Please respond to [EMAIL PROTECTED] he.org Hi, Enabling SOAPMonitor is throwing NPE and causing an operation to fail. It works fine if SOAPMonitor is not enabled. Why would failure in SOAPMonitor module result in operation failure? org.apache.axis2.AxisFault: java.lang.NullPointerException at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java :396) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper ation.java:352) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO peration.java:273) at tellabs.mtosi.DiscoveryServiceStub.getAllCapabilities(DiscoveryServiceSt ub.java:170) at tellabs.mtosi.DiscoveryServiceStub.main(DiscoveryServiceStub.java:464) Caused by: java.lang.Exception: org.apache.axis2.AxisFault: java.lang.NullPointerException; nested exception is: java.lang.NullPointerException at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:319) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:228) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2 12) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:81 8) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process( Http11Protocol.java:624) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.NullPointerException at com.ctc.wstx.sw.BaseNsStreamWriter.doWriteAttr(BaseNsStreamWriter.java:4 67) at com.ctc.wstx.sw.BaseNsStreamWriter.writeAttribute(BaseNsStreamWriter.jav a:229) at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeAttribute(MTOMXMLStrea mWriter.java:134) at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(OMSeri alizerUtil.java:387) at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(OMSeri alizerUtil.java:171) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI mpl.java:803) at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMS ourcedElementImpl.java:555) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI mpl.java:792) at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMS ourcedElementImpl.java:546) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI mpl.java:807) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI mpl.java:792) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI mpl.java:807) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPE nvelopeImpl.java
Re: Rampart 1.1 - Sample07 as policy
Hi Dimuthu, Thank you for answering. I have already tried to compare the samples from the basic and policy folder. But I still have some problems figuring it out. In the old way you didn't specify encryption protocol or whether it was header, body or the entire soap message that should be signed. I have some questions then. Sample07 did it use TripleDesRsa15 or Basic128Rsa15? Do you know which part of the document that was signed? Did it use a Asymmetric binding? Would it be possible at all to change my service to use policies without changing the clients. The clients are already running with the old configuration style and it would be hard work changing them. But it would be nice to support policies for new clients. Hope you can help me! Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "Dimuthu Leelaratne" axis-user@ws.apache.org cc 19-02-2007 04:37 Subject Re: Rampart 1.1 - Sample07 as Please respond to policy [EMAIL PROTECTED] he.org Hi Riis, Please have a look at samples/policy folder in rampart 1.1 distribution. It has 4 samples and they could help you. Cheers, Dimuthu On 2/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm trying to change my implementation to use policies instead of the old > way. > But I have some problems figuring it out. > > If I should implement sample07 as policies instead of the below way, what > would it take? > Could some one give an example of "Sample07" from the Rampart 1.1 > distribution as policies? > > Client (axis.conf) > > > Timestamp Encrypt Signature > client > > org.apache.rampart.samples.sample07.PWCBHandler > client.properties > DirectReference > SKIKeyIdentifier > service > > > > > > Timestamp Encrypt Signature > > org.apache.rampart.samples.sample07.PWCBHandler > client.properties > > > > Service (service.conf) > > > Timestamp Encrypt Signature > > org.apache.rampart.samples.sample07.PWCBHandler > service.properties > > > > > > Timestamp Encrypt Signature > service > > org.apache.rampart.samples.sample07.PWCBHandler > service.properties > DirectReference > SKIKeyIdentifier > useReqSigCert > > > > Regards > Multi-Support A/S > > Torben Riis > > Phone +45 96 600 600, Fax +45 96 600 601 > E-mail: [EMAIL PROTECTED] > http://www.multi-support.com > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Rampart 1.1 - Sample07 as policy
Hi, I'm trying to change my implementation to use policies instead of the old way. But I have some problems figuring it out. If I should implement sample07 as policies instead of the below way, what would it take? Could some one give an example of "Sample07" from the Rampart 1.1 distribution as policies? Client (axis.conf) Timestamp Encrypt Signature client org.apache.rampart.samples.sample07.PWCBHandler client.properties DirectReference SKIKeyIdentifier service Timestamp Encrypt Signature org.apache.rampart.samples.sample07.PWCBHandler client.properties Service (service.conf) Timestamp Encrypt Signature org.apache.rampart.samples.sample07.PWCBHandler service.properties Timestamp Encrypt Signature service org.apache.rampart.samples.sample07.PWCBHandler service.properties DirectReference SKIKeyIdentifier useReqSigCert Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 + Rampart on WebSphere gives com.ibm.crypto.provider.RSA fault
Hi, Yes I had bcprov-jdk13-133.jar from the Rampart 1.1 distriubtion in WEB-INF/lib. But I have solved the problem by updating bouncycastle to bcprov-jdk14-135.jar. Now it works for both Tomcat 5.5, WebSphere 5.1 and WebSphere 6.0 Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "Davanum Srinivas" <[EMAIL PROTECTED] To m>axis-user@ws.apache.org cc 14-02-2007 18:11 Subject Re: Axis2 + Rampart on WebSphere Please respond to gives com.ibm.crypto.provider.RSA [EMAIL PROTECTED] fault he.org Do you have bouncycastle jar in your WEB-INF/lib? thanks, dims On 2/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm testing Axis2 1.1.1 with Rampart 1.1 on WebSphere and the services > returns the following fault: > Remote exception: org.apache.axis2.AxisFault: com.ibm.crypto.provider.RSA > > I'm testing encryption of soap messages as in sample05 from the Rampart 1.1 > distribution. > > My implementation works on Tomcat 5.5 but not on WebSphere. I have tested > with both WebSphere 5.1 and 6.0. > The classloader for the web module is set to PARENT_LAST! > > I can't figure out why the service casts a "com.ibm..." exception. > > Does anyone have a suggestion? > > > Regards > Multi-Support A/S > > Torben Riis > > Phone +45 96 600 600, Fax +45 96 600 601 > E-mail: [EMAIL PROTECTED] > http://www.multi-support.com > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Axis2 + Rampart on WebSphere gives com.ibm.crypto.provider.RSA fault
Hi, I'm testing Axis2 1.1.1 with Rampart 1.1 on WebSphere and the services returns the following fault: Remote exception: org.apache.axis2.AxisFault: com.ibm.crypto.provider.RSA I'm testing encryption of soap messages as in sample05 from the Rampart 1.1 distribution. My implementation works on Tomcat 5.5 but not on WebSphere. I have tested with both WebSphere 5.1 and 6.0. The classloader for the web module is set to PARENT_LAST! I can't figure out why the service casts a "com.ibm..." exception. Does anyone have a suggestion? Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2: Security phase (Rampart) alters response
Sorry, I forgot to attach the wsdl. (See attached file: URIService.wsdl)(See attached file: maTypes.xsd)(See attached file: services.xml) Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "Ruchith Fernando" axis-user@ws.apache.org cc 08-02-2007 09:47 Subject Re: Axis2: Security phase (Rampart) Please respond to alters response [EMAIL PROTECTED] he.org Hi, Can you please create a JIRA issue and add the WSDL. I'll try to reproduce the issue. Axis2: Security phase (Rampart) alters response Thanks, Ruchith On 2/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > I have registered a strange behaviour with Axis2 1.1.1 and rampart 1.1. It > seams like rampart alters the soap body response. > > Below are two soap response messages, taken with soapUI. One with Rampart > enabled and one without. As you can see the elements in > RetrieveFolderURIResponse isn't the same. > > Response without Rampart > http://schemas.xmlsoap.org/soap/envelope/ > "> > > > http://www.multi-support.com/URIService/types";> > www.mrtg.org > www.google.com > mytest > > > > > Response with rampart enabled > http://schemas.xmlsoap.org/soap/envelope/ > "> > > > http://www.multi-support.com/URIService/types";> > www.mrtg.org > http://www.multi-support.com/xsd/matypes > ">www.google.com > mytest > > > > > > If we look at the definition in the wsdl, it looks like element types from > RetrieveFolderURIResponse is used as element name > in the response when rampart is enabled. But only for types referring to > simple and complex types. > > Rampart enabled > .. > http://www.multi-support.com/URIService/types";> > www.mrtg.org > http://www.multi-support.com/xsd/matypes > ">www.google.com > mytest > > > > > > > > .. > > > Snippet from URIService.wsdl >xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; > targetNamespace="http://www.multi-support.com/URIService/"; > xmlns:ma="http://www.multi-support.com/URIService/types"; > xmlns:mau="http://www.multi-support.com/URIService/"; > xmlns:mat="http://www.multi-support.com/xsd/matypes"; > xmlns:xsd="http://www.w3.org/2001/XMLSchema";> > >namespace="http://www.multi-support.com/xsd/matypes"; > schemaLocation="maTypes.xsd" /> > > > > > > > > > > > > > > > > Snippet from maTypes.xsd > > > > > > Rampart is only enabled for inflow security. > > Snippet from Services.xml > > > > UsernameToken > com.multisupport.maservices.PWCBHandler > > > > > > I have enabled the SOAPMonitor and if the soapmonitorPhase is placed before > the Security phase, then the response looks right > whether or not Rampart is enabled. But if I place the soapmonitorPhase > after the Security phase, then the monitor reflects the result > actually returned. > > Axis2.xml > > > > > > > > > > > > Regards > Multi-Support A/S > > Torben Riis > --
Re: Axis2: Security phase (Rampart) alters response
Hi Ruchith, Thanks for the fast answer. I have created jira AXIS2-2139. Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com "Ruchith Fernando" axis-user@ws.apache.org cc 08-02-2007 09:47 Subject Re: Axis2: Security phase (Rampart) Please respond to alters response [EMAIL PROTECTED] he.org Hi, Can you please create a JIRA issue and add the WSDL. I'll try to reproduce the issue. Axis2: Security phase (Rampart) alters response Thanks, Ruchith On 2/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > I have registered a strange behaviour with Axis2 1.1.1 and rampart 1.1. It > seams like rampart alters the soap body response. > > Below are two soap response messages, taken with soapUI. One with Rampart > enabled and one without. As you can see the elements in > RetrieveFolderURIResponse isn't the same. > > Response without Rampart > http://schemas.xmlsoap.org/soap/envelope/ > "> > > > http://www.multi-support.com/URIService/types";> > www.mrtg.org > www.google.com > mytest > > > > > Response with rampart enabled > http://schemas.xmlsoap.org/soap/envelope/ > "> > > > http://www.multi-support.com/URIService/types";> > www.mrtg.org > http://www.multi-support.com/xsd/matypes > ">www.google.com > mytest > > > > > > If we look at the definition in the wsdl, it looks like element types from > RetrieveFolderURIResponse is used as element name > in the response when rampart is enabled. But only for types referring to > simple and complex types. > > Rampart enabled > .. > http://www.multi-support.com/URIService/types";> > www.mrtg.org > http://www.multi-support.com/xsd/matypes > ">www.google.com > mytest > > > > > > > > .. > > > Snippet from URIService.wsdl >xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; > targetNamespace="http://www.multi-support.com/URIService/"; > xmlns:ma="http://www.multi-support.com/URIService/types"; > xmlns:mau="http://www.multi-support.com/URIService/"; > xmlns:mat="http://www.multi-support.com/xsd/matypes"; > xmlns:xsd="http://www.w3.org/2001/XMLSchema";> > >namespace="http://www.multi-support.com/xsd/matypes"; > schemaLocation="maTypes.xsd" /> > > > > > > > > > > > > > > > > Snippet from maTypes.xsd > > > > > > Rampart is only enabled for inflow security. > > Snippet from Services.xml > > > > UsernameToken > com.multisupport.maservices.PWCBHandler > > > > > > I have enabled the SOAPMonitor and if the soapmonitorPhase is placed before > the Security phase, then the response looks right > whether or not Rampart is enabled. But if I place the soapmonitorPhase > after the Security phase, then the monitor reflects the result > actually returned. > > Axis2.xml > > > > > > > > > > > > Regards > Multi-Support A/S > > Torben Riis > > Phone
Axis2: Security phase (Rampart) alters response
Hi, I have registered a strange behaviour with Axis2 1.1.1 and rampart 1.1. It seams like rampart alters the soap body response. Below are two soap response messages, taken with soapUI. One with Rampart enabled and one without. As you can see the elements in RetrieveFolderURIResponse isn't the same. Response without Rampart http://schemas.xmlsoap.org/soap/envelope/ "> http://www.multi-support.com/URIService/types";> www.mrtg.org www.google.com mytest Response with rampart enabled http://schemas.xmlsoap.org/soap/envelope/ "> http://www.multi-support.com/URIService/types";> www.mrtg.org http://www.multi-support.com/xsd/matypes ">www.google.com mytest If we look at the definition in the wsdl, it looks like element types from RetrieveFolderURIResponse is used as element name in the response when rampart is enabled. But only for types referring to simple and complex types. Rampart enabled .. http://www.multi-support.com/URIService/types";> www.mrtg.org http://www.multi-support.com/xsd/matypes ">www.google.com mytest .. Snippet from URIService.wsdl http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; targetNamespace="http://www.multi-support.com/URIService/"; xmlns:ma="http://www.multi-support.com/URIService/types"; xmlns:mau="http://www.multi-support.com/URIService/"; xmlns:mat="http://www.multi-support.com/xsd/matypes"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";> http://www.multi-support.com/xsd/matypes"; schemaLocation="maTypes.xsd" /> Snippet from maTypes.xsd Rampart is only enabled for inflow security. Snippet from Services.xml UsernameToken com.multisupport.maservices.PWCBHandler I have enabled the SOAPMonitor and if the soapmonitorPhase is placed before the Security phase, then the response looks right whether or not Rampart is enabled. But if I place the soapmonitorPhase after the Security phase, then the monitor reflects the result actually returned. Axis2.xml Regards Multi-Support A/S Torben Riis Phone +45 96 600 600, Fax +45 96 600 601 E-mail: [EMAIL PROTECTED] http://www.multi-support.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]