Вызов простого сервиса WSDL с BPEL - PullRequest
0 голосов
/ 09 января 2012

Я пытаюсь создать простой процесс BPEL в Sonic Workbench, который будет вызывать созданный мной веб-сервис WSDL.Я получаю это сообщение об ошибке после запуска процесса:

Cannot send message to anonymous endpoint for "{http://informationservice.project.com/}InformationService" in partnerLink information

Я понятия не имею, что означает это сообщение об ошибке, и поиск в Google не помогает.

Спасибо

Редактировать: код BPEL:

<?xml version="1.0" encoding="UTF-8"?>
<process expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0" name="testB" queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0" targetNamespace="urn:bpel:testB" xml:ID="1"
  xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
  xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
  xmlns:plk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
  xmlns:psbx="urn:parasoft:bpel:extension" xmlns:tns="urn:bpel:testB"
  xmlns:tns0="http://informationservice.project.com/"
  xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <import importType="http://schemas.xmlsoap.org/wsdl/"
    location="information.wsdl" namespace="http://informationservice.project.com/"/>
  <import importType="http://schemas.xmlsoap.org/wsdl/"
    location="testB.wsdl" namespace="urn:bpel:testB"/>
  <partnerLinks>
    <partnerLink initializePartnerRole="no" name="information"
      partnerLinkType="tns0:InformationService" partnerRole="InformationService"/>
    <partnerLink myRole="testB" name="testB" partnerLinkType="tns:testB"/>
  </partnerLinks>
  <variables>
    <variable messageType="tns0:getAirportsForCity" name="input"/>
    <variable messageType="tns:testBRequest" name="testBRequest"/>
    <variable messageType="tns:testBResponse" name="testBResponse"/>
    <variable messageType="tns0:getAirportsForCityResponse" name="output"/>
  </variables>
  <sequence xml:ID="2">
    <receive createInstance="yes" name="testB" operation="testB"
        partnerLink="testB" portType="tns:testBPortType"
        variable="testBRequest" xml:ID="3"/>
    <assign xml:ID="7">
      <copy xmlns:psbx="urn:parasoft:bpel:extension">
            <from>
                <literal>
                    <ns1:getAirportsForCity xmlns="" xmlns:ns1="http://informationservice.project.com/">
                        <city/>
                    </ns1:getAirportsForCity>
                </literal>
            </from>
            <to part="parameters" variable="input"/>
        </copy>
        <copy xmlns:psbx="urn:parasoft:bpel:extension">
            <from part="parameters" variable="testBRequest">
                <query>/child::node()[local-name()='testB']/child::node()[local-name()='city']</query>
            </from>
            <to part="parameters" variable="input">
                <query>/child::node()[local-name()='getAirportsForCity']/child::node()[local-name()='city']</query>
            </to>
        </copy>
      </assign>
      <invoke inputVariable="input" operation="getAirportsForCity"
          outputVariable="output" partnerLink="information"
          portType="tns0:InformationService" xml:ID="6"/>
      <assign xml:ID="4">
        <copy>
            <from>
                <literal>
                    <ns1:testBResponse xmlns=""
                        xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:ns1="urn:bpel:testB">
                        <airport/>
                    </ns1:testBResponse>
                </literal>
            </from>
            <to part="parameters" variable="testBResponse"/>
        </copy>
        <copy xmlns:psbx="urn:parasoft:bpel:extension">
            <from part="parameters" variable="output">
                <query>/child::node()[local-name()='getAirportsForCityResponse']/child::node()[local-name()='return']</query>
            </from>
            <to part="parameters" variable="testBResponse">
                <query>/child::node()[local-name()='testBResponse']/child::node()[local-name()='airport']</query>
            </to>
        </copy>
      </assign>
      <reply name="testB" operation="testB" partnerLink="testB"
        portType="tns:testBPortType" variable="testBResponse" xml:ID="5"/>
  </sequence>
</process>

Когда я изменяю initializePartnerRole на yes У меня другая ошибка:

No endpoint specified to initialize partner role for partnerLink information

код information.wsdl:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="InformationService"
  targetNamespace="http://informationservice.project.com/" xmlns=""
  xmlns:ns1="http://schemas.xmlsoap.org/soap/http"
  xmlns:ns2="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns:tns="http://informationservice.project.com/"
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ns2:partnerLinkType name="InformationService">
    <ns2:role name="InformationService" portType="tns:InformationService"/>
