web services - Error 411 on bpel -


i'm trying call service temperature , pass result service convery fahrenheit degrees celsius exception when execute service.

<!-- temperatura bpel process [generated eclipse bpel designer] --> <!-- date: tue may 12 10:40:32 cest 2015 --> <bpel:process name="temperatura"          targetnamespace="http://ws.temperatura.tps"          suppressjoinfailure="yes"          xmlns:tns="http://ws.temperatura.tps"          xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"          xmlns:ns="http://ws.cdyne.com/weatherws/" xmlns:ns0="http://www.w3schools.com/webservices/">      <!-- import client wsdl -->     <bpel:import namespace="http://www.w3schools.com/webservices/" location="tempconvert.wsdl" importtype="http://schemas.xmlsoap.org/wsdl/"></bpel:import>     <bpel:import namespace="http://ws.cdyne.com/weatherws/" location="weathersoap.wsdl" importtype="http://schemas.xmlsoap.org/wsdl/"></bpel:import>     <bpel:import location="temperaturaartifacts.wsdl" namespace="http://ws.temperatura.tps"              importtype="http://schemas.xmlsoap.org/wsdl/" />      <!-- ================================================================= -->              <!-- partnerlinks                                                      -->     <!-- list of services participating in bpel process               -->     <!-- ================================================================= -->              <bpel:partnerlinks>         <!-- 'client' role represents requester of service. -->         <bpel:partnerlink name="client"                      partnerlinktype="tns:temperatura"                      myrole="temperaturaprovider"                      />         <bpel:partnerlink name="weatherpl" partnerlinktype="tns:weatherplt" partnerrole="weatherrole"></bpel:partnerlink>         <bpel:partnerlink name="converterpl" partnerlinktype="tns:converterplt" partnerrole="converterrole"></bpel:partnerlink>     </bpel:partnerlinks>      <!-- ================================================================= -->              <!-- variables                                                         -->     <!-- list of messages , xml documents used within bpel process  -->     <!-- ================================================================= -->              <bpel:variables>         <!-- reference message passed input during initiation -->         <bpel:variable name="input"                   messagetype="tns:temperaturarequestmessage"/>          <!--            reference message returned requester           -->         <bpel:variable name="output"                   messagetype="tns:temperaturaresponsemessage"/>         <bpel:variable name="weatherplresponse" messagetype="ns:getcityweatherbyzipsoapout"></bpel:variable>         <bpel:variable name="weatherplrequest" messagetype="ns:getcityweatherbyzipsoapin"></bpel:variable>         <bpel:variable name="converterplresponse" messagetype="ns0:fahrenheittocelsiussoapout"></bpel:variable>         <bpel:variable name="converterplrequest" messagetype="ns0:fahrenheittocelsiussoapin"></bpel:variable>     </bpel:variables>      <!-- ================================================================= -->              <!-- orchestration logic                                               -->     <!-- set of activities coordinating flow of messages across    -->     <!-- services integrated within business process                  -->     <!-- ================================================================= -->              <bpel:sequence name="main">          <!-- receive input requester.               note: maps operation defined in temperatura.wsdl               -->         <bpel:receive name="receiveinput" partnerlink="client"                  porttype="tns:temperatura"                  operation="process" variable="input"                  createinstance="yes"/>          <!-- generate reply synchronous request -->         <bpel:assign validate="no" name="assigninput">               <bpel:copy>                 <bpel:from><bpel:literal><tns:getcityweatherbyzip xmlns:tns="http://ws.cdyne.com/weatherws/" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance">   <tns:zip>tns:zip</tns:zip> </tns:getcityweatherbyzip> </bpel:literal></bpel:from>                 <bpel:to variable="weatherplrequest" part="parameters"></bpel:to>             </bpel:copy>             <bpel:copy>                 <bpel:from part="payload" variable="input">                     <bpel:query querylanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![cdata[tns:zipcode]]></bpel:query>                 </bpel:from>                 <bpel:to part="parameters" variable="weatherplrequest">                     <bpel:query querylanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![cdata[ns:zip]]></bpel:query>                 </bpel:to>             </bpel:copy>         </bpel:assign>         <bpel:invoke name="invokeweather" partnerlink="weatherpl" operation="getcityweatherbyzip" porttype="ns:weathersoap" inputvariable="weatherplrequest" outputvariable="weatherplresponse"></bpel:invoke>         <bpel:assign validate="no" name="assigntemp">               <bpel:copy>                 <bpel:from><bpel:literal><tns:fahrenheittocelsius xmlns:tns="http://www.w3schools.com/webservices/" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance">   <tns:fahrenheit>tns:fahrenheit</tns:fahrenheit> </tns:fahrenheittocelsius> </bpel:literal></bpel:from>                 <bpel:to variable="converterplrequest" part="parameters"></bpel:to>             </bpel:copy>             <bpel:copy>                 <bpel:from part="parameters" variable="weatherplresponse">                     <bpel:query querylanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![cdata[ns:getcityweatherbyzipresult/ns:temperature]]></bpel:query>                 </bpel:from>                 <bpel:to part="parameters" variable="converterplrequest">                     <bpel:query querylanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![cdata[ns0:fahrenheit]]></bpel:query>                 </bpel:to>             </bpel:copy>         </bpel:assign>         <bpel:invoke name="invoketemp" partnerlink="converterpl" operation="fahrenheittocelsius" porttype="ns0:tempconvertsoap" inputvariable="converterplrequest" outputvariable="converterplresponse"></bpel:invoke>         <bpel:assign validate="no" name="assignouput">             <bpel:copy>                 <bpel:from><bpel:literal><tns:temperaturaresponse xmlns:tns="http://ws.temperatura.tps" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance">   <tns:temp>tns:temp</tns:temp> </tns:temperaturaresponse> </bpel:literal></bpel:from>                 <bpel:to variable="output" part="payload"></bpel:to>             </bpel:copy>             <bpel:copy>                 <bpel:from part="parameters" variable="converterplresponse">                     <bpel:query querylanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![cdata[ns0:fahrenheittocelsiusresult]]></bpel:query>                 </bpel:from>                 <bpel:to part="payload" variable="output">                     <bpel:query querylanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![cdata[tns:temp]]></bpel:query>                 </bpel:to>             </bpel:copy>         </bpel:assign>         <bpel:reply name="replyoutput"                 partnerlink="client"                porttype="tns:temperatura"                operation="process"                 variable="output"                />     </bpel:sequence> </bpel:process> 

