Reputation: 876
I'm trying to create a simple BPEL process in Sonic Workbench, that will call a WSDL webservice I created. I am getting this error message after running the process:
Cannot send message to anonymous endpoint for "{http://informationservice.project.com/}InformationService" in partnerLink information
I have no idea what this error message means and googling doesn't help.
Thanks
Edit: BPEL Code:
<?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>
When I change initializePartnerRole
to yes
I've different error:
No endpoint specified to initialize partner role for partnerLink information
information.wsdl code:
<?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>
Upvotes: 0
Views: 1550
Reputation: 3142
I don't know Sonic, but from the error message I'd guess that the partnerlinks partner role is not associated with a partner EPR. In BPEL a partner link has a myRole part (which is the interface a partner expects from me to be implemented and to be provided for the partner's use) and the partnerRole, which is linked to the portType the partner implements and that provides the operation your BPEL process wants to invoke. All this stuff is defined in BPEL and WSDL. For the concrete binding of endpoints, BPEL engines use deployment descriptors which define the mapping of an EPR (either a concrete endpoint, e.g. an URL, or an indirect endpoint (e.g. identifying a port which holds the EPR) to the partner role. I assume this mapping is missing in your case.
Edit:
In your code snippet, the initializePartnerRole
attribute of the partnerlink is set to no
, which means the BPEL processor MUST NOT initialize the EPR of the partner role before it is first utilized. This is probably causing your problem. You can set it to yes
to force the engine to initialize the EPR or omit the attribute to leave the decision up to the engine. See section 6.2 in the BPEL 2.0 spec for further details.
Upvotes: 1