ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "EXTERNAL Schmid Markus (Diplomand; CI/TMP)" <external.Markus.Schm...@de.bosch.com>
Subject AW: undeclared partnerrole
Date Thu, 20 Dec 2007 07:11:02 GMT
Hi,

yes of course, thank you very much for your answer.
I'll have a closer look at the namespaces although I am not very good at
it.


Service-1 (Simple Service)
_______________________________________

WSDL:

<?xml version="1.0"?>
<definitions name="RPC"
        targetNamespace="urn:/ODE_Service_rpc_0.5_bpel_su.wsdl"
        xmlns:tns="urn:/ODE_Service_rpc_0.5_bpel_su.wsdl"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns="http://schemas.xmlsoap.org/wsdl/">

    <message name="rpcRequest">
        <part name="text" type="xsd:string"/>
    </message>

    <message name="rpcResponse">
        <part name="text" type="xsd:string"/>
    </message>

    <portType name="rpcPortType">
        <operation name="rpcOperation">
            <input message="tns:rpcRequest"/>
            <output message="tns:rpcResponse"/>
        </operation>
    </portType>

    <plnk:partnerLinkType name="rpcPartnerLinkType">
        <plnk:role name="Provider" portType="tns:rpcPortType"/>
    </plnk:partnerLinkType>
</definitions>

*******************************************

Service-2 (This one calls service-1)
_____________________________________________

BPEL:
<?xml version="1.0" encoding="UTF-8"?>
<process
        name="AnmeldungProzess"
        xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:rpcns="urn:/ODE_Service_rpc_0.5_bpel_su.wsdl"        
        targetNamespace="urn:/anmeldung_bpel_su.bpel"
        xmlns:tns="urn:/anmeldung_bpel_su.bpel"
        xmlns:anmns="urn:/anmeldung_bpel_su.wsdl"
        xmlns:regns="urn:/registrierung_bpel_su.wsdl"
        
 
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">

    <import location="ODEServices_0.5_anmeldung_bpel_su.wsdl"
            namespace="urn:/anmeldung_bpel_su.wsdl"
            importType="http://schemas.xmlsoap.org/wsdl/" />

    <import location="ODEServices_0.5_registrierung_bpel_su.wsdl"
            namespace="urn:/registrierung_bpel_su.wsdl"
            importType="http://schemas.xmlsoap.org/wsdl/" />

    <import location="ODE_Service_rpc_0.5_bpel_su.wsdl"
            namespace="urn:/ODE_Service_rpc_0.5_bpel_su.wsdl"
            importType="http://schemas.xmlsoap.org/wsdl/" />


    <partnerLinks>
        <partnerLink name="AnmeldungPartnerLink"
                partnerLinkType="anmns:AnmeldungPartnerLinkType"
                myRole="Provider" />
        <partnerLink name="RegPartnerLink"
                partnerLinkType="regns:RegPartnerLinkType"
                partnerRole="Provider"
                initializePartnerRole="yes" />
        <partnerLink name="RPCPartnerLink"
                partnerLinkType="rpcns:rpcPartnerLinkType"
                partnerRole="Provider"
                initializePartnerRole="yes" />

    </partnerLinks>

    <variables>
        <variable messageType="anmns:AnmeldungMessageRequest"
name="varAnmeldungRequest"/>
        <variable messageType="anmns:AnmeldungMessageResponse"
name="varAnmeldungResponse"/>
        <variable messageType="regns:RegMessageRequest"
name="varRegRequest"/>
        <variable messageType="regns:RegMessageResponse"
name="varRegResponse"/>
        <variable messageType="rpcns:rpcRequest" name="varRPCRequest"/>
        <variable messageType="rpcns:rpcResponse"