and when execute service exception

<?xml version="1.0" encoding="utf-8"?> <message><parameters><getcityweatherbyzipresponse xmlns="http://ws.cdyne.com/weatherws/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"><getcityweatherbyzipresult xmlns="http://ws.cdyne.com/weatherws/"><success xmlns="http://ws.cdyne.com/weatherws/">true</success><responsetext xmlns="http://ws.cdyne.com/weatherws/">city found</responsetext><state xmlns="http://ws.cdyne.com/weatherws/">ny</state><city xmlns="http://ws.cdyne.com/weatherws/">new york</city><weatherstationcity xmlns="http://ws.cdyne.com/weatherws/">white plains</weatherstationcity><weatherid xmlns="http://ws.cdyne.com/weatherws/">15</weatherid><description xmlns="http://ws.cdyne.com/weatherws/">n/a</description><temperature xmlns="http://ws.cdyne.com/weatherws/">63</temperature><relativehumidity xmlns="http://ws.cdyne.com/weatherws/">87</relativehumidity><wind xmlns="http://ws.cdyne.com/weatherws/">e7</wind><pressure xmlns="http://ws.cdyne.com/weatherws/">29.97s</pressure><visibility xmlns="http://ws.cdyne.com/weatherws/"/><windchill xmlns="http://ws.cdyne.com/weatherws/"/><remarks xmlns="http://ws.cdyne.com/weatherws/"/></getcityweatherbyzipresult></getcityweatherbyzipresponse></parameters></message> 11:15:44,686 error [externalservice] error sending message (mex={partnerrolemex#hqejbhcnphraa13wrt34ru [pid {http://ws.temperatura.tps}temperatura-178] calling org.apache.ode.bpel.epr.wsaendpoint@4d15bb4f.fahrenheittocelsius(...) status async}): transport error: 411 error: length required org.apache.axis2.axisfault: transport error: 411 error: length required     @ org.apache.axis2.transport.http.httpsender.handleresponse(httpsender.java:298)     @ org.apache.axis2.transport.http.httpsender.sendviapost(httpsender.java:192)     @ org.apache.axis2.transport.http.httpsender.send(httpsender.java:77)     @ org.apache.axis2.transport.http.commonshttptransportsender.writemessagewithcommons(commonshttptransportsender.java:327)     @ org.apache.axis2.transport.http.commonshttptransportsender.invoke(commonshttptransportsender.java:206)     @ org.apache.axis2.engine.axisengine.send(axisengine.java:396)     @ org.apache.axis2.description.outinaxisoperationclient.send(outinaxisoperation.java:374)     @ org.apache.axis2.description.outinaxisoperationclient.executeimpl(outinaxisoperation.java:211)     @ org.apache.axis2.client.operationclient.execute(operationclient.java:163)     @ org.apache.ode.axis2.soapexternalservice$1$1.call(soapexternalservice.java:206)     @ java.util.concurrent.futuretask.run(futuretask.java:262)     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615)     @ java.lang.thread.run(thread.java:745) 

the service expecting content length header.

add following property:


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -