ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Goldhammer <Goldhammer.J...@gmx.net>
Subject Re: Problems with ODE 1.1 Release
Date Tue, 11 Sep 2007 15:55:09 GMT

Hello developers of ODE,

We have the same problems as desribed in this thread.
We develop a process with Apache Ode and integrate some own developed
webservices, functional topic does not matter.

One own developed webservice has a operation "logRun" and its defined in a
wsdl file.

<wsdl:operation name="logRun">
			<wsdl:input message="tns:logRunRequest"></wsdl:input>
			<wsdl:output message="tns:logRunResponse"></wsdl:output>
			<wsdl:fault name="fault" message="tns:logFaultException">
			</wsdl:fault>
		</wsdl:operation>

The message logRunRequest is defined as:

	<wsdl:message name="logRunRequest">
		<wsdl:part name="request" element="types:LogRunRequestVO">
		</wsdl:part>
	</wsdl:message>

The element LogRunRequestVO is defined in a file complexTypes.xsd.

    <xsd:element name="LogRunRequestVO">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="types:emptyparam"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

The referenced typed emptyparam itself is defined in another xsd-file
simpleTypes.xsd.

 <xsd:element name="emptyparam" type="xsd:boolean">
        <xsd:annotation>
            <xsd:documentation>
		a dummy boolean for methods with no input parameter
	   </xsd:documentation>
        </xsd:annotation>
    </xsd:element>

The xsd files are valid and WSDL file is valid against ws-i.

Now, to the bpel process itself.
We defined some variables, e.g. to make a service call

<bpws:variable messageType="ns1:logRunRequest" name="LogRunRequestVO"/>

If we want to set the value of the property of LogRunRequestVO, we have to
copy the xml structure in it before. After that, we can set the
emptyparam-property to true. Without this initialisation we cannot set the
property (selectionFailure). The problem is now that we have to do that for
all service invokes. I didn´t complain about the effort, but more about the
failures which can be produced with this. It takes too long to find out the
right definition for each initialisation.

<bpws:assign name="initVariable" validate="no">
            <bpws:copy>
                <bpws:from>
                    <bpws:literal>
                        <types:logRunRequest
xmlns:types="http://cis.log.interface.de.ibm.com/types">
                            <xsd:emptyparam
xmlns:xsd="http://cis.de.ibm.com/simpleTypes"/>
                        </types:logRunRequest>
                    </bpws:literal>
                </bpws:from>
                <bpws:to
                   
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"><![CDATA[$LogRunRequestVO.request]]></bpws:to>
            </bpws:copy>
            <bpws:copy>
                <bpws:from
                   
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"><![CDATA[true()]]></bpws:from>
                <bpws:to
                   
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"><![CDATA[$LogRunRequestVO.request/xsd:emptyparam]]></bpws:to>
            </bpws:copy>
        </bpws:assign>

Isn´t it possible that ODE makes this initialisation? I saw in the old
processes which we have made with activeBpel contain this function ... and
it worked very well.
Can you change the behaviour of ODE in this case?

Thanks in advance for your response.
Regards,
Jens Goldhammer




