Re: How to add wsdl extension for SOAP/JMS.
Liu, I just want to say this is very nice work. Thanks for tackling this. It almost makes me want to go through the rest of the wsdl extension schemas and make them not subclass the old TExensibilityElementImpl thing. Would simplify that stuff quite a bit. Again, nice job. Dan On Fri July 3 2009 9:10:04 am liucong wrote: Hi, I am writing a plugin for xjc. First I just modify the cxf-xjc-ts and cxf-xjc-ts-test, and make it work with the -Xwsdlextension, not -Xts. The pom file is also changed. And it works rightly. Then I copy the modified projects into cxf-xjc-wsdlextension and cxf-xjc-wsdlextension-test, and make the cxf-xjc-ts the same with the subversion. It failed. The exception is: [INFO] [INFO] Building Apache CXF XJC WSDL Extension Plugin Tests [INFO]task-segment: [install] [INFO] [INFO] [cxf-xml2fastinfoset:xml2fastinfoset {execution: xml2fastinfoset}] [INFO] [jaxb2:xjc {execution: default}] [INFO] Generating source... [INFO] [ERROR] BUILD ERROR [INFO] [INFO] unrecognized parameter -Xwsdlextension What's wrong? Do I need to do more configuration for ths xjc plugin? thanks! Daniel Kulp wrote: Liu, I think for stuff that are simple (basically, complexTypes with simpleContent and simpleType object), you cannot extend TExtensibilityElementImpl. Instead, you would need to make it implement ExtensibilityElement interface and add the QName and required fields and such. Dan On Wed July 1 2009 12:18:15 pm liucong wrote: Hi, I do a simple experiment about the design sugguest by Dan. First, I use jaxb, not xjc. I think they have the principle. The schema like this[1]: xs:element name=deliveryMode type=soapjms:deliveryModeType / xs:complexType name=deliveryModeType xs:simpleContent xs:extension base=xs:string /xs:extension /xs:simpleContent /xs:complexType The generated class for DeliveryModeType like this[2]: @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = deliveryModeType, propOrder = { value }) public class DeliveryModeType{ @XmlValue protected String value; /** * Gets the value of the value property. * * @return * possible object is * {...@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {...@link String } * */ public void setValue(String value) { this.value = value; } public boolean isSetValue() { return (this.value!= null); } } The DeliveryModeType doesn't extend TExtensibilityElementImpl. So I just modify the class and make it look like this[3]: @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = deliveryModeType, propOrder = { value }) public class DeliveryModeType extends TExtensibilityElementImpl{ @XmlValue protected String value; /** * Gets the value of the value property. * * @return * possible object is * {...@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {...@link String } * */ public void setValue(String value) { this.value = value; } public boolean isSetValue() { return (this.value!= null); } } Then when I publish a service, I get an exception[4] Creating Service {http://cxf.apache.org/jms_greeter}JMSGreeterService from WSDL: file:./wsdl/jms_greeter.wsdl Exception in thread main javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:275) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:209) at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderI mpl .java:84) at javax.xml.ws.Endpoint.publish(Endpoint.java:47) at demo.jms_greeter.server.Server.init(Server.java:30) at demo.jms_greeter.server.Server.main(Server.java:34) Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.apache.cxf.wsdl11.WSDLServiceFactory.init(WSDLServiceFactory.java: 93) at
Re: How to add wsdl extension for SOAP/JMS.
Hi, I am writing a plugin for xjc. First I just modify the cxf-xjc-ts and cxf-xjc-ts-test, and make it work with the -Xwsdlextension, not -Xts. The pom file is also changed. And it works rightly. Then I copy the modified projects into cxf-xjc-wsdlextension and cxf-xjc-wsdlextension-test, and make the cxf-xjc-ts the same with the subversion. It failed. The exception is: [INFO] [INFO] Building Apache CXF XJC WSDL Extension Plugin Tests [INFO]task-segment: [install] [INFO] [INFO] [cxf-xml2fastinfoset:xml2fastinfoset {execution: xml2fastinfoset}] [INFO] [jaxb2:xjc {execution: default}] [INFO] Generating source... [INFO] [ERROR] BUILD ERROR [INFO] [INFO] unrecognized parameter -Xwsdlextension What's wrong? Do I need to do more configuration for ths xjc plugin? thanks! Daniel Kulp wrote: Liu, I think for stuff that are simple (basically, complexTypes with simpleContent and simpleType object), you cannot extend TExtensibilityElementImpl. Instead, you would need to make it implement ExtensibilityElement interface and add the QName and required fields and such. Dan On Wed July 1 2009 12:18:15 pm liucong wrote: Hi, I do a simple experiment about the design sugguest by Dan. First, I use jaxb, not xjc. I think they have the principle. The schema like this[1]: xs:element name=deliveryMode type=soapjms:deliveryModeType / xs:complexType name=deliveryModeType xs:simpleContent xs:extension base=xs:string /xs:extension /xs:simpleContent /xs:complexType The generated class for DeliveryModeType like this[2]: @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = deliveryModeType, propOrder = { value }) public class DeliveryModeType{ @XmlValue protected String value; /** * Gets the value of the value property. * * @return * possible object is * {...@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {...@link String } * */ public void setValue(String value) { this.value = value; } public boolean isSetValue() { return (this.value!= null); } } The DeliveryModeType doesn't extend TExtensibilityElementImpl. So I just modify the class and make it look like this[3]: @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = deliveryModeType, propOrder = { value }) public class DeliveryModeType extends TExtensibilityElementImpl{ @XmlValue protected String value; /** * Gets the value of the value property. * * @return * possible object is * {...@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {...@link String } * */ public void setValue(String value) { this.value = value; } public boolean isSetValue() { return (this.value!= null); } } Then when I publish a service, I get an exception[4] Creating Service {http://cxf.apache.org/jms_greeter}JMSGreeterService from WSDL: file:./wsdl/jms_greeter.wsdl Exception in thread main javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:275) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:209) at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl .java:84) at javax.xml.ws.Endpoint.publish(Endpoint.java:47) at demo.jms_greeter.server.Server.init(Server.java:30) at demo.jms_greeter.server.Server.main(Server.java:34) Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.apache.cxf.wsdl11.WSDLServiceFactory.init(WSDLServiceFactory.java:93) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFro mWSDL(ReflectionServiceFactoryBean.java:317) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServi ceModel(ReflectionServiceFactoryBean.java:437) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflecti onServiceFactoryBean.java:195) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFac toryBean.java:163) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Abs tractWSDLBasedEndpointFactory.java:100) at
Re: How to add wsdl extension for SOAP/JMS.
Hi, It looks like the xjc pulgin just loads the extensions once, so you need to add all the xjc extensions dependencies into each xjc extension test pom. dependencies dependency groupIdorg.apache.cxf/groupId artifactIdcxf-xjc-dv/artifactId version${project.version}/version /dependency dependency groupIdorg.apache.cxf/groupId artifactIdcxf-xjc-ts/artifactId version${project.version}/version /dependency dependency groupIdorg.apache.cxf/groupId artifactIdcxf-xjc-wsdlextension/artifactId version${project.version}/version /dependency /dependencies Willem liucong wrote: yeah. The pom file in the cxf-xjc-wsdlextension: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdorg.apache.cxf/groupId artifactIdcxf-xjc-wsdlextension/artifactId packagingjar/packaging version2.3.0-SNAPSHOT/version nameApache CXF XJC WSDL Extension Plugin/name urlhttp://cxf.apache.org/url parent groupIdorg.apache.cxf/groupId artifactIdcxf-parent/artifactId version2.3.0-SNAPSHOT/version relativePath../../../parent/pom.xml/relativePath /parent properties maven.test.skiptrue/maven.test.skip /properties dependencies dependency groupIdorg.apache.cxf/groupId artifactIdcxf-common-utilities/artifactId version${project.version}/version /dependency dependency groupIdcom.sun.xml.bind/groupId artifactIdjaxb-xjc/artifactId /dependency dependency groupIdcom.sun.xml.bind/groupId artifactIdjaxb-impl/artifactId /dependency dependency groupIdcommons-lang/groupId artifactIdcommons-lang/artifactId /dependency /dependencies scm connectionscm:svn:http://svn.apache.org/repos/asf/cxf/trunk/common/xjc/wsdlextension/connection developerConnectionscm:svn:https://svn.apache.org/repos/asf/cxf/trunk/common/xjc/wsdlextension/developerConnection /scm /project The pom file in the cxf-xjc-wsdlextension-test is: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdorg.apache.cxf/groupId artifactIdcxf-xjc-wsdlextension-test/artifactId packagingjar/packaging version2.3.0-SNAPSHOT/version nameApache CXF XJC WSDL Extension Plugin Tests/name urlhttp://cxf.apache.org/url parent groupIdorg.apache.cxf/groupId artifactIdcxf-parent/artifactId version2.3.0-SNAPSHOT/version relativePath../../../parent/pom.xml/relativePath /parent dependencies dependency groupIdjavax.xml.bind/groupId artifactIdjaxb-api/artifactId /dependency dependency groupIdcom.sun.xml.bind/groupId artifactIdjaxb-impl/artifactId /dependency dependency groupIdcom.sun.xml.bind/groupId artifactIdjaxb-xjc/artifactId /dependency dependency groupIdjunit/groupId artifactIdjunit/artifactId scopetest/scope /dependency dependency groupIdorg.apache.cxf/groupId artifactIdcxf-common-utilities/artifactId version${project.version}/version /dependency dependency groupIdcommons-lang/groupId artifactIdcommons-lang/artifactId /dependency /dependencies build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdjaxb2-maven-plugin/artifactId version1.2/version executions execution goals goalxjc/goal /goals /execution /executions configuration outputDirectory${basedir}/target/generated/src/test/java/outputDirectory schemaDirectory${basedir}/src/test/resources/schemas/configuration/schemaDirectory arguments-Xwsdlextension/arguments extensiontrue/extension quiettrue/quiet /configuration dependencies dependency groupIdorg.apache.cxf/groupId
Re: How to add wsdl extension for SOAP/JMS.
On Thu June 25 2009 1:39:34 am liucong wrote: Hi, Dan, Thank you very much for your advice. By some experiments for the WSDL extension. I think it is right that this WSDL extension needs some changes to CXF wsdl processing. And the CXF wsdl processing will supoort the entension in SOAP/JMS. I think this kind of extension is necessary for CXF wsdl processing. The best place to look is in the cxf trunk/common/xjc/ts project. That project is an XJC plugin that adds toString methods to all the generated types. For MOST cases, you would need make the superclass be TExtensibilityElementImpl instead of Object. In other cases, it's a bit more complex: 1) For stuff that sublasses JAXBElement, you would need to make it implement ExtensibilityElement and add those methods and field. 2) For Enums - I think the stuff from (1) applies as well, not really sure though. Technically, it PROBABLY just needs to apply to root elements. (Stuff with @XmlRootElement annotations). Dan Are there any documents which help me finish this kind of extension? thank you! :-) Liu Daniel Kulp wrote: Hmm... I'm not really sure. I don't think there IS a schema that would work properly for this. My gut feeling was something like: xs:complexType name=deliveryModeType xs:simpleContent xs:restriction base=wsdl:tExtensibilityElement xs:enumeration value=PERSISTENT / xs:enumeration value=NON_PERSISTENT / /xs:restriction /xs:simpleContent /xs:complexType but I know that doesn't work. This will probably need some changes to CXF wsdl processing to really get this to work well. Actually, this could provide a good opportunity to cleanup the JAXB WSDL extension mechanism to NOT require that the schema extends the wsdl:tExtensibilityElement type. I'm actually thinking a xjc plugin that would make all the generated types automatically implement the wsdl4j ExtensibiltyElement interface and add the methods/fields for that. That can significantly cleanup the CXF schemas for all the extensors. It would be completely automatic. Dan On Tue June 23 2009 11:51:43 am liucong wrote: Hi, I want to add wsdl extension for SOAP/JMS according to http://www.w3.org/TR/2008/WD-soapjms-20081121/#wsdl-extensions. For example, I want add wsdl extension for DeliveryMode property. I edit the wsdl file like[1]: wsdl:binding name=JMSGreeterPortBinding type=tns:JMSGreeterPortType soap:binding style=document transport=http://www.w3.org/2008/07/soap/bindings/JMS// soapjms:deliveryModePERSISTENT/soapjms:deliveryMode wsdl:operation name=greetMe soap:operation soapAction=test style=document/ wsdl:input name=greetMeRequest soap:body use=literal/ /wsdl:input wsdl:output name=greetMeResponse soap:body use=literal/ /wsdl:output /wsdl:operation ... /wsdl:binding If I add the extension schema like this[2]: xs:element name=deliveryMode type=soapjms:deliveryModeType / xs:complexType name=deliveryModeType xs:complexContent xs:extension base=wsdl:tExtensibilityElement xs:sequence xs:element name=deliveryMode xs:simpleType xs:restriction base=xs:string xs:enumeration value=PERSISTENT / xs:enumeration value=NON_PERSISTENT / /xs:restriction /xs:simpleType /xs:element /xs:sequence /xs:extension /xs:complexContent /xs:complexType But I can't get the extension in the wsdl. If I change the wsdl like this[3]: wsdl:binding name=JMSGreeterPortBinding type=tns:JMSGreeterPortType soap:binding style=document transport=http://www.w3.org/2008/07/soap/bindings/JMS// soapjms:deliveryModesoapjms:deliveryModePERSISTENT/soapjms:delivery Mod e/soapjms:deliveryMode wsdl:operation name=greetMe soap:operation soapAction=test style=document/ wsdl:input name=greetMeRequest soap:body use=literal/ /wsdl:input wsdl:output name=greetMeResponse soap:body use=literal/ /wsdl:output /wsdl:operation ... /wsdl:binding I'll get the result of deliveryMode extension. I think the wsdl extension just can add attributes, element to a extension element in CXF. But I can't get the extension element's value. Is it right? My question is: how to get the extension information in [1]. What does the extension schema look like? thanks. Liu -- Daniel Kulp dk...@apache.org http://www.dankulp.com/blog
Re: How to add wsdl extension for SOAP/JMS.
Hmm... I'm not really sure. I don't think there IS a schema that would work properly for this. My gut feeling was something like: xs:complexType name=deliveryModeType xs:simpleContent xs:restriction base=wsdl:tExtensibilityElement xs:enumeration value=PERSISTENT / xs:enumeration value=NON_PERSISTENT / /xs:restriction /xs:simpleContent /xs:complexType but I know that doesn't work. This will probably need some changes to CXF wsdl processing to really get this to work well. Actually, this could provide a good opportunity to cleanup the JAXB WSDL extension mechanism to NOT require that the schema extends the wsdl:tExtensibilityElement type. I'm actually thinking a xjc plugin that would make all the generated types automatically implement the wsdl4j ExtensibiltyElement interface and add the methods/fields for that. That can significantly cleanup the CXF schemas for all the extensors. It would be completely automatic. Dan On Tue June 23 2009 11:51:43 am liucong wrote: Hi, I want to add wsdl extension for SOAP/JMS according to http://www.w3.org/TR/2008/WD-soapjms-20081121/#wsdl-extensions. For example, I want add wsdl extension for DeliveryMode property. I edit the wsdl file like[1]: wsdl:binding name=JMSGreeterPortBinding type=tns:JMSGreeterPortType soap:binding style=document transport=http://www.w3.org/2008/07/soap/bindings/JMS// soapjms:deliveryModePERSISTENT/soapjms:deliveryMode wsdl:operation name=greetMe soap:operation soapAction=test style=document/ wsdl:input name=greetMeRequest soap:body use=literal/ /wsdl:input wsdl:output name=greetMeResponse soap:body use=literal/ /wsdl:output /wsdl:operation ... /wsdl:binding If I add the extension schema like this[2]: xs:element name=deliveryMode type=soapjms:deliveryModeType / xs:complexType name=deliveryModeType xs:complexContent xs:extension base=wsdl:tExtensibilityElement xs:sequence xs:element name=deliveryMode xs:simpleType xs:restriction base=xs:string xs:enumeration value=PERSISTENT / xs:enumeration value=NON_PERSISTENT / /xs:restriction /xs:simpleType /xs:element /xs:sequence /xs:extension /xs:complexContent /xs:complexType But I can't get the extension in the wsdl. If I change the wsdl like this[3]: wsdl:binding name=JMSGreeterPortBinding type=tns:JMSGreeterPortType soap:binding style=document transport=http://www.w3.org/2008/07/soap/bindings/JMS// soapjms:deliveryModesoapjms:deliveryModePERSISTENT/soapjms:deliveryMod e/soapjms:deliveryMode wsdl:operation name=greetMe soap:operation soapAction=test style=document/ wsdl:input name=greetMeRequest soap:body use=literal/ /wsdl:input wsdl:output name=greetMeResponse soap:body use=literal/ /wsdl:output /wsdl:operation ... /wsdl:binding I'll get the result of deliveryMode extension. I think the wsdl extension just can add attributes, element to a extension element in CXF. But I can't get the extension element's value. Is it right? My question is: how to get the extension information in [1]. What does the extension schema look like? thanks. Liu -- Daniel Kulp dk...@apache.org http://www.dankulp.com/blog
Re: How to add wsdl extension for SOAP/JMS.
Hi, Dan, Thank you very much for your advice. By some experiments for the WSDL extension. I think it is right that this WSDL extension needs some changes to CXF wsdl processing. And the CXF wsdl processing will supoort the entension in SOAP/JMS. I think this kind of extension is necessary for CXF wsdl processing. Are there any documents which help me finish this kind of extension? thank you! :-) Liu Daniel Kulp wrote: Hmm... I'm not really sure. I don't think there IS a schema that would work properly for this. My gut feeling was something like: xs:complexType name=deliveryModeType xs:simpleContent xs:restriction base=wsdl:tExtensibilityElement xs:enumeration value=PERSISTENT / xs:enumeration value=NON_PERSISTENT / /xs:restriction /xs:simpleContent /xs:complexType but I know that doesn't work. This will probably need some changes to CXF wsdl processing to really get this to work well. Actually, this could provide a good opportunity to cleanup the JAXB WSDL extension mechanism to NOT require that the schema extends the wsdl:tExtensibilityElement type. I'm actually thinking a xjc plugin that would make all the generated types automatically implement the wsdl4j ExtensibiltyElement interface and add the methods/fields for that. That can significantly cleanup the CXF schemas for all the extensors. It would be completely automatic. Dan On Tue June 23 2009 11:51:43 am liucong wrote: Hi, I want to add wsdl extension for SOAP/JMS according to http://www.w3.org/TR/2008/WD-soapjms-20081121/#wsdl-extensions. For example, I want add wsdl extension for DeliveryMode property. I edit the wsdl file like[1]: wsdl:binding name=JMSGreeterPortBinding type=tns:JMSGreeterPortType soap:binding style=document transport=http://www.w3.org/2008/07/soap/bindings/JMS// soapjms:deliveryModePERSISTENT/soapjms:deliveryMode wsdl:operation name=greetMe soap:operation soapAction=test style=document/ wsdl:input name=greetMeRequest soap:body use=literal/ /wsdl:input wsdl:output name=greetMeResponse soap:body use=literal/ /wsdl:output /wsdl:operation ... /wsdl:binding If I add the extension schema like this[2]: xs:element name=deliveryMode type=soapjms:deliveryModeType / xs:complexType name=deliveryModeType xs:complexContent xs:extension base=wsdl:tExtensibilityElement xs:sequence xs:element name=deliveryMode xs:simpleType xs:restriction base=xs:string xs:enumeration value=PERSISTENT / xs:enumeration value=NON_PERSISTENT / /xs:restriction /xs:simpleType /xs:element /xs:sequence /xs:extension /xs:complexContent /xs:complexType But I can't get the extension in the wsdl. If I change the wsdl like this[3]: wsdl:binding name=JMSGreeterPortBinding type=tns:JMSGreeterPortType soap:binding style=document transport=http://www.w3.org/2008/07/soap/bindings/JMS// soapjms:deliveryModesoapjms:deliveryModePERSISTENT/soapjms:deliveryMod e/soapjms:deliveryMode wsdl:operation name=greetMe soap:operation soapAction=test style=document/ wsdl:input name=greetMeRequest soap:body use=literal/ /wsdl:input wsdl:output name=greetMeResponse soap:body use=literal/ /wsdl:output /wsdl:operation ... /wsdl:binding I'll get the result of deliveryMode extension. I think the wsdl extension just can add attributes, element to a extension element in CXF. But I can't get the extension element's value. Is it right? My question is: how to get the extension information in [1]. What does the extension schema look like? thanks. Liu
How to add wsdl extension for SOAP/JMS.
Hi, I want to add wsdl extension for SOAP/JMS according to http://www.w3.org/TR/2008/WD-soapjms-20081121/#wsdl-extensions. For example, I want add wsdl extension for DeliveryMode property. I edit the wsdl file like[1]: wsdl:binding name=JMSGreeterPortBinding type=tns:JMSGreeterPortType soap:binding style=document transport=http://www.w3.org/2008/07/soap/bindings/JMS// soapjms:deliveryModePERSISTENT/soapjms:deliveryMode wsdl:operation name=greetMe soap:operation soapAction=test style=document/ wsdl:input name=greetMeRequest soap:body use=literal/ /wsdl:input wsdl:output name=greetMeResponse soap:body use=literal/ /wsdl:output /wsdl:operation ... /wsdl:binding If I add the extension schema like this[2]: xs:element name=deliveryMode type=soapjms:deliveryModeType / xs:complexType name=deliveryModeType xs:complexContent xs:extension base=wsdl:tExtensibilityElement xs:sequence xs:element name=deliveryMode xs:simpleType xs:restriction base=xs:string xs:enumeration value=PERSISTENT / xs:enumeration value=NON_PERSISTENT / /xs:restriction /xs:simpleType /xs:element /xs:sequence /xs:extension /xs:complexContent /xs:complexType But I can't get the extension in the wsdl. If I change the wsdl like this[3]: wsdl:binding name=JMSGreeterPortBinding type=tns:JMSGreeterPortType soap:binding style=document transport=http://www.w3.org/2008/07/soap/bindings/JMS// soapjms:deliveryModesoapjms:deliveryModePERSISTENT/soapjms:deliveryMode/soapjms:deliveryMode wsdl:operation name=greetMe soap:operation soapAction=test style=document/ wsdl:input name=greetMeRequest soap:body use=literal/ /wsdl:input wsdl:output name=greetMeResponse soap:body use=literal/ /wsdl:output /wsdl:operation ... /wsdl:binding I'll get the result of deliveryMode extension. I think the wsdl extension just can add attributes, element to a extension element in CXF. But I can't get the extension element's value. Is it right? My question is: how to get the extension information in [1]. What does the extension schema look like? thanks. Liu
Re: How to add wsdl extension for SOAP/JMS.
Hi, You added a wrong schema, your schema should like this xs:element name=deliveryMode type=soapjms:deliveryModeType / xs:complexType name=deliveryModeType xs:complexContent xs:extension base=wsdl:tExtensibilityElement xs:sequence xs:simpleType xs:restriction base=xs:string xs:enumeration value=PERSISTENT / xs:enumeration value=NON_PERSISTENT / /xs:restriction /xs:simpleType /xs:sequence /xs:extension /xs:complexContent /xs:complexType Willem liucong wrote: Hi, I want to add wsdl extension for SOAP/JMS according to http://www.w3.org/TR/2008/WD-soapjms-20081121/#wsdl-extensions. For example, I want add wsdl extension for DeliveryMode property. I edit the wsdl file like[1]: wsdl:binding name=JMSGreeterPortBinding type=tns:JMSGreeterPortType soap:binding style=document transport=http://www.w3.org/2008/07/soap/bindings/JMS// soapjms:deliveryModePERSISTENT/soapjms:deliveryMode wsdl:operation name=greetMe soap:operation soapAction=test style=document/ wsdl:input name=greetMeRequest soap:body use=literal/ /wsdl:input wsdl:output name=greetMeResponse soap:body use=literal/ /wsdl:output /wsdl:operation ... /wsdl:binding If I add the extension schema like this[2]: xs:element name=deliveryMode type=soapjms:deliveryModeType / xs:complexType name=deliveryModeType xs:complexContent xs:extension base=wsdl:tExtensibilityElement xs:sequence xs:element name=deliveryMode xs:simpleType xs:restriction base=xs:string xs:enumeration value=PERSISTENT / xs:enumeration value=NON_PERSISTENT / /xs:restriction /xs:simpleType /xs:element /xs:sequence /xs:extension /xs:complexContent /xs:complexType But I can't get the extension in the wsdl. If I change the wsdl like this[3]: wsdl:binding name=JMSGreeterPortBinding type=tns:JMSGreeterPortType soap:binding style=document transport=http://www.w3.org/2008/07/soap/bindings/JMS// soapjms:deliveryModesoapjms:deliveryModePERSISTENT/soapjms:deliveryMode/soapjms:deliveryMode wsdl:operation name=greetMe soap:operation soapAction=test style=document/ wsdl:input name=greetMeRequest soap:body use=literal/ /wsdl:input wsdl:output name=greetMeResponse soap:body use=literal/ /wsdl:output /wsdl:operation ... /wsdl:binding I'll get the result of deliveryMode extension. I think the wsdl extension just can add attributes, element to a extension element in CXF. But I can't get the extension element's value. Is it right? My question is: how to get the extension information in [1]. What does the extension schema look like? thanks. Liu