Re: JMS performance
Firstly remember that you're probably not comparing apples to oranges. The default in JMS is to use persistence; that means the messages are all written to disk before they are sent (on both the request and probably response) which is gonna add hugely to the latency as each thread is gonna be spending most of its time waiting for stuff to be stored on disk. So if you really wanna compare like for like, turn off persistence in JMS - or use HTTP with WS-RM with a *persistent* implementation (not a RAM version). Also make absolutely sure you are pooling all the JMS resources; creating connections, sessions, producers, consumers on a per message basis is insanely slow - they should all be created up front. For more help see... http://activemq.apache.org/how-do-i-use-jms-efficiently.html http://open.iona.com/wiki/display/ProdInfo/FUSE+Message+Broker+Performance+Tuning+Guide But hey if you're happy with HTTP and don't have any reliable messaging requirements there's no real need to change. On 26/11/2007, Mayank Thakore <[EMAIL PROTECTED]> wrote: > Hi Ulhas, > > I am using default temp. queue. Earlier when working with XFire we had > tried static reply queue. But are just gearing up with CXF. > > I was interested in relative performance of http / jms. We have been > given performance requirements for our project. While http meets just > as it is, jms is a far cry from what we must achieve. > > I am currently looking at three things to ascertain where jms could be > going slow: > > 1. OpenJMS server (persistence causing delay?) > 2. Our WSDL (sync/async differs?) > 3. CXF jms transport > > I am still reading what a web service is after finishing my first > project where we had used XFire. > > Thanks for any and all help > > Regards > Mayank > > > On Nov 26, 2007 9:13 PM, Ulhas Bhole <[EMAIL PROTECTED]> wrote: > > Hi Mayank, > > > > I don't think anyone has done the benchmark on the cost of > > request/response on JMS transport. > > > > Are you using static reply queue or using default temp. queue for response? > > > > Regards, > > > > Ulhas Bhole > > > > > > Mayank Thakore wrote: > > > Hi, > > > > > > I wrote a simple WSDL based web service. > > > > > > In HTTP I am getting 1000 request/response in 19 secs. > > > But, in JMS 1000 request/response cost 110+ secs. > > > > > > Is this OK? Are there any benchmarks? > > > > > > Any pointers on what can be done for JMS? > > > I am using CXF 2.0.2 and OpenJMS. > > > > > > Thanks! > > > Mayank > > > > > > > > > IONA Technologies PLC (registered in Ireland) > > Registered Number: 171387 > > Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland > > > -- James --- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com
RE: what would be the best place to introduce xslt transformer for response message
Here you go. It looks like below (roughly): import java.io.IOException; import java.io.OutputStream; import javax.xml.transform.Transformer; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import org.apache.cxf.binding.soap.SoapMessage; import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor; import org.apache.cxf.interceptor.Fault; import org.apache.cxf.io.CachedOutputStream; import org.apache.cxf.phase.Phase; public class XSLTOutInterceptor extends AbstractSoapInterceptor { private OutputStream originalOs; public XSLTOutInterceptor() { super(Phase.PRE_PROTOCOL); } public void handleMessage(SoapMessage message) throws Fault { boolean isOutbound = false; isOutbound = message == message.getExchange().getOutMessage() || message == message.getExchange().getOutFaultMessage(); if (isOutbound) { //replace the original output stream with our own outputstream, //so that the output can be cached for xslt transformation, otherwise //the output might be flushed to socket before xslt. originalOs = message.getContent(OutputStream.class); CachedOutputStream cos = new CachedOutputStream(); message.setContent(OutputStream.class, cos); // Add an ending interceptor to read the cached output and do xslt message.getInterceptorChain().add(new XSLTOutEndingInterceptor()); } } public class XSLTOutEndingInterceptor extends AbstractSoapInterceptor { public XSLTOutEndingInterceptor() { super(Phase.PRE_PROTOCOL_ENDING); } public void handleMessage(SoapMessage message) throws Fault { try { CachedOutputStream cos = (CachedOutputStream)message.getContent(OutputStream.class); //the output is cached in CachedOutputStream, now lets do xslt. Transformer trans =m ... // write the transformed result back to the original output stream trans.transform(new StreamSource(cos.getInputStream()), new StreamResult(originalOs)); //set the original output stream back message.setContent(OutputStream.class, originalOs); } catch (IOException ioe) { ioe.printStackTrace(); } } } } > -Original Message- > From: mule1 [mailto:[EMAIL PROTECTED] > Sent: 2007年11月26日 22:29 > To: cxf-user@incubator.apache.org > Subject: RE: what would be the best place to introduce xslt transformer for > response message > > > Hello, > > I am not clear exactly what you said. I looked at the SAAJOutInterceptor, > but didn't clearly understand how I can get the message content - either > bytes or something that I can use to tranform with an xslt transfomer. If > possible, can you provide me some sample lines of code? Thanks. > -- > View this message in context: > http://www.nabble.com/what-would-be-the-best-place-to-introduce-xslt-tr > ansformer-for-response-message-tf4862565.html#a13950419 > Sent from the cxf-user mailing list archive at Nabble.com. IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: Error or Debug?
Hi , Take easy , it is information level message , the "ERROR [STDERR]" message header is cause by the java.util.log is directed to error message output stream which is holden by log4j. I highly recommend you to try out the cxf 2.0.3 in which we did some enhancement on the logger system. Willem. Eman Ali al-Maktari [IT Department] wrote: Oops! it looks that I've sent the wrong error message! This is the one I'm talking about: INFO: Outbound Message -- http://schemas.xmlsoap.org/soap/envelope/";>http://ws.linkinnews.lit.com/"/> -- 16:47:10,485 ERROR [STDERR] Nov 25, 2007 4:47:10 PM org.apache.cxf.interceptor.LoggingInInterceptor handleMessage INFO: Inbound Message -- Headers: {Content-Length=[912], SOAPAction=[""], Server=[Jetty(6.1.5)], content-type=[text/xml; charset=utf-8], null=[HTTP/1.1 200 OK]} Message: http://schemas.xmlsoap.org/soap/envelope/";>http://ws.linkinnews.lit.com/";> ... I dumped the soap request and response by putting the following in my cxf.xml: -- - Original Message - From: "Eman Ali al-Maktari [IT Department]" <[EMAIL PROTECTED]> To: cxf-user@incubator.apache.org Sent: Sunday, November 25, 2007 9:31:31 AM (GMT+0300) Asia/Kuwait Subject: Re: Error or Debug? Hi Willem, thanks for the reply.. -- This is the full messages: 09:13:01,578 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory,logInbound,logOutbound]; root of BeanFactory hierarchy] 09:13:04,265 ERROR [STDERR] Nov 25, 2007 9:13:04 AM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass INFO: Creating Service {http://ws.linkinnews.lit.com/}CategoriesImplService from class com.lit.linkinnews.ws.CategoriesImpl 09:13:04,765 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/ -- and yes, I'm using log4j in JBoss - Original Message - From: "Willem2" <[EMAIL PROTECTED]> To: cxf-user@incubator.apache.org Sent: Sunday, November 25, 2007 4:14:20 AM (GMT+0300) Asia/Kuwait Subject: Re: Error or Debug? I can't tell it just from a single message. It may relate to your log configuration, do you use log4j in your container(tomcat) ? Because CXF uses java.util.logger, even it is debug information, you will get ERROR [STDERR] message. In CXF2.0.3 we did some refactoring work in logger, you should try it :) Willem. Eman Ali al-Maktari [IT Department] wrote: - Original Message - From: "Eman Ali al-Maktari [IT Department]" <[EMAIL PROTECTED]> To: cxf-user@incubator.apache.org Sent: Wednesday, November 21, 2007 7:03:18 PM (GMT+0300) Asia/Kuwait Subject: Error or Debug? Hi all, is this error or just a debugging info? 2007-11-21 18:48:49,633 ERROR [STDERR] Nov 21, 2007 6:48:49 PM org.apache.cxf.interceptor.LoggingInInterceptor handleMessage -- Best Regards, Eman Ali al-Maktari Software Engineer Technical Department LinkInTime Get Mobile ))) www.linkintime.com Mobile :: (00967) 71 2000 834 Office :: (00967) 1 427 377 Fax :: (00967) 1 428 851 LinkInTime Ltd. Iran Street Haddah - Sana'a - P.O.Box. 16871, YEMEN -- Best Regards, Eman Ali al-Maktari Software Engineer Technical Department LinkInTime Get Mobile ))) www.linkintime.com Mobile :: (00967) 71 2000 834 Office :: (00967) 1 427 377 Fax :: (00967) 1 428 851 LinkInTime Ltd. Iran Street Haddah - Sana'a - P.O.Box. 16871, YEMEN
RE: Throwing faults from within an Interceptor
> -Original Message- > From: Christian Vest Hansen [mailto:[EMAIL PROTECTED] > Sent: 2007年11月26日 18:36 > To: cxf-user@incubator.apache.org > Subject: Re: Throwing faults from within an Interceptor > > Hello Jervis. > > > Make sure the exception thrown from your interceptor is declared as an > exception on the operation being invoked > > It is. It is declared to be thrown in the WSDL and on my implementation > methods. > > > was the MyFault class generated by wsdltojava? does it have the WebFault > annotation? > > Yes and yes. > > > Take a look into WebFaultOutInterceptor. handleMessage(), the code might > tell you why WebFaultOutInterceptor did not recognize your exception as a > checked exception. > > Looks like it should work, but I can't help thinking that it might be > because my interceptor runs PRE_PROTOCOL. Are we certain that faults > always go through this WebFaultOutInterceptor? > It should, if you are using JAX-WS frontend. Where your interceptor sits does not really matter, as when the exception is thrown from the outbound interceptor chain, CXF will start a new interceptor chain to deal with exceptions (fault out interceptor chain). Can you set your log level to FINE to see what interceptors you have in your fault out chain. Thanks, Jervis > > 2007/11/26, Liu, Jervis <[EMAIL PROTECTED]>: > > Hi, it is possible to throw a checked Exception from CXF interceptors. Make > sure the exception thrown from your interceptor is declared as an exception > on the operation being invoked, otherwise this exception will not be > recognized as a checked Exception. Also was the MyFault class generated by > wsdltojava? does it have the WebFault annotation? The checked exception is > unmarshalled by WebFaultOutInterceptor and its super class > FaultOutInterceptor. If the exception is not recognized as checked exception > by WebFaultOutInterceptor, the exception will be handled by the default > protocol binding fault interceptors such as Soap11FaultOutInterceptor and > Soap12FaultOutInterceptor. Take a look into WebFaultOutInterceptor. > handleMessage(), the code might tell you why WebFaultOutInterceptor did > not recognize your exception as a checked exception. > > > > Let me know if you have any further questions, > > > > Jervis > > > > > -Original Message- > > > From: Christian Vest Hansen [mailto:[EMAIL PROTECTED] > > > Sent: 2007年11月23日 17:56 > > > To: cxf-user@incubator.apache.org > > > Subject: Throwing faults from within an Interceptor > > > > > > I have a WSDL that defines MyFault and all of my operations can > > > potentially throw this fault. This fault has some custom elements and > > > stuff, so it is not an ordinary SoapFault, and it got its own > > > Exception class when I generated my Java code. > > > > > > When I throw this fault from within an operation in my WebServiceImpl > > > class, all of the custom cruft I put in this fault gets marshalled > > > correctly. > > > > > > However, I also have an Interceptor (that operates in the > > > Phase.PRE_PROTOCOL phase) that want to throw faults as well, and > > > preferably faults defined in my WSDL. So in the Interceptors > > > handleMessage() I do something like this: > > > > > > throw new Fault(new MyFault("Bad stuff")); > > > > > > When I do this, I only get an ordinary soap fault with a "Bad stuff" > > > fault string, but all of the things that are custom to the MyFault > > > dosn't get marshalled properly. > > > > > > So, is there any way that I can remedy this? Can I make an interceptor > > > throw a properly marshalled custom soap fault? > > > > > > CXF version 2.0.3. > > > > > > -- > > > Venlig hilsen / Kind regards, > > > Christian Vest Hansen. > > > > > > IONA Technologies PLC (registered in Ireland) > > Registered Number: 171387 > > Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland > > > > > -- > Venlig hilsen / Kind regards, > Christian Vest Hansen. IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: disable-address-updates breaks ServiceName?wsdl url
Can I see your whole web.xml and endpoint configuration file (bean.xml or cxf-servlet.xml)? I think there must be something wrong with them. BTW, Can you get the wsdl by removing the disable-address-updates and base-addresses parameters in your web.xml? Willem. Christian Vest Hansen wrote: I tried this, but I can't seem to hit home on any of these base-addresses: http://localhost:8080/myapp http://localhost:8080/myapp/ http://localhost:8080/myapp/services http://localhost:8080/myapp/services/ Regardless, my point was that I still wanted to access the wsdl at the same url, just without having updated endpoint urls in the wsdl. 2007/11/25, Willem2 <[EMAIL PROTECTED]>: If you set the disable-address-updates , you also need to set the base-address like http://localhost:8080/myapp Since CXF servlet will not update the endpoint address with the request url, you need to specify the base-address to build up a real accessible address for the endpoint. Willem. Christian Vest Hansen wrote: Usually, you can access the WSDL of a service by appending ?wsdl to the endpoint url and end up with something like this: http://localhost:8080/myapp/ServiceName?wsdl However, if you add the disable-address-updates init-param to your CXFServlet in web.xml like this: CXFServlet CXF Servlet org.apache.cxf.transport.servlet.CXFServlet disable-address-updates true 1 Then you're no longer able to access the WSDL file at the address above. Is this correct behaviour? I'de rather like to be able to access the WSDL regardless of the presence of this init-param. -- Venlig hilsen / Kind regards, Christian Vest Hansen. -- View this message in context: http://www.nabble.com/disable-address-updates-breaks-ServiceName-wsdl-url-tf4862292.html#a13931696 Sent from the cxf-user mailing list archive at Nabble.com.
Questions about CXF WS-RM sample
Hello, I've been going through CXF's Reliable Messaging sample[1] and had a couple of questions about it. The WS_RM sample involves a client[2] that sends four messages to the service[3]. The client has a MessageLossSimulator[4] interceptor that intentionally causes the 2nd and 4th messages to be discarded. Later, the client resends the two missing messages. Here's my questions: 1.) How does the service know that there exist messages #2 and #4 that are missing (so it would request them)? Or, is it the client that detects that the server never got the two messages and hence resends them? 2.) The MessageLossSimulator discards every other message. Why doesn't discard one or the two resended messages? Thanks, Glen [1] http://tinyurl.com/2pcler [2] http://tinyurl.com/3ymxml [3] http://tinyurl.com/2wtluj [4] http://tinyurl.com/2ks3mq
RE: Error with wsdl2java from maven
Yep, that was it, works fine now, thanks! -Original Message- From: Beryozkin, Sergey [mailto:[EMAIL PROTECTED] Sent: Monday, November 26, 2007 3:40 PM To: cxf-user@incubator.apache.org Subject: RE: Error with wsdl2java from maven Most likely what this means is that the module you're building has some dependencies which pull in older Xerces impls, Say xerces 2.6.2... What you can do is to remove a content of xerces section in your mvn repo, except for the latest 2.8.1 one and then do mvn -o install in the module which fails, thus identifying dependencies to blame. You can then explicitly exclude older Xerces dependencies from being pulled in. Alterantively you may want to try to fork a wsdl-to-java for your particular module using fork=once property Cheers, Sergey -Original Message- From: Silberman, Nathan [mailto:[EMAIL PROTECTED] Sent: 26 November 2007 20:07 To: cxf-user@incubator.apache.org Subject: Error with wsdl2java from maven Has anybody encountered the following error type when using wsdl2java from maven? The error: [INFO] [ERROR] BUILD ERROR [INFO] [INFO] org.apache.xerces.dom.DeferredDocumentImpl.getInputEncoding()Ljava/lang/ S tring; [INFO] [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: org.apache.xerces.dom.De ferredDocumentImpl.getInputEncoding()Ljava/lang/String; at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:564) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:480) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:459) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) at org.apache.maven.cli.MavenCli.main(MavenCli.java:280) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: org.apache.xerces.dom .DeferredDocumentImpl.getInputEncoding()Ljava/lang/String; at org.apache.cxf.maven_plugin.WSDL2JavaMojo.processWsdl(WSDL2JavaMojo.j ava:233) at org.apache.cxf.maven_plugin.WSDL2JavaMojo.execute(WSDL2JavaMojo.java: 129) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:443) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:539) ... 16 more Caused by: java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredDocument Impl.getInputEncoding()Ljava/lang/String; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.ws.commons.schema.utils.DOMUtil.getInputEncoding(DOMUtil.j ava:594) at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollec tion.java:365) at org.apache.cxf.wsdl11.SchemaUtil.extractSchema(SchemaUtil.java:106) at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:66) at org.apache.cxf.tools.validator.internal.ValidatorUtil.getSchema(Valid atorUtil.java:63) at org.apache.cxf.tools.validator.internal.WSDLRefValidator.(WSDLR efValidator.java:122) at org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL1 1Validator.java:99) at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuil der.validate(JAXWSDefinitionBuilder.java:198) at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuil der.validate(JAXWSDefinitionBuilder.java:61) at or
jaxb xml element mapping via configuration file
Hello, Is it possible to do jaxb xml element mapping in the configuration file instead of using the annotations such as @XmlElement etc? -- View this message in context: http://www.nabble.com/jaxb-xml-element-mapping-via-configuration-file-tf4878381.html#a13960372 Sent from the cxf-user mailing list archive at Nabble.com.
JSON client?
Hi all, I've got my JSON endpoints up with CXF which is great. I now want to write a java client that can hit the JSON endpoint and turn the JSON response into the corresponding java objects. What is the best approach for doing this? Does anyone have any experience with this? Thanks for the help!
RE: Missing namespace prefix on arg0 ?
Look at the schema for elementFormDefault and/or specific form= modifiers. Code first? RPC or Doc? > -Original Message- > From: Kaleb Walton [mailto:[EMAIL PROTECTED] > Sent: Monday, November 26, 2007 2:11 PM > To: cxf-user@incubator.apache.org > Subject: Missing namespace prefix on arg0 ? > > > > This may be due to my lack of expertise with XML / WSDLs in > general but I am confused as to why the tag below does > not include the ns1: prefix as the rest of the tags do. If I > add the ns1: prefix to (to make it > ) CXF does not digest the request properly. Is > there any way to apply a namespace to the arg tag or should I > not be concerned with it? > > > http://schemas.xmlsoap.org/soap/encoding/"; xmlns:SOAP-ENC=" > http://schemas.xmlsoap.org/soap/encoding/"; xmlns:xsi=" > http://www.w3.org/1999/XMLSchema-instance"; xmlns:SOAP-ENV=" > http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd3=" > http://www.w3.org/2001/XMLSchema"; xmlns:xsd=" > http://www.w3.org/1999/XMLSchema";> > > http://services.iss.net/v1"; > SOAP-ENC:root="1"> xsi:type="xsd:string">startTime.ASC > xsi:type="xsd3:dateTime">2006-11-26T11:56:11Z > xsi:type="xsd3:dateTime">2007-11-26T11:56:11Z > true > 0 xsi:type="xsd:int">100 > CID001696 > > > > > > Regards, > Kaleb >
RE: Error with wsdl2java from maven
Most likely what this means is that the module you're building has some dependencies which pull in older Xerces impls, Say xerces 2.6.2... What you can do is to remove a content of xerces section in your mvn repo, except for the latest 2.8.1 one and then do mvn -o install in the module which fails, thus identifying dependencies to blame. You can then explicitly exclude older Xerces dependencies from being pulled in. Alterantively you may want to try to fork a wsdl-to-java for your particular module using fork=once property Cheers, Sergey -Original Message- From: Silberman, Nathan [mailto:[EMAIL PROTECTED] Sent: 26 November 2007 20:07 To: cxf-user@incubator.apache.org Subject: Error with wsdl2java from maven Has anybody encountered the following error type when using wsdl2java from maven? The error: [INFO] [ERROR] BUILD ERROR [INFO] [INFO] org.apache.xerces.dom.DeferredDocumentImpl.getInputEncoding()Ljava/lang/ S tring; [INFO] [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: org.apache.xerces.dom.De ferredDocumentImpl.getInputEncoding()Ljava/lang/String; at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:564) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:480) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:459) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) at org.apache.maven.cli.MavenCli.main(MavenCli.java:280) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: org.apache.xerces.dom .DeferredDocumentImpl.getInputEncoding()Ljava/lang/String; at org.apache.cxf.maven_plugin.WSDL2JavaMojo.processWsdl(WSDL2JavaMojo.j ava:233) at org.apache.cxf.maven_plugin.WSDL2JavaMojo.execute(WSDL2JavaMojo.java: 129) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:443) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:539) ... 16 more Caused by: java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredDocument Impl.getInputEncoding()Ljava/lang/String; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.ws.commons.schema.utils.DOMUtil.getInputEncoding(DOMUtil.j ava:594) at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollec tion.java:365) at org.apache.cxf.wsdl11.SchemaUtil.extractSchema(SchemaUtil.java:106) at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:66) at org.apache.cxf.tools.validator.internal.ValidatorUtil.getSchema(Valid atorUtil.java:63) at org.apache.cxf.tools.validator.internal.WSDLRefValidator.(WSDLR efValidator.java:122) at org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL1 1Validator.java:99) at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuil der.validate(JAXWSDefinitionBuilder.java:198) at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuil der.validate(JAXWSDefinitionBuilder.java:61) at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon tainer.java:128) at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon tainer.java:229) at org.apache.cxf.tools.common.toolspec.ToolRunner
Error with wsdl2java from maven
Has anybody encountered the following error type when using wsdl2java from maven? The error: [INFO] [ERROR] BUILD ERROR [INFO] [INFO] org.apache.xerces.dom.DeferredDocumentImpl.getInputEncoding()Ljava/lang/ S tring; [INFO] [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: org.apache.xerces.dom.De ferredDocumentImpl.getInputEncoding()Ljava/lang/String; at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:564) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:480) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:459) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) at org.apache.maven.cli.MavenCli.main(MavenCli.java:280) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: org.apache.xerces.dom .DeferredDocumentImpl.getInputEncoding()Ljava/lang/String; at org.apache.cxf.maven_plugin.WSDL2JavaMojo.processWsdl(WSDL2JavaMojo.j ava:233) at org.apache.cxf.maven_plugin.WSDL2JavaMojo.execute(WSDL2JavaMojo.java: 129) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:443) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:539) ... 16 more Caused by: java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredDocument Impl.getInputEncoding()Ljava/lang/String; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.ws.commons.schema.utils.DOMUtil.getInputEncoding(DOMUtil.j ava:594) at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollec tion.java:365) at org.apache.cxf.wsdl11.SchemaUtil.extractSchema(SchemaUtil.java:106) at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:66) at org.apache.cxf.tools.validator.internal.ValidatorUtil.getSchema(Valid atorUtil.java:63) at org.apache.cxf.tools.validator.internal.WSDLRefValidator.(WSDLR efValidator.java:122) at org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL1 1Validator.java:99) at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuil der.validate(JAXWSDefinitionBuilder.java:198) at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuil der.validate(JAXWSDefinitionBuilder.java:61) at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon tainer.java:128) at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon tainer.java:229) at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.ja va:83) at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:102) at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:171) at org.apache.cxf.maven_plugin.WSDL2JavaMojo.processWsdl(WSDL2JavaMojo.j ava:220) ... 19 more [INFO] [INFO] Total time: 19 seconds [INFO] Finished at: Mon Nov 26 15:00:27 EST 2007 [INFO] Final Memory: 11M/21M [INFO] maven config: org.apache.cxf cxf-codegen-plugin 2.0.3-incubator generate-sources generate-sources
Missing namespace prefix on arg0 ?
This may be due to my lack of expertise with XML / WSDLs in general but I am confused as to why the tag below does not include the ns1: prefix as the rest of the tags do. If I add the ns1: prefix to (to make it ) CXF does not digest the request properly. Is there any way to apply a namespace to the arg tag or should I not be concerned with it? http://schemas.xmlsoap.org/soap/encoding/"; xmlns:SOAP-ENC=" http://schemas.xmlsoap.org/soap/encoding/"; xmlns:xsi=" http://www.w3.org/1999/XMLSchema-instance"; xmlns:SOAP-ENV=" http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd3=" http://www.w3.org/2001/XMLSchema"; xmlns:xsd=" http://www.w3.org/1999/XMLSchema";> http://services.iss.net/v1"; SOAP-ENC:root="1"> startTime.ASC 2006-11-26T11:56:11Z 2007-11-26T11:56:11Z true 0 100 CID001696 Regards, Kaleb
Re: JMS performance
Hi Ulhas, I am using default temp. queue. Earlier when working with XFire we had tried static reply queue. But are just gearing up with CXF. I was interested in relative performance of http / jms. We have been given performance requirements for our project. While http meets just as it is, jms is a far cry from what we must achieve. I am currently looking at three things to ascertain where jms could be going slow: 1. OpenJMS server (persistence causing delay?) 2. Our WSDL (sync/async differs?) 3. CXF jms transport I am still reading what a web service is after finishing my first project where we had used XFire. Thanks for any and all help Regards Mayank On Nov 26, 2007 9:13 PM, Ulhas Bhole <[EMAIL PROTECTED]> wrote: > Hi Mayank, > > I don't think anyone has done the benchmark on the cost of > request/response on JMS transport. > > Are you using static reply queue or using default temp. queue for response? > > Regards, > > Ulhas Bhole > > > Mayank Thakore wrote: > > Hi, > > > > I wrote a simple WSDL based web service. > > > > In HTTP I am getting 1000 request/response in 19 secs. > > But, in JMS 1000 request/response cost 110+ secs. > > > > Is this OK? Are there any benchmarks? > > > > Any pointers on what can be done for JMS? > > I am using CXF 2.0.2 and OpenJMS. > > > > Thanks! > > Mayank > > > > > IONA Technologies PLC (registered in Ireland) > Registered Number: 171387 > Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland >
Re: [Deploy in JBOSS] Address already in use Exception
Dear Andrew, Thanks a lot for your cooperation you did your best, and you was helpful coz even if the problem wasn't solved but at least I could fined something to say to my Boss ;-) Dear Saleh, Thanks for your reply , I'll try it and feed you back.. - Original Message - From: "Saleh Al-Ghashmi" <[EMAIL PROTECTED]> To: cxf-user@incubator.apache.org Sent: Monday, November 26, 2007 6:44:27 PM (GMT+0300) Asia/Kuwait Subject: Re: [Deploy in JBOSS] Address already in use Exception Andrew Dinn wrote: > > Hi Eman, > > Your config files look ok. I'm afraid I don't really understand what is > going wrong in that case. > > Regarding your destroy code I have two comments. Firstly, I was > suggesting you destroy the cxf *servlet*, not (just) the cxf bus. Also, > there is no guarantee that the default bus at the point where your > destroy code is run is the same bus as the one you installed at the > point where the create code was run. Maybe you should stash the cxf > servlet somewhere when you create e.g. attach it to the servlet which is > running the create code. Then you can pick it up later and call its > destroy method. > > Hope this helps. If not then I am afraid I am stumped :-( > > regards, > > > Andrew Dinn JBoss Transactions > -- > JBoss, a Division of Red Hat > Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod > Street, Windsor, Berkshire, > SI4 1TE, United Kingdom. > Registered in UK and Wales under Company Registration No. 3798903 > Directors: Michael Cunningham (USA), Charlie Peters (USA) and David > Owens (Ireland) > > Eman Ali al-Maktari [IT Department] wrote: >> Hi Andrew, >> I tried to stop the bus using: >> public void destroy() { >> Bus bus = CXFBusFactory.getDefaultBus(); >> if (eCategories.isPublished()){ >> System.out.println("I'll stop Categories!"); >> eCategories.stop(); >> bus.shutdown(false); >> System.out.println("I't was stopped"); >> } >> super.destroy(); >> } >> >> but the problem still exist, I also tried removing >> NOTE: this destroy() method is the servlet method. >> I also tried to not explicitly create a CXFServlet(), and the problem >> happened again and again :-( >> >> These are my XML files: >> CXF.XML=== >> http://www.springframework.org/schema/beans"; >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >> xmlns:jaxws="http://cxf.apache.org/jaxws"; >> 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";> >> >> > class="org.apache.cxf.interceptor.LoggingInInterceptor"/> >> > class="org.apache.cxf.interceptor.LoggingOutInterceptor"/> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> CXF-SERVLET.XML >> >> http://www.springframework.org/schema/beans"; >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >> xmlns:jaxws="http://cxf.apache.org/jaxws"; >> xmlns:soap="http://cxf.apache.org/bindings/soap"; >> xsi:schemaLocation=" >> http://www.springframework.org/schema/beans >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd >> http://cxf.apache.org/bindings/soap >> http://cxf.apache.org/schemas/configuration/soap.xsd >> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd";> >> >> >> ===WEB.XML (When I create the CXFServlet >> explicitly)= >> > "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" >> "http://java.sun.com/dtd/web-app_2_3.dtd"; > >> >> >> >> WebServiceServlet >> com.lit.linkinnews.WebServiceServlet >> 1 >> >> >> cxf >> cxf >> Apache CXF Endpoint >> org.apache.cxf.transport.servlet.CXFServlet >> 1 >> >> >> cxf >> /services/* >> >> >> WebServiceServlet >> /WebServiceServlet >> >> >> ===WEB.XML (When I don't create the CXFServlet >> explicitly)= >> > "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" >> "http://java.sun.com/dtd/web-app_2_3.dtd"; > >> >> >> >> WebServiceServlet >> com.lit.linkinnews.WebServiceServlet >> 1 >> >> >> WebServiceServlet >> /WebServiceServlet >> >> >> >> === >> The WebServiceServlet is the servlet where I publish and unpublish the >> end points, >> >> Any help will be really, really, really appreciated. >> >> >> - Original Message - >> From: "Eman Ali al-Maktari [IT Department]" <[EMAIL PROTECTED]> >> To: cxf-user@incubator.apache.org >> Sent: Wednesday, November 21, 2007 5:33:51 PM (GMT+0300) Asia/Kuwait >> Subject: Re: [Deploy in JBOSS] Address already in use Exception >> >> Thanks a lot Andrew, >> >> I really needed a clue >> I'm goin
Re: JMS performance
Hi Mayank, I don't think anyone has done the benchmark on the cost of request/response on JMS transport. Are you using static reply queue or using default temp. queue for response? Regards, Ulhas Bhole Mayank Thakore wrote: Hi, I wrote a simple WSDL based web service. In HTTP I am getting 1000 request/response in 19 secs. But, in JMS 1000 request/response cost 110+ secs. Is this OK? Are there any benchmarks? Any pointers on what can be done for JMS? I am using CXF 2.0.2 and OpenJMS. Thanks! Mayank IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: [Deploy in JBOSS] Address already in use Exception
Andrew Dinn wrote: > > Hi Eman, > > Your config files look ok. I'm afraid I don't really understand what is > going wrong in that case. > > Regarding your destroy code I have two comments. Firstly, I was > suggesting you destroy the cxf *servlet*, not (just) the cxf bus. Also, > there is no guarantee that the default bus at the point where your > destroy code is run is the same bus as the one you installed at the > point where the create code was run. Maybe you should stash the cxf > servlet somewhere when you create e.g. attach it to the servlet which is > running the create code. Then you can pick it up later and call its > destroy method. > > Hope this helps. If not then I am afraid I am stumped :-( > > regards, > > > Andrew Dinn JBoss Transactions > -- > JBoss, a Division of Red Hat > Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod > Street, Windsor, Berkshire, > SI4 1TE, United Kingdom. > Registered in UK and Wales under Company Registration No. 3798903 > Directors: Michael Cunningham (USA), Charlie Peters (USA) and David > Owens (Ireland) > > Eman Ali al-Maktari [IT Department] wrote: >> Hi Andrew, >> I tried to stop the bus using: >> public void destroy() { >> Bus bus = CXFBusFactory.getDefaultBus(); >> if (eCategories.isPublished()){ >> System.out.println("I'll stop Categories!"); >> eCategories.stop(); >> bus.shutdown(false); >> System.out.println("I't was stopped"); >> } >> super.destroy(); >> } >> >> but the problem still exist, I also tried removing >> NOTE: this destroy() method is the servlet method. >> I also tried to not explicitly create a CXFServlet(), and the problem >> happened again and again :-( >> >> These are my XML files: >> CXF.XML=== >> http://www.springframework.org/schema/beans"; >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >> xmlns:jaxws="http://cxf.apache.org/jaxws"; >> 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";> >> >> > class="org.apache.cxf.interceptor.LoggingInInterceptor"/> >> > class="org.apache.cxf.interceptor.LoggingOutInterceptor"/> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> CXF-SERVLET.XML >> >> http://www.springframework.org/schema/beans"; >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >> xmlns:jaxws="http://cxf.apache.org/jaxws"; >> xmlns:soap="http://cxf.apache.org/bindings/soap"; >> xsi:schemaLocation=" >> http://www.springframework.org/schema/beans >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd >> http://cxf.apache.org/bindings/soap >> http://cxf.apache.org/schemas/configuration/soap.xsd >> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd";> >> >> >> ===WEB.XML (When I create the CXFServlet >> explicitly)= >> > "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" >> "http://java.sun.com/dtd/web-app_2_3.dtd"; > >> >> >> >> WebServiceServlet >> com.lit.linkinnews.WebServiceServlet >> 1 >> >> >> cxf >> cxf >> Apache CXF Endpoint >> org.apache.cxf.transport.servlet.CXFServlet >> 1 >> >> >> cxf >> /services/* >> >> >> WebServiceServlet >> /WebServiceServlet >> >> >> ===WEB.XML (When I don't create the CXFServlet >> explicitly)= >> > "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" >> "http://java.sun.com/dtd/web-app_2_3.dtd"; > >> >> >> >> WebServiceServlet >> com.lit.linkinnews.WebServiceServlet >> 1 >> >> >> WebServiceServlet >> /WebServiceServlet >> >> >> >> === >> The WebServiceServlet is the servlet where I publish and unpublish the >> end points, >> >> Any help will be really, really, really appreciated. >> >> >> - Original Message - >> From: "Eman Ali al-Maktari [IT Department]" <[EMAIL PROTECTED]> >> To: cxf-user@incubator.apache.org >> Sent: Wednesday, November 21, 2007 5:33:51 PM (GMT+0300) Asia/Kuwait >> Subject: Re: [Deploy in JBOSS] Address already in use Exception >> >> Thanks a lot Andrew, >> >> I really needed a clue >> I'm going to try the "Stopping Bus" solution as soon as I can, I hope it >> will be the solution.. >> >> for my code, it's written in a servlet that is loaded when the >> application deployed (you guest it correctly ;) ) >> >> Thanks again, I'll feed you back! >> >> - Original Message - >> From: "Andrew Dinn" <[EMAIL PROTECTED]> >> To: cxf-user@incubator.apache.org >> Sent: Wednesday, November 21, 2007 12:18:02 PM (GMT+0300) Asia/Kuwait >> Subject: Re: [Deploy in JBOSS] Address already in use Exception >>
restful_http_binding and WebServiceContext
I am trying to figure out how to get access to WebServiceContext in the restful_http_binding sample that comes with CXF. In CustomerServiceImpl.java, I've added: @Resource private WebServiceContext wsContext; to the CustomerServiceImpl class. But wsContext isn't set when methods are invoked. I've looked through the archives and the only issue I've seen seems to be if you use Spring and transactions (CXF-1074). I am new to CXF, so I may be doing something fundamentally wrong here. Any ideas? Thanks, -mike
Re: Refactoring a WSDL with CXF and Eclipse...
==>Hi! Jonathan Huang wrote: > > Hi, Tophebboy > Have you try to build your project after refactoring your SEI?? > > ==>Yes > > Have you add Jax-ws related annotaions to the modified SEI?? > > ==> Yes > > When you right click the "Project", does the operation "Generate > WSDL" appear in the popup menu?? > > ==> No. I only have "Create Jax-WS handler", "Enable Jax-WS" and "Disable > Jax-WS" > > > > Tophebboy wrote: >> >> Hi! >> I'm using Eclipse 3.3.0 and STP 0.7. >> Anyway, I don't have the option "generate wsdl". >> On top of that, once I generate the code, the SEI is changed to use new >> classes created in the service package and and cannot rebuild the wsdl >> then... >> >> >> Jonathan Huang wrote: >>> >>> Hi Tophebboy, >>> I am not sure which version of eclipse you use. >>> If you use the old one, you could set "Build Automatically" for your >>> project. Then if you refactor SEI, the related wsdl will be updated >>> automatically. If the "Build Automatically" is not set, you should build >>> your project manually after refactoring your SEI and the wsdl will also >>> be updated. >>> If you use the eclipse with the latest STP, you could use the >>> "Generate WSDL" operation to update the wsdl file after you refactor >>> your SEI. >>> Hope useful for you! >>> >>> >>> Tophebboy wrote: Hi! I have to create Web Services with CXF and Eclipse. When I follow the tutorial "Java fisrt", everything is OK. But, when I have to refactor my SEI, I lose everything: the wsdl is not updated...Anyway, I tried to Create a new Java First project to create a new SEI, a new WSDL, and I updated the WSDL of my former project with the new one, hoping that I could regenerate the code this way. But no! The operation "generate code" does nothing!!! Please help me! I really don't know how to do to be able to refactor my web services when I have to because re-doing everything from the beginning is very VERY long! Thanks in advance!!! >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/Refactoring-a-WSDL-with-CXF-and-Eclipse...-tf4857122.html#a13950872 Sent from the cxf-user mailing list archive at Nabble.com.
RE: what would be the best place to introduce xslt transformer for response message
Hello, I am not clear exactly what you said. I looked at the SAAJOutInterceptor, but didn't clearly understand how I can get the message content - either bytes or something that I can use to tranform with an xslt transfomer. If possible, can you provide me some sample lines of code? Thanks. -- View this message in context: http://www.nabble.com/what-would-be-the-best-place-to-introduce-xslt-transformer-for-response-message-tf4862565.html#a13950419 Sent from the cxf-user mailing list archive at Nabble.com.
RE: Diagnosis of stupid JAXB/JAXWS errors
No, I'd say that they are different. This person is getting a web message sent out with a missing namespace. In my case, the response that goes out is completely empty. > -Original Message- > From: Jim Ma [mailto:[EMAIL PROTECTED] > Sent: Sunday, November 25, 2007 9:27 PM > To: cxf-user@incubator.apache.org > Subject: Re: Diagnosis of stupid JAXB/JAXWS errors > > Hi Benson , > > Is this issue same as https://issues.apache.org/jira/browse/CXF-1226? > > Regards > > Jim > > Benson Margulies wrote: > > Consider the following pile of snails. Now, I realize, I don't need > > them in CXF, but I had coded them to test something. > Except, that, I'd > > neglected to code the @WebResult at all, so while I had a wrapper, > > there was no way for the code to know the element to use > for the response. > > > > It didn't work, of course. It also didn't diagnose in the > log. Should > > this sort of thing produce some whining? > > > >@RequestWrapper(className = > > > "org.apache.cxf.javascript.fortest.BasicTypeFunctionReturnStri > ngWrapper" > > ) > > @ResponseWrapper(className = > > "org.apache.cxf.javascript.fortest.StringWrapper") > > @WebResult(name = "returnValue", targetNamespace = > > "uri:org.apache.cxf.javascript.testns") > > > > >
Re: disable-address-updates breaks ServiceName?wsdl url
I tried this, but I can't seem to hit home on any of these base-addresses: http://localhost:8080/myapp http://localhost:8080/myapp/ http://localhost:8080/myapp/services http://localhost:8080/myapp/services/ Regardless, my point was that I still wanted to access the wsdl at the same url, just without having updated endpoint urls in the wsdl. 2007/11/25, Willem2 <[EMAIL PROTECTED]>: > > If you set the disable-address-updates , you also need to set the > base-address like http://localhost:8080/myapp > Since CXF servlet will not update the endpoint address with the request url, > you need to specify the base-address to build up a real accessible address > for the endpoint. > > Willem. > > > Christian Vest Hansen wrote: > > > > Usually, you can access the WSDL of a service by appending ?wsdl to > > the endpoint url and end up with something like this: > > http://localhost:8080/myapp/ServiceName?wsdl > > > > However, if you add the disable-address-updates init-param to your > > CXFServlet in web.xml like this: > > > > > > > > CXFServlet > > CXF Servlet > > > > org.apache.cxf.transport.servlet.CXFServlet > > > > disable-address-updates > > true > > > > 1 > > > > > > Then you're no longer able to access the WSDL file at the address above. > > > > Is this correct behaviour? I'de rather like to be able to access the > > WSDL regardless of the presence of this init-param. > > > > > > > > -- > > Venlig hilsen / Kind regards, > > Christian Vest Hansen. > > > > > > -- > View this message in context: > http://www.nabble.com/disable-address-updates-breaks-ServiceName-wsdl-url-tf4862292.html#a13931696 > Sent from the cxf-user mailing list archive at Nabble.com. > > -- Venlig hilsen / Kind regards, Christian Vest Hansen.
Re: Throwing faults from within an Interceptor
Hello Jervis. > Make sure the exception thrown from your interceptor is declared as an > exception on the operation being invoked It is. It is declared to be thrown in the WSDL and on my implementation methods. > was the MyFault class generated by wsdltojava? does it have the WebFault > annotation? Yes and yes. > Take a look into WebFaultOutInterceptor. handleMessage(), the code might tell > you why WebFaultOutInterceptor did not recognize your exception as a checked > exception. Looks like it should work, but I can't help thinking that it might be because my interceptor runs PRE_PROTOCOL. Are we certain that faults always go through this WebFaultOutInterceptor? 2007/11/26, Liu, Jervis <[EMAIL PROTECTED]>: > Hi, it is possible to throw a checked Exception from CXF interceptors. Make > sure the exception thrown from your interceptor is declared as an exception > on the operation being invoked, otherwise this exception will not be > recognized as a checked Exception. Also was the MyFault class generated by > wsdltojava? does it have the WebFault annotation? The checked exception is > unmarshalled by WebFaultOutInterceptor and its super class > FaultOutInterceptor. If the exception is not recognized as checked exception > by WebFaultOutInterceptor, the exception will be handled by the default > protocol binding fault interceptors such as Soap11FaultOutInterceptor and > Soap12FaultOutInterceptor. Take a look into WebFaultOutInterceptor. > handleMessage(), the code might tell you why WebFaultOutInterceptor did not > recognize your exception as a checked exception. > > Let me know if you have any further questions, > > Jervis > > > -Original Message- > > From: Christian Vest Hansen [mailto:[EMAIL PROTECTED] > > Sent: 2007年11月23日 17:56 > > To: cxf-user@incubator.apache.org > > Subject: Throwing faults from within an Interceptor > > > > I have a WSDL that defines MyFault and all of my operations can > > potentially throw this fault. This fault has some custom elements and > > stuff, so it is not an ordinary SoapFault, and it got its own > > Exception class when I generated my Java code. > > > > When I throw this fault from within an operation in my WebServiceImpl > > class, all of the custom cruft I put in this fault gets marshalled > > correctly. > > > > However, I also have an Interceptor (that operates in the > > Phase.PRE_PROTOCOL phase) that want to throw faults as well, and > > preferably faults defined in my WSDL. So in the Interceptors > > handleMessage() I do something like this: > > > > throw new Fault(new MyFault("Bad stuff")); > > > > When I do this, I only get an ordinary soap fault with a "Bad stuff" > > fault string, but all of the things that are custom to the MyFault > > dosn't get marshalled properly. > > > > So, is there any way that I can remedy this? Can I make an interceptor > > throw a properly marshalled custom soap fault? > > > > CXF version 2.0.3. > > > > -- > > Venlig hilsen / Kind regards, > > Christian Vest Hansen. > > > IONA Technologies PLC (registered in Ireland) > Registered Number: 171387 > Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland > -- Venlig hilsen / Kind regards, Christian Vest Hansen.
Re: [Deploy in JBOSS] Address already in use Exception
Hi Eman, Your config files look ok. I'm afraid I don't really understand what is going wrong in that case. Regarding your destroy code I have two comments. Firstly, I was suggesting you destroy the cxf *servlet*, not (just) the cxf bus. Also, there is no guarantee that the default bus at the point where your destroy code is run is the same bus as the one you installed at the point where the create code was run. Maybe you should stash the cxf servlet somewhere when you create e.g. attach it to the servlet which is running the create code. Then you can pick it up later and call its destroy method. Hope this helps. If not then I am afraid I am stumped :-( regards, Andrew Dinn JBoss Transactions -- JBoss, a Division of Red Hat Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in UK and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA) and David Owens (Ireland) Eman Ali al-Maktari [IT Department] wrote: Hi Andrew, I tried to stop the bus using: public void destroy() { Bus bus = CXFBusFactory.getDefaultBus(); if (eCategories.isPublished()){ System.out.println("I'll stop Categories!"); eCategories.stop(); bus.shutdown(false); System.out.println("I't was stopped"); } super.destroy(); } but the problem still exist, I also tried removing NOTE: this destroy() method is the servlet method. I also tried to not explicitly create a CXFServlet(), and the problem happened again and again :-( These are my XML files: CXF.XML=== http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:jaxws="http://cxf.apache.org/jaxws"; 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";> CXF-SERVLET.XML http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:jaxws="http://cxf.apache.org/jaxws"; xmlns:soap="http://cxf.apache.org/bindings/soap"; xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd";> ===WEB.XML (When I create the CXFServlet explicitly)= "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"; > WebServiceServlet com.lit.linkinnews.WebServiceServlet 1 cxf cxf Apache CXF Endpoint org.apache.cxf.transport.servlet.CXFServlet 1 cxf /services/* WebServiceServlet /WebServiceServlet ===WEB.XML (When I don't create the CXFServlet explicitly)= "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"; > WebServiceServlet com.lit.linkinnews.WebServiceServlet 1 WebServiceServlet /WebServiceServlet === The WebServiceServlet is the servlet where I publish and unpublish the end points, Any help will be really, really, really appreciated. - Original Message - From: "Eman Ali al-Maktari [IT Department]" <[EMAIL PROTECTED]> To: cxf-user@incubator.apache.org Sent: Wednesday, November 21, 2007 5:33:51 PM (GMT+0300) Asia/Kuwait Subject: Re: [Deploy in JBOSS] Address already in use Exception Thanks a lot Andrew, I really needed a clue I'm going to try the "Stopping Bus" solution as soon as I can, I hope it will be the solution.. for my code, it's written in a servlet that is loaded when the application deployed (you guest it correctly ;) ) Thanks again, I'll feed you back! - Original Message - From: "Andrew Dinn" <[EMAIL PROTECTED]> To: cxf-user@incubator.apache.org Sent: Wednesday, November 21, 2007 12:18:02 PM (GMT+0300) Asia/Kuwait Subject: Re: [Deploy in JBOSS] Address already in use Exception Eman Ali al-Maktari [IT Department] wrote: This is my code: Endpoint eCategories = publishCategories(); private Endpoint publishCategories() { String address = "http://localhost:9090/sn_categories";; CategoriesImpl categoriesImpl = new CategoriesImpl(); //Endpoint e = Endpoint.publish(address, categoriesImpl); CXFServlet cxf = new CXFServlet(); Bus bus = cxf.getBus(); BusFactory.setDefaultBus(bus); Endpoint e = Endpoint.create(categoriesImpl); e.publish(address); return e; } public void init(ServletConfig config) throws ServletException { super.init(config); System.out.println("Server sta
RE: Throwing faults from within an Interceptor
Hi, it is possible to throw a checked Exception from CXF interceptors. Make sure the exception thrown from your interceptor is declared as an exception on the operation being invoked, otherwise this exception will not be recognized as a checked Exception. Also was the MyFault class generated by wsdltojava? does it have the WebFault annotation? The checked exception is unmarshalled by WebFaultOutInterceptor and its super class FaultOutInterceptor. If the exception is not recognized as checked exception by WebFaultOutInterceptor, the exception will be handled by the default protocol binding fault interceptors such as Soap11FaultOutInterceptor and Soap12FaultOutInterceptor. Take a look into WebFaultOutInterceptor. handleMessage(), the code might tell you why WebFaultOutInterceptor did not recognize your exception as a checked exception. Let me know if you have any further questions, Jervis > -Original Message- > From: Christian Vest Hansen [mailto:[EMAIL PROTECTED] > Sent: 2007年11月23日 17:56 > To: cxf-user@incubator.apache.org > Subject: Throwing faults from within an Interceptor > > I have a WSDL that defines MyFault and all of my operations can > potentially throw this fault. This fault has some custom elements and > stuff, so it is not an ordinary SoapFault, and it got its own > Exception class when I generated my Java code. > > When I throw this fault from within an operation in my WebServiceImpl > class, all of the custom cruft I put in this fault gets marshalled > correctly. > > However, I also have an Interceptor (that operates in the > Phase.PRE_PROTOCOL phase) that want to throw faults as well, and > preferably faults defined in my WSDL. So in the Interceptors > handleMessage() I do something like this: > > throw new Fault(new MyFault("Bad stuff")); > > When I do this, I only get an ordinary soap fault with a "Bad stuff" > fault string, but all of the things that are custom to the MyFault > dosn't get marshalled properly. > > So, is there any way that I can remedy this? Can I make an interceptor > throw a properly marshalled custom soap fault? > > CXF version 2.0.3. > > -- > Venlig hilsen / Kind regards, > Christian Vest Hansen. IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: Refactoring a WSDL with CXF and Eclipse...
Hi, Tophebboy Have you try to build your project after refactoring your SEI?? Have you add Jax-ws related annotaions to the modified SEI?? When you right click the "Project", does the operation "Generate WSDL" appear in the popup menu?? Tophebboy wrote: > > Hi! > I'm using Eclipse 3.3.0 and STP 0.7. > Anyway, I don't have the option "generate wsdl". > On top of that, once I generate the code, the SEI is changed to use new > classes created in the service package and and cannot rebuild the wsdl > then... > > > Jonathan Huang wrote: >> >> Hi Tophebboy, >> I am not sure which version of eclipse you use. >> If you use the old one, you could set "Build Automatically" for your >> project. Then if you refactor SEI, the related wsdl will be updated >> automatically. If the "Build Automatically" is not set, you should build >> your project manually after refactoring your SEI and the wsdl will also >> be updated. >> If you use the eclipse with the latest STP, you could use the >> "Generate WSDL" operation to update the wsdl file after you refactor your >> SEI. >> Hope useful for you! >> >> >> Tophebboy wrote: >>> >>> Hi! >>> I have to create Web Services with CXF and Eclipse. >>> When I follow the tutorial "Java fisrt", everything is OK. >>> But, when I have to refactor my SEI, I lose everything: the wsdl is not >>> updated...Anyway, I tried to Create a new Java First project to create a >>> new SEI, a new WSDL, and I updated the WSDL of my former project with >>> the new one, hoping that I could regenerate the code this way. But no! >>> The operation "generate code" does nothing!!! >>> Please help me! I really don't know how to do to be able to refactor my >>> web services when I have to because re-doing everything from the >>> beginning is very VERY long! >>> Thanks in advance!!! >>> >> >> > > -- View this message in context: http://www.nabble.com/Refactoring-a-WSDL-with-CXF-and-Eclipse...-tf4857122.html#a13945723 Sent from the cxf-user mailing list archive at Nabble.com.