Couldnot initialize bpel variable.
Hi,
I have created a bpel based on a wsdl that is in MDS. The wsdl has call back interface also. I have some other services running fine based on the same wsdl.
But I am getting 'Could not initialize bpel variable : inputVariable' when i compile my project. Kindly help me in this.
Thanks,
Sri
Try the suggestions mentioned in the thread:
Could not initialize variable. An error occurs while initializing BPEL .
Thans,
Navaneeth
Similar Messages
-
How to display a BPEL variable using Java Embedding
Hi, hope someone can help, I'm sure this is something very simple but for the life of me can't seem to find it through the tutorials including the Dev guide.
Question
=======
How can I display user defined and BPEL variables in the process activity "Java Embedding" ?
ex: System.out.println(bpws:getVariableData("myDatabaseParameterVariable")
This example doesn't work but this is basically what I am trying to achieve.
I would appreciate any help with this.
RookieActually that's all the code I have.... System.out.println(myDatabaseArg);
myDatabaseArg is a simple parameter defined in the database adapter configuration wizard which is used as a criteria to retrieve data.
Just before I invoke the Read I use the Java Embedding to display the content of the parameter. -
BPEL Variables in to Transform activity (XSL)
Hi,
I need to access a BPEL variable from within a Transform activity (XSL).
I need an output like this:
<XML>
<val1>1</val1>
<val2>2</val2>
<val3>3</val3>
<val4>4</val4>
</XML>
Val1 and val2 is reachable from the xsd in the Transform activity (source variable). A DB-adapter is used to provide these data.
Val3 and val4 is present in the BPEL, within BPEL variables.
I have created a Transform activity with source = result of DP-adapter (val1 + val2), but will then need to get val3 + val4 (BPEL vars) from inside the Transform activity as well.
How can I do this ?
I have tried passing the variables in as parameters, but can't get this to work. I either only get the parameters, or only get the values from the DB-adapter, as it seems I only can have 1 source.
Similar thread, but with no answer:
Global Variables in to XSLThank you for answering.
The link you're referring to is the thing that I mentioned that I couldn't get to work.
Works fine when just passing parameters, but when I already have a source (like my DB-adapter output), and want the parameters as well, it's getting tricky. Seems there can only be 1 source: Parameters or DB-adapter output.
What I need is values from a source (DB-adapter output) + be able to send BPEL variables to the same Transform activity (XSL).
Have you tried this ? Is it at all possible ? -
How to set values to bpel variables from Java
I have a java class to create files and populate some contents into it. On success it returnes "File Created"
I used the following code to achieve it :-
WriteFiles objWriteFiles=new WriteFiles();
String para=((oracle.xml.parser.v2.XMLElement)getVariableData("inputVariable","payload","/client:FileTestProcessRequest/client:HO_ORG_ID")).getFirstChild().getNodeValue();
String result=objWriteFiles.writeHeaderInfo(para);
(writeHeaderInfo is a method in my java class)
addAuditTrailEntry(result);
I works fine..Now I want to assign this reult value to a bpel variable .. I tried doin it like below:-
setVariableData("outputVariable","payload","/client:FileTestProcessResponse/client:result" , result)
but its not working...I get a fault ...
Can anyone help me out...
Thanks,
Githa.R.SIn this example :
<!-- Invoke the EmployeeStatus Java class instead of web service -->
<bpelx:exec name="invokeJavaExec" language="java" version="1.4">
<![CDATA[
EmployeeStatus e = new EmployeeStatus();
String firstName = ((Element)getVariableData(
"EmployeeTravelStatusRequest", "employee",
"/employee/FirstName")).getNodeValue();
String lastName = ((Element)getVariableData(
"EmployeeTravelStatusRequest", "employee",
"/employee/LastName")).getNodeValue();
String empStatus = e.getTravelStatus(firstName, lastName);
addAuditTrailEntry("Employee status is: " + empStatus);
setVariableData("EmployeeTravelStatusResponse", "travelClass",
"/travelClass", empStatus);
]]>
</bpelx:exec>they dont use namespaces in the xpath-expression, can you try that ? -
Accessing BPEL Variables in XSLT
Hi All,
In a BPEL PM process I need to be able to access a global BPEL process variable in the XSL transformation. When I use any functions in the "Transform" activity I do not see the BPEL variables in scope. Any idea on how can this can be done ?
Regards,
Venkatesh.This causes a problem with the XSL Mapper. If I try to add an XPath-expression component to use this function I get the Warning message :-
"Function of name "bpws:getVariableData" not found."
If I continue, the following XSL segment is generated :-
<tns:comment>
<xsl:value-of select="bpws:getVariableData(?,?,?)"/>
</tns:comment>
This compiles ok, but when I run the business process, I get the following error from the transformation component :-
XPath expression failed to execute. Error while processing xpath expression, the expression is "ora:processXSLT("transformDimToRAN.xsl", bpws:getVariableData("invokeDimensionGateway_getFutOptTradesSelect_lastProcessedTradeRef_OutputVariable", "FutOptTradesCollection"))", the reason is Extension function http://schemas.xmlsoap.org/ws/2003/03/business-process/ : getVariableData is unknown. Please verify the xpath query. -
HOW-TO initialize class variable
How can an annotation initialize a class variable? For example, JEE5 has an annotation called @EJB that initializes a class variable with a remote or local interface:
@Stateless class Foo
@EJB bar;
bar.scoobyDoobyDoo(); // I can use bar seemingly before it was initialized!
In general terms, how can annotation be used to initialize class variables?It can't.
What it can do is tell something else that this needs to be done, and that something else can do it.
That something else might be an annotation processor running at build / compile time, which might generate some code to do it, or might generate some configuration file that causes it to be done later.
That something else might alternatively be a runtime artifact, that can look at the annotation and carry out the requested operation. For example a container could do it.
So an annotation cannot do anything, including initailizing a class variable, but it can declare that the class variable needs to be initialized in some way.
Bruce -
Accessing BPEL variables in XSL
Hi,
Did anyone have success accessing BPEL variables in XSL? If so can
you please let me know how you did it? I tried bpws:getVariableData
without much luck.
Any information will be of great help.
Thanks
RajI don't think that's really what XSL is for. It's really about taking a single XML document, and generating another XML document, based on the first.
If you want to pass in variables from BPEL, then write a complex type that contains the main XML document you need, plus all the other inputs you need.
As an example, I was doing some XSL work and needed to also supply it with a default date to set when nothing else was present.
My complex type would have been something like:
<complexType name="ProcessDataInputType">
<sequence>
<element name="defaultDate" type="date"/>
<element name="data" type="tns:MyDataType"/>
</sequence>
</complexType> -
How do we initialize DAL variables without making changes to INI files?
We have an application which currently use only two DALs. We would like to add a DAL to popluate certain data on the form. We have encountered an issue with initialization of dal vairables.
One of the solutionis that set FlushDalSymbo = Yes in the FSISYS file.
However, this involves INI file change which we would like to avoid.
So, is there a way to initialize dal variables, without making changes to INI files? If so, how?
Thanks,
BalaHi Bala,
Initializing a variable is simple, you just need to set the value to blank or zero:
Variable = ""
#Variable =0
$Variable = 0.00
You can place the declaration at the beginning of your script, of course replacing "Variable" with the actual name of you variable.
Gaétan -
Hi,
I'm trying to initialize a variable due to an error but I don't know how to do it.
I have the following code:
public class Multimedia
String titulo;
String autor;
int duracion;
Multimedia(String titulo, String autor, int duracion)
this.titulo=titulo;
this.autor=autor;
this.duracion=duracion;
}In class you have declared :
Multimedia[] listamultimedia=new Multimedia[20];And in for loop you are using:
listamultimedia=new Multimedia[20];First statement means : listamultimedia is an array of Multimedia with 20 elements.
Second statement means :*Each element of listamultimedia* is an array of 20 elements. That would mean listamultimedia is array of array i.e 2-dimensional array.
So you got the problem i guess. Its trivial to solve now.
Edited by: J2EE_Life on Apr 8, 2012 5:04 AM -
Hi,
I am having an issue with SAP adapter configuration. It throws below error in log files :
java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [no sapjcorfc in java.library.path]. java.library.path [opt/apps/Oracle/jdk160_14_R27.6.5-32/jre/lib/i386/client:/opt/apps/Oracle/jdk160_14_R27.6.5-32/jre/lib/i386:/opt/apps/Oracle/jdk160_14_R27.6.5-32/jre/../lib/i386:/opt/apps/Oracle/patch_wls1032/profiles/default/native:/opt/apps/Oracle/patch_jdev1111/profiles/default/native:/opt/apps/Oracle/jdk160_14_R27.6.5-32/jre/lib/i386/client:/opt/apps/Oracle/jdk160_14_R27.6.5-32/jre/lib/i386:/opt/apps/Oracle/jdk160_14_R27.6.5-32/jre/../lib/i386:/opt/apps/Oracle/patch_wls1032/profiles/default/native:/opt/apps/Oracle/patch_jdev1111/profiles/default/native:/opt/apps/Oracle/wlserver_10.3/server/native/linux/i686:/opt/apps/Oracle/wlserver_10.3/server/native/linux/i686/oci920_8:/opt/apps/Oracle/wlserver_10.3/server/native/linux/i686:/opt/apps/Oracle/wlserver_10.3/server/native/linux/i686/oci920_8:/opt/apps/Oracle/Oracle_SOA1/soa/thirdparty/edifecs/XEngine/bin:/opt/apps/Oracle/Oracle_SOA1/soa/thirdparty/edifecs/XEngine/bin]
java.lang.NoClassDefFoundError: Could not initialize class com.sap.mw.jco.JCO
Invoking SAP targets from bpel or iwafjca test servlet fails with "java.lang.NoClassDefFoundError: Could not initialize class com.sap.mw.jco.JCO."
I am able to connect from Application Explorer(AE) and browse through idocs and bapis. I tried to check the class loading pattern for AE using Jconsole :
1. Started the AE
2. /opt/apps/Oracle/jdk1.6.0_19/bin/jps
15279 BseFlashScreen
3. /opt/apps/Oracle/jdk1.6.0_19/bin/jconsole 15279
Enabled verbose output on class loading page and connected to SAP target from AE
4. The verbose output shows below :
Loaded com.sap.mw.jco.JCO from file:/opt/apps/Oracle/Oracle_SOA1/soa/thirdparty/ApplicationAdapters/lib/sapjco.jar
I have added the above path to my LD_LIBRARY_PATH
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${WL_HOME}/server/native/linux/${arch}:${MW_HOME}/Oracle_SOA1/soa/thirdparty/ApplicationAdapters/lib:${MW_HOME}/user_projects/domains/base_domain/lib:${WL_HOME}/server/native/linux/${arch}/oci920_8
I also added the path to WEBLOGIC_CLASSPATH in commEnv.sh file.
The sapjco.jar, libsapjcorfc.so and librfccm.so files are also available under below directories
WL_HOME/server/lib
MW_HOME/Oracle_SOA1/soa/thirdparty/ApplicationAdapters/lib
MW_HOME/user_projects/domains/base_domain/lib
Any suggestions will be really helpful.
Regards
SubhankarHi Manoj,
I have added the libsapjcorfc.so and librfccm.so files to below locations:
WL_HOME/server/lib
MW_HOME/Oracle_SOA1/soa/thirdparty/ApplicationAdapters/lib
MW_HOME/user_projects/domains/base_domain/lib
And also set the LD_LIBRARY_PATH and WEBLOGIC_CLASSPATH in commEnv.sh file.
Eg:
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${WL_HOME}/server/native/linux/${arch}:${MW_HOME}/Oracle_SOA1/soa/thirdparty/ApplicationAdapters/lib:${MW_HOME}/user_projects/domains/base_domain/lib:${WL_HOME}/server/native/linux/${arch}/oci920_8
Is there any other location where these need to be added ? I hope library path/system path refers to the WEBLOGIC_CLASSPATH ?
Regards
Subhankar -
How to put SOAP body in BPEL variable
Hi everybody,
I have a BPEL process which needs to pick up a SOAP-message from a queue, transform the body and send the result to a webservice.
The process is running deployed and picks up the soap message. In the receive action I see the SOAP message - envolope, header and body - as expected (shown below).
- <businessEventBody>
- <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="body">
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
- <SOAP-ENV:Header>
<wsa:To>
http://testhost/CCS/Service_Endpoint
</wsa:To>
- <wsa:From>
<wsa:Address>
http://localhost/CCS/Service_Endpoint
</wsa:Address>
- <wsa:Metadata>
- <device xmlns:hl7="urn:hl7-org:v3" xmlns="urn:hl7-org:v3">
<id root="1.3.6.1.4.1.25208.20.100.50" extension="CCSMESSAGING"/>
</device>
</wsa:Metadata>
</wsa:From>
<wsa:Action>
urn:hl7-org:v3:CCS_POCD_IN009010CS14
</wsa:Action>
<wsa:MessageID>
MSG_ID1208340800216
</wsa:MessageID>
</wsse:Security>
</SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <CCS_POCD_IN009010CS14 xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id xsi:type="II" root="1.3.6.1.4.1.25208.20.100.30" extension="com.scandihealth.ccs.NoteInformerCS14com.csc.hat.collaboration.Collaboration@127.0.0.1:1208340800190:0.9747211212965656"/>
<employerCCS_IdentifiedOrganization classCode="ORG" determinerCode="INSTANCE">
<id xsi:type="II" root="1.2.2.1" extension="18573" displayable="false"/>
<id xsi:type="II" root="1.3.6.1.4.1.25208.20.20" extension="5234102" displayable="false"/>
<code xsi:type="CE" code="ENTERPRISE" codeSystem="1.3.6.1.4.1.25208.20.10.20" codeSystemName="CcsOrgUnitType" displayName="Enterprise"/>
- <name xsi:type="EN" use="L">
<given>88</given></name>
- <name xsi:type="EN" use="AL">
<given>mnemo-88</given>
</name>
- <name xsi:type="EN" use="C">
<given>Enterprise 88</given>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</part>
</businessEventBody>
Now what I want to do is simply assign the body to a variable as a string (using a copy operation), however all I get is a few scattered excerpts from the body of the message (as shown here).
<javaInput>
http://testhost/CCS/Service_Endpoint
http://localhost/CCS/Service_Endpoint
urn:hl7-org:v3:CCS_POCD_IN009010CS14
MSG_ID1208340800216
88
mnemo-88
Enterprise 88
81.1
mnemo-81.1
Unit 81.1
88
mnemo-88
Enterprise 88
</javaInput>
My FormatMessageToGS.bpel file is as shown here:
<?xml version = "1.0" encoding = "UTF-8" ?>
<process name="FormatMessageToGS"
targetNamespace="http://xmlns.ccs.scandihealth.com/FormatMessageToGS"
xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:ns4="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
xmlns:ns7="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:bees="http://xmlns.oracle.com/pcbpel/adapter/jms/BusinessEventErrorService/"
xmlns:ns5="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
xmlns:ns6="http://com.scandihealth.ccs.webservices.messaging.common/CCSMessageServiceRemote.wsdl"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
xmlns:ns1="http://com.scandihealth.ccs.webservices.task.common/CCSBPELTaskServiceRemote.wsdl"
xmlns:ccstypes="http://ccs.scandihealth.com/workflow/types/"
xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://com.scandihealth.ccs.webservices.security.common/CCSSecurityServiceRemote.wsdl"
xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
xmlns:jms="http://xmlns.oracle.com/pcbpel/adapter/jms/"
xmlns:bes="http://xmlns.oracle.com/pcbpel/adapter/jms/BusinessEventService/">
<bpelx:exec import="javax.xml.transform.*"/>
<bpelx:exec import="javax.xml.transform.stream.*"/>
<bpelx:exec import="java.io.*"/>
<bpelx:exec import="java.util.*"/>
<!--
PARTNERLINKS
List of services participating in this BPEL process
-->
<partnerLinks>
<partnerLink name="BusinessEventService"
partnerLinkType="bes:Consume_Message_plt"
myRole="Consume_Message_role"/>
</partnerLinks>
<!--
VARIABLES
List of messages and XML documents used within this BPEL process
-->
<variables>
<variable name="businessEventBody" messageType="ccstypes:body_msg"/>
<variable name="businessEventInboundHeader"
messageType="jms:InboundHeader_msg"/>
<variable name="javaInput" type="xsd:string"/>
<variable name="javaOutput" type="xsd:string"/>
<variable name="FirstXSL" type="xsd:string"/>
<variable name="SecondXSL" type="xsd:string"/>
<variable name="SimplerXML" type="xsd:string"/>
<variable name="OutputToGS" type="xsd:string"/>
</variables>
<!--
ORCHESTRATION LOGIC
Set of activities coordinating the flow of messages across the
services integrated within this business process
-->
<sequence name="main">
<receive name="ReceiveBusinessEvent" partnerLink="BusinessEventService"
portType="bes:Consume_Message_ptt" operation="Consume_Message"
variable="businessEventBody" createInstance="yes"
bpelx:headerVariable="businessEventInboundHeader"/>
<!-- <throw faultName="deliberateFault" /> -->
<scope name="XSLT">
<sequence name="Sequence_1">
</scope>
</sequence>
</process>
And my types.wsdl is like this:
<definitions targetNamespace="http://ccs.scandihealth.com/workflow/types/"
xmlns:tns="http://ccs.scandihealth.com/workflow/types/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<schema targetNamespace="http://ccs.scandihealth.com/workflow/types/"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="stringElement" type="string"/>
<complexType name="ccsExceptionType">
<sequence>
<element name="faultString" type="string"/>
<element name="detail" type="string"/>
</sequence>
</complexType>
</schema>
</types>
<message name="body_msg">
<part name="body" element="tns:stringElement"/>
</message>
<message name="createTaskResponseMessage"/>
<message name="ccsExceptionMessage">
<part name="ccsException" type="tns:ccsExceptionType"/>
</message>
</definitions>
Does anybody have any idea as to what I am doing wrong, and more interesting how I can make it right?
Any help is truly appreciated.
Kind regards
AagaardHow did you define headerID?
You can also see an example here:
http://java.net/projects/oraclesoasuite11g/pages/BPEL
Arik -
Error in Passing BPEL variable Contents to BPEL Transform (XSLT)
Hi,
Problem Statement:
· I want to Transform data, from schema1 to schema2.
· Schema1 is basically a collection lets say collection of A. in XML terms, it has multiple same type of child elements under the root element.
· Schema2 associated with each child element of Schema1.
· In the Loop, I want to iterate through the schema1 data and iteration count would be as much as number of child elements in it.
· Pick one child element (using index in XPATH) and use it to associate with Schema2 elements.
· In this process I wanted to pass 2 parameters to BPEL Transform activity using properties datatype. (ref: http://blogs.oracle.com/rammenon/2007/05/07)
· However it is not realizing the parameters passed to it.
Please also suggest me a location to upload the related code for any verification.
Please suggest the flaw in this and suggestions to rectify.
Thanks
Regards
JoyExample counting nodes.
ora:countNodes('Invoke_FileSyncRead_SynchronousRead_OutputVariable','Root-Element','/ns1:Root-Element/ns1:SiteInfo')
Set that to Integer variable $count.
Then set new variable type integer $interator = 1.
That will give you a proper loop counter for your payload.
AS far as mapping only certain elements, I would just transform 1st, then pick out what you need with an explicit assign activity to whatever you want to pass that to.
Hope that helps. -
Significance of context param in web.xml to initialize any variable?servlet
I am writing a standalone web appplication for rss (xml) creation where i am having jsp servlets class etc.
Now to write rss.xml and read it back in application i have temporarily used c:\\rss.xml but to make it capable working in web application which can be uploaded in website i need to make it configurable i need to kep it in context param of web.xml and in init() method of servlet of my application what exactly i should do there.what i have tried is this :
public class Startup extends HttpServlet {
private static String rssFeed;
private ServletContext ctx;
Logger log = Logger.getLogger(Startup.class);
public void init(){
log.debug("Initializing APPLICATION CONTEXT Variables");
ctx = getServletContext();
rssFeed = (String)ctx.getInitParameter("RssFeed");
log.debug("Rss : " + rssFeed);
String rssFile = this.getServletContext().getRealPath("") + File.separator + "WEB-INF" + File.separator + "rss.properties";
Properties property = new Properties();
try{
InputStream propertiesFile = new FileInputStream(rssFile);
property.load(propertiesFile);
catch (IOException e) {
log.error("IOException during domainValuesList file Reading");
e.printStackTrace();
log.error("Exception while loading AllowedDomainValues file");
log.debug("Domain Values Lists Updated");
/** Get Host Name (Server Name) where application is hosted on
public static String getRssFeed(){
return rssFeed;
after that i called this startup servlet class in other servlet taken this getRssFeed()
stored it as string passed as parametr to other class where i need to call it but there i am getting null pointer exception which says not initialized.
even what i have written in web.xml is here:
<context-param>
<param-name>RssFeed</param-name>
<param-value>c:\\rsshandler.xml</param-value>
</context-param>
<servlet>
<servlet-name>Startup</servlet-name>
<servlet-class>src.Startup</servlet-class>
<init-param>
<param-name>RssFeedConfig</param-name>
<param-value>/WEB-INF/rss-config.xml</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>Startup</servlet-name>
<url-pattern>/Startup</url-pattern>
<load-on-startup>1</load-on-startup>
</servlet-mapping>
i tried what i know or understood but its not working.
one more thing i have doneis:created rss.properties files in web-inf
lines added are
rssfeed=c:\\rsshandler.xml
but even i am not getting this why
or what sholud i do here.
this thing needs to be configurablewhich we can change later easily.
any suggestions.
thanks
vijendraBen -
There can be init params for the servlet or for the servlet context. For the servlet, this looks like:
<servlet>
<servlet-name>InitServlet</servlet-name>
<servlet-class>package1.InitServlet</servlet-class>
<init-param>
<param-name>message</param-name>
<param-value>Hello From Initialization Parameter</param-value>
</init-param>
</servlet>
in the web.xml file, and is accessed using:
public void init(ServletConfig config) throws ServletException
super.init(config);
message = config.getInitParameter("message");
For a servlet context init param, you define it as you did using the web.xml settings editor:
<context-param>
<param-name>hello</param-name>
<param-value>hi</param-value>
</context-param>
This is accessed using:
public void init(ServletConfig config) throws ServletException
super.init(config);
message1 = config.getServletContext().getInitParameter("hello");
Hope this helps,
Lynn
Java Tools Team -
Hi all,I have a BPEL process which calls a Webservice,and at the end it transforms the output of the Webservice to the Output Variable in my BPEL process,but the thing is this process retuns elements with xsi:nil="true" and I get an error which says
*Could not initiate the BPEL process because the input xml is not well formed, the reason is :
Error parsing envelope: (4, 3679) Namespace prefix 'xsi' used but not declared. Please correct the input xml.*
I have verified the WSLD,.bpel file,the xsd..they all have xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Heres the code of the assign
<from xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
variable="Invoke_P_getlV_OutputVariable"
part="parameters"
query="/ns7:getCViewResponse/ns7:getCViewReturn"/>
<to xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
variable="outputVariable" part="payload"
query="/ns1:GetOfferResponse/ns1:getCVResponse/ns1:getCViewReturn"/>
Please temme how do I get this to wrk...I need to get this working immediatly..If you need to "clean" some xml from null values (empty tags) you can create an XSLT (like RemoveNullTags.xsl) with the following code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:apply-templates select="@*|node()"/>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:choose>
<xsl:when test="normalize-space(.)">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:when>
<xsl:when test="count(./*)">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
This xslt will remove all the empty tags on your XML. So after you create this and paste it on your project, you need to use it into an ASSIGN activity like this:
<assign name="Remove_Nulls">
<copy>
<from expression="ora:processXSLT('RemoveNullTags.xsl',bpws:getVariableData('inputVariable','payload'))"/>
<to variable="inputVariable" part="payload"
query="/ns2:writeCollectedDeleteElement"/>
</copy>
<copy>
<from expression="ora:processXSLT('RemoveNullTags.xsl',bpws:getVariableData('inputVariable','payload'))"/>
<to variable="inputVariable" part="payload"
query="/ns2:writeCollectedDeleteElement"/>
</copy>
</assign>
As you can see in this sample, i make 2 copy operations because i have xml arrays, so i need a copy operation for each child the xml element have.
HTH,
Andres -
BPEL variable access problem - ORABPEL-02118
Hi,
I have a method which accesses the variable of a BPEL process. It worked well with the Soa Suite 10.1.3.1, but I re-install the SOA Suite with the Advanced installation and applied the 10.1.3.3 patch and now I have this error message:
0 - ORABPEL-02118
Variant not found.
The variant "PatientRecordVariable" has not been declared in the current scope. All variants must be declared in the scope before being accessed.
Please check that the variant "PatientRecordVariable" is properly declared; otherwise there may be a misspelling in the name of the variant.
<2007-07-26 11:56:27,829> <ERROR> <default.collaxa.cube> <BaseCubeSessionBean::logError> Error while invoking bean "instance manager": [com.collaxa.cube.engine.EngineException: Variant not found.
The variant "PatientRecordVariable" has not been declared in the current scope. All variants must be declared in the scope before being accessed.
Please check that the variant "PatientRecordVariable" is properly declared; otherwise there may be a misspelling in the name of the variant.
ORABPEL-02118
Variant not found.
The variant "PatientRecordVariable" has not been declared in the current scope. All variants must be declared in the scope before being accessed.
Please check that the variant "PatientRecordVariable" is properly declared; otherwise there may be a misspelling in the name of the variant.
at com.collaxa.cube.engine.core.Scope.getVariantRV(Scope.java:522)
at com.collaxa.cube.engine.CubeEngine.getFieldValue(CubeEngine.java:2956)
at com.collaxa.cube.ejb.impl.InstanceManagerBean.getFieldValue(InstanceManagerBean.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at com.evermind.server.ThreadState.runAs(ThreadState.java:648)
at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
at InstanceManagerBean_RemoteProxy_4bin6i8.getFieldValue(Unknown Source)
at com.oracle.bpel.client.InstanceHandle.getField(InstanceHandle.java:229)
at webUI.GetTaskData.doGet(GetTaskData.java:50)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
My code does the following calls:
Locator locator = new Locator("default", "bpel");
WhereCondition where = new WhereCondition(SQLDefs.CI_cikey + " = ?");
where.setString(1, taskId);
IInstanceHandle[] instances = locator.listInstances( where );
IInstanceHandle instanceHandle = instances[0];
System.out.println(instanceHandle.getTitle());
HashMap inst = (HashMap)instanceHandle.getField("PatientRecordVariable");
XMLElement dataXML = (XMLElement)inst.get("payload");
String data = XMLHelper.printXML(dataXML);
The problem is at the "getField" method. I was wondering if somebody encountered this error and know how to solve it. I think it should also be possible to access the variable directly from the database (I'm using XE) but I don't know in which table to look.
Any help would be greatly appreciated. Thanks.
AmirWhen I display the debugTrace message for the process instance using
System.out.println(instanceHandle.getDebugTrace());
it gives me this:
<variant key="_$$process-start-time" type="long">1185481662531</variant>
<variant key="_$$++is-sync-operation" type="boolean">false</variant>
<variant key="++properties" id="1" ns1:type="ns2:HashMap">
</variant>
<variant key="_$$audit-trail-count" type="int">1</variant>
<variant key="_$$audit-detail-count" type="int">0</variant>
<variant key="_$$main-scope" id="2" xmlns:ns3="http://www.w3.org/2001/XMLSchema" ns1:type="ns3:string">BpPrc0.1</variant>
<variant key="_$$operation-name" id="3" xmlns:ns4="http://www.w3.org/2001/XMLSchema" ns1:type="ns4:string">initiate</variant>
<variant key="_$$variable-name" id="4" xmlns:ns5="http://www.w3.org/2001/XMLSchema" ns1:type="ns5:string">PatientRecordVariable</variant>
<variant key="_$$++wi-global-table" id="5" xmlns:ns6="com.collaxa.cube.engine.core" ns1:type="ns6:WorkItemLookupTable2">
<work-item ns1:type="ns2:WorkItem">
<key ns1:type="ns2:WorkItemKey">
<instance-id>70017</instance-id><node-id>BpRcv0</node-id><scope-id>BpSeq0.3</scope-id><count-id>1</count-id></key><state>closed.finalized</state></work-item><work-item ns1:type="ns2:WorkItem">
<key ns1:type="ns2:WorkItemKey">
<instance-id>70017</instance-id><node-id>BpAss1</node-id><scope-id>BpSeq0.3</scope-id><count-id>5</count-id></key><state>closed.finalized</state></work-item><work-item ns1:type="ns2:WorkItem">
<key ns1:type="ns2:WorkItemKey">
<instance-id>70017</instance-id><node-id>BpInv0</node-id><scope-id>BpSeq0.3</scope-id><count-id>4</count-id></key><state>closed.finalized</state></work-item><work-item ns1:type="ns2:WorkItem">
<key ns1:type="ns2:WorkItemKey">
<instance-id>70017</instance-id><node-id>BpInv1</node-id><scope-id>BpSeq0.3</scope-id><count-id>6</count-id></key><state>closed.finalized</state></work-item><work-item ns1:type="ns2:WorkItem">
<key ns1:type="ns2:WorkItemKey">
<instance-id>70017</instance-id><node-id>BpAss0</node-id><scope-id>BpSeq0.3</scope-id><count-id>2</count-id></key><state>closed.finalized</state></work-item><work-item ns1:type="ns2:WorkItem">
<key ns1:type="ns2:WorkItemKey">
<instance-id>70017</instance-id><node-id>BxExe1</node-id><scope-id>BpSeq0.3</scope-id><count-id>3</count-id></key><state>closed.finalized</state></work-item></variant>
<variant key="_$$audit-event-count" type="int">16</variant>
</scope><object-store></object-store></scope-context></cube-instance><work-items></work-items></debug-trace>
There is a variant element with the attribute key whose value is "_$$variable-name" and the element has the value "PatientRecordVariable". I don't know if this is related to my problem, but if it is, I still don't understant why it could not get the data of this variable.
Is there any way to get bpel processes' variable data from the database? I browsed the tables but I haven't found them. Hope somebody knows it.
Amir
Maybe you are looking for
-
How to set delivery plan per day in components requirements
hi As we know, the production order of finish goods includes started date and finished data such as Sep 1, and Sep 10. So, MRP calculate component requirement which includes delivery date such as Aug 28 (because of lead time). however, purchase peopl
-
Ciscoworks LMS 3.0 to Cisco Prime Infrastructure LMS 4.2
In order to complete the upgrade the LMS 3.x runs over a physical server that ends with the upgrade(server its gona be retired), the think is that the Cisco Prime comes with an UCS and its gona run over a VM. The question here is the "Cisco Prime Inf
-
Hello All, I have a file in application server, now I need to convert this file into IDOC format and save the records in SAP database. Can any one provide us the steps to do this. I would like to know how to create a port for file type to read the fl
-
Updated iPhoto '08 File menu is missing "Page Setup..." item
I assume this is an error (any other way to set landscape mode?) ... how do I fix it?
-
I have a iphone 3g s with ios 4.1. My institution has a wifi connection in which after connecting to the wifi network we have to login through a web page. The institution has two login pages, one for desktops and the other for mobiles. The problem is