Re: Message level service .. Attachment problems
Now that i solve config problems to work with SOAPMessage i found problems to work with attachments... If i send a simple message everything works fine, if i send a message with attachments it throws this error: 11:00:41,080 ERROR [STDERR] 15-ott-2007 11.00.41 com.sun.xml.messaging.saaj.soap.EnvelopeFactory createEnvelope GRAVE: SAAJ0511: Unable to create envelope from given source 11:00:41,083 ERROR [STDERR] 15-ott-2007 11.00.41 org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Unable to create envelope from given source: at org.apache.cxf.jaxws.interceptors.DispatchInDatabindingInterceptor$PostDispatchSOAPHandlerInterceptor.handleMessage(DispatchInDatabindingInterceptor.java:191) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73) at org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:79) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:235) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:140) at org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:278) at org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:256) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595) Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source: at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:114) at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java:71) at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:125) at org.apache.cxf.jaxws.interceptors.DispatchInDatabindingInterceptor$PostDispatchSOAPHandlerInterceptor.handleMessage(DispatchInDatabindingInterceptor.java:189) ... 28 more Caused by: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501) at com.sun.xml.messaging.saaj.util.transform.EfficientStreamingTransformer.transform(EfficientStreamingTransformer.java:390) at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:102) ... 31 more Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog. at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269) at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) ... 33 more Seems that the message isn't well formed, but it's from the same client i used for axis and it worked for
RE: CXF + ACEGI security - full example
Thank you for the example! | | From: | | --| |Anne Racel [EMAIL PROTECTED] | --| | | To:| | --| |cxf-user@incubator.apache.org | --| | | Date: | | --| |10/07/2007 08:54 AM | --| | | Subject: | | --| |RE: CXF + ACEGI security - full example | --| Oops! - this should be: your class that implements CallbackHandler entry key=passwordCallbackClass value=[your class that extends CallbackHandler/ Anne Racel Senior Software Engineer Cormine Intelligent Data
RE: JSR 181 Document literal wrapped
Where are you getting the requirement that the response be named 'Response', as opposed to, say, OpNameResponse? Aside from that, I think that what you are asking for is the default behavior of JAX-WS + JAXB. -Original Message- From: cunparis [mailto:[EMAIL PROTECTED] Sent: Monday, October 15, 2007 9:02 AM To: cxf-user@incubator.apache.org Subject: JSR 181 Document literal wrapped I'd like to use JSR 181 to expose a class as a web service using document literal wrapped encoding. In DLW each operation must have one parameter with the same name as the operation, and the return object has the same name + Response. I'm curious if I have to follow these standards in Java when I design the interfaces or if I can just make normal java methods and have JSR 181 generate the service DLW? Anyone tried this? -- View this message in context: http://www.nabble.com/JSR-181---Document- literal-wrapped-tf4627235.html#a13212227 Sent from the cxf-user mailing list archive at Nabble.com.
Destination factory problem
Hi I have this Np DestinationFactory found problem when running a system test. I've checked archives, the suggested solutions are all about doing some programmatic bus setup, etc... Unfortunately it's not something I can do in my scenario. Here's my configuration : beans xmlns:web=http://java.sun.com/xml/ns/j2ee; xmlns:sunjaxws=http://java.sun.com/xml/ns/jax-ws/ri/runtime; xmlns:xalan=http://xml.apache.org/xslt; xmlns:httpj=http://cxf.apache.org/transports/http-jetty/configuration; xmlns:soap=http://cxf.apache.org/bindings/soap; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:jaxws=http://cxf.apache.org/jaxws; xmlns=http://www.springframework.org/schema/beans; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd import resource=classpath:META-INF/cxf/cxf.xml / import resource=classpath:META-INF/cxf/cxf-extension-soap.xml / import resource=classpath:META-INF/cxf/cxf-extension-http.xml / jaxws:endpoint id=1...other attributes omiited for brevity/ jaxws:endpoint id=2...other attributes omiited for brevity /beans In debug mode I'm seeing *two* buses created, one bus has a DestinationFactoryManagerImpl initialized properly, for the second bus, no DestinationFactoryManagerImpl is initilized (no register() method is called on it) and hence at the service init time an exception is thrown Can someone please show how one can configure two endpoints such that a single bus is created... Thanks, Sergey IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
SOAPMessage with Attachment service problems
Hi all, i deploy a message level service that receive a SOAPMessage and works fine until i send a message with attachment: 18:37:13,026 ERROR [STDERR] 15-ott-2007 18.37.13 com.sun.xml.messaging.saaj.soap.EnvelopeFactory createEnvelope GRAVE: SAAJ0511: Unable to create envelope from given source 18:37:13,028 ERROR [STDERR] 15-ott-2007 18.37.13 org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Unable to create envelope from given source: at org.apache.cxf.jaxws.interceptors.DispatchInDatabindingInterceptor$PostDispatchSOAPHandlerInterceptor.handleMessage(DispatchInDatabindingInterceptor.java:191) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73) at org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:79) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:235) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:140) at org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:278) at org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:256) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595) Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source: at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:114) at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java:71) at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:125) at org.apache.cxf.jaxws.interceptors.DispatchInDatabindingInterceptor$PostDispatchSOAPHandlerInterceptor.handleMessage(DispatchInDatabindingInterceptor.java:189) ... 28 more Caused by: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501) at com.sun.xml.messaging.saaj.util.transform.EfficientStreamingTransformer.transform(EfficientStreamingTransformer.java:390) at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:102) ... 31 more Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog. at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269) at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source) this is the client: package org.openspcoop.test.client; import java.net.URL; import javax.xml.soap.MessageFactory; import javax.xml.soap.SOAPConnection; import javax.xml.soap.SOAPMessage; import javax.xml.soap.SOAPFactory; import javax.xml.soap.SOAPConnectionFactory; import javax.xml.soap.AttachmentPart; public class
Re: about cxf security
Hi Feng, There are currently so WS-Security samples. You can look directly at the WS security system tests, though, for some examples of how to configure CXF endpoints for use with WS- Security (message protection, for example). http://tinyurl.com/3azs3j [1] These tests are based loosly on some WCF interop endpoints provided by Microsoft. [1] https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/ test/java/org/apache/cxf/systest/ws/security/ On Oct 15, 2007, at 12:49 PM, fzhang wrote: I have two questions: 1. Is there any security related implementation/test? I could not find it in apache-cxf-2.0.2-incubator\samples. 2. I checked the http://arsenalist.com/2007/07/31/cxf-ws-security-using-jsr-181- interceptor-annotations-xfire-migration/ . The picture does not look complete to me, there is no wsdl presented in the sample and certain code does not compile. Also, the client and server are all in JAVA implementation, I am wondering how in .NET to use the callbacks. Is the security limited to communications between JAVA only? Thanks in advance! Feng -- View this message in context: http://www.nabble.com/about-cxf- security-tf4628816.html#a13216919 Sent from the cxf-user mailing list archive at Nabble.com.
Re: JAXB and namespace prefixes
It is right . package-info.class is only used to generate schema element . It will not impact on the namespace prefixes for the wsdl:definition element. -jim Benson Margulies wrote: At least with CXF, the namespace prefixes for the wsdl:definition element ignore any @XmlNs mappings on the package-info.java of the package containing the SEI. Is this right?
Re: Are namespace prefixes normative in jaxb?
It is ok to set this property to JAXB Marshaller to control the namespace prefix. Currently we use hard code to set properties for JAXB Marshaller , maybe we need more flexible way to configure JAXB Marshaller.(use spring configuration ? ) -Jim Benson Margulies wrote: I see a way to get a grip on this problem via com.sun.xml.bind.namespacePrefixMapper. Does CXF want to have a way to communicate one of these to the JAXB marshaller? -Original Message- From: Benson Margulies [mailto:[EMAIL PROTECTED] Sent: Sunday, October 14, 2007 5:07 PM To: cxf-user@incubator.apache.org Subject: Are namespace prefixes normative in jaxb? I've got the following situation. I've used annotations to control all the namespace prefixes in my service. The wsdl I can pull with ?wsdl or java2wsdl has the prefixes I expect. However, responses from my service do not use the specified prefix. Here's an example. Note the use of 'ns1', which is nowhere to be seen in my wsdl. I appreciate that from a pure XSD perspective I have no cause for complaint here, but my poor tiny-brained scripted language client would really like to avoid having a full XML parser, given that IE before version 7 was/is namespace-ignorant in the DOM. The critical question here is whether CXF has any influence over the behavior of the JAXB RI in this respect. soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body ns1:echoResponse xmlns:ns1=uri:com.basistech.ws.fortest returnEcho This/return /ns1:echoResponse /soap:Body /soap:Envelope