Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-3602

Compatibility issues with other Java vendors in WS-AT

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 5.12.6.Final
    • XTS
    • None

    Description

      The narayana WS-AT implementation includes some meta-data information when exchanging services. For example this payload is sent when registering a participant to the coordinator service:

      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
          <soap:Header>
              <Action xmlns="http://www.w3.org/2005/08/addressing" soap:mustUnderstand="1">
                  http://docs.oasis-open.org/ws-tx/wscoor/2006/06/Register
              </Action>
              ...
          </soap:Header>
          <soap:Body>
              <Register xmlns="http://docs.oasis-open.org/ws-tx/wscoor/2006/06"
                        xmlns:ns2="http://www.w3.org/2005/08/addressing">
                  <ProtocolIdentifier>
                      http://docs.oasis-open.org/ws-tx/wsat/2006/06/D2PC
                  </ProtocolIdentifier>
                  <ParticipantProtocolService>
                      <ns2:Address>http://localhost:8080/ws-t11-participant/ParticipantService</ns2:Address>
                      <ns2:ReferenceParameters>
                          ...
                      </ns2:ReferenceParameters>
                      <ns2:Metadata>   <--- HERE: The metadata contains the serviceName and endpointName
                          <wsam:ServiceName xmlns:wsa="http://www.w3.org/2005/08/addressing"
                                            xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
                                            xmlns:wsat="http://docs.oasis-open.org/ws-tx/wsat/2006/06"
                                            xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
                              EndpointName="ParticipantPortType">
                                  wsat:ParticipantService
                          </wsam:ServiceName>
                      </ns2:Metadata>
                  </ParticipantProtocolService>
              </Register>
          </soap:Body>
      </soap:Envelope>
      

      The ParticipantProtocolService contains the URL to connect but it also adds some meta-data (the service-name and the endpoint-name). Although this seems to be good (the more data the better) is making some other WS-AT implementations fail. The exception is something like the following:

      javax.xml.ws.WebServiceException: EndpointReference WSDL ServiceName differs from Service Instance WSDL Service QName. The two Service QNames must match.
          at com.sun.xml.ws.client.WSServiceDelegate.getPortNameFromEPR(WSServiceDelegate.java:686)
          at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:432)
          at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:424)
          ...
      

      The main issue is that the wsdl files defined in the ws-at and ws-coor standards contain no service names. The files define the types, messages and the port-types but never the bindings. They are implementation specific and for example naraya defines the participant service here and the service-name used is ParticipantService. But for example metro implementation of WS-AT defines the same binding here with service-name WSAT11Service. Therefore when the Java implementation tries to locate the service name sent by narayana ParticipantService, it is different to the one used is its wsdl WSAT11Service and it throws the previous exception. Note that this issue would also happen to narayana implementation, because it uses the standard java way of loading the the implementation. Narayana impl also uses the endpoint reference and call normal delegate implementation to pick up the port, so if the service names differ the same exception would be thrown. In all the tests and quickstarts the service name is the same (only narayana impl is used) and there is no problem.

      So for compatibility reasons sending no meta-data is better. Just the address (URL) and the reference parameters are enough. The standards force the action, messages, types and so on and so forth. This way any java implementation just picks up its default service name and port and sends the correct data.

      Attachments

        Activity

          People

            rhn-support-rmartinc Ricardo Martin Camarero
            rhn-support-rmartinc Ricardo Martin Camarero
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: