RE: Return direct XML
Hi, I was trying to use Aegis Binding on the Dynamic client (DynamicClientFactory.createClient()) but it is hard coded to use JAXB. Is there a specific reason for this or could I confidently modify the source code of my distribution and expect it to run using Aegis bindings? Thanks, Ps: benson, the fix for CXF-1168 works for me in 2.0.1. Thx! -Original Message- From: Benson Margulies [mailto:[EMAIL PROTECTED] Sent: 07 November 2007 02:38 To: cxf-user@incubator.apache.org Subject: RE: Return direct XML I believe that Aegis allows you to have a return type of org.w3c.Document or the JDOM equivalent, and XML will appear. -Original Message- From: Liu, Jervis [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 06, 2007 9:32 PM To: cxf-user@incubator.apache.org Subject: RE: Return direct XML In your case, looks like the easiest way is to use JAX-WS Provider API with XML Binding. You will find a bunch of different type of Provider implementations under system test: https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/j av a/org/apache/cxf/systest/provider/. Of course the limitation is that the input of your function has to be in XML format as well (can be Source/SOAPMessage/DataSource, depend on your mode and binding), in some cases you may find its hard to parse input from XML by yourself. Cheers, Jervis -Original Message- From: Roshan A. Punnoose [mailto:[EMAIL PROTECTED] Sent: 2007?11?7? 4:08 To: cxf-user@incubator.apache.org Subject: Return direct XML Hi, What is the easiest way to return XML directly? For example, in my function, if I create XML, I want to be able to send that object directly back to the calling client. Is this possible? Roshan IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
client https and server http
Hi everybody, I have the following problem: My web application contains - a Web Service and - a client (which calls another Web Service). The client calls the remote service using https whereas the service deployed in my application should use http. I have configured the service as following: beans xmlns=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.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-servlet.xml / jaxws:endpoint id=moduleServiceImpl implementor=modulverwaltung.service.ModuleServiceImpl address=/ModuleService / /beans I did the clients's https configuration in the program code: Client client = ClientProxy.getClient(port); HTTPConduit conduit = (HTTPConduit) client.getConduit(); TLSClientParameters tlsParams = new TLSClientParameters(); conduit.setTlsClientParameters(tlsParams); When I try to call the remote service from my client, the following happens: INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Could not send Message. at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) at $Proxy33.getLecturers(Unknown Source) at kvv.service.client.KvvServiceClient.getLecturers(KvvServiceClient.java:74) at modulverwaltung.tools.AdaptLecturersToKvv.main(AdaptLecturersToKvv.java:29) Caused by: java.io.IOException: Illegal Protocol http for HTTPS URLConnection Factory. at org.apache.cxf.transport.https.HttpsURLConnectionFactory.createConnection(HttpsURLConnectionFactory.java:124) at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:475) at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46) ... 8 more Would be thankful for any help... Best regards, Abid Hussain -- Abid Hussain Mail: [EMAIL PROTECTED] Tel.: 0179 / 9080412 Web: http://www.abid76.de
class loading stax-api.jar
Not to sure if I should be posting this to the developers list or not - however I came a cross an issue with stax.jar on OAS. There was a problem with class loading because of stax-api.jar including QName. Issue was resolved by using jsr173_api-2.2.0.jar instead. I think that this should be part of jsr173_api-2.2.0.jar should be part of cxf dependencies rather that stax-api.jar -- View this message in context: http://www.nabble.com/class-loading-stax-api.jar-tf4763868.html#a13624807 Sent from the cxf-user mailing list archive at Nabble.com.
Re: client https and server http
Hi again, I finally got it. I had to put the http:conduit in my configuration: http:conduit name={http://ws.kvv.mi.fuberlin.de/}KvvServiceImplService.http-conduit; http:tlsClientParameters secureSocketProtocol=SSL / /http:conduit Sorry for that. But I find that xfire is really hard to handle, cause it uses all this spring stuff which is quite confusing, if you're not familiar to spring (like me). Everytime something isn't working, I wonder if it's some mysterious spring behaviour and don't recognise that the solution (like above) is pretty easy. I'm trying to set up a services and clients using CXF for a couple of weeks. Before I was using XFire. Till now my experience is that XFire was MUCH easier to configure and to handle. Best regards, Abid Abid Hussain schrieb: Hi everybody, I have the following problem: My web application contains - a Web Service and - a client (which calls another Web Service). The client calls the remote service using https whereas the service deployed in my application should use http. I have configured the service as following: beans xmlns=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.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-servlet.xml / jaxws:endpoint id=moduleServiceImpl implementor=modulverwaltung.service.ModuleServiceImpl address=/ModuleService / /beans I did the clients's https configuration in the program code: Client client = ClientProxy.getClient(port); HTTPConduit conduit = (HTTPConduit) client.getConduit(); TLSClientParameters tlsParams = new TLSClientParameters(); conduit.setTlsClientParameters(tlsParams); When I try to call the remote service from my client, the following happens: INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Could not send Message. at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) at $Proxy33.getLecturers(Unknown Source) at kvv.service.client.KvvServiceClient.getLecturers(KvvServiceClient.java:74) at modulverwaltung.tools.AdaptLecturersToKvv.main(AdaptLecturersToKvv.java:29) Caused by: java.io.IOException: Illegal Protocol http for HTTPS URLConnection Factory. at org.apache.cxf.transport.https.HttpsURLConnectionFactory.createConnection(HttpsURLConnectionFactory.java:124) at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:475) at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46) ... 8 more Would be thankful for any help... Best regards, Abid Hussain -- Abid Hussain Mail: [EMAIL PROTECTED] Web: http://www.abid76.de
client https and server http
Hi everybody, I have the following problem: My web application contains - a Web Service and - a client (which calls another Web Service). The client calls the remote service using https whereas the service deployed in my application should use http. I have configured the service as following: beans xmlns=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.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-servlet.xml / jaxws:endpoint id=moduleServiceImpl implementor=modulverwaltung.service.ModuleServiceImpl address=/ModuleService / /beans I did the clients's https configuration in the program code: Client client = ClientProxy.getClient(port); HTTPConduit conduit = (HTTPConduit) client.getConduit(); TLSClientParameters tlsParams = new TLSClientParameters(); conduit.setTlsClientParameters(tlsParams); When I try to call the remote service from my client, the following happens: INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Could not send Message. at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) at $Proxy33.getLecturers(Unknown Source) at kvv.service.client.KvvServiceClient.getLecturers(KvvServiceClient.java:74) at modulverwaltung.tools.AdaptLecturersToKvv.main(AdaptLecturersToKvv.java:29) Caused by: java.io.IOException: Illegal Protocol http for HTTPS URLConnection Factory. at org.apache.cxf.transport.https.HttpsURLConnectionFactory.createConnection(HttpsURLConnectionFactory.java:124) at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:475) at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46) ... 8 more Would be thankful for any help... Best regards, Abid Hussain -- Abid Hussain Mail: [EMAIL PROTECTED] Tel.: 0179 / 9080412 Web: http://www.abid76.de
RE: Specifying minOccurs for primitive properties with Simple Server
I've got another target for this trick, which is control of namespace prefixes. From: Kaleb Walton [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 07, 2007 1:49 PM To: cxf-user@incubator.apache.org Cc: cxf-user@incubator.apache.org Subject: RE: Specifying minOccurs for primitive properties with Simple Server To add a little bit of fuel to this fire - I found the following link related to JAXB 2.0 XML configuration for those of us who don't want to use annotations: http://jbossesb.blogspot.com/2007/07/introducing-jaxb-annotations-on.htm l Do we have access to the point of JAXBContext creation so we can set a RuntimeInlineAnnotationReader? Something that can be set through one of the simple: Spring tags such as simple:properties? Regards, Kaleb Inactive hide details for Kaleb Walton---11/07/2007 01:29:20 PM---Thanks for clarification - please excuse the lack of understaKaleb Walton---11/07/2007 01:29:20 PM---Thanks for clarification - please excuse the lack of understanding on my part. If there is a way to specify JAXB configuration From: Kaleb Walton/Southfield/[EMAIL PROTECTED] To: cxf-user@incubator.apache.org Cc: cxf-user@incubator.apache.org Date: 11/07/2007 01:29 PM Subject: RE: Specifying minOccurs for primitive properties with Simple Server Thanks for clarification - please excuse the lack of understanding on my part. If there is a way to specify JAXB configuration options via XML or some external configuration file to support such functionality I would be interested in trying that out. Do you have any suggested resources for me to follow? I'll do some digging on my own as well, thank you! Regards, Kaleb Benson Margulies ---11/07/2007 01:06:37 PM---Um, the simple front end is using either JAXB or Aegis. If JAXB, I From: Benson Margulies [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Date: 11/07/2007 01:06 PM Subject: RE: Specifying minOccurs for primitive properties with Simple Server Um, the simple front end is using either JAXB or Aegis. If JAXB, I wonder if there is something in the JAXB outboard XML format that would help you with this? The problem here is that the thing you want to control is a property of the data binding, not the front end. From: Kaleb Walton [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Sent: Wednesday, November 07, 2007 1:00 PM To: cxf-user@incubator.apache.org Cc: cxf-user@incubator.apache.org Subject: RE: Specifying minOccurs for primitive properties with Simple Server Since there are things about Aegis that I have found undesirable and the simple server is so easy to use, I've created a JIRA ticket requesting 'defaultMinOccurs' and 'defaultNillable' properties to be enabled in the simple server. Hopefully others will agree with this suggestion and it will be implemented soon! https://issues.apache.org/jira/browse/CXF-1184 https://issues.apache.org/jira/browse/CXF-1184 Regards, Kaleb Inactive hide details for Kaleb Walton---11/05/2007 04:31:58 PM---Ok - I'll definitely research that a bit more. Thank you for Kaleb Walton---11/05/2007 04:31:58 PM---Ok - I'll definitely research that a bit more. Thank you for the tip! From: Kaleb Walton/Southfield/[EMAIL PROTECTED] To: cxf-user@incubator.apache.org Date: 11/05/2007 04:31 PM Subject: RE: Specifying minOccurs for primitive properties with Simple Server Ok - I'll definitely research that a bit more. Thank you for the tip! Regards, Kaleb Benson Margulies ---11/05/2007 04:16:37 PM---This is for what we invented Aegis, I think. You can do some of these From: Benson Margulies [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Cc: Daniel Kulp [EMAIL PROTECTED] Date: 11/05/2007 04:16 PM Subject: RE: Specifying minOccurs for primitive properties with Simple Server This is for what we invented Aegis, I think. You can do some of these things in XML files. From: Kaleb Walton [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Sent: Monday, November 05, 2007 4:13 PM To: cxf-user@incubator.apache.org Cc: Daniel Kulp Subject: Re: Specifying minOccurs for primitive properties with Simple Server Thanks for the suggestion. Right now since we use the Simple Server we have ZERO annotations in our Java classes and we want to keep it that way so that method will not work for us. If you can think of any other configuration option that I can specify in my Spring config, or if there's some file that I can create to include meta data about how to serialize the class please let me know as this is one of the last little things that's getting in our way :) Thanks again for all your consideration! Regards, Kaleb Inactive hide
Re: Aegis databinding and Java 5 Generic List creating extra anyType field
On Wednesday 07 November 2007, Benson Margulies wrote: I'm not sure that the flat thing is all that hard. I'd like to know what the other Dan thinks. For Arrays internal to other objects, it's not that hard.For arrays that are parameters to the SEI methods it's quite a bit harder.That said, I had the same problem in JAXB (when not using generated doc/lit/wrapped wrapper objects) so I've battled it before. (although, since the entire Aegis code is in our control, it's probably much easier) Basically, the reasons I went with the wrapper types as part of the fix for CXF-1116 was that: 1) It was consistent with the arrays internal to the other objects 2) It HAS to be implemented that way for the rpc/lit case and 3) It was easy to implement for the wrapped doc/lit case since the call path in this case is almost exactly the same as the rpc/lit case. FYI: arrays to SEI methods using RPC/Lit will generate ArrayOf types with JAXB as well. To get JAXB to NOT do the ArrayOf things for doc/lit/wrapped took a lot of work and separate call paths for the doc/lit/wrapped case compared to the doc/lit/bare and rpc/lit cases. Dan -Original Message- From: Daniel Kulp [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 07, 2007 1:25 PM To: cxf-user@incubator.apache.org Cc: Kaleb Walton Subject: Re: Aegis databinding and Java 5 Generic List creating extra anyType field This is *quite* undesirable. Does anyone have any suggestions for a workaround? At this point, I think the only options are: 1) Switch to jaxb (which doesn't do this) 2) Start writing the code to do the flat stuff. Patches are more than welcome. :-) Dan On Wednesday 07 November 2007, Kaleb Walton wrote: Darn! I think that's it... I'm looking at the output of all of my arrays and they fork in this extra level which is given the name of the class of the object type stored in the array. Example: Note the extra 'ServiceFieldError' level that shouldn't be there and also note the 'fieldErrors' property that should actually be of type Array. [fieldErrors] = stdClass Object ( [ServiceFieldError] = Array ( [0] = stdClass Object ( [code] = errors.required [defaultMessage] = Field is required [field] = foo [rejectedValue] = Foo ) [1] = stdClass Object ( [code] = errors.required [defaultMessage] = Field is required [field] = bar [rejectedValue] = 1 ) ) ) This is *quite* undesirable. Does anyone have any suggestions for a workaround? Regards, Kaleb | | From: | | --- --- | |Benson Margulies [EMAIL PROTECTED] --- --- | | | | To:| | --- --- | |cxf-user@incubator.apache.org --- --- | | | | Date: | | --- --- | |11/06/2007 11:49 AM --- --- | | | | Subject: | | --- --- | |RE: Aegis databinding and Java 5 Generic List creating extra | anyType field
Re: cannot resolve wsdl:tExtensibilityElement
Hate to be answering my own posts but the cause of this is the fact that I am behind a proxy server. Seems that the following import in jms-conf.xsd, http-conf.xsd causes the xsd resolver to run off to the internet to try and find the schema. Is there anyway around this? xs:import namespace=http://schemas.xmlsoap.org/wsdl/; schemaLocation=http://schemas.xmlsoap.org/schemas/wsdl/wsdl.xsd/ How did I know this - -well if I hack http-conf.xsd to do the following it works! xs:import namespace=http://schemas.xmlsoap.org/wsdl/; schemaLocation=file:///c:/temp/schemas/wsdl/wsdl.xsd/ Thanks Adrian C wrote: Hi, Am doing some testing with jms am getting the error below, has anyone seen anything like this before? Thanks org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 175 in XML document from class path resource [junit/wsclient-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'wsdl:tExtensibilityElement' to a(n) 'type definition' component. Caused by: org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'wsdl:tExtensibilityElement' to a(n) 'type definition' component. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:2241) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getGlobalDecl(XSDHandler.java:1201) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexContent(XSDComplexTypeTraverser.java:715) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(XSDComplexTypeTraverser.java:288) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseGlobal(XSDComplexTypeTraverser.java:196) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getGlobalDecl(XSDHandler.java:1333) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(XSDElementTraverser.java:376) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTraverser.traverseGlobal(XSDElementTraverser.java:248) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.traverseSchemas(XSDHandler.java:1081) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:481) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:556) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2459) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1807) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:330) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292) at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:340) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:317) at
Re: Aegis databinding and Java 5 Generic List creating extra anyType field
Thank you for laying it out plainly! I've found another reason why Aegis doesn't work for our circumstances so I'm going to go back to jaxb to see if theres something that will solve my minOccurs=1 on primitives issue :) Regards, Kaleb From: Daniel Kulp [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Cc: Kaleb Walton/Southfield/[EMAIL PROTECTED] Date: 11/07/2007 01:25 PM Subject:Re: Aegis databinding and Java 5 Generic List creating extra anyType field This is *quite* undesirable. Does anyone have any suggestions for a workaround? At this point, I think the only options are: 1) Switch to jaxb (which doesn't do this) 2) Start writing the code to do the flat stuff. Patches are more than welcome. :-) Dan On Wednesday 07 November 2007, Kaleb Walton wrote: Darn! I think that's it... I'm looking at the output of all of my arrays and they fork in this extra level which is given the name of the class of the object type stored in the array. Example: Note the extra 'ServiceFieldError' level that shouldn't be there and also note the 'fieldErrors' property that should actually be of type Array. [fieldErrors] = stdClass Object ( [ServiceFieldError] = Array ( [0] = stdClass Object ( [code] = errors.required [defaultMessage] = Field is required [field] = foo [rejectedValue] = Foo ) [1] = stdClass Object ( [code] = errors.required [defaultMessage] = Field is required [field] = bar [rejectedValue] = 1 ) ) ) This is *quite* undesirable. Does anyone have any suggestions for a workaround? Regards, Kaleb | | From: | | | --- --- | |Benson Margulies [EMAIL PROTECTED] | || | --- --- | | | | To:| | | --- --- | |cxf-user@incubator.apache.org | || | --- --- | | | | Date: | | | --- --- | |11/06/2007 11:49 AM | || | --- --- | | | | Subject: | | | --- --- | |RE: Aegis databinding and Java 5 Generic List creating extra | anyType field | | | --- --- | The 'flat' feature is an attribute in the mapping schema that was intended to control some cases of either adding an extra level of type/element or not. Apparently, it isn't this one. While the code to parse the attribute exists, the code to actually pay attention to it does not.
RE: Specifying minOccurs for primitive properties with Simple Server
Thanks for clarification - please excuse the lack of understanding on my part. If there is a way to specify JAXB configuration options via XML or some external configuration file to support such functionality I would be interested in trying that out. Do you have any suggested resources for me to follow? I'll do some digging on my own as well, thank you! Regards, Kaleb From: Benson Margulies [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Date: 11/07/2007 01:06 PM Subject:RE: Specifying minOccurs for primitive properties with Simple Server Um, the simple front end is using either JAXB or Aegis. If JAXB, I wonder if there is something in the JAXB outboard XML format that would help you with this? The problem here is that the thing you want to control is a property of the data binding, not the front end. From: Kaleb Walton [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 07, 2007 1:00 PM To: cxf-user@incubator.apache.org Cc: cxf-user@incubator.apache.org Subject: RE: Specifying minOccurs for primitive properties with Simple Server Since there are things about Aegis that I have found undesirable and the simple server is so easy to use, I've created a JIRA ticket requesting 'defaultMinOccurs' and 'defaultNillable' properties to be enabled in the simple server. Hopefully others will agree with this suggestion and it will be implemented soon! https://issues.apache.org/jira/browse/CXF-1184 Regards, Kaleb Inactive hide details for Kaleb Walton---11/05/2007 04:31:58 PM---Ok - I'll definitely research that a bit more. Thank you for Kaleb Walton---11/05/2007 04:31:58 PM---Ok - I'll definitely research that a bit more. Thank you for the tip! From: Kaleb Walton/Southfield/[EMAIL PROTECTED] To: cxf-user@incubator.apache.org Date: 11/05/2007 04:31 PM Subject: RE: Specifying minOccurs for primitive properties with Simple Server Ok - I'll definitely research that a bit more. Thank you for the tip! Regards, Kaleb Benson Margulies ---11/05/2007 04:16:37 PM---This is for what we invented Aegis, I think. You can do some of these From: Benson Margulies [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Cc: Daniel Kulp [EMAIL PROTECTED] Date: 11/05/2007 04:16 PM Subject: RE: Specifying minOccurs for primitive properties with Simple Server This is for what we invented Aegis, I think. You can do some of these things in XML files. From: Kaleb Walton [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Sent: Monday, November 05, 2007 4:13 PM To: cxf-user@incubator.apache.org Cc: Daniel Kulp Subject: Re: Specifying minOccurs for primitive properties with Simple Server Thanks for the suggestion. Right now since we use the Simple Server we have ZERO annotations in our Java classes and we want to keep it that way so that method will not work for us. If you can think of any other configuration option that I can specify in my Spring config, or if there's some file that I can create to include meta data about how to serialize the class please let me know as this is one of the last little things that's getting in our way :) Thanks again for all your consideration! Regards, Kaleb Inactive hide details for Daniel Kulp ---11/05/2007 03:56:32 PM---Hmm... Not really sure.Daniel Kulp ---11/05/2007 03:56:32 PM---Hmm... Not really sure. From: Daniel Kulp [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Cc: Kaleb Walton/Southfield/[EMAIL PROTECTED] Date: 11/05/2007 03:56 PM Subject: Re: Specifying minOccurs for primitive properties with Simple Server Hmm...Not really sure. I suppose you could try something like: public class MyArg { @XmlElement(type = Integer.class, required = false) int foo; public int getFoo() { // getter} public void setFoo(int foo) { // setter} } That might work. That said, the Java 5 autoboxing should work and allow the non-primitive forms to work.Even with public void setFoo(Integer foo), you should be able to call setFoo(12) or similar. Dan On Monday 05 November 2007, Kaleb Walton wrote: Pardon me if this has been answered already - couldn't find it anywhere in Nabble. Is there a way to specify minOccurs for primitive properties with the Simple Server? Since many of our consumers use dynamic languages that do not have default values for primitives I am forced to
Re: wsdl2java code generation problem ArrayOfType Problem
This is the way the JAXB spec (and thus the JAX-WS spec) requires them to be generated. We just pass the schema off to JAXB so whatever it does is what we do. Dan On Wednesday 07 November 2007, Sven wrote: Hello, since 2 days i try to generate client stubs from https://api.betfair.com/exchange/v3/BFExchangeService.wsdl. the problem are the generated ArrayOfType classes. How can i configure wsdl2java, that these array types generated/mapped to real java arrays like type[] and not a single arrayOfType-class? Example (from wsdl above): xsd:complexType name=PlaceBetsReq xsd:complexContent xsd:extension base=types:APIRequest xsd:sequence xsd:element name=bets nillable=true type=types:ArrayOfPlaceBets/ /xsd:sequence /xsd:extension /xsd:complexContent /xsd:complexType -- - xsd:complexType name=ArrayOfPlaceBets xsd:sequence xsd:element form=qualified maxOccurs=unbounded name=PlaceBets nillable=true type=types:PlaceBets/ /xsd:sequence /xsd:complexType this class 'PlaceBetsReq' takes an array of PlaceBets but wsdl2java generates a class 'ArrayOfPlaceBets' but i need PlaceBets[]. i axis 1.4 is see it works, but not at me with xfire. may be someone can give my some tips or better a solution. sven -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog
RE: Specifying minOccurs for primitive properties with Simple Server
Um, the simple front end is using either JAXB or Aegis. If JAXB, I wonder if there is something in the JAXB outboard XML format that would help you with this? The problem here is that the thing you want to control is a property of the data binding, not the front end. From: Kaleb Walton [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 07, 2007 1:00 PM To: cxf-user@incubator.apache.org Cc: cxf-user@incubator.apache.org Subject: RE: Specifying minOccurs for primitive properties with Simple Server Since there are things about Aegis that I have found undesirable and the simple server is so easy to use, I've created a JIRA ticket requesting 'defaultMinOccurs' and 'defaultNillable' properties to be enabled in the simple server. Hopefully others will agree with this suggestion and it will be implemented soon! https://issues.apache.org/jira/browse/CXF-1184 Regards, Kaleb Inactive hide details for Kaleb Walton---11/05/2007 04:31:58 PM---Ok - I'll definitely research that a bit more. Thank you for Kaleb Walton---11/05/2007 04:31:58 PM---Ok - I'll definitely research that a bit more. Thank you for the tip! From: Kaleb Walton/Southfield/[EMAIL PROTECTED] To: cxf-user@incubator.apache.org Date: 11/05/2007 04:31 PM Subject: RE: Specifying minOccurs for primitive properties with Simple Server Ok - I'll definitely research that a bit more. Thank you for the tip! Regards, Kaleb Benson Margulies ---11/05/2007 04:16:37 PM---This is for what we invented Aegis, I think. You can do some of these From: Benson Margulies [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Cc: Daniel Kulp [EMAIL PROTECTED] Date: 11/05/2007 04:16 PM Subject: RE: Specifying minOccurs for primitive properties with Simple Server This is for what we invented Aegis, I think. You can do some of these things in XML files. From: Kaleb Walton [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Sent: Monday, November 05, 2007 4:13 PM To: cxf-user@incubator.apache.org Cc: Daniel Kulp Subject: Re: Specifying minOccurs for primitive properties with Simple Server Thanks for the suggestion. Right now since we use the Simple Server we have ZERO annotations in our Java classes and we want to keep it that way so that method will not work for us. If you can think of any other configuration option that I can specify in my Spring config, or if there's some file that I can create to include meta data about how to serialize the class please let me know as this is one of the last little things that's getting in our way :) Thanks again for all your consideration! Regards, Kaleb Inactive hide details for Daniel Kulp ---11/05/2007 03:56:32 PM---Hmm... Not really sure.Daniel Kulp ---11/05/2007 03:56:32 PM---Hmm... Not really sure. From: Daniel Kulp [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Cc: Kaleb Walton/Southfield/[EMAIL PROTECTED] Date: 11/05/2007 03:56 PM Subject: Re: Specifying minOccurs for primitive properties with Simple Server Hmm...Not really sure. I suppose you could try something like: public class MyArg { @XmlElement(type = Integer.class, required = false) int foo; public int getFoo() { // getter} public void setFoo(int foo) { // setter} } That might work. That said, the Java 5 autoboxing should work and allow the non-primitive forms to work.Even with public void setFoo(Integer foo), you should be able to call setFoo(12) or similar. Dan On Monday 05 November 2007, Kaleb Walton wrote: Pardon me if this has been answered already - couldn't find it anywhere in Nabble. Is there a way to specify minOccurs for primitive properties with the Simple Server? Since many of our consumers use dynamic languages that do not have default values for primitives I am forced to use complex types for Integers, Longs, Boolean's, etc. for parameters that should be optional. This is a problem with many of our developers as they are used to using primitive ints, longs and booleans. Example: public class MyArg { Integer foo; public Integer getFoo() { // getter} public void setFoo(Integer foo) { // setter} } we would like it to be: public class MyArg { int foo; public int getFoo() { // getter} public void setFoo(int foo) { // setter} } Any options? Regards, Kaleb -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog http://www.dankulp.com/blog
Re: Java first: Binding classes not exposed in service APIs
Jeff, Any chance you could log a JIRA and attach a test case for the enum problem? It SOUNDS like Aegis isn't generating the schema for the enums correctly. Or possibly some import namespaces is off or similar. Dan On Tuesday 06 November 2007, Segal, Jeffrey wrote: Update: I have verified that this is in fact supported by CXF, just not well documented yet. Here is my Spring configuration, which changes the default nillable and minOccurs settings to avoid stubs which wrap every Object with JAXBElement: bean id=typeMappingRegistryConfiguration class=org.apache.cxf.aegis.type.Configuration property name=defaultMinOccurs value1/value /property property name=defaultNillable value=false/ /bean bean id=typeMappingRegistry class=org.apache.cxf.aegis.type.DefaultTypeMappingRegistry property name=configuration ref=typeMappingRegistryConfiguration/ /bean bean id=aegisBean class=org.apache.cxf.aegis.databinding.AegisDatabinding property name=typeMappingRegistry ref=typeMappingRegistry/ /bean bean id=jaxws-and-aegis-service-factory class=org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean property name=properties map entry key=writeXsiType value type=java.lang.Booleantrue/value /entry entry key=overrideTypesList list valuecom.foo.bar.A/value valuecom.foo.bar.B/value valuecom.foo.bar.C/value /list /entry /map /property property name=dataBinding ref=aegisBean/ property name=serviceConfigurations list bean class=org.apache.cxf.jaxws.support.JaxWsServiceConfiguration/ bean class=org.apache.cxf.aegis.databinding.AegisServiceConfiguration/ bean class=org.apache.cxf.service.factory.DefaultServiceConfiguration/ /list /property /bean jaxws:endpoint id=fooService implementor=#myFooServiceBean implementorClass=com.service.foo.impl address=/foo jaxws:serviceFactory ref bean=jaxws-and-aegis-service-factory/ /jaxws:serviceFactory /jaxws:endpoint This all works as advertised, which is great. However, there are two features that appear to be lacking. First, let's say class A (referenced in the overrideTypesList above) has an enum property. CXF will correctly convert it to an XML enumeration. However, when creating stubs, the following error occurs: WSDLToJava Error : Thrown by JAXB : undefined simple or complex type 'ns3:SomeEnumType' Am I right to assume that CXF does not fully support Java 5 enums? Second, let's say class A has properties of types D, E and F. If class A was referenced in a service API (e.g., com.foo.bar.A getA(int id)), CXF is smart enough to bind D, E and F to XML in the resultant WSDL. However, if class A is only added to the WSDL via the overrideTypesList, classes D, E and F must also be manually added. If D, E and F in turn each have 3 more POJOs of their own, one can see how calling out each dependency out gets very unwieldy. I think these two features would be a great addition to CXF's capabilities. Thoughts? Cheers, Jeff -Original Message- From: Segal, Jeffrey [mailto:[EMAIL PROTECTED] Sent: Monday, November 05, 2007 6:30 PM To: cxf-user@incubator.apache.org Subject: Java first: Binding classes not exposed in service APIs I asked a smiliar question a few days ago referencing binding subclasses with Aegis (http://www.nabble.com/Migrating-XFire-Aegis-inheritance-to-CXF-tf4733 90 3.html), but I wanted to follow up on the subject and ask a more general question. Is binding arbitrary classes (i.e. those that are not necessarily exposed in a service interface) supported in CXF? If so, how is this done using JAXB? What would the Spring configuration look like? Thanks! Jeff -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: Java first: Binding classes not exposed in service APIs
On Monday 05 November 2007, Segal, Jeffrey wrote: I asked a smiliar question a few days ago referencing binding subclasses with Aegis (http://www.nabble.com/Migrating-XFire-Aegis-inheritance-to-CXF-tf4733 90 3.html), but I wanted to follow up on the subject and ask a more general question. Is binding arbitrary classes (i.e. those that are not necessarily exposed in a service interface) supported in CXF? If so, how is this done using JAXB? What would the Spring configuration look like? JAXB has several ways of dealing with subclasses that aren't referenced directly from the SEI: 1) If the JAXB classes were generated from it's xsd - java tools (or our wsdl2java), there are ObjectFactory object created that would reference it. When the JAXBContext is created, we add the ObjectFactory classes for all the packages we know about to the context so they could be picked up that way. 2) The JAXBDataBinding object has a spring configurable extraClasses property that can be an array of extra classes to add into the context so it knows about it. 3) jaxb.index files - for all classes that we know about, we check the package for a jaxb.index file which is just a text file with a list of other classes in that package to load. 4) With JAXB 2.1/JAX-WS 2.1, there is support for an XmlSeeAlso annotation which you can put on the SEI or other beans to have JAXB add those classes. -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: class loading stax-api.jar
Actually, I see that a javax.xml.stream:stax-api:1.0-2 jar was added to central last month. That jar doesn't have the QName class either. We can switch to that (Sun CDDL license) or possibly to the geronimo-specs version which also doesn't have it. Most likely, I'll switch it to the geronimo-specs version. (Nice apache license) Dan On Wednesday 07 November 2007, Adrian C wrote: Not to sure if I should be posting this to the developers list or not - however I came a cross an issue with stax.jar on OAS. There was a problem with class loading because of stax-api.jar including QName. Issue was resolved by using jsr173_api-2.2.0.jar instead. I think that this should be part of jsr173_api-2.2.0.jar should be part of cxf dependencies rather that stax-api.jar -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog
RE: Aegis databinding and Java 5 Generic List creating extra anyType field
Darn! I think that's it... I'm looking at the output of all of my arrays and they fork in this extra level which is given the name of the class of the object type stored in the array. Example: Note the extra 'ServiceFieldError' level that shouldn't be there and also note the 'fieldErrors' property that should actually be of type Array. [fieldErrors] = stdClass Object ( [ServiceFieldError] = Array ( [0] = stdClass Object ( [code] = errors.required [defaultMessage] = Field is required [field] = foo [rejectedValue] = Foo ) [1] = stdClass Object ( [code] = errors.required [defaultMessage] = Field is required [field] = bar [rejectedValue] = 1 ) ) ) This is *quite* undesirable. Does anyone have any suggestions for a workaround? Regards, Kaleb | | From: | | --| |Benson Margulies [EMAIL PROTECTED] | --| | | To:| | --| |cxf-user@incubator.apache.org | --| | | Date: | | --| |11/06/2007 11:49 AM | --| | | Subject: | | --| |RE: Aegis databinding and Java 5 Generic List creating extra anyType field | --| The 'flat' feature is an attribute in the mapping schema that was intended to control some cases of either adding an extra level of type/element or not. Apparently, it isn't this one. While the code to parse the attribute exists, the code to actually pay attention to it does not. From: Kaleb Walton [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 06, 2007 11:27 AM To: cxf-user@incubator.apache.org Subject: RE: Aegis databinding and Java 5 Generic List creating extra anyType field Thanks for the reply. Unfortunately nillable is already set to false. What is the 'flat' feature? I can't imagine that I'm the only person having the problem. Do you know if there is a way to specify something in an aegis.xml config that tells the 'items' list to not add the 'anyType' property? Regards, Kaleb Inactive hide details for Benson Margulies ---11/06/2007 08:58:14 AM---If you set nillable to false it might do what you wantBenson Margulies ---11/06/2007 08:58:14 AM---If you set nillable to false it might do what you want. On the other From: Benson Margulies [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Date: 11/06/2007 08:58 AM Subject: RE: Aegis databinding and Java 5 Generic List creating extra anyType field If you set nillable to false it might do what you want. On the other hand, it might be that this is the never-implemented 'flat' feature of Aegis. -Original Message- From: Kaleb Walton
RE: Return direct XML
The dynamic client is situated in the source in a place that surprised me, and this aspect fits with that. Go ahead and give it a try, it should just have a DataBinding instance that could be made settablr. -Original Message- From: Benjamin Coiffe [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 07, 2007 3:45 AM To: cxf-user@incubator.apache.org Subject: RE: Return direct XML Hi, I was trying to use Aegis Binding on the Dynamic client (DynamicClientFactory.createClient()) but it is hard coded to use JAXB. Is there a specific reason for this or could I confidently modify the source code of my distribution and expect it to run using Aegis bindings? Thanks, Ps: benson, the fix for CXF-1168 works for me in 2.0.1. Thx! -Original Message- From: Benson Margulies [mailto:[EMAIL PROTECTED] Sent: 07 November 2007 02:38 To: cxf-user@incubator.apache.org Subject: RE: Return direct XML I believe that Aegis allows you to have a return type of org.w3c.Document or the JDOM equivalent, and XML will appear. -Original Message- From: Liu, Jervis [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 06, 2007 9:32 PM To: cxf-user@incubator.apache.org Subject: RE: Return direct XML In your case, looks like the easiest way is to use JAX-WS Provider API with XML Binding. You will find a bunch of different type of Provider implementations under system test: https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/j av a/org/apache/cxf/systest/provider/. Of course the limitation is that the input of your function has to be in XML format as well (can be Source/SOAPMessage/DataSource, depend on your mode and binding), in some cases you may find its hard to parse input from XML by yourself. Cheers, Jervis -Original Message- From: Roshan A. Punnoose [mailto:[EMAIL PROTECTED] Sent: 2007?11?7? 4:08 To: cxf-user@incubator.apache.org Subject: Return direct XML Hi, What is the easiest way to return XML directly? For example, in my function, if I create XML, I want to be able to send that object directly back to the calling client. Is this possible? Roshan IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: Specifying minOccurs for primitive properties with Simple Server
Hmm not right now, but it wouldn't be too hard. Basically, if we add a MapString, Object ctxProperties property to the JAXBDataBinding that could be configured from spring, that would allow it. The map created on line 310 of JAXBDataBinding would then be created as a copy of that map. There's a bunch of keys on the JAXBRIContext that could be set/controlled that way. The ANNOTATION_READER is one of them. You want to test it out? Patches are welcome. :-) Dan On Wednesday 07 November 2007, Kaleb Walton wrote: To add a little bit of fuel to this fire - I found the following link related to JAXB 2.0 XML configuration for those of us who don't want to use annotations: http://jbossesb.blogspot.com/2007/07/introducing-jaxb-annotations-on.h tml Do we have access to the point of JAXBContext creation so we can set a RuntimeInlineAnnotationReader? Something that can be set through one of the simple: Spring tags such as simple:properties? Regards, Kaleb From: Kaleb Walton/Southfield/[EMAIL PROTECTED] To: cxf-user@incubator.apache.org Cc: cxf-user@incubator.apache.org Date: 11/07/2007 01:29 PM Subject:RE: Specifying minOccurs for primitive properties with Simple Server Thanks for clarification - please excuse the lack of understanding on my part. If there is a way to specify JAXB configuration options via XML or some external configuration file to support such functionality I would be interested in trying that out. Do you have any suggested resources for me to follow? I'll do some digging on my own as well, thank you! Regards, Kaleb Inactive hide details for Benson Margulies ---11/07/2007 01:06:37 PM---Um, the simple front end is using either JAXB or AegisBenson Margulies ---11/07/2007 01:06:37 PM---Um, the simple front end is using either JAXB or Aegis. If JAXB, I From: Benson Margulies [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Date: 11/07/2007 01:06 PM Subject:RE: Specifying minOccurs for primitive properties with Simple Server Um, the simple front end is using either JAXB or Aegis. If JAXB, I wonder if there is something in the JAXB outboard XML format that would help you with this? The problem here is that the thing you want to control is a property of the data binding, not the front end. From: Kaleb Walton [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 07, 2007 1:00 PM To: cxf-user@incubator.apache.org Cc: cxf-user@incubator.apache.org Subject: RE: Specifying minOccurs for primitive properties with Simple Server Since there are things about Aegis that I have found undesirable and the simple server is so easy to use, I've created a JIRA ticket requesting 'defaultMinOccurs' and 'defaultNillable' properties to be enabled in the simple server. Hopefully others will agree with this suggestion and it will be implemented soon! https://issues.apache.org/jira/browse/CXF-1184 Regards, Kaleb Inactive hide details for Kaleb Walton---11/05/2007 04:31:58 PM---Ok - I'll definitely research that a bit more. Thank you for Kaleb Walton---11/05/2007 04:31:58 PM---Ok - I'll definitely research that a bit more. Thank you for the tip! From: Kaleb Walton/Southfield/[EMAIL PROTECTED] To: cxf-user@incubator.apache.org Date: 11/05/2007 04:31 PM Subject: RE: Specifying minOccurs for primitive properties with Simple Server Ok - I'll definitely research that a bit more. Thank you for the tip! Regards, Kaleb Benson Margulies ---11/05/2007 04:16:37 PM---This is for what we invented Aegis, I think. You can do some of these From: Benson Margulies [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Cc: Daniel Kulp [EMAIL PROTECTED] Date: 11/05/2007 04:16 PM Subject: RE: Specifying minOccurs for primitive properties with Simple Server This is for what we invented Aegis, I think. You can do some of these things in XML files. From: Kaleb Walton [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Sent: Monday, November 05, 2007 4:13 PM To: cxf-user@incubator.apache.org Cc: Daniel Kulp Subject: Re: Specifying minOccurs for primitive properties with Simple Server Thanks for the suggestion. Right now since we use the Simple Server we have ZERO annotations in our Java classes and we want to keep it that way so that method will not work for us. If you can think of any other configuration option that I can specify in my Spring config, or if there's some file that I can create to include meta data about how to serialize the class please let me know as this is one of the last little things that's getting in our way :) Thanks again for all your consideration! Regards, Kaleb Inactive hide details for
RE: JMS configuration for consumer
This also applies to the binding element as well in terms of generic applicability, standards, etc. :-) From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: JMS configuration for consumerDate: Wed, 7 Nov 2007 08:09:39 -0500 Hi, In the JMS configuration docuement (for consumer only in this case), it specified that the configuration can be done either by WSDL or configuration file. Can this be mixed with a portion in wsdl and configuration? Is the WSDL configuration for JMS consumers standard? That is, is the syntax of the port element contents standardized or are they specific to a JMS impl? This is a snip from a commercial JMS that I need to connect to: wsdl:port binding=tns:ESB_VehicleManagementSOAP_JMS_Binding name=SOAP_JMS_Portsoap:address location=jms:/queue?destination=jms/SoapOutputamp;connectionFactory=jms/outboundSoapJmsQCFamp;replyToDestination=jms/SoapInputamp;targetService=ESB_VehicleManagement_DialogPlus//wsdl:port Does a cxf jms consumer need to know the cxf JMS namespace if definded by wsdl? BTW, we want to have the default tempory queue setup for request/reply. Peek-a-boo FREE Tricks Treats for You! Get 'em! _ Help yourself to FREE treats served up daily at the Messenger Café. Stop by today. http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline
Re: Return direct XML
Hi, You can try it. I am also looking forward that the DynamicClientFactory can work with Aegis Binding. And the patch of it is welcome :) Willem. Benjamin Coiffe wrote: Hi, I was trying to use Aegis Binding on the Dynamic client (DynamicClientFactory.createClient()) but it is hard coded to use JAXB. Is there a specific reason for this or could I confidently modify the source code of my distribution and expect it to run using Aegis bindings? Thanks, Ps: benson, the fix for CXF-1168 works for me in 2.0.1. Thx! -Original Message- From: Benson Margulies [mailto:[EMAIL PROTECTED] Sent: 07 November 2007 02:38 To: cxf-user@incubator.apache.org Subject: RE: Return direct XML I believe that Aegis allows you to have a return type of org.w3c.Document or the JDOM equivalent, and XML will appear. -Original Message- From: Liu, Jervis [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 06, 2007 9:32 PM To: cxf-user@incubator.apache.org Subject: RE: Return direct XML In your case, looks like the easiest way is to use JAX-WS Provider API with XML Binding. You will find a bunch of different type of Provider implementations under system test: https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/j av a/org/apache/cxf/systest/provider/. Of course the limitation is that the input of your function has to be in XML format as well (can be Source/SOAPMessage/DataSource, depend on your mode and binding), in some cases you may find its hard to parse input from XML by yourself. Cheers, Jervis -Original Message- From: Roshan A. Punnoose [mailto:[EMAIL PROTECTED] Sent: 2007?11?7? 4:08 To: cxf-user@incubator.apache.org Subject: Return direct XML Hi, What is the easiest way to return XML directly? For example, in my function, if I create XML, I want to be able to send that object directly back to the calling client. Is this possible? Roshan IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: client https and server http
One comment about configuring the http conduit with Java code. The configure the http conduit with Java code should work, you just need set the right endpoint address. Please check out the CXF systest [1] 's testHttpsBasicConnection(). [1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java Willem. Abid Hussain wrote: Hi again, I finally got it. I had to put the http:conduit in my configuration: http:conduit name={http://ws.kvv.mi.fuberlin.de/}KvvServiceImplService.http-conduit; http:tlsClientParameters secureSocketProtocol=SSL / /http:conduit Sorry for that. But I find that xfire is really hard to handle, cause it uses all this spring stuff which is quite confusing, if you're not familiar to spring (like me). Everytime something isn't working, I wonder if it's some mysterious spring behaviour and don't recognise that the solution (like above) is pretty easy. I'm trying to set up a services and clients using CXF for a couple of weeks. Before I was using XFire. Till now my experience is that XFire was MUCH easier to configure and to handle. Best regards, Abid Abid Hussain schrieb: Hi everybody, I have the following problem: My web application contains - a Web Service and - a client (which calls another Web Service). The client calls the remote service using https whereas the service deployed in my application should use http. I have configured the service as following: beans xmlns=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.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-servlet.xml / jaxws:endpoint id=moduleServiceImpl implementor=modulverwaltung.service.ModuleServiceImpl address=/ModuleService / /beans I did the clients's https configuration in the program code: Client client = ClientProxy.getClient(port); HTTPConduit conduit = (HTTPConduit) client.getConduit(); TLSClientParameters tlsParams = new TLSClientParameters(); conduit.setTlsClientParameters(tlsParams); When I try to call the remote service from my client, the following happens: INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Could not send Message. at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) at $Proxy33.getLecturers(Unknown Source) at kvv.service.client.KvvServiceClient.getLecturers(KvvServiceClient.java:74) at modulverwaltung.tools.AdaptLecturersToKvv.main(AdaptLecturersToKvv.java:29) Caused by: java.io.IOException: Illegal Protocol http for HTTPS URLConnection Factory. at org.apache.cxf.transport.https.HttpsURLConnectionFactory.createConnection(HttpsURLConnectionFactory.java:124) at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:475) at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46) ... 8 more Would be thankful for any help... Best regards, Abid Hussain
Re: cannot resolve wsdl:tExtensibilityElement
looks like its using spring's PluggableSchemaResolver, which looks like it should work based on the entries in the META-INF/spring.schemas ... but I am seeing the spring.schemas loaded up twice! 31 [main] DEBUG org.springframework.beans.factory.xml.PluggableSchemaResolver - Loading schema mappings from [META-INF/spring.schemas] 47 [main] DEBUG org.springframework.beans.factory.xml.PluggableSchemaResolver - Loaded schema mappings: {http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://cxf.apache.org/schemas/policy.xsd=schemas/policy.xsd, http://cxf.apache.org/schemas/configuration/security.xsd=schemas/configuration/security.xsd, http://cxf.apache.org/schemas/wsdl/jms.xsd=schemas/wsdl/jms.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd=schemas/oasis-200401-wss-wssecurity-utility-1.0.xsd, http://cxf.apache.org/schemas/configuration/soap.xsd=schemas/configuration/soap.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd=schemas/configuration/wsrm-manager.xsd, http://cxf.apache.org/schemas/wsdl/http-conf.xsd=schemas/wsdl/http-conf.xsd, http://cxf.apache.org/schemas/jaxws.xsd=schemas/jaxws.xsd, http://www.w3.org/2006/07/ws-policy.xsd=schemas/ws-policy-200607.xsd, http://cxf.apache.org/schema/bindings/object.xsd=org/apache/cxf/binding/soap/spring/object.xsd, http://schemas.xmlsoap.org/ws/2004/09/policy/ws-policy.xsd=schemas/ws-policy-200409.xsd, http://www.springframework.org/schema/gienah/gienah.xsd=org/gienah/testing/xml/spring-gienah-0.2.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://cxf.apache.org/schemas/simple.xsd=schemas/simple.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://cxf.apache.org/schemas/configuration/wsrm-manager-types.xsd=schemas/configuration/wsrm-manager-types.xsd, http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd=schemas/configuration/wsrm-policy.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://cxf.apache.org/schemas/configuration/cxf-beans.xsd=schemas/configuration/cxf-beans.xsd, http://cxf.apache.org/schemas/ws/addressing.xsd=schemas/ws-addr-conf.xsd, http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd=schemas/oasis-200401-wss-wssecurity-secext-1.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://cxf.apache.org/schemas/core.xsd=schemas/core.xsd, http://www.w3.org/2007/02/ws-policy.xsd=schemas/ws-policy-200702.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.w3.org/2001/xml.xsd=schemas/xml.xsd, http://cxf.apache.org/schemas/configuration/http-conf.xsd=schemas/configuration/http-conf.xsd, http://cxf.apache.org/schemas/configuration/http-jetty.xsd=schemas/configuration/http-jetty.xsd, http://cxf.apache.org/schemas/configuration/jms.xsd=schemas/configuration/jms.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://schemas.xmlsoap.org/wsdl/http/=schemas/wsdl/http.xsd, http://schemas.xmlsoap.org/wsdl/=schemas/wsdl/wsdl.xsd, http://schemas.xmlsoap.org/ws/2004/08/addressing=schemas/wsdl/addressing.xsd} 47 [main] DEBUG org.springframework.beans.factory.xml.PluggableSchemaResolver - Loading schema mappings from [META-INF/spring.schemas] 47 [main] DEBUG org.springframework.beans.factory.xml.PluggableSchemaResolver - Loaded schema mappings: {http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://cxf.apache.org/schemas/policy.xsd=schemas/policy.xsd, http://cxf.apache.org/schemas/configuration/security.xsd=schemas/configuration/security.xsd, http://cxf.apache.org/schemas/wsdl/jms.xsd=schemas/wsdl/jms.xsd,
JMS configuration for consumer
Hi, In the JMS configuration docuement (for consumer only in this case), it specified that the configuration can be done either by WSDL or configuration file. Can this be mixed with a portion in wsdl and configuration? Is the WSDL configuration for JMS consumers standard? That is, is the syntax of the port element contents standardized or are they specific to a JMS impl? This is a snip from a commercial JMS that I need to connect to: wsdl:port binding=tns:ESB_VehicleManagementSOAP_JMS_Binding name=SOAP_JMS_Port soap:address location=jms:/queue?destination=jms/SoapOutputamp;connectionFactory=jms/outboundSoapJmsQCFamp;replyToDestination=jms/SoapInputamp;targetService=ESB_VehicleManagement_DialogPlus/ /wsdl:port Does a cxf jms consumer need to know the cxf JMS namespace if definded by wsdl? BTW, we want to have the default tempory queue setup for request/reply. _ Peek-a-boo FREE Tricks Treats for You! http://www.reallivemoms.com?ocid=TXT_TAGHMloc=us
RE: Specifying minOccurs for primitive properties with Simple Server
To add a little bit of fuel to this fire - I found the following link related to JAXB 2.0 XML configuration for those of us who don't want to use annotations: http://jbossesb.blogspot.com/2007/07/introducing-jaxb-annotations-on.html Do we have access to the point of JAXBContext creation so we can set a RuntimeInlineAnnotationReader? Something that can be set through one of the simple: Spring tags such as simple:properties? Regards, Kaleb From: Kaleb Walton/Southfield/[EMAIL PROTECTED] To: cxf-user@incubator.apache.org Cc: cxf-user@incubator.apache.org Date: 11/07/2007 01:29 PM Subject:RE: Specifying minOccurs for primitive properties with Simple Server Thanks for clarification - please excuse the lack of understanding on my part. If there is a way to specify JAXB configuration options via XML or some external configuration file to support such functionality I would be interested in trying that out. Do you have any suggested resources for me to follow? I'll do some digging on my own as well, thank you! Regards, Kaleb Inactive hide details for Benson Margulies ---11/07/2007 01:06:37 PM---Um, the simple front end is using either JAXB or AegisBenson Margulies ---11/07/2007 01:06:37 PM---Um, the simple front end is using either JAXB or Aegis. If JAXB, I From: Benson Margulies [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Date: 11/07/2007 01:06 PM Subject:RE: Specifying minOccurs for primitive properties with Simple Server Um, the simple front end is using either JAXB or Aegis. If JAXB, I wonder if there is something in the JAXB outboard XML format that would help you with this? The problem here is that the thing you want to control is a property of the data binding, not the front end. From: Kaleb Walton [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 07, 2007 1:00 PM To: cxf-user@incubator.apache.org Cc: cxf-user@incubator.apache.org Subject: RE: Specifying minOccurs for primitive properties with Simple Server Since there are things about Aegis that I have found undesirable and the simple server is so easy to use, I've created a JIRA ticket requesting 'defaultMinOccurs' and 'defaultNillable' properties to be enabled in the simple server. Hopefully others will agree with this suggestion and it will be implemented soon! https://issues.apache.org/jira/browse/CXF-1184 Regards, Kaleb Inactive hide details for Kaleb Walton---11/05/2007 04:31:58 PM---Ok - I'll definitely research that a bit more. Thank you for Kaleb Walton---11/05/2007 04:31:58 PM---Ok - I'll definitely research that a bit more. Thank you for the tip! From: Kaleb Walton/Southfield/[EMAIL PROTECTED] To: cxf-user@incubator.apache.org Date: 11/05/2007 04:31 PM Subject: RE: Specifying minOccurs for primitive properties with Simple Server Ok - I'll definitely research that a bit more. Thank you for the tip! Regards, Kaleb Benson Margulies ---11/05/2007 04:16:37 PM---This is for what we invented Aegis, I think. You can do some of these From: Benson Margulies [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Cc: Daniel Kulp [EMAIL PROTECTED] Date: 11/05/2007 04:16 PM Subject: RE: Specifying minOccurs for primitive properties with Simple Server This is for what we invented Aegis, I think. You can do some of these things in XML files. From: Kaleb Walton [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Sent: Monday, November 05, 2007 4:13 PM To:
Re: cannot resolve wsdl:tExtensibilityElement
You could add an XmlCatalog to the catalog resolver to map the http://schemas.xmlsoap.org/schemas/wsdl/wsdl.xsd location to something that's local. Dan On Wednesday 07 November 2007, Adrian C wrote: Hate to be answering my own posts but the cause of this is the fact that I am behind a proxy server. Seems that the following import in jms-conf.xsd, http-conf.xsd causes the xsd resolver to run off to the internet to try and find the schema. Is there anyway around this? xs:import namespace=http://schemas.xmlsoap.org/wsdl/; schemaLocation=http://schemas.xmlsoap.org/schemas/wsdl/wsdl.xsd/ How did I know this - -well if I hack http-conf.xsd to do the following it works! xs:import namespace=http://schemas.xmlsoap.org/wsdl/; schemaLocation=file:///c:/temp/schemas/wsdl/wsdl.xsd/ Thanks Adrian C wrote: Hi, Am doing some testing with jms am getting the error below, has anyone seen anything like this before? Thanks org.springframework.beans.factory.xml.XmlBeanDefinitionStoreExceptio n: Line 175 in XML document from class path resource [junit/wsclient-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'wsdl:tExtensibilityElement' to a(n) 'type definition' component. Caused by: org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'wsdl:tExtensibilityElement' to a(n) 'type definition' component. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSA XParseException(ErrorHandlerWrapper.java:236) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Er rorHandlerWrapper.java:172) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError (XMLErrorReporter.java:382) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.rep ortSchemaError(XSDHandler.java:2241) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.get GlobalDecl(XSDHandler.java:1201) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexType Traverser.traverseComplexContent(XSDComplexTypeTraverser.java:715) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexType Traverser.traverseComplexTypeDecl(XSDComplexTypeTraverser.java:288) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexType Traverser.traverseGlobal(XSDComplexTypeTraverser.java:196) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.get GlobalDecl(XSDHandler.java:1333) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTrav erser.traverseNamedElement(XSDElementTraverser.java:376) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTrav erser.traverseGlobal(XSDElementTraverser.java:248) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.tra verseSchemas(XSDHandler.java:1081) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.par seSchema(XSDHandler.java:481) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchem a(XMLSchemaLoader.java:556) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSc hemaGrammar(XMLSchemaValidator.java:2459) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handle StartElement(XMLSchemaValidator.java:1807) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startE lement(XMLSchemaValidator.java:705) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.sca nStartElement(XMLNSDocumentScannerImpl.java:330) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerIm pl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl. java:1693) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerIm pl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse( XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse( XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser .java:148) at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser .java:250) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Do cumentBuilderImpl.java:292) at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocu ment(DefaultDocumentLoader.java:76) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoad BeanDefinitions(XmlBeanDefinitionReader.java:388)
Re: Aegis databinding and Java 5 Generic List creating extra anyType field
This is *quite* undesirable. Does anyone have any suggestions for a workaround? At this point, I think the only options are: 1) Switch to jaxb (which doesn't do this) 2) Start writing the code to do the flat stuff. Patches are more than welcome. :-) Dan On Wednesday 07 November 2007, Kaleb Walton wrote: Darn! I think that's it... I'm looking at the output of all of my arrays and they fork in this extra level which is given the name of the class of the object type stored in the array. Example: Note the extra 'ServiceFieldError' level that shouldn't be there and also note the 'fieldErrors' property that should actually be of type Array. [fieldErrors] = stdClass Object ( [ServiceFieldError] = Array ( [0] = stdClass Object ( [code] = errors.required [defaultMessage] = Field is required [field] = foo [rejectedValue] = Foo ) [1] = stdClass Object ( [code] = errors.required [defaultMessage] = Field is required [field] = bar [rejectedValue] = 1 ) ) ) This is *quite* undesirable. Does anyone have any suggestions for a workaround? Regards, Kaleb | | From: | | | --- --- | |Benson Margulies [EMAIL PROTECTED] | || | --- --- | | | | To:| | | --- --- | |cxf-user@incubator.apache.org | || | --- --- | | | | Date: | | | --- --- | |11/06/2007 11:49 AM | || | --- --- | | | | Subject: | | | --- --- | |RE: Aegis databinding and Java 5 Generic List creating extra | anyType field | | | --- --- | The 'flat' feature is an attribute in the mapping schema that was intended to control some cases of either adding an extra level of type/element or not. Apparently, it isn't this one. While the code to parse the attribute exists, the code to actually pay attention to it does not. From: Kaleb Walton [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 06, 2007 11:27 AM To: cxf-user@incubator.apache.org Subject: RE: Aegis databinding and Java 5 Generic List creating extra anyType field Thanks for the reply. Unfortunately nillable is already set to false. What is the 'flat' feature? I can't imagine that I'm the only person having the problem. Do you know if there is a way to specify something in an aegis.xml config that tells the 'items' list to not add the 'anyType' property? Regards, Kaleb Inactive hide details for Benson Margulies ---11/06/2007 08:58:14 AM---If you set nillable to false it might do what you wantBenson
Re: Help! Aegis not mapping Java.Util.Collection properly
Hmm... my testcases (albiet simple ones) are looking OK. Any chance you could send me a testcase? (private to dan at dankulp dot com to avoid spam filters that tend to eat them would be best.) Dan On Tuesday 06 November 2007, Vespa, Anthony J wrote: I downloaded the current 2.0.3 build and I am still getting this error in SoapUI 1.7.6 - I took it from this location: http://people.apache.org/~dkulp/stage_cxf/2.0.3-incubator-take1/ Please advise. From: Vespa, Anthony J Sent: Monday, November 05, 2007 6:19 PM To: Daniel Kulp; cxf-user@incubator.apache.org Subject: RE: Help! Aegis not mapping Java.Util.Collection properly Thank you so much! So to clarify a couple things (apologies if this is redundant I just want to make sure I understand) -Once this issue is fixed, will the any-type resolve to being the actual types on my collection, or will it still be any type and this just fixes the breakage in the SoapUI tool? -Will this then be going into 2.0.3, and if so, when will 2.0.3 be fully released as a finished item? I didn't see any dates for it in my inspection of the docs and sites. Thanks again!! -Tony From: Daniel Kulp [mailto:[EMAIL PROTECTED] Sent: Mon 11/5/2007 4:56 PM To: cxf-user@incubator.apache.org Cc: Vespa, Anthony J Subject: Re: Help! Aegis not mapping Java.Util.Collection properly On Monday 05 November 2007, Vespa, Anthony J wrote: Okie, so what is the next step? Do I need to log a bug for this? I'm not really 100% on why the mapping is broken. I have it fixed. :-) Running the test suite now. There were two issues: 1) We were generating the ArrayOfAnyType into the http://www.w3.org/2001/XMLSchema namespace which is really wrong as thats a standard namespace that we shouldn't be generating anything into. 2) Because that namespace is a standard one, we don't create an xsd:import element for it.Thus, the SOAPui parser/validator cannot find it. Fixing (1) actually fixes this. Dan -T -Original Message- From: Daniel Kulp [mailto:[EMAIL PROTECTED] Sent: Monday, November 05, 2007 4:32 PM To: cxf-user@incubator.apache.org Cc: Vespa, Anthony J Subject: Re: Help! Aegis not mapping Java.Util.Collection properly I'm not an aegis expert at all, but I believe the claim is that the generics work on the Collections, but not on other classes. Thus, ListInteger will map to int in the schema, but FooInteger is not mapped.Basically, we only look at the generics if its an instance of a collection and at that point, we ONLY look at that collection. We don't going searching up all the declarations to figure out where the generics expansion came from. That said, mapping to the anyType should have worked. Generating an invalid wsdl is definitely a bug. Dan On Monday 05 November 2007, Vespa, Anthony J wrote: Hello, I am having a problem trying to return a 'complex object' that contains a java.util.collection as one of the properties. I've written a SOAP service using Aegis binding and I want to pass in a generic return type from the various data accessing functions I have written. I am getting this error in my SOAPUI: Mon Nov 05 13:17:48 EST 2007:WARN: error: src-resolve: type '[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema' not found. I have defined the class as such: @XmlType(name = wsResponse, namespace = http://soap.ws.test.com/;) public class wsResponseT { protected CollectionT response; protected String sName; protected String sessionId; public wsResponse(CollectionT os) { this.response = os; } public wsResponse() { } public void setResponse(CollectionT response) { this.response = response; } public CollectionT getResponse() { return response; } ... (other setters//getters) } Please help, I have been held up for 2 days! Though there are no real examples out there, the Xfire/CXF docs 'claim' this should be automatic with Java 1.5 Thanks! -Tony -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: Return direct XML
Yep, I think the initial thought just wanted it works only by setting the JAXB Context with the WSDL dynamically, it may skip the part of JAXB DataBinding. Maybe we can get it workable by refactoring the DynamicClientFactory to accept different DataBinding Context ? I don't know if Aegis can generate the type class from WSDL just like XJC. Or we do not need do it for Aegis DataBinding. Any other thought? Willem. Benson Margulies wrote: The dynamic client is situated in the source in a place that surprised me, and this aspect fits with that. Go ahead and give it a try, it should just have a DataBinding instance that could be made settablr. -Original Message- From: Benjamin Coiffe [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 07, 2007 3:45 AM To: cxf-user@incubator.apache.org Subject: RE: Return direct XML Hi, I was trying to use Aegis Binding on the Dynamic client (DynamicClientFactory.createClient()) but it is hard coded to use JAXB. Is there a specific reason for this or could I confidently modify the source code of my distribution and expect it to run using Aegis bindings? Thanks, Ps: benson, the fix for CXF-1168 works for me in 2.0.1. Thx! -Original Message- From: Benson Margulies [mailto:[EMAIL PROTECTED] Sent: 07 November 2007 02:38 To: cxf-user@incubator.apache.org Subject: RE: Return direct XML I believe that Aegis allows you to have a return type of org.w3c.Document or the JDOM equivalent, and XML will appear. -Original Message- From: Liu, Jervis [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 06, 2007 9:32 PM To: cxf-user@incubator.apache.org Subject: RE: Return direct XML In your case, looks like the easiest way is to use JAX-WS Provider API with XML Binding. You will find a bunch of different type of Provider implementations under system test: https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/j av a/org/apache/cxf/systest/provider/. Of course the limitation is that the input of your function has to be in XML format as well (can be Source/SOAPMessage/DataSource, depend on your mode and binding), in some cases you may find its hard to parse input from XML by yourself. Cheers, Jervis -Original Message- From: Roshan A. Punnoose [mailto:[EMAIL PROTECTED] Sent: 2007?11?7? 4:08 To: cxf-user@incubator.apache.org Subject: Return direct XML Hi, What is the easiest way to return XML directly? For example, in my function, if I create XML, I want to be able to send that object directly back to the calling client. Is this possible? Roshan IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
RE: Specifying minOccurs for primitive properties with Simple Server
Since there are things about Aegis that I have found undesirable and the simple server is so easy to use, I've created a JIRA ticket requesting 'defaultMinOccurs' and 'defaultNillable' properties to be enabled in the simple server. Hopefully others will agree with this suggestion and it will be implemented soon! https://issues.apache.org/jira/browse/CXF-1184 Regards, Kaleb | | From: | | --| |Kaleb Walton/Southfield/[EMAIL PROTECTED] | --| | | To:| | --| |cxf-user@incubator.apache.org | --| | | Date: | | --| |11/05/2007 04:31 PM | --| | | Subject: | | --| |RE: Specifying minOccurs for primitive properties with Simple Server | --| Ok - I'll definitely research that a bit more. Thank you for the tip! Regards, Kaleb Inactive hide details for Benson Margulies ---11/05/2007 04:16:37 PM---This is for what we invented Aegis, I think. You can dBenson Margulies ---11/05/2007 04:16:37 PM---This is for what we invented Aegis, I think. You can do some of these From: Benson Margulies [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Cc: Daniel Kulp [EMAIL PROTECTED] Date: 11/05/2007 04:16 PM Subject:RE: Specifying minOccurs for primitive properties with Simple Server This is for what we invented Aegis, I think. You can do some of these things in XML files. From: Kaleb Walton [mailto:[EMAIL PROTECTED] Sent: Monday, November 05, 2007 4:13 PM To: cxf-user@incubator.apache.org Cc: Daniel Kulp Subject: Re: Specifying minOccurs for primitive properties with Simple Server Thanks for the suggestion. Right now since we use the Simple Server we have ZERO annotations in our Java classes and we want to keep it that way so that method will not work for us. If you can think of any other configuration option that I can specify in my Spring config, or if there's some file that I can create to include meta data about how to serialize the class please let me know as this is one of the last little things that's getting in our way :) Thanks again for all your consideration! Regards, Kaleb Inactive hide details for Daniel Kulp ---11/05/2007 03:56:32 PM---Hmm... Not really sure.Daniel Kulp ---11/05/2007 03:56:32 PM---Hmm... Not really sure. From: Daniel Kulp [EMAIL PROTECTED] To:
Re: JMS configuration for consumer
Hi Patrick, I don't think CXF JMS transport will recognize the address that you wrote in the soap:address. Now CXF JMS transport just consumer the address information which define as jms:address which is defined by CXF itself. You can find some example wsdl here [1]. BTW It looks like your address is coming form soap/jms binding. Currently CXF do not support it yet. [1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_doc_lit.wsdl Willem. Patrick Mulligan wrote: This also applies to the binding element as well in terms of generic applicability, standards, etc. :-) From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: JMS configuration for consumerDate: Wed, 7 Nov 2007 08:09:39 -0500 Hi, In the JMS configuration docuement (for consumer only in this case), it specified that the configuration can be done either by WSDL or configuration file. Can this be mixed with a portion in wsdl and configuration? Is the WSDL configuration for JMS consumers standard? That is, is the syntax of the port element contents standardized or are they specific to a JMS impl? This is a snip from a commercial JMS that I need to connect to: wsdl:port binding=tns:ESB_VehicleManagementSOAP_JMS_Binding name=SOAP_JMS_Portsoap:address location=jms:/queue?destination=jms/SoapOutputamp;connectionFactory=jms/outboundSoapJmsQCFamp;replyToDestination=jms/SoapInputamp;targetService=ESB_VehicleManagement_DialogPlus//wsdl:port Does a cxf jms consumer need to know the cxf JMS namespace if definded by wsdl? BTW, we want to have the default tempory queue setup for request/reply. Peek-a-boo FREE Tricks Treats for You! Get 'em! _ Help yourself to FREE treats served up daily at the Messenger Café. Stop by today. http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline
Re: JMS configuration for consumer
Hi Patrick, you cannot use the snippet you used to connect to the service you are trying directly. You will need to have jms:address .../ configured with the appropriate info. from the location jms: address. This translation you can do it in configuration or modify the WSDL it's upto you. Another thing I noticed is the location starts with jms:/ and this won't tell CXF to use JMS transport at client side we need the location name starting from jms:// so you will need to modify WSDL anyway. Regards, Ulhas Bhole Patrick Mulligan wrote: Hi, In the JMS configuration docuement (for consumer only in this case), it specified that the configuration can be done either by WSDL or configuration file. Can this be mixed with a portion in wsdl and configuration? Is the WSDL configuration for JMS consumers standard? That is, is the syntax of the port element contents standardized or are they specific to a JMS impl? This is a snip from a commercial JMS that I need to connect to: wsdl:port binding=tns:ESB_VehicleManagementSOAP_JMS_Binding name=SOAP_JMS_Port soap:address location=jms:/queue?destination=jms/SoapOutputamp;connectionFactory=jms/outboundSoapJmsQCFamp;replyToDestination=jms/SoapInputamp;targetService=ESB_VehicleManagement_DialogPlus/ /wsdl:port Does a cxf jms consumer need to know the cxf JMS namespace if definded by wsdl? BTW, we want to have the default tempory queue setup for request/reply. _ Peek-a-boo FREE Tricks Treats for You! http://www.reallivemoms.com?ocid=TXT_TAGHMloc=us IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: wsdl2java code generation problem ArrayOfType Problem
Am Mittwoch, den 07.11.2007, 18:53 +0100 schrieb Sven: this class 'PlaceBetsReq' takes an array of PlaceBets but wsdl2java generates a class 'ArrayOfPlaceBets' but i need PlaceBets[]. i axis 1.4 is see it works, but not at me with xfire. I have not done this before, but I think I have an answer for you. (BTW, this answer is for *CXF*, not XFire, I don't know how similar XFire would be here.) Your problem seems to be described in Mark Hansen's SOA Using Java Web Services book, pp. 201-202 and 206-207. Anyway, if you want to switch from a list to an array property, the WSDL jaxb:property annotation can help you (you'll need to modify the WSDL you keep locally for this though). Something like this: sequence annotation appinfo jaxb:property collectionType=indexed/ /appinfo /annotation xsd:element form=qualified maxOccurs=unbounded name=PlaceBets nillable=true type=types:PlaceBets/ /sequence We use the same JAXB as GlassFish Metro, so you can query their JAXB/Metro forum[1] as well if it might help. Regards, Glen [1] http://forums.java.net/jive/forum.jspa?forumID=46 may be someone can give my some tips or better a solution. sven
RE: Return direct XML
Oh, I see. If you are getting Class objects from xjc, Aegis can't do that. -Original Message- From: Willem Jiang [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 07, 2007 12:12 PM To: cxf-user@incubator.apache.org Subject: Re: Return direct XML Yep, I think the initial thought just wanted it works only by setting the JAXB Context with the WSDL dynamically, it may skip the part of JAXB DataBinding. Maybe we can get it workable by refactoring the DynamicClientFactory to accept different DataBinding Context ? I don't know if Aegis can generate the type class from WSDL just like XJC. Or we do not need do it for Aegis DataBinding. Any other thought? Willem. Benson Margulies wrote: The dynamic client is situated in the source in a place that surprised me, and this aspect fits with that. Go ahead and give it a try, it should just have a DataBinding instance that could be made settablr. -Original Message- From: Benjamin Coiffe [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 07, 2007 3:45 AM To: cxf-user@incubator.apache.org Subject: RE: Return direct XML Hi, I was trying to use Aegis Binding on the Dynamic client (DynamicClientFactory.createClient()) but it is hard coded to use JAXB. Is there a specific reason for this or could I confidently modify the source code of my distribution and expect it to run using Aegis bindings? Thanks, Ps: benson, the fix for CXF-1168 works for me in 2.0.1. Thx! -Original Message- From: Benson Margulies [mailto:[EMAIL PROTECTED] Sent: 07 November 2007 02:38 To: cxf-user@incubator.apache.org Subject: RE: Return direct XML I believe that Aegis allows you to have a return type of org.w3c.Document or the JDOM equivalent, and XML will appear. -Original Message- From: Liu, Jervis [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 06, 2007 9:32 PM To: cxf-user@incubator.apache.org Subject: RE: Return direct XML In your case, looks like the easiest way is to use JAX-WS Provider API with XML Binding. You will find a bunch of different type of Provider implementations under system test: https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/j av a/org/apache/cxf/systest/provider/. Of course the limitation is that the input of your function has to be in XML format as well (can be Source/SOAPMessage/DataSource, depend on your mode and binding), in some cases you may find its hard to parse input from XML by yourself. Cheers, Jervis -Original Message- From: Roshan A. Punnoose [mailto:[EMAIL PROTECTED] Sent: 2007?11?7? 4:08 To: cxf-user@incubator.apache.org Subject: Return direct XML Hi, What is the easiest way to return XML directly? For example, in my function, if I create XML, I want to be able to send that object directly back to the calling client. Is this possible? Roshan IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
wsdl2java code generation problem ArrayOfType Problem
Hello, since 2 days i try to generate client stubs from https://api.betfair.com/exchange/v3/BFExchangeService.wsdl. the problem are the generated ArrayOfType classes. How can i configure wsdl2java, that these array types generated/mapped to real java arrays like type[] and not a single arrayOfType-class? Example (from wsdl above): xsd:complexType name=PlaceBetsReq xsd:complexContent xsd:extension base=types:APIRequest xsd:sequence xsd:element name=bets nillable=true type=types:ArrayOfPlaceBets/ /xsd:sequence /xsd:extension /xsd:complexContent /xsd:complexType --- xsd:complexType name=ArrayOfPlaceBets xsd:sequence xsd:element form=qualified maxOccurs=unbounded name=PlaceBets nillable=true type=types:PlaceBets/ /xsd:sequence /xsd:complexType this class 'PlaceBetsReq' takes an array of PlaceBets but wsdl2java generates a class 'ArrayOfPlaceBets' but i need PlaceBets[]. i axis 1.4 is see it works, but not at me with xfire. may be someone can give my some tips or better a solution. sven
RE: newb question - JDOMException with aegis binding?
Thanks! Got it and it's working. Why is that not on the dependency list? With that, it generated a bunch of foo.aegis.xml not found messages for each of the property types of the FullOrder, including the MultiString one. Is there a way to make it ignore most of the properties of my class except the ones I want to expose? Maybe I should start a new thread, since I'm past the JDOMException issue. Also, I went a couple steps further and got another NoClassDefFoundError, this time for jaxen. I found this jar, but it is also not on the dependencies list. You need jdom-1.0.jar. -- View this message in context: http://www.nabble.com/newb-question---JDOMException-with-aegis-binding--tf4767403.html#a13636856 Sent from the cxf-user mailing list archive at Nabble.com.
Re: cannot resolve wsdl:tExtensibilityElement
should this not be working out of the box? I see that the schema is there - the entry is there for the pluggablespringresolver. It looks like its an issue that has been looked at before: http://www.ohloh.net/projects/4982/contributors/30202/commits/10289783 Is it possible that this issue has not been competly fixed? dkulp wrote: You could add an XmlCatalog to the catalog resolver to map the http://schemas.xmlsoap.org/schemas/wsdl/wsdl.xsd location to something that's local. Dan On Wednesday 07 November 2007, Adrian C wrote: Hate to be answering my own posts but the cause of this is the fact that I am behind a proxy server. Seems that the following import in jms-conf.xsd, http-conf.xsd causes the xsd resolver to run off to the internet to try and find the schema. Is there anyway around this? xs:import namespace=http://schemas.xmlsoap.org/wsdl/; schemaLocation=http://schemas.xmlsoap.org/schemas/wsdl/wsdl.xsd/ How did I know this - -well if I hack http-conf.xsd to do the following it works! xs:import namespace=http://schemas.xmlsoap.org/wsdl/; schemaLocation=file:///c:/temp/schemas/wsdl/wsdl.xsd/ Thanks Adrian C wrote: Hi, Am doing some testing with jms am getting the error below, has anyone seen anything like this before? Thanks org.springframework.beans.factory.xml.XmlBeanDefinitionStoreExceptio n: Line 175 in XML document from class path resource [junit/wsclient-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'wsdl:tExtensibilityElement' to a(n) 'type definition' component. Caused by: org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'wsdl:tExtensibilityElement' to a(n) 'type definition' component. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSA XParseException(ErrorHandlerWrapper.java:236) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Er rorHandlerWrapper.java:172) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError (XMLErrorReporter.java:382) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.rep ortSchemaError(XSDHandler.java:2241) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.get GlobalDecl(XSDHandler.java:1201) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexType Traverser.traverseComplexContent(XSDComplexTypeTraverser.java:715) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexType Traverser.traverseComplexTypeDecl(XSDComplexTypeTraverser.java:288) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexType Traverser.traverseGlobal(XSDComplexTypeTraverser.java:196) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.get GlobalDecl(XSDHandler.java:1333) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTrav erser.traverseNamedElement(XSDElementTraverser.java:376) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTrav erser.traverseGlobal(XSDElementTraverser.java:248) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.tra verseSchemas(XSDHandler.java:1081) at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.par seSchema(XSDHandler.java:481) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchem a(XMLSchemaLoader.java:556) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSc hemaGrammar(XMLSchemaValidator.java:2459) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handle StartElement(XMLSchemaValidator.java:1807) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startE lement(XMLSchemaValidator.java:705) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.sca nStartElement(XMLNSDocumentScannerImpl.java:330) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerIm pl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl. java:1693) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerIm pl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse( XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse( XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser .java:148) at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser .java:250) at
Re: Stack trace of custom exception visible on server
Anyone any ideas? Ronald Pieterse wrote: When I throw a custom exception from the server to the client the stack trace also appears in the server logs. How can I stop that? I just want to print out one line saying the exception is thrown - that's all. -- View this message in context: http://www.nabble.com/Stack-trace-of-custom-exception-visible-on-server-tf4710680.html#a13637582 Sent from the cxf-user mailing list archive at Nabble.com.
Re: WSDL not recognized by vs net
Hi. This way might be another way to get doc/literal bare WSDL. We just need to add annotation @SOAPBinding. import javax.jws.soap.SOAPBinding; import javax.jws.WebService; import javax.jws.WebParam; @SOAPBinding(style=SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL, parameterStyle=SOAPBinding.ParameterStyle.BARE) @WebService public interface HelloWorld { String sayHi(@WebParam(name=text) String text); } So we can write client-side code like this: //doc/lit wrapped HelloWorldImplService service = new HelloWorldImplService(); CXFSpring.sayHi hi = new CXFSpring.sayHi(); hi.text = Client; CXFSpring.sayHiResponse response = service.sayHi( hi); Console.Out.WriteLine(response= + [EMAIL PROTECTED]); //doc/lit bare HelloWorldImplService service = new HelloWorldImplService(); String response = service.sayHi(Client); Console.Out.WriteLine(response= + response); flat-out -- View this message in context: http://www.nabble.com/WSDL-not-recognized-by-vs-net-tf4599448.html#a13641274 Sent from the cxf-user mailing list archive at Nabble.com.
MessagePartInfo with apparently incorrect element name
JAXB+JAXWS ... I have a MessagePartInfo with isElement true, xmlSchema null, and the element QName has no namespaceURI. The name comes from an @WebParam which has a plain, unqualified name in it. So I suppose I'm dealing with a name in the service TNS, but is this how we want these to come through?
RE: Programmatically publishing a REST endpoint
Currently there are three ways to build a RESTful service in CXF. [1] and [2] should give you enough information on how to use CXF HTTP binding and JAX-WS Dispatch/Provider to build a RESTful service. Now we have a third option - using JSR-311. You are very welcome to try this new feature out, any feedbacks would be hightly appreciated. This has not been documented yet, but I will do this soon. At the same time, there are couple of examples under system test directory [3], which hopefully will help you out. To answer your specific question, if you want to use CXF HTTP binding, you need to write your server mainline as below: JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean(); sf.setServiceClass(PeopleService.class); sf.getServiceFactory().setWrapped(true); sf.setBindingId(HttpBindingFactory.HTTP_BINDING_ID); sf.setAddress(http://localhost:9001/;); PeopleService peopleService = new PeopleServiceImpl(); sf.getServiceFactory().setInvoker(new BeanInvoker(peopleService)); Server svr = sf.create(); Your RestReviewService.class suggests that you are actually using JSR-311, in this case, your server main line is as below: JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean(); sf.setResourceClasses(RestReviewService.class); //default lifecycle is per-request, change it to singleton sf.setResourceProvider(RestReviewService.class, new SingletonResourceProvider()); sf.setAddress(http://localhost:9001/;); sf.create(); [1]. http://cwiki.apache.org/CXF20DOC/http-binding.html [2]. http://cwiki.apache.org/CXF20DOC/rest-with-jax-ws-provider-and-dispatch.html [3]. https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs Hope this helps, Jervis -Original Message- From: Tom Davies [mailto:[EMAIL PROTECTED] Sent: 2007?11?8? 9:03 To: cxf-user@incubator.apache.org Subject: Programmatically publishing a REST endpoint Hi, I have a SOAP services working fine, using the servlet transport. The servlet is configured in web.xml, and the end point publishing happens in the init method of the servlet (which is a subclass of CXFServlet: public void init(ServletConfig servletConfig) throws ServletException { super.init(servletConfig); Bus bus = this.getBus(); BusFactory.setDefaultBus(bus); Endpoint.publish(/review, SpringContext.getComponent(rpcReviewService)); Endpoint e = Endpoint.create(HTTPBinding.HTTP_BINDING, SpringContext.getComponent(restReviewService)); e.publish(/rest); Endpoint.publish(/auth, SpringContext.getComponent(rpcAuthService)); } My RestReviewService class (based on the CustomerService example) looks like: @Component(restReviewService) @WebService @UriTemplate(/review/) public class RestReviewService { @Autowired private ReviewService reviewService; @HttpContext UriInfo uriInfo; @HttpMethod(GET) @UriTemplate(/all/) public ListReviewData getAllReviews() { return reviewService.getAllReviews(); } } When I start my server the log says: ... [java] Nov 8, 2007 11:34:53 AM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass [java] INFO: Creating Service {http://rpc.spi.crucible.atlassian.com/ }RestReviewServiceService from class com.atlassian.crucible.spi.rpc.RestReviewService [java] Nov 8, 2007 11:34:53 AM org.apache.cxf.endpoint.ServerImpl initDestination [java] INFO: Setting the server's publish address to be /rest [java] Nov 8, 2007 11:34:53 AM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass ... But the service endpoint seems to be another SOAP service, as when I go to http://localhost:6060/foo/services/rest/review/all I get: soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/ envelope/soap:Bodysoap:Faultfaultcodesoap:Server/ faultcodefaultstringNo such operation: review/faultstring/ soap:Fault/soap:Body/soap:Envelope Thanks for any tips or pointers to documentation other than http://cwiki.apache.org/CXF20DOC/rest-with-jax-ws-provider-and -dispatch.html I suspect I need to set the JAXRS binding for the endpoint, but I don't know how to do it... Tom -- ATLASSIAN - http://www.atlassian.com Our products help over 8,500 customers in more than 95 countries to collaborate IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland