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:deliveryMode>PERSISTENT</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:deliveryMode><soapjms:deliveryMode>PERSISTENT</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