13 Replies Latest reply on Nov 16, 2010 4:34 AM by izgur

    BPEL editor - INVOKE problem

    izgur

      I'm using Jboss AS 5.1, ESB 4,8 and RiftSaw 2.1 in eclipse iwth JbossTools...

       

      When I try to change code by hand, the bpel suddenly doesn't know  what my external web services methods and its parameters are...

      The partner role deletes or something like that. And I'm in a circle no matter where I change anything...

       

      I'M TRYING DO TO THIS GRAFICALLY..

      When  i add the invoke element to my bpel, add 2 assign, now it always messes  up my artifacts.wsdl. Can somebody tell me why the INVOKE element in  BPEL change my artifacts WSDL from:

       

      <?xml version="1.0"?>
      <definitions name="bpellGlassPojo"
              targetNamespace="http://samples/bpellGlassPojo"
              xmlns:tns="http://samples/bpellGlassPojo"
              xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
              xmlns="http://schemas.xmlsoap.org/wsdl/"
              xmlns:wsdl="http://glasspojo.si"

              >

       

      <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           TYPE DEFINITION - List of types participating in this BPEL process
           The BPEL Designer will generate default request and response types
           but you can define or import any XML Schema type and use them as part
           of the message types.
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   
             <plnk:partnerLinkType name="GlassFishLinkType">
          <plnk:role name="GlassFishProvider" portType="wsdl:GlassPojoWS"/>
        </plnk:partnerLinkType>
          <import location="GlassPojoWSService.wsdl" namespace="http://glasspojo.si/"/>
          <types>
              <schema attributeFormDefault="unqualified" elementFormDefault="qualified"
                      targetNamespace="http://samples/bpellGlassPojo"
                      xmlns="http://www.w3.org/2001/XMLSchema">

       

                  <element name="bpellGlassPojoRequest">
                      <complexType>
                          <sequence>
                              <element name="ServiceID" type="int" />
                              <element name="sUserName" type="string"></element>
                              <element name="sPassword" type="string"></element>
                          </sequence>
                      </complexType>
                  </element>

       

                  <element name="bpellGlassPojoResponse">
                      <complexType>
                          <sequence>
                              <element name="result" type="string"/>
                          </sequence>
                      </complexType>
                  </element>
              </schema>
          </types>

       


      <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           MESSAGE TYPE DEFINITION - Definition of the message types used as
           part of the port type defintions
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   
          <message name="bpellGlassPojoRequestMessage">
              <part name="payload" element="tns:bpellGlassPojoRequest"/>
          </message>
          <message name="bpellGlassPojoResponseMessage">
              <part name="payload" element="tns:bpellGlassPojoResponse"/>
          </message>

       

      <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           PORT TYPE DEFINITION - A port type groups a set of operations into
           a logical service unit.
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->  

       

          <!-- portType implemented by the bpellGlassPojo BPEL process -->
          <portType name="bpellGlassPojo">
              <operation name="process">
                  <input  message="tns:bpellGlassPojoRequestMessage" />
                  <output message="tns:bpellGlassPojoResponseMessage"/>
              </operation>
          </portType>

       

       

      <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           PARTNER LINK TYPE DEFINITION
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   
          <plnk:partnerLinkType name="bpellGlassPojo">
              <plnk:role name="bpellGlassPojoProvider" portType="tns:bpellGlassPojo"/>
          </plnk:partnerLinkType>
         
      </definitions>

       

      TO...

       

      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:tns="http://samples/bpellGlassPojo" xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:wsdl="http://glasspojo.si" xmlns:wsdl1="http://glasspojo.si/" name="bpellGlassPojo" targetNamespace="http://samples/bpellGlassPojo">

       

      <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           TYPE DEFINITION - List of types participating in this BPEL process
           The BPEL Designer will generate default request and response types
           but you can define or import any XML Schema type and use them as part
           of the message types.
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   
             <plnk:partnerLinkType name="GlassFishLinkType">
          <plnk:role name="GlassFishProvider" portType="wsdl:GlassPojoWS"/>
        </plnk:partnerLinkType>
          <plnk:partnerLinkType name="SecondGlassFishType">
          <plnk:role name="GlassFishProv" portType="wsdl1:GlassPojoWS"/>
        </plnk:partnerLinkType>
          <import location="GlassPojoWSService.wsdl" namespace="http://glasspojo.si/"/>
          <types>
              <schema xmlns="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://samples/bpellGlassPojo">

       

                  <element name="bpellGlassPojoRequest">
                      <complexType>
                          <sequence>
                              <element name="ServiceID" type="int"/>
                              <element name="sUserName" type="string"/>
                              <element name="sPassword" type="string"/>
                          </sequence>
                      </complexType>
                  </element>

       

                  <element name="bpellGlassPojoResponse">
                      <complexType>
                          <sequence>
                              <element name="result" type="string"/>
                          </sequence>
                      </complexType>
                  </element>
              </schema>
          </types>

       


      <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           MESSAGE TYPE DEFINITION - Definition of the message types used as
           part of the port type defintions
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   
          <message name="bpellGlassPojoRequestMessage">
              <part element="tns:bpellGlassPojoRequest" name="payload"/>
          </message>
          <message name="bpellGlassPojoResponseMessage">
              <part element="tns:bpellGlassPojoResponse" name="payload"/>
          </message>

       

      <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           PORT TYPE DEFINITION - A port type groups a set of operations into
           a logical service unit.
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->  

       

          <!-- portType implemented by the bpellGlassPojo BPEL process -->
          <portType name="bpellGlassPojo">
              <operation name="process">
                  <input message="tns:bpellGlassPojoRequestMessage"/>
                  <output message="tns:bpellGlassPojoResponseMessage"/>
              </operation>
          </portType>

       

      <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           PARTNER LINK TYPE DEFINITION
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   
          <plnk:partnerLinkType name="bpellGlassPojo">
              <plnk:role name="bpellGlassPojoProvider" portType="tns:bpellGlassPojo"/>
          </plnk:partnerLinkType>
         
      </definitions>

       

      And suddently my Projects doesn't know that the input for my main  artifacts wsdl in myprojectrequest with 2 strings and the response  myprojectresponse with one string. Instead I get just ... element or  type undefined

        • 1. Re: BPEL editor - INVOKE problem
          grid.qian

          lgor,

          In formal, if you only add a invoke and two assign, they don't add a partlinktype into a your wsdl. Besides this, what did you do?

          • 2. Re: BPEL editor - INVOKE problem
            izgur

            That's the way It works on my computer... And the instalation should be without any errors...

             

            I can tell my steps...

            1. import wsdl & xsd

            2. new bpel process file...

            3. add an invoke... global partner link... name the link, type and role and assign the operation...

            4. add assign before and after the invoke element..

            5. press SAVE and whoops...

             

            In my main WSDL myartifacts.wsdl design view,the input myprojectrequest and output myprojectresponse isn't there any more (it was there from the beginning, when I said new BPEL process file), just a red element or type undefined.

             

            But I found (after a day) that if I than add my service and binding written by hand to the wsdl, and switch back to the design view, everything is ok again. If the service&binding has already been defined, and I add a new INVOKE, I get element or type undefined and here I can fix it if I delete the service&binding and save, and the paste it again in the same place... That's the way it works for me ...

             

            BR, Igor!

            • 3. Re: BPEL editor - INVOKE problem
              grid.qian

              I checked your wsdls from your first said. The first and the changed, there are differents. Some of them, for example, add namespace like xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" and xmlns:wsdl1, maybe done by bpel editor. But from your steps, I don't find what step can add these namespaces. The other of them, for example, partnerlink type. it should not be done by bpel editor. The partnerlinke type only can be done by you through the wsdl editor, by hand, right?

              For your errors, I think they are caused by the namespaces, wsdl, wsdl1 because wsdl and wsdl1 are same namespace, so cause the error that are no input and output in the wsdl editor design view.

              • 4. Re: BPEL editor - INVOKE problem
                izgur

                When I have some time, I'll try and post if the BPEL editor problem was caused by namespace :wsdl.

                The other of them, for example, partnerlink type. it should not be  done by bpel editor. The partnerlinke type only can be done by you  through the wsdl editor, by hand, right?

                 

                I wrote my steps exactly as I'm doing it... So, I do the whole step 3 in the BPEL editor:

                3. add an invoke... global partner link... name the link, type and role and assign the operation...

                 

                And step 5(SAVING .bpel) makes the changes to the WSDL !

                 

                So, you are telling me that's is not the right way... I should first define the partner link in the WSDL, that go to BPEL, add invoke and choose the partner link defined ?

                • 5. Re: BPEL editor - INVOKE problem
                  grid.qian

                  The partnerlink type is defined in wsdl, and the partnerlink is defined by bpel file. So you should define the partnerlink type in wsdl file at first. And for your step3, you said you add 'global partner link... name the link, type.....', yes, you should add parnter link, name the link, but the type, you mean partner link type? It should be choose from your wsdl files by a Dialog, right? not create a new one, just choose from existed.

                  • 6. Re: BPEL editor - INVOKE problem
                    izgur

                    I will do it that way and reply any problems...

                     

                    Till Friday I need to know if I'm able to call a external web service which uses the UsernameToken basic authentication...

                     

                    Up to know I just took a look at the SecureInvokeExample...

                     

                    I didn't see that anything for the authentication would be specified in WSDL or BPEL file...

                     

                    That means that jbossws-cxf-myPort.xml does it all ?

                     

                    If I get this right I have to write the jbossws-cxf-myPort.xml where I specify both beans (message elements from WSDL) and for each specify the <map> tag.

                     

                    Are all this <entry> necessary : passwordCallbackClass, signaturePropFile, singatureKeyIdentifier?

                    Do I need to write these .jks files ?

                     

                    Merlin? OK... I have a lot of reading to do...

                     

                    I hope somebody could explain ...

                    • 7. Re: BPEL editor - INVOKE problem
                      izgur

                      wrong discussion ... sorry

                      • 8. Re: BPEL editor - INVOKE problem
                        izgur
                        yes, you should add parnter link, name the link, but the type, you mean  partner link type? It should be choose from your wsdl files by a Dialog,  right? not create a new one, just choose from existed.

                        By a Dialog ???

                         

                        Could you please tell me then how to define this partner link type in WSDL...

                         

                        Just add <plnk:partnerLinkType name="FOneStringLinkType"><plnk:role name="OneStringProvider" portType="wsdl:OneString"/>   ??? No....

                        • 9. Re: BPEL editor - INVOKE problem
                          grid.qian

                          At first, we need to say these are two parts:

                          1 for partnerlink, when you add a invoke, in it's detail tab of the properties view, you can choose to create a global partnerlink, then a message dialog open to make you input name, after you input name, then another dialog open to make you choose partnerlink type. Then a parterlink created.

                          2 for partnerlink type, you need to create it by hands in the Source view of the wsdl editor.

                          • 10. Re: BPEL editor - INVOKE problem
                            izgur

                            OK... now I get it, but it doesnt work .)

                             

                            My imported WSDL and XSD must be alright, because I copied it from a bpel project, which runs on my computer just well...

                             

                            Now I :

                            1. added these lines to the WSDL

                            <plnk:partnerLinkType name="OneStringLinkType">
                                <plnk:role name="OneStringProvider" portType="wsdl:OneString"/>
                                <import location="OneStringService.wsdl" namespace="http://onestring.si/"/>

                             

                            2. than went to BPEL where i added INVOKE. Went to detail, new global partner link and choose my OneStringLinkType (until now i always created a new one).

                             

                            The problem now is that If I go to the new created link, there are NO methods/params under the OneStringProvider...(i saw that there are no methods when i chose the partner link type earlier too)

                            Like it doesnt find any from the partners wsdl ...

                            • 11. Re: BPEL editor - INVOKE problem
                              grid.qian

                              Firstly, you may put the partnerlink type in the same wsdl with the porttype, then in bpel process editor, create partnerlink, then choose a partnerlink type from project.

                              Secondly, why did you add the import into the partnerlink type? why not add it into the wsdl file directly?

                              These two ways are no any problems, I think.

                              • 12. Re: BPEL editor - INVOKE problem
                                bbrodt

                                Hi Igor,

                                 

                                I tried several times with my latest build of the BPEL  editor, but I'm unable to reproduce the problem. The only differences  in the artifacts.wsdl AFTER creating the new partnerlink was the  addition of the new partnerlink definition, just before the  <types> element (which is what I would  expect):

                                 

                                <!--  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                      TYPE DEFINITION - List of services participating in this BPEL  process
                                      The default output of the BPEL designer uses strings as input and
                                      output to the BPEL Process. But you can define or import any XML
                                      Schema type and us them as part of the message types.
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  -->   
                                    <plnk:partnerLinkType name="calcPLT">
                                     <plnk:role name="calcClientRole"  portType="wsdl:RectangleCalculator"/>
                                   </plnk:partnerLinkType>
                                     <import location="RectangleCalculator.wsdl"  namespace="http://rectangle.bple.tps"/>
                                    <types> 
                                         <schema attributeFormDefault="unqualified"
                                                 elementFormDefault="qualified"
                                                 targetNamespace="http://eclipse.org/bpel/sample"
                                                 xmlns="http://www.w3.org/2001/XMLSchema"
                                                 >

                                 

                                The section in bold is what  was added to the WSDL. It is possible that this problem has been fixed  as part of another bug. If you have time, can you please try a more  recent build of the JBoss tools (use a nightly build) and see if you  still get the error?

                                 

                                Also, if you could post the XSD and WSDL that you are using to this forum, that would help.

                                 

                                Thanks!

                                 

                                Bob

                                • 13. Re: BPEL editor - INVOKE problem
                                  izgur
                                  I tried several times with my latest build of the BPEL  editor, but I'm  unable to reproduce the problem. The only differences  in the  artifacts.wsdl AFTER creating the new partnerlink was the  addition of  the new partnerlink definition, just before the  <types> element  (which is what I would  expect):

                                   

                                  I see that too know. It adds the correct lines to the WSDL, but it messes up my designer view with element or  type undefined.

                                   

                                  But like I said... I managed a work around... i delete the service&binding and save the artifacts.wsdl, that add it again and the designer shows everything is valid again..  Sorry I won't update my JBoss tools as long as it works for me... I don't know if that could mess up my other projects...

                                   

                                  I'm working know like said... write the partnerlink by hand in the wsdl, and thn in bpel when i add an INVOKE I choose the global link written in the wsdl file... But there is one WSDL I can't import... or I don't import the right port... so if I want to choose the existing portType i see that my bpel doest see the wsdl methods...

                                   

                                   

                                  Could you please help me with the partner link ... there are 2 .wsdl, the first imports the second... What am I doing wrong ?

                                   

                                  I will post only the neccessary, not the operations ...

                                   

                                  artifacts.wsdl

                                  <definitions name="bpelCdrClient"

                                          targetNamespace="http://samples/bpelCdrClient"

                                          xmlns:tns="http://samples/bpelCdrClient"

                                          xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"

                                          xmlns="http://schemas.xmlsoap.org/wsdl/"

                                          xmlns:ns1='http://cdrmanager.ccs.mystore.si/'>

                                   

                                      <plnk:partnerLinkType name="cdriType">

                                          <plnk:role name="mycdrProvider" portType="ns1:CdrManagerWS"/>

                                        </plnk:partnerLinkType>

                                      <import location="CdrManager.wsdl" namespace="http://ws.cdr.mystore.si/" />

                                   

                                  CdrManager.wsdl:

                                  <definitions name="CdrManagerWSImplService"

                                                    targetNamespace="http://ws.cdr.mystore.si/"

                                                    xmlns='http://schemas.xmlsoap.org/wsdl/'

                                                     xmlns:wsdl='http://schemas.xmlsoap.org/wsdl'

                                                     xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'

                                                     xmlns:ns1='http://ws.cdr.mystore.si/' >

                                   

                                  <wsdl:import location="CdrManagerWS.wsdl" namespace="http://cdrmanager.ccs.mystore.si/" xmlns:ns1="http://ws.cdr.mystore.si/"></wsdl:import>

                                  <wsdl:service name="CdrManagerWSImplService">

                                  <wsdl:port binding="tns:CdrManagerWSImplServiceSoapBinding" name="CdrManagerWSImplPort">

                                  <soap:address location="http://192.168.60.92:8088/CdrManager"/>

                                  </wsdl:port>

                                  </wsdl:service>

                                   

                                  CdrManagerWS.wsdl

                                  <definitions name="CdrManagerWS"

                                                      targetNamespace="http://cdrmanager.ccs.mystore.si/"

                                                      xmlns='http://schemas.xmlsoap.org/wsdl/'

                                                       xmlns:wsdl='http://schemas.xmlsoap.org/wsdl'

                                                       xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'

                                                      xmlns:wsdlsoap='http://schemas.xmlsoap.org/wsdl/soap'

                                                       xmlns:xs='http://www.w3.org/2001/XMLSchema'

                                                      xmlns:tns='http://cdrmanager.ccs.mystore.si/' >

                                  <wsdl:types>

                                  <wsdl:portType name="CdrManagerWS">