Hi Ian,

The service you're invoking has the following message definition:

<message name="logLineInput">
  <part name="outLine" type="xsd:string"/>
</message>

So you have a single part that has a xsd:string type. When you do a BPEL
assignment, you're already at the part level so you don't have anything to
do with the part itself, only its content. So your assignment should be:

    <assign>
      <copy>
       <from>
         <literal>initialized line</literal>
        </from>
      <to variable="logInMsg" part="outLine"/>
       </copy>
      </assign>

Can you give it a try this way? That being said it's entirely possible that
we would have a bug with simple typed parts in doc/lit, it's not a very
common use case (usually people use element parts). But I'd like you to try
with the correct assignment first and if that fails, then I'll create a Jira
issue for it.

Thanks,
Matthieu

On Tue, Jan 13, 2009 at 2:21 PM, <[email protected]> wrote:

>
>
> I have an existing web service operation that I want to invoke from a BPEL
> process.
> My process assigns a literal value to the input variable for the request
> message then invokes the operation.
> I am having trouble initializing the input variable for the invoke in a way
> that causes the right SOAP request to be sent to the service.
>
> The service name is simpleLogService.
> The operation is logLine.
> The binding for the operation specifies style="document", which may be a
> relevant factor. Or not.
>
>
> I tested the web service operation using soapUI.
> The request message (as generated by soapUI from the WSDL) looks like this:
>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>   <soapenv:Header/>
>   <soapenv:Body>
>      <outLine>an example log line </outLine>
>   </soapenv:Body>
> </soapenv:Envelope>
>
> The operation completes successfully, writing the expected string to a log
> file.
>
>
> I tried running the BPEL process.
>
> The assign looks like this:
>     <assign>
>       <copy>
>        <from>
>          <literal xmlns:sim="http://simpleLogService.examples/"; >
>              <sim:outLine>
>                 initialized line
>              </sim:outLine>
>           </literal>
>         </from>
>       <to variable="logInMsg" part="outLine"/>
>        </copy>
>       </assign>
>
>
> The invoke resulted in a fault when Tomcat tried to run the operation.
>
> Looking in the Tomcat log (stdout_*.log) I see the fault is:
> java.lang.ClassCastException: org.apache.axis.message.Text cannot be cast
> to org.apache.axis.message.SOAPBodyElement
>
> In the log, the SOAP request message sent by ODE looks like this:
>
> </soapenv:Header><soapenv:Body>
>                 initialized line
>              </soapenv:Body></soapenv:Envelope>
>
> This does not match the WSDL definition of the service.  It seems to be
> missing the <outline> </outline> tokens that were present in the literal.
> But at least the assign got executed.  The invoke was executed and did not
> complain about an improperly initialize input variable.
>
> I have attached a zip file, simpleBpelProcess_1.zip, containing the process
> and the Apache log.
>
> (See attached file: simpleBpelProcess_1.zip)
>
> As a second experiment, I tried modifying the assign to specify the empty
> namespace for <outLine> as follows:
>
>     <assign>
>       <copy>
>        <from>
>          <literal xmlns="" >
>              <outLine>
>                 initialized line
>              </outLine>
>           </literal>
>         </from>
>       <to variable="logInMsg" part="outLine"/>
>        </copy>
>       </assign>
>
> That resulted in an improperly initialized variable:
> ERROR - GeronimoLog.error(104) | org.apache.ode.bpel.common.FaultException:
> The variable logInMsg isn't properly initialized.
> From this, I guess that the empty namespace is definitely wrong.
>
>
>
> Can anybody help me understand what I'm doing wrong?
>
>
>
> Ian Griggs
> Integration Architect
> Applied Materials Canada Inc.
> AGS Manufacturing Automation Services
> [email protected] <<-- New mail address
> [email protected] <<-- personal mail address
> 647 288 5298  -- Direct dial number in office
> (416) 977-0599 x85298 -- office, note new extension
> (416) 465 9389 -- home
>
> The content of this message is Applied Materials Confidential.  If you are
> not the intended recipient and have received this message in error, any use
> or distribution is prohibited.  Please notify me immediately by reply
> e-mail and delete this message from your computer system.  Thank you.

Reply via email to