Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

10.6. Message Content Type Names


Since transformations occur between named types (for example, from type A to type B), it is important to understand how the type names are derived. The type of the message is determined based on the service contract, which can be WSDL or Java.
  • WSDL
    For WSDL interfaces, the message name is determined based on the fully-qualified element name of a WSDL message. Here is an example of a WSDL definition:
    <definitions xmlns:tns="urn:switchyard-quickstart:bean-service:1.0">  
      <message name="submitOrder">
        <part name="parameters" element="tns:submitOrder"/>
      </message>
      <portType name="OrderService">
        <operation name="submitOrder">
          <input message="tns:submitOrder"/>
        </operation>
      </portType>
    </definitions>
    
    Copy to Clipboard Toggle word wrap
    This yields the following message type name based on the message element name defined in the WSDL:
    {urn:switchyard-quickstart:bean-service:1.0}submitOrder
    
    Copy to Clipboard Toggle word wrap
  • Java
    For Java interfaces, the message name consists of the full package name and the class name prefixed with "java:". Here is an example of a Java definition:
    package org.switchyard.example;
    public interface OrderService {
        void submitOrder(Order order);
    }
    
    Copy to Clipboard Toggle word wrap
    This yields the following message type name:
    java:org.switchyard.example.Order
    
    Copy to Clipboard Toggle word wrap
    You may override the default operation name generated for a Java interface. The @OperationTypes annotation provides this capability by allowing you to specify the input, output, and fault type names used for a Java service interface. For example, if you want to accept XML input content without any need for transformation to a Java object model, you can change the OrderService interface as shown below:
    package org.switchyard.example;
    public interface OrderService {
        @OperationTypes(in = "{urn:switchyard-quickstart:bean-service:1.0}submitOrder")
        void submitOrder(String orderXML);
    }
    Copy to Clipboard Toggle word wrap
    This annotation can be useful if you want to maintain a tight control over the names used for message content.
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat