13 Replies Latest reply on Oct 12, 2006 12:04 PM by aguizar

    jbpm bpel problem with doc/lit format.

    powerpunch

      wrote a simple bpel code:

      <?xml version="1.0" encoding="UTF-8"?>
      <process name="review" targetNamespace="urn:author"
      xmlns:urn="urn:author"
      xmlns:rev="urn:reviewer"
      xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://schemas.xmlsoap.org/ws/2003/03/business-process/
      http://schemas.xmlsoap.org/ws/2003/03/business-process/"
      xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">



      <!-- realizes the abstract relationship with the caller -->


      <!-- realizes the relationship with the reviewer1 -->





      <!-- holds the incoming message -->


      <!-- holds the outgoing message -->





      <!-- receive a message carrying the name of a person -->





















      <!-- reply with a message carrying the greeting -->







      the corresponding wsdl is as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <definitions targetNamespace="urn:author"
      xmlns:urn="urn:author"
      xmlns:rev="urn:reviewer"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">



      <!-- characterizes the relationship between the process and its caller -->
      <plt:partnerLinkType name="callerPLT">
      <plt:role name="service">
      <plt:portType name="urn:callerPT"/>
      </plt:role>
      </plt:partnerLinkType>

      <plt:partnerLinkType name="reviewPLT">
      <plt:role name="review">
      <plt:portType name="rev:Reviewer"/>
      </plt:role>
      </plt:partnerLinkType>

      <!-- describes the interface presented to callers-->









      the rev.wsdl of the external web service used is as follows:

      <?xml version="1.0" encoding="UTF-8"?>

      <wsdl:definitions targetNamespace="urn:reviewer"
      xmlns:apachesoap="http://xml.apache.org/xml-soap"
      xmlns:impl="urn:reviewer"
      xmlns:intf="urn:reviewer"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">

      <wsdl:types>
      <xsd:schema elementFormDefault="qualified" targetNamespace="urn:reviewer">
      <xsd:element name="reviewRequest">
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="name" type="xsd:string"/>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="reviewResponse">
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="value" type="xsd:int"/>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:schema>
      </wsdl:types>

      <wsdl:message name="reviewResponse">
      <wsdl:part name="output" element="impl:reviewResponse"/>
      </wsdl:message>
      <wsdl:message name="reviewRequest">
      <wsdl:part name="in0" element="impl:reviewRequest"/>
      </wsdl:message>

      <wsdl:portType name="Reviewer">
      <wsdl:operation name="reviewRequest" parameterOrder="in0">
      <wsdl:input message="impl:reviewRequest" name="reviewRequest"/>
      <wsdl:output message="impl:reviewResponse" name="reviewResponse"/>
      </wsdl:operation>
      </wsdl:portType>

      <wsdl:binding name="reviewerSoapBinding" type="impl:Reviewer">
      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="reviewRequest">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="reviewRequest">
      <wsdlsoap:body use="literal"/>
      <!--encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:reviewer" -->
      </wsdl:input>
      <wsdl:output name="reviewResponse">
      <wsdlsoap:body use="literal"/>
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>

      <wsdl:service name="ReviewerService">
      <wsdl:port binding="impl:reviewerSoapBinding" name="reviewer">
      <wsdlsoap:address location="http://localhost:8080/reviewer/reviewer"/>
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>


      in the "binding.xml" generated after generate-artifacts, the style has been changed to document/literal. the web-service involved also supports doc/lit format.

      the bpel process gets deployed. using wsdl2Java, the client is generated. i get the following error:

      2006-08-21 12:05:32,093 ERROR [org.jboss.webservice.handler.HandlerChainBaseImpl] RuntimeException in request handler
      java.lang.NullPointerException
      at org.jbpm.bpel.service.provider.PortProvider.getRequestParts(PortProvider.java:363)
      at org.jbpm.bpel.service.provider.PortProvider.sendRequest(PortProvider.java:316)
      at org.jbpm.bpel.service.provider.PortProvider.handleRequest(PortProvider.java:202)
      at org.jboss.webservice.handler.HandlerWrapper.handleRequest(HandlerWrapper.java:106)
      at org.jboss.webservice.handler.HandlerChainBaseImpl.handleRequest(HandlerChainBaseImpl.java:216)
      at org.jboss.webservice.handler.ServerHandlerChain.handleRequest(ServerHandlerChain.java:52)
      at org.jboss.webservice.server.InvokerProviderJSE.invokeTarget(InvokerProviderJSE.java:74)
      at org.jboss.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:121)
      at org.jboss.axis.providers.java.JavaProvider.invoke(JavaProvider.java:358)
      at org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
      at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
      at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
      at org.jboss.axis.handlers.soap.SOAPService.invoke(SOAPService.java:560)
      at org.jboss.webservice.server.ServerEngine.invokeInternal(ServerEngine.java:200)
      at org.jboss.webservice.server.ServerEngine.invoke(ServerEngine.java:89)
      at org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:911)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)


      can somebody please help out with this problem??

        • 1. Re: jbpm bpel problem with doc/lit format.
          powerpunch

          <?xml version="1.0" encoding="UTF-8"?>
          <process name="review" targetNamespace="urn:author"
          xmlns:urn="urn:author"
          xmlns:rev="urn:reviewer"
          xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://schemas.xmlsoap.org/ws/2003/03/business-process/
          http://schemas.xmlsoap.org/ws/2003/03/business-process/"
          xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">



          <!-- realizes the abstract relationship with the caller -->


          <!-- realizes the relationship with the reviewer1 -->





          <!-- holds the incoming message -->


          <!-- holds the outgoing message -->





          <!-- receive a message carrying the name of a person -->





















          <!-- reply with a message carrying the greeting -->




          • 2. Re: jbpm bpel problem with doc/lit format.
            aguizar

            jBPM BPEL is currently able to consume doc/lit endpoints but not publish them. A future release will address this task. See BPEL-144.

            • 3. Re: jbpm bpel problem with doc/lit format.
              powerpunch

              Hi alex,

              thnks for the info. I require to publish the bpel service in doc/literal form.
              while looking into the code of portprovider.java i found tht it gets the request parts assuping the rpc/lit format. whr can we change this so tht it supports the doc/lit format.

              • 4. Re: jbpm bpel problem with doc/lit format.
                aguizar

                I can apply a quick fix to the server code so that it detects and reads document-style SOAP envelopes, if you don't mind changing the generated service WSDL yourself. This could be part of beta 2.

                BPEL-144 is about taking the published WSDL document into account, as does the code for . It also includes changes to the WSDL generation tool. All of this has to wait until beta 3, tough.

                • 5. Re: jbpm bpel problem with doc/lit format.
                  aguizar

                   

                  as does the code for .

                  I forgot I can't write tags at all. I meant, the code for the invoke activity.

                  • 6. Re: jbpm bpel problem with doc/lit format.
                    powerpunch

                    thnks alex, so u mean... as of now...whn i invoke my bpel process, the imput variables must ne in the rpc/lit form...but the bpel process might call other web services which are in the doc/lit format rite??

                    i have the jbpm-bpel beta1 edition...thr have been no later editions rite?

                    thnks for the info :)

                    • 7. Re: jbpm bpel problem with doc/lit format.
                      powerpunch

                      one more thing alex...i get the following error while generating bpel service through ant generate-service...ne clues on this??

                      Buildfile: build.xml

                      pack-definition:

                      generate-service:
                      [servicegen] Aug 22, 2006 11:25:03 PM org.jbpm.JbpmConfiguration getInstance
                      [servicegen] INFO: using jbpm configuration resource 'jbpm.cfg.xml'

                      BUILD FAILED
                      C:\jbpm-bpel-1.1-beta1\doc\examples\process.template.xml:135: org.jbpm.jpdl.JpdlException: [[ERROR] no processdefinition.xml inside process archive]

                      • 8. Re: jbpm bpel problem with doc/lit format.
                        aguizar

                        Two clues:
                        a) read the manual
                        b) search the forum (terms: bpel processdefinition.xml)

                        :-)

                        Not enough?
                        Alright... see BPEL-deployment

                        • 9. Re: jbpm bpel problem with doc/lit format.
                          powerpunch

                          Hi alex,
                          when can we expect beta2 ??
                          ....nd am still working on the above problem. :)

                          • 10. Re: jbpm bpel problem with doc/lit format.
                            powerpunch

                            Alex,
                            i chked again..the jdplException is gone. i get the foll error!

                            C:\jbpm-bpel-1.1-beta1\doc\examples\hello>ant generate-service
                            Buildfile: build.xml

                            pack-definition:

                            generate-service:
                            [servicegen] Aug 23, 2006 12:38:49 PM org.jbpm.JbpmConfiguration getInstance
                            [servicegen] INFO: using jbpm configuration resource 'jbpm.cfg.xml'
                            [servicegen] Aug 23, 2006 12:38:50 PM org.jbpm.bpel.xml.DefaultProblemHandler add
                            [servicegen] SEVERE: META-INF/bpel-definition.xml could not read wsdl document
                            [servicegen] WSDLException: faultCode=CONFIGURATION_ERROR: Problem instantiating factory implementation.: org.jbpm.bpel.wsdl.xml.WsdlFactoryImpl: java.lang.Cl
                            sNotFoundException: org.jbpm.bpel.wsdl.xml.WsdlFactoryImpl
                            [servicegen] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
                            [servicegen] at java.security.AccessController.doPrivileged(Native Method)
                            [servicegen] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                            [servicegen] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
                            [servicegen] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
                            [servicegen] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
                            [servicegen] at java.lang.Class.forName0(Native Method)
                            [servicegen] at java.lang.Class.forName(Class.java:164)
                            [servicegen] at javax.wsdl.factory.WSDLFactory.newInstance(Unknown Source)
                            [servicegen] at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
                            [servicegen] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
                            [servicegen] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
                            [servicegen] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
                            [servicegen] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
                            [servicegen] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
                            [servicegen] at org.jbpm.bpel.xml.BpelReader.readWsdlDocument(BpelReader.java:358)
                            [servicegen] at org.jbpm.bpel.par.DefDescriptorArchiveParser.readDocuments(DefDescriptorArchiveParser.java:72)
                            [servicegen] at org.jbpm.bpel.par.DefDescriptorArchiveParser.readFromArchive(DefDescriptorArchiveParser.java:43)
                            [servicegen] at org.jbpm.jpdl.par.ProcessArchive.parseProcessDefinition(ProcessArchive.java:81)
                            [servicegen] at org.jbpm.bpel.ant.ServiceGeneratorTask.execute(ServiceGeneratorTask.java:28)
                            [servicegen] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
                            [servicegen] at org.apache.tools.ant.Task.perform(Task.java:364)
                            [servicegen] at org.apache.tools.ant.Target.execute(Target.java:341)
                            [servicegen] at org.apache.tools.ant.Target.performTasks(Target.java:369)
                            [servicegen] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
                            [servicegen] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
                            [servicegen] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
                            [servicegen] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
                            [servicegen] at org.apache.tools.ant.Main.runBuild(Main.java:668)
                            [servicegen] at org.apache.tools.ant.Main.startAnt(Main.java:187)
                            [servicegen] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
                            [servicegen] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

                            [servicegen] at javax.wsdl.factory.WSDLFactory.newInstance(Unknown Source)
                            [servicegen] at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
                            [servicegen] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
                            [servicegen] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
                            [servicegen] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
                            [servicegen] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
                            [servicegen] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
                            [servicegen] at org.jbpm.bpel.xml.BpelReader.readWsdlDocument(BpelReader.java:358)
                            [servicegen] at org.jbpm.bpel.par.DefDescriptorArchiveParser.readDocuments(DefDescriptorArchiveParser.java:72)
                            [servicegen] at org.jbpm.bpel.par.DefDescriptorArchiveParser.readFromArchive(DefDescriptorArchiveParser.java:43)
                            [servicegen] at org.jbpm.jpdl.par.ProcessArchive.parseProcessDefinition(ProcessArchive.java:81)
                            [servicegen] at org.jbpm.bpel.ant.ServiceGeneratorTask.execute(ServiceGeneratorTask.java:28)
                            [servicegen] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
                            [servicegen] at org.apache.tools.ant.Task.perform(Task.java:364)
                            [servicegen] at org.apache.tools.ant.Target.execute(Target.java:341)
                            [servicegen] at org.apache.tools.ant.Target.performTasks(Target.java:369)
                            [servicegen] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
                            [servicegen] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
                            [servicegen] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
                            [servicegen] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
                            [servicegen] at org.apache.tools.ant.Main.runBuild(Main.java:668)
                            [servicegen] at org.apache.tools.ant.Main.startAnt(Main.java:187)
                            [servicegen] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
                            [servicegen] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

                            BUILD FAILED
                            C:\jbpm-bpel-1.1-beta1\doc\examples\process.template.xml:134: org.jbpm.jpdl.JpdlException: [[ERROR] META-INF/bpel-definition.xml could not read wsdl document]


                            Please Help!! the prob is only with my machine...the same thing works well on the other machines!!
                            thnks.

                            • 11. Re: jbpm bpel problem with doc/lit format.
                              aguizar

                              I've seen similar exceptions when hot-redeploying jbpm-bpel.sar. Clearly a bug, but I have to investigate. This would explain that it works on other machines if you don't redeploy the .sar there.

                              Note that the above issue does not affect the ability to redeploy .wars for individual processes, which is what you want to do most the times.

                              • 12. Re: jbpm bpel problem with doc/lit format.
                                vedavati

                                Did you find the solution to this problem? I am running into the same exception when I run ant generate-service in the Hello example in BPEL beta2 version

                                • 13. Re: jbpm bpel problem with doc/lit format.
                                  aguizar

                                  On a second thought, my comment above does not apply to the generate-service task because it runs at the client side.

                                  vedavati, can you describe the steps you followed to encounter the exception? Apparently, this problem affects only a reduced number of execution environments, so please mention your operating system, jboss version, ant version and jwsdp version (if any). Let's try to find what the problem is.