IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

XML/XSL et SOAP Discussion :

Besoin d'aide pour une expression


Sujet :

XML/XSL et SOAP

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé Avatar de maya
    Profil pro
    Étudiant
    Inscrit en
    Novembre 2006
    Messages
    140
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : Algérie

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Novembre 2006
    Messages : 140
    Par défaut Besoin d'aide pour une expression
    Bonjour ,

    Je m'interesse à BPEL pour la composition des web service , mais malheureusement je m'y connais pas trop en XML;j'ai trouvé une partie ou j'ai rien saisi, c'est quoi au juste ? que signifie le $ ?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    <copy>
                    <from>$FunctionProcessServiceOperationInput.functionProcessServiceRequest/ns3:param0</from>
                    <to>$AddInput.parameters/ns4:param0</to>
                </copy>
    et voici tout le fichier
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    <?xml version="1.0" encoding="UTF-8"?>
    <process
        name="FunctionProcess"
        targetNamespace="http://FunctionProcess.bpel"
        xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:sxt="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Trace" 
        xmlns:sxed="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor"
        xmlns:tns="http://FunctionProcess.bpel" xmlns:ns0="http://AdderService.wsdl" xmlns:ns1="http://MultiplierService.wsdl" xmlns:ns2="http://SquareService.wsdl" xmlns:ns3="http://www.example.org/messages" xmlns:ns4="http://ws.apache.org/axis2">
        <import namespace="http://FunctionProcessService.wsdl" location="FunctionProcessService.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
        <import namespace="http://AdderService.wsdl" location="AdderService.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
        <import namespace="http://MultiplierService.wsdl" location="MultiplierService.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
        <import namespace="http://SquareService.wsdl" location="SquareService.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
        <partnerLinks>
            <partnerLink name="SquarePartnerLink" xmlns:ns2="http://SquareService.wsdl" partnerLinkType="ns2:SquareServicePartnerlinkType" partnerRole="squareRole"/>
            <partnerLink name="MultiplierPartnerLink" xmlns:ns1="http://MultiplierService.wsdl" partnerLinkType="ns1:MultiplierServicePartnerlinkType" partnerRole="multiplierRole"/>
            <partnerLink name="AdderPartnerLink" xmlns:ns0="http://AdderService.wsdl" partnerLinkType="ns0:AdderServicePartnerlinkType" partnerRole="adderRole"/>
            <partnerLink name="FunctionProcessPartnerLink" xmlns:tns="http://FunctionProcessService.wsdl" partnerLinkType="tns:FunctionProcessService" myRole="FunctionProcessServicePortTypeRole"/>
        </partnerLinks>
        <variables>
            <variable name="FunctionProcessServiceOperationOutput" xmlns:tns="http://FunctionProcessService.wsdl" messageType="tns:FunctionProcessServiceOperationResponse"/>
            <variable name="MultiplyOutput1" messageType="ns1:multiplyResponse"/>
            <variable name="MultiplyInput1" messageType="ns1:multiplyRequest"/>
            <variable name="FunctionProcessServiceOperationInput" xmlns:tns="http://FunctionProcessService.wsdl" messageType="tns:FunctionProcessServiceOperationRequest"/>
            <variable name="MultiplyOutput" xmlns:ns1="http://MultiplierService.wsdl" messageType="ns1:multiplyResponse"/>
            <variable name="MultiplyInput" xmlns:ns1="http://MultiplierService.wsdl" messageType="ns1:multiplyRequest"/>
            <variable name="SquareOutput" xmlns:ns2="http://SquareService.wsdl" messageType="ns2:squareResponse"/>
            <variable name="SquareInput" xmlns:ns2="http://SquareService.wsdl" messageType="ns2:squareRequest"/>
            <variable name="AddOutput" xmlns:ns0="http://AdderService.wsdl" messageType="ns0:addResponse"/>
            <variable name="AddInput" xmlns:ns0="http://AdderService.wsdl" messageType="ns0:addRequest"/>
        </variables>
        <sequence>
            <receive name="ReceiveRequest" createInstance="yes" partnerLink="FunctionProcessPartnerLink" operation="FunctionProcessServiceOperation" xmlns:tns="http://FunctionProcessService.wsdl" portType="tns:FunctionProcessServicePortType" variable="FunctionProcessServiceOperationInput"/>
            <assign name="Assign1">
    	    <copy>
                    <from>
                        <literal xml:space="preserve">
    			<tns:add xmlns:tns="http://ws.apache.org/axis2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    	  			<tns:param0></tns:param0>
    				<tns:param1></tns:param1>
    			</tns:add>
    		    </literal>
                    </from>
                    <to part="parameters" variable="AddInput">
                    </to>
                </copy>
    	    <copy>
                    <from>
                        <literal xml:space="preserve">
    			<tns:multiply xmlns:tns="http://ws.apache.org/axis2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    	  			<tns:param0></tns:param0>
    				<tns:param1></tns:param1>
    			</tns:multiply>
    		    </literal>
                    </from>
                    <to part="parameters" variable="MultiplyInput">
                    </to>
                </copy>
     
                <copy>
                    <from>$FunctionProcessServiceOperationInput.functionProcessServiceRequest/ns3:param0</from>
                    <to>$AddInput.parameters/ns4:param0</to>
                </copy>
                <copy>
                    <from>$FunctionProcessServiceOperationInput.functionProcessServiceRequest/ns3:param1</from>
                    <to>$AddInput.parameters/ns4:param1</to>
                </copy>
                <copy>
                    <from>$FunctionProcessServiceOperationInput.functionProcessServiceRequest/ns3:param0</from>
                    <to>$MultiplyInput.parameters/ns4:param0</to>
                </copy>
                <copy>
                    <from>$FunctionProcessServiceOperationInput.functionProcessServiceRequest/ns3:param1</from>
                    <to>$MultiplyInput.parameters/ns4:param1</to>
                </copy>
            </assign>
            <flow name="Flow1">
                <invoke name="InvokeAdderService" partnerLink="AdderPartnerLink" operation="add" portType="ns0:AdderServicePortType" inputVariable="AddInput" outputVariable="AddOutput"/>
                <invoke name="InvokeMultiplierService1" partnerLink="MultiplierPartnerLink" operation="multiply" portType="ns1:MultiplierServicePortType" inputVariable="MultiplyInput" outputVariable="MultiplyOutput"/>
            </flow>
            <assign name="Assign2">
    	    <copy>
                    <from>
                        <literal xml:space="preserve">
    			<tns:multiply xmlns:tns="http://ws.apache.org/axis2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    	  			<tns:param0></tns:param0>
    				<tns:param1></tns:param1>
    			</tns:multiply>
    		    </literal>
                    </from>
                    <to part="parameters" variable="MultiplyInput1">
                    </to>
                </copy>
                <copy>
                    <from>$AddOutput.parameters/ns4:return</from>
                    <to>$MultiplyInput1.parameters/ns4:param0</to>
                </copy>
                <copy>
                    <from>$MultiplyOutput.parameters/ns4:return</from>
                    <to>$MultiplyInput1.parameters/ns4:param1</to>
                </copy>
            </assign>
            <invoke name="InvokeMultiplierService2" partnerLink="MultiplierPartnerLink" operation="multiply" portType="ns1:MultiplierServicePortType" inputVariable="MultiplyInput1" outputVariable="MultiplyOutput1"/>
            <assign name="Assign3">
                <copy>
                    <from>
                        <literal xml:space="preserve">
    			<tns:square xmlns:tns="http://ws.apache.org/axis2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    	  			<tns:param0></tns:param0>
    			</tns:square>
    		    </literal>
                    </from>
                    <to part="parameters" variable="SquareInput">
                    </to>
                </copy>
    	    <copy>
                    <from>$MultiplyOutput1.parameters/ns4:return</from>
                    <to>$SquareInput.parameters/ns4:param0</to>
                </copy>
            </assign>
            <invoke name="InvokeSquareService" partnerLink="SquarePartnerLink" operation="square" xmlns:ns2="http://SquareService.wsdl" portType="ns2:SquareServicePortType" inputVariable="SquareInput" outputVariable="SquareOutput"/>
            <assign name="Assign4">
                <copy>
                    <from>
                        <literal xml:space="preserve">
    			<tns:functionProcessServiceResponse xmlns:tns="http://www.example.org/messages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    	  			<tns:return></tns:return>
    			</tns:functionProcessServiceResponse>
    		    </literal>
                    </from>
                    <to part="functionProcessServiceResponse" variable="FunctionProcessServiceOperationOutput">
                    </to>
                </copy>
    	    <copy>
                    <from>$SquareOutput.parameters/ns4:return</from>
                    <to>$FunctionProcessServiceOperationOutput.functionProcessServiceResponse/ns3:return</to>
                </copy>
            </assign>
            <reply name="Reply1" partnerLink="FunctionProcessPartnerLink" operation="FunctionProcessServiceOperation" xmlns:tns="http://FunctionProcessService.wsdl" portType="tns:FunctionProcessServicePortType" variable="FunctionProcessServiceOperationOutput"/>
        </sequence>
    </process>

    Je vous remercie d'avance pour votre aide
    @+

  2. #2
    Membre éclairé
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Avril 2007
    Messages
    241
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Avril 2007
    Messages : 241
    Par défaut
    Bonjour,

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <variable name="FunctionProcessServiceOperationOutput" xmlns:tns="http://FunctionProcessService.wsdl" messageType="tns:FunctionProcessServiceOperationResponse"/>
    Tu as ici la déclaration d'une variable, le "$FunctionProcessServiceOperationInput" va donc te permettre d'accéder à cette variable, ensuite ".functionProcessServiceRequest" doit certainement être une fonction définis dans le fichier wsdl donné à la déclaration.

  3. #3
    Membre confirmé Avatar de maya
    Profil pro
    Étudiant
    Inscrit en
    Novembre 2006
    Messages
    140
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : Algérie

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Novembre 2006
    Messages : 140
    Par défaut
    Bonjour ;
    Merci psylox pour ta réponse ,
    Mais je ne comprends pas la signification de /ns4:param0
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <to>$AddInput.parameters/ns4:param0</to>

  4. #4
    Membre éclairé
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Avril 2007
    Messages
    241
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Avril 2007
    Messages : 241
    Par défaut
    Je pense que la fonction parameters te retourne du XML dont l'un des noeuds est ns4:param et que donc en rajoutant cela tu vas récupérer le contenu de cet élément que tu vas placer dans <to></to>.

Discussions similaires

  1. Besoin d'aide pour une expression régulière
    Par StringBuilder dans le forum Shell et commandes GNU
    Réponses: 3
    Dernier message: 06/12/2012, 12h12
  2. Besoin d'aide pour une expression régulière
    Par chlon dans le forum Requêtes
    Réponses: 4
    Dernier message: 16/07/2009, 16h41
  3. [RegEx] Besoin d'aide pour une expression régulière
    Par vallica dans le forum Langage
    Réponses: 4
    Dernier message: 04/09/2007, 19h59
  4. Besoin d'aide pour une expression reguliere
    Par Jim_Nastiq dans le forum Langage
    Réponses: 5
    Dernier message: 10/04/2006, 09h11
  5. Besoin d'aide pour une expression régulière
    Par planetiss dans le forum Langage
    Réponses: 5
    Dernier message: 16/02/2006, 19h04

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo