BPEL 프로세스에 대한 헬퍼 클래스 작성(Java 웹 서비스)

구체적 API 요청(예를 들어, sendMessage 또는 call)은 클라이언트 응용프로그램이 "문서/리터럴 랩핑" 스타일 요소를 사용하도록 요구합니다. 클라이언트 응용프로그램은 헬퍼 클래스에 필요한 랩퍼 요소 생성을 돕도록 요구합니다.

시작하기 전에

헬퍼 클래스를 작성하려면 먼저 WebSphere® Process Server 환경에서 웹 서비스 API의 WSDL 파일을 내보내야 합니다.

이 타스크의 수행 목적 및 시기

웹 서비스 API의 call()sendMessage() 조작은 WebSphere Process Server에서 BPEL 프로세스와의 상호 작용을 허용합니다. call() 조작의 입력 메시지는 프로세스 입력 메시지의 문서/리터럴 랩퍼가 제공될 것으로 예상합니다.
다음과 같은 방법으로 BPEL 프로세스 또는 휴먼 타스크에 대한 헬퍼 클래스를 작성할 수 있습니다.
  1. SoapElement 오브젝트를 사용하십시오.

    WebSphere Integration Developer에서 사용할 수 있는 Rational Application Developer 환경에서 웹 서비스 엔진은 JAX-RPC 1.1을 지원합니다. JAX-RPC 1.1에서 SoapElement 오브젝트는 DOM(Document Object Model) 요소를 확장하므로 DOM API를 사용하여 SOAP 메시지를 작성, 읽기, 로드 및 저장할 수 있습니다.

    예를 들어, WSDL 파일에 워크플로우 프로세스 또는 휴먼 타스크에 대한 다음 입력 메시지가 있다고 가정하십시오.
    <xsd:element name="operation1">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="input1" nillable="true" type="xsd:string"/>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
    DOM API를 사용하여 해당하는 SOAP 메시지를 작성하는 경우는 다음과 같습니다.
    SOAPFactory soapfactoryinstance = SOAPFactory.newInstance();
    SOAPElement soapmessage = soapfactoryinstance.createElement
                              ("operation1", namespaceprefix, interfaceURI);
    SOAPElement inputelement = soapfactoryinstance.createElement("input1");
    inputelement.addTextNode( message value);
    soapmessage.addChildElement(outputelement);
    다음 예는 sendMessage 조작에 대한 입력 매개변수를 작성하는 방법을 보여줍니다.
    SendMessage inWsend = new SendMessage();
    inWsend.setProcessTemplateName(processtemplatename);
    inWsend.setPortType(porttype);
    inWsend.setOperation(operationname);
    inWsend.set_any(soapmessage);
  2. WebSphere Custom Data Binding 기능을 사용하십시오.
관련 태스크
비즈니스 오브젝트 내보내기

ⓒ Copyright IBM Corporation 2005, 2006.
이 Information Center는 Eclipse 기술을 기반으로 합니다. (http://www.eclipse.org)