</ns2:partnerLinkType>
<wsdl:types>
    <xs:schema
        targetNamespace="http://informationservice.project.com/"
        version="1.0"
        xmlns:tns="http://informationservice.project.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <xs:element name="getAirportsForCity">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="city" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
        <xs:element name="getAirportsForCityResponse">
            <xs:complexType>
                <xs:sequence>
                    <xs:element maxOccurs="unbounded" minOccurs="0"
                        name="return" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
        <xs:element name="getCities" type="tns:getCities"/>
        <xs:element name="getCitiesResponse" type="tns:getCitiesResponse"/>
        <xs:complexType name="getCities">
            <xs:sequence/>
        </xs:complexType>
        <xs:complexType name="getCitiesResponse">
            <xs:sequence>
                <xs:element maxOccurs="unbounded" minOccurs="0"
                    name="return" type="xs:string"/>
            </xs:sequence>
        </xs:complexType>
    </xs:schema>
</wsdl:types>
<wsdl:message name="getCities">
    <wsdl:part element="tns:getCities" name="parameters"/>
</wsdl:message>
<wsdl:message name="getCitiesResponse">
    <wsdl:part element="tns:getCitiesResponse" name="parameters"/>
</wsdl:message>
<wsdl:message name="getAirportsForCityResponse">
    <wsdl:part element="tns:getAirportsForCityResponse" name="parameters"/>
</wsdl:message>
<wsdl:message name="getAirportsForCity">
    <wsdl:part element="tns:getAirportsForCity" name="parameters"/>
</wsdl:message>
<wsdl:portType name="InformationService">
    <wsdl:operation name="getCities">
        <wsdl:input message="tns:getCities" name="getCities"/>
        <wsdl:output message="tns:getCitiesResponse" name="getCitiesResponse"/>
    </wsdl:operation>
    <wsdl:operation name="getAirportsForCity">
        <wsdl:input message="tns:getAirportsForCity" name="getAirportsForCity"/>
        <wsdl:output message="tns:getAirportsForCityResponse" name="getAirportsForCityResponse"/>
    </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="InformationServiceSoapBinding" type="tns:InformationService">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getCities">
        <soap:operation soapAction="" style="document"/>
        <wsdl:input name="getCities">
            <soap:body use="literal"/>
        </wsdl:input>
        <wsdl:output name="getCitiesResponse">
            <soap:body use="literal"/>
        </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getAirportsForCity">
        <soap:operation soapAction="" style="document"/>
        <wsdl:input name="getAirportsForCity">
            <soap:body use="literal"/>
        </wsdl:input>
        <wsdl:output name="getAirportsForCityResponse">
            <soap:body use="literal"/>
        </wsdl:output>
    </wsdl:operation>
</wsdl:binding>
<wsdl:service name="InformationService">
    <wsdl:port binding="tns:InformationServiceSoapBinding" name="InformationServiceEndpoint">
        <soap:address location="http://localhost:9002/information"/>
    </wsdl:port>
</wsdl:service>
</wsdl:definitions>

1 Ответ

1 голос
/ 09 января 2012

Я не знаю Соника, но из сообщения об ошибке я бы предположил, что роль партнера по партнерским ссылкам не связана с партнерским EPR. В BPEL партнерская ссылка имеет часть myRole (интерфейс, который партнер ожидает от меня, который будет реализован и предоставлен для использования партнером), и partnerRole, который связан с portType, который реализует партнер, и который обеспечивает операцию, которую вы выполняете. Процесс BPEL хочет вызвать. Все эти вещи определены в BPEL и WSDL. Для конкретного связывания конечных точек механизмы BPEL используют дескрипторы развертывания, которые определяют сопоставление EPR (либо конкретной конечной точки, например, URL-адреса, либо косвенной конечной точки (например, идентификации порта, который содержит EPR), с ролью партнера. это отображение отсутствует в вашем случае.

Edit: В вашем фрагменте кода атрибут initializePartnerRole партнерской ссылки установлен на no, что означает, что процессор BPEL НЕ ДОЛЖЕН инициализировать EPR роли партнера до его первого использования. Это, вероятно, вызывает вашу проблему. Вы можете установить его на yes, чтобы заставить двигатель инициализировать EPR или пропустить атрибут, чтобы оставить решение на усмотрение двигателя. Подробнее см. В разделе 6.2 спецификации BPEL 2.0.

...