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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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> > >> >> > 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. > >
