8 Replies Latest reply: Jun 11, 2009 2:51 AM by 21205 RSS

    hello world mystery

    jcfff
      I followed the soa11g_installation_tp4.pdf document and successfully installed the preview.
      then i made a very simple "hello world" BPEL process and hit "run" on the "composite.xml" as instructed in the documentation.
      i could then also get to the test page on localhost:8988/SOAConsole and did a couple of calls.
      they worked but here comes the puzzle

      in my "hello world" process, i take the value from the "input" element on the default generated request schema and assign it to the "result" element of the default generated response schema;
      but what i am getting from the test runs is that the input value gets concatenated to a "hello" literal then assigned to the "result";
      for example,
      if i set "input" on the test page as "foo", i would expect to see the response having "foo" in its "result" element but instead
      i am seeing "hello foo" in the "result" element.

      can someone from oracle shed some light on this?
      thanks.
        • 1. Re: hello world mystery
          21205
          In your assignment on SOAHelloProcess.bpel you use an assignment which has an expression like
          concat ('Hello ', bpws:getVariableData('inputVariable','payload','/client:SOAHelloProcessProcessRequest/client:input'))
          and this concatenation is assigned to the output variable...

          Your input "foo" gets "Hello " concatenated in front of it, so the endresult is "Hello foo"
          • 2. Re: hello world mystery
            jcfff
            hi Alex,
            I didn't add such code in the BPEL process.
            What i did is a simple "assign", from "input" to the "result" element, as following:
            <assign name="Assign_1">
            <copy>
            <from variable="inputVariable" part="payload"
            query="/client:HelloWorldBPProcessRequest/client:input"/>
            <to variable="outputVariable" part="payload"
            query="/client:HelloWorldBPProcessResponse/client:result"/>
            </copy>
            </assign>


            I think there is something funny going on here in the preview;
            after i deployed this and went to the Flow-debug --> Debug View
            it shows something different
            <assign name="Assign_1" id="BpAss0">
            -<copy>
            <from expression="concat("Hello ", bpws:getVariableData('inputVariable','payload','/client:HelloWorldProcessRequest/client:input'))"/>
            <to variable="outputVariable" part="payload" query="/client:HelloWorldProcessResponse/client:result"/>
            </copy>
            </assign>
            which explains why the result has got "Hello " prefixed.
            but i swear i didn't do this ...
            • 3. Re: hello world mystery
              21205
              sounds weird....

              Did you include the "Hello concat" first, as in follow the tutorial and adjusted the code later on to try something different?
              In that case you need to remove the older deployment or just run the latest deployment...



              (I just got started with this whole "SOA" thing...)
              • 4. Re: hello world mystery
                jcfff
                no, i didn't follow the tutorial ... i simply assigned the value.
                • 5. Re: hello world mystery
                  21205
                  I just reinstalled everything on my machine... and noticed there was a HelloWorld! created by default

                  This one is additional to the one I created following the tutorial, which was named SOAHelloComposite - same as in the tutorial...

                  What do you see when you go: http://localhost:8988/soa-infra/
                  • 6. Re: hello world mystery
                    jcfff
                    that's what i have suspected what's happening ...
                    i saw 2 "hello world" processes listed in the BPEL console, but the thing is no matter which one i perform testing on, the instances are always having "Hello " prefix, it's as if my process gets overridden by the default sample.
                    • 7. Re: hello world mystery
                      706262
                      The reason you are getting the prefix hello as its being concatenated on the from assign
                      concat('Hello',bpws:getVariableData('inputVariable','payload','/client:process/client:input')), if you want to get rid of this just remove concat function and assign input to the result.
                      Regards,
                      Sadique
                      • 8. Re: hello world mystery
                        21205
                        very strange... I think I'm running out of ideas, sorry...

                        well, at least it's a friendly "hello"... could be a lot worse ;)