name="varRPCResponse"/>
        <variable type="xsd:string" name="varName" />
        <variable type="xsd:integer" name="varAlter" />
        <variable type="xsd:integer" name="varResponse" />
        <variable type="xsd:string" name="varRPC"/>
    </variables>


    <sequence name="Main">
        <receive name="Eingang"
                createInstance="yes"
                operation="AnmeldungOperation"
                partnerLink="AnmeldungPartnerLink"
                portType="anmns:AnmeldungPortType"
                variable="varAnmeldungRequest"/>


        <assign name="assign_AnRegistrierung">
            <copy>
                <from>$varAnmeldungRequest.body/anmns:Name</from>
                <to variable="varName"/>
            </copy>
            <copy>
            <from>$varAnmeldungRequest.body/anmns:Alter</from>
            <to variable="varAlter"/>
            </copy>

            <copy>
                <from>
                    <literal>
                        <regns:RegMessageRequest>
                            <regns:text/>
                            <regns:Alter/>
                        </regns:RegMessageRequest>
                    </literal>
                </from>
                <to>$varRegRequest.body</to>
            </copy>

            <copy>
                <from>$varName</from>
                <to>$varRegRequest.body/regns:text</to>
            </copy>

            <copy>
                <from>$varAlter</from>
                <to>$varRegRequest.body/regns:Alter</to>
            </copy>            
        </assign>
        
        <!-- building request to rpc -->
        <!-- no initialising because it's only a string  --> 
        <assign>
        	<copy>
        		<from>'To RPC ... '</from>
        		<to>$varRPCRequest.text</to>
        	</copy>        	
        </assign>        
        
        <!-- invoke the rpc simple service   -->
        <invoke name="Aufruf_RPC"
                operation="rpcOperation"
                inputVariable="varRPCRequest"
                outputVariable="varRPCResponse"
                partnerLink="RPCPartnerLink"
                portType="rpcns:rpcPortType"/>         

        
        <!-- do something with the response, still missing -->
        
        
        <!-- invoke registry -->
        <invoke name="Aufruf_Registrierung"
                operation="RegOperation"
                inputVariable="varRegRequest"
                outputVariable="varRegResponse"
                partnerLink="RegPartnerLink"
                portType="regns:RegPortType"/>
        
        <!-- build response of the main service, 
just add some strings together to see if everything was called-->
        <assign name="assign_ErstellenServiceRueckgabe_Antwort">
            <copy>
                <from>$varRegResponse.body/regns:text</from>
                <to>$varResponse</to>
            </copy>
            <copy>
                <from>$varResponse</from>
                <to>$varAnmeldungResponse.body/anmns:Antwort</to>
            </copy>
        </assign>
        
        <reply name="Antwort"
                partnerLink="AnmeldungPartnerLink"
                portType="anmns:AnmeldungPortType"
                operation="AnmeldungOperation"
                variable="varAnmeldungResponse"/>
    </sequence>
</process>

***********************************
WSDL:

<?xml version="1.0"?>
<definitions name="AnmeldungProzess"
		xmlns="http://schemas.xmlsoap.org/wsdl/"
		xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
		
		targetNamespace="urn:/anmeldung_bpel_su.wsdl"
        xmlns:tns="urn:/anmeldung_bpel_su.wsdl"
        >

    <types>
        <schema targetNamespace="urn:/anmeldung_bpel_su.wsdl"
                xmlns="http://www.w3.org/2000/10/XMLSchema">
            <element name="AnmeldungMessageRequest">
                <complexType>
                    <all>
                        <element name="Name" type="string"/>
                        <element name="Alter" type="integer"/>
                    </all>
                </complexType>
            </element>
            <element name="AnmeldungMessageResponse">
                <complexType>
                    <all>
                        <element name="Antwort" type="string"/>
                    </all>
                </complexType>
            </element>
        </schema>
    </types>

    <message name="AnmeldungMessageRequest">
        <part name="body" element="tns:AnmeldungMessageRequest"/>
    </message>

    <message name="AnmeldungMessageResponse">
        <part name="body" element="tns:AnmeldungMessageResponse"/>
    </message>

    <portType name="AnmeldungPortType">
        <operation name="AnmeldungOperation">
            <input message="tns:AnmeldungMessageRequest"/>
            <output message="tns:AnmeldungMessageResponse"/>
        </operation>
    </portType>

    <plnk:partnerLinkType name="AnmeldungPartnerLinkType">
        <plnk:role name="Provider" portType="tns:AnmeldungPortType"/>
    </plnk:partnerLinkType>
</definitions>


> Hi,
>
> I deployed a service-1 with rpc which can be called by a client.
> I then deployed a service-2 which tries to send a message to service-1
> but fails because of an
> undeclared partnerrole. But i declared a partnerrole in the named
> partnerlink can anyone please point out my error?
> WSDL and BPEL at the end



Mime
View raw message