WSDL Extensions
The following sections describe extensions to the WSDL standard to support the JMS protocol.
WSDL Binding
TIBCO Standard
The WSDL Binding for SOAP Over JMS varies only slightly from the SOAP Over HTTP binding. The transport attribute under soap:binding
indicates that JMS is being used. The attribute must have the value: http://www.tibco.com/namespaces/ws/2004/soap/binding/JMS
.
For example:
<soap:binding style="document"
transport="http://www.tibco.com/namespaces/ws/2004/soap/binding/JMS"/>
In addition to the soap:binding
transport information, there must be a JMS binding element that describe the message type used for transmission. Currently, the only supported message types are ByteMessage and TextMessage. This looks like the following:
<jms:binding messageFormat="bytes"/>
An example of the complete WSDL binding section is show below.
<wsdl:binding name="RetailJMSBinding" type="tns:RetailerPortType"><soap:binding style="document" transport=
"http://www.tibco.com/namespaces/ws/2004/soap/binding/JMS"/>
<jms:binding messageFormat="bytes"/>
<wsdl:operation name="getCatalog">
<wsdl:documentation>The operation has no documentation</wsdl:documentation>
<soap:operation style="document" soapAction="RetailGetCatalog"/>
<wsdl:input>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://InputMessageNamespace" parts=""/>
</wsdl:input>
<wsdl:output>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://OutputMessageNamespace" parts="return"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
W3C SOAP Over JMS 1.0 Compliance
When the service is W3C SOAP Over JMS 1.0 compliant, the transport attribute under soap:binding
has the value : http://www.w3.org/2010/soapjms/.
For example:
<soap:binding style="rpc" transport="http://www.w3.org/2010/soapjms/"/>
Additionally the JNDI namespace in WSDL is also http://www.w3.org/2010/soapjms/
An example of the complete WSDL binding section with W3C SOAP Over JMS 1.0 specification is as follows.
<wsdl:binding name="RetailJMSBinding" type="tns:RetailerPortType"><soap:binding style="document" transport=
"
http://www.w3.org/2010/soapjms/"/>
<jms:binding messageFormat="bytes"/>
<wsdl:operation name="getCatalog">
<wsdl:documentation>The operation has no documentation</wsdl:documentation>
<soap:operation style="document" soapAction="RetailGetCatalog"/>
<wsdl:input>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://InputMessageNamespace" parts=""/>
</wsdl:input>
<wsdl:output>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://OutputMessageNamespace" parts="return"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
WSDL Service
TIBCO Standard
The service section of the WSDL also contains extensions to support SOAP over JMS. The extension is defined with the following form where '?' means optional.
<wsdl:service><jndi:context />?
<jms:connectionFactory />?
<wsdl:port><jndi:context />?
<jms:connectionFactory />?
<jms:targetAddress />
</wsdl:port>
</wsdl:service>
In this definition, both jndi:context
and jms:connectionFactory
elements can possibly appear at two locations and they must appear at least once. When they appear under wsdl:service
, the definition applies to all ports inside the service. When they appear under wsdl:port
, the definition applies to only that port and it overrides the definitions that appear at the service level if it exists. If they do not appear at the service level, then each port must define them.
The jms:connectionFactory
element is the JMS connection factory name that is used to connect with JMS service, using the JNDI context supplied in the jndi:context
element. Below is an example of using TIBCO Enterprise Message Service as the JMS provider.
<jms:connectionFactory>QueueConnectionFactory
</jms:connectionFactory>
In a simple configuration, the jms:connectionFactory
is the same for both the Service Provider and the Service Clients. However, both provider and clients can use different connection factories, provided that they all create connections to the same JMS provider instance.
The jms:targetAddress
element contains address information which the service provider is going to listen for messages. Below is an example of using TIBCO Enterprise Message Service as the JMS provider with a queue name of MyQueue.
<jms:targetAddress destination="queue">MyQueue</jms:targetAddress>
The jndi:context
element holds one or more jndi:property
elements. Each of the jndi:property
elements describes a JNDI name/value pair. For example,
<jndi:context>
<jndi:property name="java.naming.factory.initial"
type="java.lang.String">
com.tibco.tibjms.naming.TibjmsInitialContextFactory
</jndi:property>
<jndi:property name="java.naming.provider.url"
type="java.lang.String">
tibjmsnaming://localhost:7222
</jndi:property>
</jndi:context>
W3C SOAP Over JMS 1.0 Complaint
With W3C Compliance the jndi:property
elements described in the JNDI name and pair value are dispalyed as :
<jms:jndiInitialContextFactory>com.tibco.tibjms.naming.TibjmsInitialContextFactory</jms:jndiInitialContextFactory>
<jms:jndiURL>tibjmsnaming://localhost:7222</jms:jndiURL>
Query Parameters
With W3C SOAP Over JMS 1.0 compliance, property names are displayed as query parameters with the value of SOAPJMS_requestURI within the WSDL ( attribute location and under <soap:address>) binding . They are supported in the client activities when referring to concrete WSDLs.
Property Names |
Description |
|
JMS property for sending message |
|
JMS property for sending message |
|
JMS property for sending message |
jndiConnectionFactoryName |
Jndi property for connection factory name |
jndiInitialContextFactory |
Jndi property for Initial Context Factory name |
jndiURL |
Jndi property for JNDI connection |
targetService |
Property to dispatch the request |
Fault Codes
Additional fault codes are introduced with the W3C SOAP Over JMS 1.0 compliance. The following table lists the fault codes.
Error Fault |
Condition |
|
If using SOAP 1.2, and the SOAPJMS_contentType property has an action parameter, and its value does not match with SOAPJMS_soapAction value. |
|
If SOAPJMS_contentType property is missing. |
|
If SOAPJMS_requestURI property is missing. |
missingTargetService |
If mentioned in WSDL and SOAPJMS_targetService property is missing. |
targetServiceNotAllowedInRequestURI |
If targetService parameter is included in the SOAPJMS_requestURI. |
unrecognizedBindingVersion |
if the value of the SOAPJMS_bindingVersion property does not match the fixed value 1.0. |