RichTaylor wrote:
> 
> To clarify, the first sentence should have read "the input variable is
> being
> initialized _unnecessarily_, effectively being set to an empty string."  I
> meant to say that the input message is correctly populated with data from
> your incoming message, but you're accidentally wiping it out by
> initializing
> the input variable.  - Rich
> 
> 
> On 8/31/07, Rich Taylor <bhamtaylor@gmail.com> wrote:
>>
>> In the process you attached, the "input" variable is being initialized,
>> effectively being set to an empty string.  It is then referenced, but
>> it's
>> already been wiped out, hence the blank response.   Remove the first two
>> "copy" operations from your "assign" activity and it should be closer to
>> working.
>>
>> In your process, the input variable is populated/initialized by the
>> "receive" activity in the beginning of the process, with the data
>> "sdfgsdfg", from the incoming message.  It's only the output variable
>> that
>> _you_ need to initialize, since it is an empty xml document.
>>
>> If you're looking for a minimal echo bpel process, I have attached one
>> below.   The process below was created with the Eclipse BPEL Designer and
>> is
>> very similar, just a simpler way to accomplish what you're after.
>>
>> If you notice, I didn't have to initialize the output variable.  It may
>> not have been clear from earlier emails, but you only have to initialize
>> vars if you're going to copy a value into a section of a message that is
>> deeper than the node you're specifying with "message" and "part".   I
>> realize that explanation may or may not help.  I would say review the
>> "Assign" section of the BPEL spec[1].  I had to read it several times and
>> admit that I still get it all.
>>
>> Let us know if it still doesn't work.
>>
>> Peace, Rich
>>
>> [1]
>> http://docs.oasis-open.org/wsbpel/2.0/OS/wsbpel-v2.0-OS.html#_Toc164738498
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <bpws:process exitOnStandardFault="yes" name="Test4"
>>     suppressJoinFailure="yes"
>>     targetNamespace="urn:test"
>>     xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
>> xmlns:tns="urn:test">
>>     <bpws:import importType=" http://schemas.xmlsoap.org/wsdl/"
>>         location="Test4.wsdl" namespace="urn:test"/>
>>     <bpws:partnerLinks>
>>         <bpws:partnerLink myRole="Test4Provider" name="client"
>> partnerLinkType="tns:Test4"/>
>>     </bpws:partnerLinks>
>>     <bpws:variables>
>>         <bpws:variable messageType="tns:Test4RequestMessage"
>> name="input"/>
>>         <bpws:variable messageType="tns:Test4ResponseMessage"
>> name="output"/>
>>     </bpws:variables>
>>     <bpws:sequence name="main">
>>         <bpws:receive createInstance="yes" name="receiveInput"
>>             operation="process" partnerLink="client"
>>             portType="tns:Test4" variable="input"/>
>>         <bpws:assign name="Assign" validate="no">
>>             <bpws:copy>
>>                 <bpws:from part="payload" variable="input"/>
>>                 <bpws:to part="payload" variable="output"/>
>>             </bpws:copy>
>>         </bpws:assign>
>>         <bpws:reply name="replyOutput" operation="process"
>>             partnerLink="client" portType="tns:Test4" variable="output"/>
>>     </bpws:sequence>
>> </bpws:process>
>>
>>
>> On 8/31/07, Greg Bluntzer <gbluntzer@gmail.com> wrote:
>> >
>> >
>> > Ok it doesnt fail anymore but it doesnt copy the value over either what
>> > am i
>> > doing wrong.
>> >
>> > I was assuming that I need to initialize the output variable as well.
>> >
>> > ####WSDL#####
>> > <?xml version=" 1.0"?>
>> > <definitions name="Test4"
>> >         targetNamespace="http://Test4"
>> >         xmlns:tns="http://Test4"
>> >         xmlns:plnk=" http://docs.oasis-open.org/wsbpel/2.0/plnktype"
>> >         xmlns="http://schemas.xmlsoap.org/wsdl/"
>> >         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
>> >
>> > <!--
>> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> >      TYPE DEFINITION - List of types participating in this BPEL process
>> >      The BPEL Designer will generate default request and response types
>> >      but you can define or import any XML Schema type and use them as
>> > part
>> >      of the message types.
>> >
>> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> > -->
>> >     <types>
>> >         <schema attributeFormDefault="unqualified"
>> > elementFormDefault="qualified"
>> >                 targetNamespace="http://Test4 "
>> >                 xmlns="http://www.w3.org/2001/XMLSchema">
>> >
>> >             <element name="Test4Request">
>> >                 <complexType>
>> >                     <sequence>
>> >                         <element name="input" type="string"/>
>> >                     </sequence>
>> >                 </complexType>
>> >             </element>
>> >
>> >             <element name="Test4Response">
>> >                 <complexType>
>> >                     <sequence>
>> >                         <element name="result" type="string"/>
>> >                     </sequence>
>> >                 </complexType>
>> >             </element>
>> >         </schema>
>> >     </types>
>> >
>> >
>> > <!--
>> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> >      MESSAGE TYPE DEFINITION - Definition of the message types used as
>> >      part of the port type defintions
>> >
>> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> > -->
>> >     <message name="Test4RequestMessage">
>> >         <part name="payload" element="tns:Test4Request"/>
>> >     </message>
>> >     <message name="Test4ResponseMessage">
>> >         <part name="payload" element="tns:Test4Response"/>
>> >     </message>
>> >
>> > <!--
>> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> >      PORT TYPE DEFINITION - A port type groups a set of operations into
>> >      a logical service unit.
>> >
>> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> > -->
>> >
>> >     <!-- portType implemented by the Test4 BPEL process -->
>> >     <portType name="Test4">
>> >         <operation name="process">
>> >             <input  message="tns:Test4RequestMessage" />
>> >             <output message="tns:Test4ResponseMessage"/>
>> >         </operation>
>> >     </portType>
>> >
>> >
>> > <!--
>> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> >      PARTNER LINK TYPE DEFINITION
>> >
>> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> > -->
>> >     <plnk:partnerLinkType name="Test4">
>> >         <plnk:role name="Test4Provider" portType="tns:Test4"/>
>> >     </plnk:partnerLinkType>
>> >
>> >     <binding name="Test4SOAPBinding" type="tns:Test4">
>> >         <soap:binding style="document"
>> >                 transport=" http://schemas.xmlsoap.org/soap/http" />
>> >         <operation name="process">
>> >                 <soap:operation soapAction="http://Test4/process" />
>> >                 <input>
>> >                         <soap:body use="literal" />
>> >                 </input>
>> >                 <output>
>> >                         <soap:body use="literal" />
>> >                 </output>
>> >         </operation>
>> >     </binding>
>> >     <service name="Test4Service">
>> >         <port name="Test4Port" binding="tns:Test4SOAPBinding">
>> >                 <soap:address
>> > location="http://localhost:8080/ode/processes/Test4"></soap:address>
>> >         </port>
>> >     </service>
>> > </definitions>
>> >
>> >
>> >
>> >
>> > ####BPEL####
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> > <bpws:process exitOnStandardFault="yes" name="Test4"
>> >     suppressJoinFailure="yes" targetNamespace=" http://Test4"
>> >    
>> xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable
>> > "
>> > xmlns:tns=" http://Test4">
>> >     <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
>> >         location="Test4.wsdl" namespace=" http://Test4"/>
>> >     <bpws:partnerLinks>
>> >         <bpws:partnerLink myRole="Test4Provider" name="client"
>> > partnerLinkType="tns:Test4"/>
>> >     </bpws:partnerLinks>
>> >     <bpws:variables>
>> >         <bpws:variable messageType="tns:Test4RequestMessage"
>> > name="input"/>
>> >         <bpws:variable messageType="tns:Test4ResponseMessage"
>> > name="output"/>
>> >     </bpws:variables>
>> >     <bpws:sequence name="main">
>> >         <bpws:receive createInstance="yes" name="receiveInput"
>> >             operation="process" partnerLink="client"
>> >             portType="tns:Test4" variable="input"/>
>> >         <bpws:assign name="Assign" validate="no">
>> >             <bpws:copy keepSrcElementName="yes">
>> >                 <bpws:from>
>> >                     <bpws:literal>
>> >                         <Test4Request xmlns="http://Test4">
>> >                             <input/>
>> >                         </Test4Request>
>> >                     </bpws:literal>
>> >                 </bpws:from>
>> >                 <bpws:to part="payload" variable="input"/>
>> >             </bpws:copy>
>> >             <bpws:copy>
>> >                 <bpws:from part="payload" variable="input">
>> >                     <bpws:query
>> > queryLanguage="urn:oasis:names:tc:wsbpel: 2.0:sublang:xpath1.0
>> > "><![CDATA[/tns:input]]></bpws:query>
>> >                 </bpws:from>
>> >                 <bpws:to><![CDATA[$input.payload/tns:input]]></bpws:to>
>> >             </bpws:copy>
>> >             <bpws:copy keepSrcElementName="yes">
>> >                 <bpws:from>
>> >                     <bpws:literal>
>> >                         <Test4Response xmlns=" http://Test4">
>> >                             <result/>
>> >                         </Test4Response>
>> >                     </bpws:literal>
>> >                 </bpws:from>
>> >                 <bpws:to part="payload" variable="output"/>
>> >             </bpws:copy>
>> >             <bpws:copy>
>> >                 <bpws:from part="payload" variable="input">
>> >                     <bpws:query
>> > queryLanguage="urn:oasis:names:tc:wsbpel: 2.0:sublang:xpath1.0
>> > "><![CDATA[/tns:input]]></bpws:query>
>> >                 </bpws:from>
>> >
>> >                
>> <bpws:to><![CDATA[$output.payload/tns:result]]></bpws:to>
>> >             </bpws:copy>
>> >         </bpws:assign>
>> >         <bpws:reply name="replyOutput" operation="process"
>> >             partnerLink="client" portType="tns:Test4"
>> > variable="output"/>
>> >     </bpws:sequence>
>> > </bpws:process>
>> >
>> > #### DEPLOY ####
>> > <deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
>> >         xmlns:pns=" http://Test4"
>> >         xmlns:wns="http://Test4">
>> >
>> >
>> >         <process name="pns:Test4">
>> >                 <active>true</active>
>> >                 <provide partnerLink="client">
>> >                         <service name="wns:Test4Service"
>> > port="Test4Port"/>
>> >                 </provide>
>> >         </process>
>> > </deploy>
>> >
>> > ####  SOAP  ####
>> > <soapenv:Envelope xmlns:soapenv="
>> > http://schemas.xmlsoap.org/soap/envelope/"
>> > xmlns:tes=" http://Test4">
>> >    <soapenv:Header/>
>> >    <soapenv:Body>
>> >       <tes:Test4Request>
>> >          <tes:input>sdfgsdfg</tes:input>
>> >       </tes:Test4Request>
>> >    </soapenv:Body>
>> > </soapenv:Envelope>
>> >
>> > #### SOAP RESPONSE ####
>> > <soapenv:Envelope xmlns:soapenv="
>> > http://schemas.xmlsoap.org/soap/envelope/">
>> >    <soapenv:Body>
>> >       <axis2ns1:Test4Response xmlns:axis2ns1="http://Test4"
>> > xmlns="http://Test4">
>> >          <result/>
>> >       </axis2ns1:Test4Response>
>> >    </soapenv:Body>
>> > </soapenv:Envelope>
>> >
>> >
>> > RichTaylor wrote:
>> > >
>> > > Hi Greg, this threw me off for a while as well.  Basically before you
>> > > assign
>> > > a value into an xml document (a variable in this case), it, as an xml
>> > > document must exist.  The simplest way to do this in your case would
>> > be to
>> > > add another "copy" operation in your assign, right before your
>> current
>> > one
>> > > (can be in the same assign activity).   In the eclipse editor, select
>> > > "Fixed
>> > > Value", then type a raw XML document that conforms to your schema
>> type
>> > > tns:Test4ResponseMessage.
>> > > I don't see that aspect of your WSDL so I can't give you an exact
>> > example.
>> > > But it would look something like the  following in your BPEL (note,
>> > the
>> > > Eclipse designer add the "literal" element for you).  Notice the
>> _two_
>> > > "copy" operations, the first one is the one you're missing.   Let me
>> > know
>> > > if
>> > > this isn't clear.
>> > >
>> > > <bpws:assign>
>> > >             <bpws:copy>
>> > >                 <bpws:from>
>> > >                     <literal>
>> > >                         <GetQuotes xmlns="
>> http://swanandmokashi.com">
>> > >                             <QuoteTicker/>
>> > >                         </GetQuotes>
>> > >                     </literal>
>> > >                 </bpws:from>
>> > >                 <bpws:to variable="quoteInput" part="parameters"/>
>> > >             </bpws:copy>
>> > >             <bpws:copy>
>> > >
>> > > <bpws:from><![CDATA[$input.payload/tns:input]]></bpws:from>
>> > >
>> > >
>> > <bpws:to><![CDATA[$quoteInput.parameters/quote:QuoteTicker]]></bpws:to>
>> > >             </bpws:copy>
>> > >         </bpws:assign>
>> > >
>> > >
>> > > Cheers, Rich Taylor
>> > >
>> > > On 8/31/07, Greg Bluntzer <gbluntzer@gmail.com> wrote:
>> > >>
>> > >>
>> > >> Alex thanks for your help but im still stuck.
>> > >>
>> > >> Can anyone point me to a good example of initializing variables or
>> > tell
>> > >> me
>> > >> what to do.  I looked through the other post and being new, don't
>> > really
>> > >> understand Alex's answer.  Im using document style binding and am
>> > just
>> > >> trying to copy the input variable to the output variable.
>> > >>
>> > >>
>> > >> Eclipse BPEL has the following choices on Initializing Variables
>> > >> Variable
>> > >> Expression
>> > >> Fixed Value
>> > >> Property of Variable
>> > >> Partner Link Reference
>> > >> End Point Reference
>> > >> Opaque
>> > >>
>> > >> or am i supposed to use another assign?
>> > >>
>> > >> My WSDL, BPEL, DEPLOY, SOAP call are on previous post
>> > >>
>> > >>
>> > >> Thanks, Greg
>> > >>
>> > >>
>> > >>
>> > >> Alex Boisvert wrote:
>> > >> >
>> > >> > In your case, the "output" variable (payload part) needs to be
>> > >> initialized
>> > >> > with a literal element <tns:result> to satisfy the <to>
>> expression.
>> > >> >
>> > >> > alex
>> > >> >
>> > >> >
>> > >> > On 8/30/07, Alex Boisvert < boisvert@intalio.com> wrote:
>> > >> >>
>> > >> >> Hi Greg,
>> > >> >>
>> > >> >> See the (new) FAQ:  *My process fails with a selectionFailure;
>> > What
>> > >> can
>> > >> I
>> > >> >> do?*<
>> > >>
>> http://cwiki.apache.org/confluence/display/ODExSITE/Frequently+Asked+Questions
>> >
>> > >> >
>> > >> >>
>> > >> >> I just added it since similar questions were asked recently.
>> > >> >>
>> > >> >> alex
>> > >> >>
>> > >> >>
>> > >> >> On 8/30/07, Greg Bluntzer < gbluntzer@gmail.com> wrote:
>> > >> >> >
>> > >> >> >
>> > >> >> > Thanks for your help now it deploys. But now i have a
different
>> > >> issue.
>> > >> >> I
>> > >> >> > changed rpc to document as you suggested.
>> > >> >> > Now im getting a new error when i access the webservice.
Im
>> > using
>> > >> >> SoapUI
>> > >> >> > to
>> > >> >> > create my SOAP Test
>> > >> >> >
>> > >> >> > Again Thanks for any help
>> > >> >> >
>> > >> >> > #####ERROR######
>> > >> >> > ERROR - GeronimoLog.error(108) | Error processing response
for
>> > MEX
>> > >> >> > {MyRoleMex#hqejbhcnphr2jrxh4xvf4x
>> > >> >> > [Client hqejbhcnphr2jrxh4xvf4w] calling
>> > >> >> > {Test4}Test4Service.process(...)}
>> > >> >> > org.apache.axis2.AxisFault:
>> > >> >> >
>> > >> >> {
>> > >>
>> http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailu
>> >
>> >
>> <http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailu>
>> > <
>> > >>
>> >
>> http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailu
>> > >
>> > >> >> > re No results for expression: {OXPath10Expression /tns:result}
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >
>> > >> >
>> > >>
>> > >> --
>> > >> View this message in context:
>> > >>
>> >
>> http://www.nabble.com/Problems-with-ODE-1.1-Release-tf4355659.html#a12427799
>> > >> Sent from the Apache Ode User mailing list archive at Nabble.com.
>> > >>
>> > >>
>> > >
>> > >
>> >
>> > --
>> > View this message in context:
>> >
>> http://www.nabble.com/Problems-with-ODE-1.1-Release-tf4355659.html#a12433273
>> > Sent from the Apache Ode User mailing list archive at Nabble.com.
>> >
>> >
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Problems-with-ODE-1.1-Release-tf4355659.html#a12617935
Sent from the Apache Ode User mailing list archive at Nabble.com.


Mime
View raw message