이 콘텐츠는 선택한 언어로 제공되지 않습니다.

23.2. Conversational Web Services


Seam uses a SOAP header element in both SOAP request and response messages to carry the conversation ID beteen the consumer and the service. One example of a web service request containing a conversation ID is:
<soapenv:Envelope 
         xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
         xmlns:seam="http://seambay.example.seam.jboss.org/">
                  
  <soapenv:Header>
    <seam:conversationId xmlns:seam='http://www.jboss.org/seam/webservice'>
      2
    </seam:conversationId>
  </soapenv:Header>
  
  <soapenv:Body>
    <seam:confirmAuction/>
  </soapenv:Body>
  
</soapenv:Envelope>    

Copy to Clipboard Toggle word wrap
The above SOAP message contains a conversationId element, which contains the conversation ID for the request — in this case, 2. Because web services can be consumed by a variety of web service clients written in a variety of languages, the developer is responsible for implementing conversation ID propagation between individual web services to be used in a single conversation's scope.
The conversationId header element must be qualified with a namespace of http://www.jboss.org/seam/webservice, or Seam will be unable to read the conversation ID from the request. An example response to the above request message is:
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
  <env:Header>
    <seam:conversationId xmlns:seam='http://www.jboss.org/seam/webservice'>
      2
    </seam:conversationId>
  </env:Header>
  <env:Body>
    <confirmAuctionResponse 
       xmlns="http://seambay.example.seam.jboss.org/"/>
  </env:Body>
</env:Envelope>
Copy to Clipboard Toggle word wrap
Note that the response message contains the same conversationId element as the request.

23.2.1. A Recommended Strategy

Since web services must be implemented as either stateless session beans or POJOs, we recommend that conversational web services implement the web service as a facade for a conversational Seam component.
If the web service is written as a stateless session bean, it can be transformed into a Seam component by annotating it with @Name. This allows Seam bijection, and other features, to be used in the web service class itself.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat