4 Replies Latest reply on Jul 13, 2011 2:05 PM by fabianpc

    Connection to Web Service

    ace_team

      Hi Community!

      There is a Web Service provinding some methods I can invoke through SOAP and REST packets. I've the web service's WSDL for connection parameters.

      I know other people asked about WS in the past. I found a discussion talking about Work Item (http://community.jboss.org/message/581911#581911]), but I don't know how to use them... Can someone tell me where can I find documentation about this issue or can someome explain me how to fix the problem?

       

      Thanks

        • 1. Re: Connection to Web Service
          ace_team

          Hi again.

          I'm trying to create a work item: it seems the only way to implement a web service connection (I still don't know how to do it!). As it's described in this post: http://community.jboss.org/thread/161306 , I've created a new jBPM Project and a new "META-INF" folder in "/usr/local/jBPM/jbpm-installer/workspace/WSCustomer/src/main/resource/"  ("/usr/local/jBPM/" is jBPM's installation folder, "WSCustomer" is jBPM project's name). Is this the right place?

           

          In this folder I've put 2 files:

          1. "MyWorkDefinition.conf" (MyWorkDefinition is my work item's name) that contains:

              

          import org.drools.process.core.datatype.impl.type.StringDataType;

           

          [

           

            [

              "name" : "Notification",

              "parameters" : [

                "Message" : new StringDataType(),

                "From" : new StringDataType(),

                "To" : new StringDataType(),

                "Priority" : new StringDataType(),

              ],

              "displayName" : "Notification",

              "icon" : "icons/notification.gif"

            ]

           

          ]

           

             2. "drools.rulebase.conf" that contains:

           

          drools.workDefinitions = MyWorkDefinitions.conf

           

          But as I try to load eclipse bpmn editor, it returns "Could not parse work definitions MyWorkDefinitions.conf:null" error.

           

          Can someone help me, please?!

           

          Thanks,

          Carlo

          • 2. Re: Connection to Web Service
            fabianpc

            The problem is the name of file. Try drools.workDefinitions = MyWorkDefinition.conf

            Greetings.

            • 3. Re: Connection to Web Service
              ace_team

              Thanks a lot fabian!

              It was a wrong name problem as you told. Before it started working, I had to refresh the project, despite I tryed to restart eclipse IDE! But now I have my "Notification" new work item. But now I've lost "log" and "Email" Service Task (those I had before I added the new one). I think it depends by "drools.rulebase.conf" file that declares only MyWorkDefinition.conf....

               

              Anyway, can someone tell me how to construct a web service connection work item (the remote WS wants a SOAP request through an https secure connection)?

              • 4. Re: Connection to Web Service
                fabianpc

                You could use http://axis.apache.org/axis/. You can see the samples: samples\misc\TestClient.java. This code should be implements into WorkItemHandler (see http://docs.jboss.org/jbpm/v5.1/userguide/ch13.html#d0e3599)

                 

                Good luck.