10 Replies Latest reply on Jul 7, 2006 6:45 AM by ncapito

    BPEL String/XML  Problem

    ncapito

      I have a process that is passing around an xml string. However i have come to a problem. If i try to call into my processing using a string like "...." as a parameter it crashes. I have been messing with it for a while and a normal string "MyXml..." will work fine. Any help? I am going to attach the crash below....

      The statement in the process that crashes is:

      
       <assign>
       <copy>
       <from variable="request" part="msg" />
       <to variable="serviceRequest"
       part="String_1" />
       </copy>
       </assign>


      Request is just a type with a string.

      15:35:18,906 ERROR [StartListener] could not deliver request
      org.jbpm.graph.def.DelegationException
      at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)

      at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)

      at org.jbpm.bpel.def.BpelDefinition.startProcessInstance(BpelDefinition.
      java:58)
      at org.jbpm.bpel.service.messager.StartListener.onMessage(StartListener.
      java:120)
      at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:707)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jbpm.graph.def.DelegationException
      at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)

      at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)

      at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)

      at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)

      at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
      at org.jbpm.graph.def.Transition.take(Transition.java:92)
      at org.jbpm.graph.def.Node.leave(Node.java:349)
      at org.jbpm.bpel.def.Activity.leave(Activity.java:149)
      at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter
      .java:42)
      at org.jbpm.bpel.def.Receive.accept(Receive.java:67)
      at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter
      .java:81)
      at org.jbpm.bpel.def.Sequence.accept(Sequence.java:84)
      at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter
      .java:28)
      at org.jbpm.bpel.def.BpelDefinition.startProcessInstance(BpelDefinition.
      java:55)
      ... 3 more
      Caused by: org.jbpm.graph.def.DelegationException
      at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)

      at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)

      at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)

      at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)

      at org.jbpm.bpel.def.Activity.enter(Activity.java:89)
      at org.jbpm.graph.def.Transition.take(Transition.java:92)
      at org.jbpm.graph.def.Node.leave(Node.java:349)
      at org.jbpm.bpel.def.Activity.leave(Activity.java:149)
      at org.jbpm.bpel.def.Assign.execute(Assign.java:36)
      at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
      ... 12 more
      Caused by: java.lang.RuntimeException: no wsdl fault matches the contents of the
      soap detail element: org.jboss.axis.message.SOAPElementAxisImpl@1d71519[[detail
      : null]]
      at org.jbpm.bpel.service.soap.PortCaller.readFault(PortCaller.java:455)
      at org.jbpm.bpel.service.soap.PortCaller.call(PortCaller.java:96)
      at org.jbpm.bpel.service.messager.MessagerSession.invoke(MessagerSession
      .java:140)
      at org.jbpm.bpel.service.def.Invoker.invoke(Invoker.java:80)
      at org.jbpm.bpel.def.Invoke.execute(Invoke.java:27)
      at org.jbpm.bpel.def.Activity.enter(Activity.java:84)
      ... 17 more


        • 1. Re: BPEL String/XML  Problem
          aguizar

           

          If i try to call into my processing using a string like "...." as a parameter it crashes [...A] normal string "MyXml..." will work fine.

          It is not clear to me what kind of strings cause the problem. Is it, literally, one that contains a dot sequence? Please clarify.

          • 2. Re: BPEL String/XML  Problem
            ncapito

            I fixed the problem. However this is what was happening:


            I was sending an xml document as a string for example:

            "<TestDOC>
            <Element>Data</Elemenr>
            <ETC>...</ETC>
            </TestDOC>"

            and it wad crashing.... i fixed the problem by encoding the string.


            It was crashing when it saw the < at the beggining of the string. If i remove the < at the beginning of the string it would run fine....


            My guess is that it is literally inserting the string into the script and crashing....


            Let me know if you want any other information.



            • 3. Re: BPEL String/XML  Problem
              ncapito

               

              Is it, literally, one that contains a dot sequence? Please clarify.


              I jsut realized that i used ... in my example again..... I am using ... in the sense of etc. It is just an XML message.

              • 4. Re: BPEL String/XML  Problem
                aguizar

                Oh, I get what you mean now. Your string contains markup and the engine does not escape the delimiters. The BPEL spec does not require that delimiters be escaped when sending messages over the wire. That is the responsibility of the process designer.

                From your stack trace, I guess the target service received ill-formed XML and sent an undefined fault back, as indicated by the innermost exception:

                Caused by: java.lang.RuntimeException: no wsdl fault matches the contents of the soap detail element


                • 5. Re: BPEL String/XML  Problem
                  ncapito

                  I do not know if i fully follow. My xml message is correct. I am able to get stuff out of the message as long as i send it over encoded (My encoding takes and removes the < > and some other chars). Once i am inside the process i copy the variable and pass it to a web service. The service then decodes and reads the message.



                  The crash was happening inside of the process after the receive. I was trying to copy the received variable containing XML message variable into another variable to pass it to my web service.


                  Does that make any sense?

                  • 6. Re: BPEL String/XML  Problem
                    mecrash

                    Hi i have a problem, have a web service that returns a xml on a strin, when i want to get the xml on a aplication whit a string it gives me a java.lang.outofmemory.error
                    y have fixet once this problem by using a string objet insted on a strin variable but now it donst work

                    Help!!!!!!!!!!!!!!!!!

                    • 7. Re: BPEL String/XML  Problem
                      aguizar

                      Please create a new topic for unrelated questions. When you do, provide as much detail as you can: product versions, environment and the full exception stack trace. The effort you put in your question is proportional to the effort we put in the answer.

                      • 8. Re: BPEL String/XML  Problem
                        ncapito

                        Random post aside. Do you have any response to my post? Is the fact that you can not use "XMLStrings" as string variables in a process definition a problem?

                        • 9. Re: BPEL String/XML  Problem
                          aguizar

                          Again, the BPEL specification does not mandate a runtime escapes text content embedded in outgoing messages. I encourage you to file a feature request if you consider this feature valuable, but you should not rely on it if you care about the portability of your BPEL documents.

                          • 10. Re: BPEL String/XML  Problem
                            ncapito

                            Thanks for the reply Alex. I do care about portability issues so I will not reqquest a feature. I do appoligize I did not see you previous post about the spec.


                            Nick