XML variables wrapped in CDATA block
I have a process that is exposed as a web service, which I am calling from a form. I am using an XML process variable as an "out" parameter of my web service. When I get the value, it is wrapped in a CDATA block. As a result, it is not valid XML. I am calling the web service from a PDF form, and I would like to bind the XML to a subform, but I cannot because of this CDATA problem. Any ideas?
Thanks.
Jared Langdon
Hi Jared
We've always had difficulties doing what you're proposing.
Even if the data coming back from the web service is valid, we've never been able to bind an entire XML snippet to a sub-form.
You can validate this by writing a simple web service that returns a hard-coded string (containing xml data), and try binding that. If you do manage to do the binding, we'd really love to know how you achieve that in your form coding, so please post your experiences here.
What we usually do is rather than returning an entire xml packet, we return a number of discrete values, and bind each of those explicity to fields. Repeating fields are a bit more problematic, and for those we usually use comma-separated fields.
You can find a description of this pattern (not quite what you want, but should give you some ideas) at:
http://www.adobe.com/devnet/livecycle/articles/populating_dropdown_form_sqlplus.html
Howard
http://www.avoka.com
Similar Messages
-
Assigning a node value from an XML variable to a String type in Weblogic Process Integrator
Hi,
Is there any way to assign a node value from an XML variable to a String variable
in Weblogic Process Integrator...
Thanx.
Narendra.Nerendra
Are you talking about using Xpath on the XML document and assigning to a
variable, it is unclear what you are asking
Tony
"Narendra" <[email protected]> wrote in message
news:3bba1215$[email protected]..
>
Hi,
Is there any way to assign a node value from an XML variable to a Stringvariable
in Weblogic Process Integrator...
Thanx.
Narendra. -
Why can't Workbench handle a 2MB XML variable from invoke?
I have an SQL query that returns about 2.3 MB XML variable. That works fine but if I set that variable to be an output variable and invoke the process from Workbench I get an InvocationTargetException from org.apache.axis.message.SOAPFaultBuilder.createFault (see below). I'm running Workbench ES2 9.5 as a Java plugin in Eclipse Indigo (32-bit) on a Windows 7 64-bit system with 8 GB memory. The same problem occurs on a Windows XP SP3 system with 4GB memory.
There are no error messages in server.log at all, just the usual SqlHelper message displaying the SQL statement that was executed. This appears to be strictly a Workbench phenomenon. The server seems to be able to merge the data with a PDF just fine also.
Here's my eclipse.ini file settings:
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256M
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms512m
-Xmx1280m
Here is the stack trace from the invocation error:
ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error.
at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapAxisDispatcher.throwExceptionHandler(SoapAxisDispatcher.java:211)
at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapAxisDispatcher.doSend(SoapAxisDispatcher.java:129)
at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:66)
at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
at com.adobe.workbench.utils.invoke.InvokeWithProgressRunner.invokeServiceOperation(InvokeWithProgressRunner.java:230)
at com.adobe.workbench.utils.invoke.InvokeWithProgressRunner.run(InvokeWithProgressRunner.java:125)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapAxisDispatcher.doSend(SoapAxisDispatcher.java:127)
... 5 moreI don't quite follow what you are recommending but this is really a nuisance. We can record the process and the play back works just fine, all the way to the end. There's a post to this forum that only shows up on Google Groups that points to the Apache Axis SOAPFaultBuilder source code (the first line of the 'Caused by' stack trace). The only place I can find that class in my setup (32-bit Eclipse Indigo with LC Workbench plugin) is in eclipese\.metadata\.plugins\org.apache.axis_1.4.0.v201005080400\lib\axis.jar. So I'll replace that with a newer version and see what happens.
-
How to specify XML declaration in an XML Variable
I had posted this question in the Flex Builder discussion,
but I am not sure if that was the right board, so posting it again
here:
I need to set the XML declaration for my XML variable as
follows:
var employees:XML =
<?xml version="1.0" encoding="utf-8"?>
<employees>
<employee ssn="123-123-1234">
<name first="John" last="Doe"/>
<address>
<street>11 Main St.</street>
<city>San Francisco</city>
<state>CA</state>
<zip>98765</zip>
</address>
</employee>
<employee ssn="789-789-7890">
<name first="Mary" last="Roe"/>
<address>
<street>99 Broad St.</street>
<city>Newton</city>
<state>MA</state>
<zip>01234</zip>
</address>
</employee>
</employees>;
However, if I specify <?xml version="1.0"
encoding="utf-8"?>, I get a design time and compile error. If I
remove it it works fine. But the server to which I send this XML is
expecting the declaration. How can I set the declaration?
Any help or pointer is appreciated.I am not able to load the xml. Can anybody figure out the
problem :
I have used a LoadXML class :
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
// Demonstrates the code required to load external XML
public class LoadXML extends Sprite {
// The property that will eventually contain the loaded XML
private var novel:XML;
// The object used to load the XML
private var urlLoader:URLLoader;
// Constructor
public function LoadXML () {
// Specify the location of the external XML
var urlRequest:URLRequest = new URLRequest("novel.xml");
// Create an object that can load external text data
urlLoader = new URLLoader();
// Register to be notified when the XML finishes loading
urlLoader.addEventListener(Event.COMPLETE,
completeListener);
// Load the XML
urlLoader.load(urlRequest);
// Method invoked automatically when the XML finishes
loading
private function completeListener(e:Event):void {
// The string containing the loaded XML is stored in the
URLLoader
// object's data property (urlLoader.data). To create a new
XML
// instance from that loaded string, we pass it to the XML
constructor
novel = new XML(urlLoader.data);
trace(novel.toXMLString()); // Display the loaded XML, now
converted
// to an XML object
And in main.mxml :
myXml = new LoadXml ;
trace ( myXml.novel ) ;
The output is errenous -
How to specify the XML Declaration for an XML variable
I need to set the XML declaration for my XML variable as
follows:
var employees:XML =
<?xml version="1.0" encoding="utf-8"?>
<employees>
<employee ssn="123-123-1234">
<name first="John" last="Doe"/>
<address>
<street>11 Main St.</street>
<city>San Francisco</city>
<state>CA</state>
<zip>98765</zip>
</address>
</employee>
<employee ssn="789-789-7890">
<name first="Mary" last="Roe"/>
<address>
<street>99 Broad St.</street>
<city>Newton</city>
<state>MA</state>
<zip>01234</zip>
</address>
</employee>
</employees>;
However, if I specify <?xml version="1.0"
encoding="utf-8"?>, I get a design time and compile error. If I
remove it it works fine. But the server to which I send this XML is
expecting the declaration. Can somebody help me with this?
ThanksI work mostly with the Java versions of the parser so you'll have to make the translation to C++. As far as I know, you can't use the SAX API to access to the encoding.
You need to use the DOM along with Oracle's extension to the basic DOM functionality. Oracle's package, oracle.xml.parser.v2 defines a class which implements the Document interface called XMLDocument. This class has a method, getEncoding(), which returns the encoding. You would use the method in getDocument() in the Parser base class inherited by DOMParser to retrive the XMLDocument.
Jeff -
How to search for a particular element within a XML variable using studio?
All,
I am using studio 7.0 to develop a webbased application. In this, i need to access
an oracle db using a WLAI Application View from my Workflow. I get some data back
from Oracle as an XML variable and then apply an XPath statement to access the
individual columns returned.
My problem arises when there are no records in the db matching my criteria and
an empty XML variable is returned to me from the app view. In these cases my
XPath statement fails in studio causing an improper exit.
Does anybody know how to check for content in a XML varaible using studio? So
that if there is content i can proceed with XPath and if there is no content,
then i will take a different route.
Thanks in advance
Regards
SriIf I remember correctly, the adapter will return an XML document that contains
XML elements for each row. You can just simply check the count of these elements
with an XPath statement: ie. count(response/row)
"Sri " <[email protected]> wrote:
>
All,
I am using studio 7.0 to develop a webbased application. In this, i need
to access
an oracle db using a WLAI Application View from my Workflow. I get some
data back
from Oracle as an XML variable and then apply an XPath statement to access
the
individual columns returned.
My problem arises when there are no records in the db matching my criteria
and
an empty XML variable is returned to me from the app view. In these
cases my
XPath statement fails in studio causing an improper exit.
Does anybody know how to check for content in a XML varaible using studio?
So
that if there is content i can proceed with XPath and if there is no
content,
then i will take a different route.
Thanks in advance
Regards
Sri -
Changing data in XML variable and appending tags in XML document
Hi all,
I am new to weblogic Integrator . can any one help me concerning following problem
1. I get input XML message to my workflow which I stores in XML variable. after
some processing i want to change value of one tag in XML stored in XML variable.
How I can do thaat ?
2. I have some XML like
<root>
<child>
<a> </A>
</child>
<child>
</child>
</root>
and i want to append multiple such tag at run time . how i can do the same
in wli
Please let me know your suggestion
KiranFor both cases I suggest you use XSLT.
Mike
"Kiran" <[email protected]> wrote in message
news:3c720cd2$[email protected]..
>
Hi all,
I am new to weblogic Integrator . can any one help me concerning followingproblem
1. I get input XML message to my workflow which I stores in XML variable.after
some processing i want to change value of one tag in XML stored in XMLvariable.
How I can do thaat ?
2. I have some XML like
<root>
<child>
<a> </A>
</child>
<child>
</child>
</root>
and i want to append multiple such tag at run time . how i can do thesame
in wli
Please let me know your suggestion
Kiran -
DOCTYPE decleration in XML variable
Hi
I am using a local XML variable to build an XML document which I then use HTTP_Post to send to a partner company, and receive data back.
My problem is that the DOCTYPE decleration is being stripped from the XML Variable, so the partner company do not know what to do with the posted doc.
Is there any way I can prevent this being stripped out?
Thanks
Nick
PS The DOCTYPE decleration is also stripped if I use the XMLLoader action.Hi Nick,
I know this behaviour from MII 12.0. Unfortunalety there is no way to prevent this. What version do you use?
As a workaround you could try to add the DOCTYPE declarations after saving the XML into a string.
First, save all DOCTYPE declarations as a local string. Then create the xml as needed without the DOCTYPEs and save it to a local string property. Finally insert the DOCTYPEs string into the XML String and link the result string to the Payload string of the HTTP_Post action.
Michael -
SQL XML Variable Assignment?
Maybe more of a code question, but used in B1i. Using the B1out type="sql" how do I assign the return value of:
Select CardCode From [OCDR] Where U_CSTN = <xsl:value-of select="col[8]"/>
to a xml variable? Maybe a simple question but I am having issues using the return value that I need in a B1out type="object" in the same atom.
All responses deeply appreciated,
Mike
<xsl:template name="transform">
<b1im_multimsg xmlns="">
<xsl:for-each select="$msg/row">
<b1im_msg>
<B1out type="sql">
<xsl:variable name="Code">
<sql>Select CardCode From [OCRD] Where U_DTNCN = <xsl:value-of select="col[8]"/></sql>
</xsl:variable>
</B1out>
<B1out type="object">
<Documents>
<row>
<CardCode>
<xsl:copy-of select="$Code"/>
</CardCode>
</row>
</Documents>
<Document_Lines>
<row>
<ItemCode>
<xsl:value-of select="col[2]"/>
</ItemCode>
<Quantity>
<xsl:value-of select="col[3]"/>
</Quantity>
</row>
</Document_Lines>
</B1out>
</b1im_msg>
</xsl:for-each>
</b1im_multimsg>
</xsl:template>I has an immediate suspicion it might be related to the issue
mentioned in
http://otn.oracle.com/support/tech/sql_plus/htdocs/sub_var2.html#2_7
but this proved wrong: the SP2-306 still occurs in the latest
SQL*Plus.
I wonder what version of 8i you had working? With an old SQL*Plus
8.1.7.0 my connection failed the same as in 9.2 and 10i.
My solution was to do:
SQLPLUS='sqlplus -s'
UNPW='/ as sysdba'
$SQLPLUS "$UNPW" <<EOF
EOFThis worked in 9.2.0.5, 10.1.0.2 and 8.1.7.0.
One common security risk on UNIX remains: putting the username and
password on the command line. On some systems a "ps" command will
show the password to any user. If OS authentication cannot be used
for connection, perhaps putting the username/password in the SQL
script may be more secure?
A final note is that in SQL*Plus 10g, no quotes are needed around
AS SYSDBA, i.e.
sqlplus / as sysdba works from the OS prompt, whereas in 9.2 you need to do
sqlplus "/ as sysdba"This makes a solution easy:
SQLPLUS="/usr/oracle/product/10.1.0/bin/sqlplus -s xxx/xxxxxx@xxxx as sysdba"-- CJ -
Flash loads XML variables from cache memory...
Hi everyone. This is a very important issue. I have been in
many many forums looking for this answer and no one fulfills my
expectations. As I said on title... I have created a small
application that edits my XML file in server. It really works,
because I open manually my file and it's perfectly modified...
however, everytime I refresh my page it loads the ancient XML
variables because they come from cache...
I also could find out that this problem is mainly happening
with IExplorer, not with Mozilla Firefox.... however, I need it to
run on IE too... but can not find a real solution.. I have been
told to add random numbers to the XMl file extenskion, and other
things like that, honestly... they do not work... please... does
anybody have the light on this issue ??? I will appreciate your
answers...
Thanks in advance,Did you try appending a URL variable.
xmlRequest.xml.load("theData.xml?cacheKiller=" + new
Date().getTime(); -
How to convert XML document to xml variable?
Hi,
I have taken an xml variable in my process and reading a xml document file. Can anyone tell me how can i convert this xml document to xml variable so that i can parse the xml variable.
I am able to convert xml variable to xml document variable by using set value activity. But how do I perform reverse process.
I want to perform this conversion because i want to keep xml data in document format on storage drive and then parse this xml data so that i can read the nodes.
Any help will be appreciated..
Regards
Sunilwe can use set value activity to reach these xml docs and assign it to xml variable.
Then parsing of this xml can be browsed to find the nodes.
Regards
Sunil -
Using a variable value in CDATA for generating an XML type in Oracle
Hello,
I have prepared a function given below where I have some input variables & I have to generate one XML with those input variables as tag attribute value:
create or replace function NEW_PROJECT_DETAILS
( p_ReferenceId in varchar2 ,
p_Project_No in varchar2,
p_Project_Name in varchar2,
p_Project_Desc in varchar2 ,
p_Project_Type in varchar2,
p_Project_Location in varchar2,
p_Project_Status in varchar2 )
return xmltype
as
payload xmltype;
begin
dbms_output.put_line('Payload Started');
payload:= xmltype('<?xml version="1.0" encoding="UTF-8"?>
<ProjectDetails>
<RefID>'||p_ReferenceId||'</RefID>
<ProjectNo>'||p_Project_No||'</ProjectNo>
<ProjectName>'||p_Project_Name||'</ProjectName>
<ProjectDesc>'||p_Project_Desc||'</ProjectDesc>
<ProjectType>'||p_Project_Type||'</ProjectType>
<ProjectLocation><![CDATA[p_Project_Location]]></ProjectLocation>
/* <ProjectLocation>'||p_Project_Location||'</ProjectLocation> */
<ProjectStatus>'||p_Project_Status||'</ProjectStatus>
</ProjectDetails>');
dbms_output.put_line('Payload Comp1');
return payload;
end;
This procedure works absolutely fine.
Now the problem which I am having is that the variable p_Project_Location has value like "6747:BBO&M SBV".
Due to the '*&*' in that value I have to use CDATA. But i dont know how to pass this variable directly in the CDATA in the XML.
Please help me with this asap.
Thanks & Regards,
Divya Aggarwal
Edited by: 784414 on Dec 2, 2010 4:15 AM
Edited by: 784414 on Dec 2, 2010 4:16 AMHi,
If you absolutely want to use a CDATA section, then :
payload:= xmltype('<?xml version="1.0" encoding="UTF-8"?>
<ProjectDetails>
<RefID>'||p_ReferenceId||'</RefID>
<ProjectNo>'||p_Project_No||'</ProjectNo>
<ProjectName>'||p_Project_Name||'</ProjectName>
<ProjectDesc>'||p_Project_Desc||'</ProjectDesc>
<ProjectType>'||p_Project_Type||'</ProjectType>
<ProjectLocation><![CDATA['||p_Project_Location||']]></ProjectLocation>
<ProjectStatus>'||p_Project_Status||'</ProjectStatus>
</ProjectDetails>');Alternatively, you can escape non valid characters with DBMS_XMLGEN.CONVERT, e.g. :
payload:= xmltype('<?xml version="1.0" encoding="UTF-8"?>
<ProjectDetails>
<RefID>'||p_ReferenceId||'</RefID>
<ProjectNo>'||p_Project_No||'</ProjectNo>
<ProjectName>'||p_Project_Name||'</ProjectName>
<ProjectDesc>'||p_Project_Desc||'</ProjectDesc>
<ProjectType>'||p_Project_Type||'</ProjectType>
<ProjectLocation>'||dbms_xmlgen.convert(p_Project_Location)||'</ProjectLocation>
<ProjectStatus>'||p_Project_Status||'</ProjectStatus>
</ProjectDetails>');which outputs :
<?xml version="1.0" encoding="UTF-8"?>
<ProjectDetails>
<RefID>1</RefID>
<ProjectNo>1</ProjectNo>
<ProjectName>PRJ1</ProjectName>
<ProjectDesc>This is project 1</ProjectDesc>
<ProjectType>P</ProjectType>
<ProjectLocation>6747:BBO&M SBV</ProjectLocation>
<ProjectStatus>S</ProjectStatus>
</ProjectDetails>Any basic XML parser should then convert back escaped characters when processing the document.
You can also use SQL/XML functions, which will take care of that automatically.
For example :
SELECT appendChildXML(
XMLType('<?xml version="1.0" encoding="UTF-8"?><ProjectDetails/>'),
XMLForest(
'1' as "RefID",
'1' as "ProjectNo",
'PRJ1' as "ProjectName",
'This is project 1' as "ProjectDesc",
'P' as "ProjectType",
'6747:BBO&M SBV' as "ProjectLocation",
'S' as "ProjectStatus"
FROM dual;or,
SELECT appendChildXML(
XMLType('<?xml version="1.0" encoding="UTF-8"?><ProjectDetails/>'),
XMLForest(
'1' as "RefID",
'1' as "ProjectNo",
'PRJ1' as "ProjectName",
'This is project 1' as "ProjectDesc",
'P' as "ProjectType",
XMLCData('6747:BBO&M SBV') as "ProjectLocation",
'S' as "ProjectStatus"
FROM dual; -
Posting an XML Variable to a BLS Transaction from a web page
I am working in xMII 11.5 with all the latest service packs. I know this is probably a really basic question but I am stumped.
I am trying to pass a multi row and multi column XML data set from a web page into a BLS transaction (actually, two of them) in order to populate the parameter. I want to use the Web Service interface to the transaction. I have tried using parameters on an Xacute Query in an Applet as well with an equal lack of success. I cannot persuade the transaction to see the incoming variable as an XML data type. I have tried encoding and decoding and string to xml conversions and nothing seems to successfully allow the data set to be seen withing the BLS as anything but a string. The String to XML action will not handle the number of columns in the dataset though it seems to work if the data set has only one column. The data set is formatted in the proper "Rowsets/Rowset/Row" format. I have considered writing the data to an XML file on the server (I know I can deal with that) but that is not acceptable in this application.
Can someone share the secret with me?
...SparksParameter value:
r1d1,r1d2,r1d3;r2d1,r2d2,r2d3;r3d1,r3d2,r3d2
Pass thru String List to Xml Parser with delim ";"
<Row>
<Item>r1d1,r1d2,r1d3</Item>
</Row>
<Row>
<Item>r2d1,r2d2,r2d3</Item>
</Row>
<Row>
<Item>r3d1,r3d2,r3d2</Item>
</Row>
Repeat on each row/item and pass thru String List to Xml Parser with delim ","
<Row>
<Item>r1d1</Item>
</Row>
<Row>
<Item>r1d2</Item>
</Row>
<Row>
<Item>r1d3</Item>
</Row>
Of course, your columns aren't flat but they are easy to ref, to get "column 2" for example:
StringListToXml_1.Output{/Rowsets/Rowset/Row[2]/Item}
So now you have rows and columns. Assign your data to your BAPI structured as needed.
We have passed complex XML via the SOAP interface in 11.5, but it involved some "hacks". Basically we passed the sterilized XML via a String Type Parameter, and then unserialized it inside the BLT.
I have been told on this board that there is a solution to passing XML data vie the SOAP interface using ref docs, but i have never personally seen a working example. -
Using a variable outside of the block it has been incremented
Hello everyone,
I came across a scenario where in I am having to use a variable (for summing up), outside of the block within which it has been incremented. Its something like below:
-------------- Header section of MS Word RTF (repeats for every page) -----------------------
For Each Header
<?xdoxslt:set_variable($_XDOCTX, 'TotalTax', 0)?>
-------------- Body section of MS Word RTF -----------------------
<?start:body?>
Lines Group
Increment TotalTax for each loop
End Lines Group
<?end body?>
-------------- Footer section of MS Word RTF (repeats for every page)-----------------------
<?xdoxslt:get_variable($_XDOCTX, 'TotalTax')?>
End For Each Group
---------------------------- End of template ----------------------------
The varaible 'TotalTax' is being declared in the header, incremented within the Body and is being used in the footer section. For the above mentioned syntax, the value being displayed for TotalTax is '0', i.e the value for which it has been defaulted while declaration.
Can someone please help me in getting it fixed such that TotalTax would display the value it was assigned in the Body rather than '0'.
Thanks,Hello and thank you for responding. I checked out the link you provided; however, my problem is not reviwed there.
I am setting a variable inside a <?start:body?>. Inside the body are several loops - which is fine. But it ends with <?end body?>. If I reference my variable BEFORE <?end body?> it retains it's value from the calculations within the program. But if I try to use the variable AFTER the <?end body?>, it give me an error "NULL" value or similar.
Any thoughts?
Rob -
Retrieve element from an XML variable
I have a BPEL process that takes in a XML message and from that message I want to parse out one element.
Using BPEL v10.1.3.3.0
Here is the xsd's, (use a wrapper for adding the name space)
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="TempNamespace"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
nxsd:version="DTD">
<include schemaLocation="VendorMasterBridge_2_1.xsd"/>
</schema>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="VendorMasterBridge">
<xs:complexType>
<xs:sequence>
<xs:element name="VendorMaster" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="VendorNumber" minOccurs="1" type="xs:string"/>
<xs:element name="VendorName" minOccurs="0" type="xs:string"/>
<xs:element name="BatchCtrlNbr" minOccurs="0" type="xs:string"/>
<xs:element name="Error" minOccurs="0" type="xs:string"/>
<xs:element name="VendorMasterFields" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="DateCreated" minOccurs="0" type="xs:dateTime"/>
<xs:element name="Address1" minOccurs="0" type="xs:string"/>
<xs:element name="Address2" minOccurs="0" type="xs:string"/>
<xs:element name="PassReqdAutoCreate" minOccurs="0" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" use="optional" type="xs:string"/>
<xs:attribute name="version" use="optional" type="xs:string" default="2.1"/>
<xs:attribute name="timestamp" use="optional" type="xs:dateTime"/>
</xs:complexType>
</xs:element>
</xs:schema>
I use the Assign activity to try and get the Address1 field
<assign name="Assign_1">
<copy>
<from variable="Vendxml" part="VendorMasterBridge"
query="/ns3:VendorMasterBridge/VendorMaster/VendorMasterFields/Address1"/>
<to variable="addr"/>
</copy>
</assign>
When I deploy and run the BPEL process I get this error
<selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"><part name="summary"><summary>empty variable/expression result.
xpath variable/expression expression "/ns3:VendorMasterBridge/VendorMaster/VendorMasterFields/Address1" is empty at line 87, when attempting reading/copying it.
Please make sure the variable/expression result "/ns3:VendorMasterBridge/VendorMaster/VendorMasterFields/Address1" is not empty.
</summary>
</part></selectionFailure>
Here is the XML used for input
<invWriteVendor_Enqueue_InputVariable>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="VendorMasterBridge">
<VendorMasterBridge xmlns:ns0="TempNamespace" id="RMS">
<VendorMaster xmlns="">
<VendorNumber>1077952523</VendorNumber>
<VendorName>UNIFLEX</VendorName>
<VendorMasterFields>
<Address1>383 W COMBO AVE</Address1>
<Address2>PO BOX 9004</Address2>
<City>HICKSVILLE</City>
<StateCode>NY</StateCode>
<Zip>11801-9004</Zip>
<Country>USA</Country>
<TelephoneNumber>05169322400</TelephoneNumber>
<StatusCode>00</StatusCode>
</VendorMasterFields>
</VendorMaster>
</VendorMasterBridge>
</part></invWriteVendor_Enqueue_InputVariable>
Can someone help me know what I am doing wrong?
If I do an assign of the input xml to another xml of the same message type all the fields transfer. I only run into this issue if I am trying to access a specific element.
Thanks for any help on this,Thanks for the reply, but could you be a little more specific? Problem with the namespace where, in the incoming message? Is it defined wrong in the BPEL process? A mis-match somewhere?
I kind of figured it was a namespace issue but I can not seem to track it down.
Maybe you are looking for
-
My iPhone, iPad and iMac Safari access to the Apple Store and iCloud are fine and accept my new Apple ID. Mail constantly prompts me for a password with a box that shows my old Apple ID. I'm guessing that somewhere on the iMac I can change or delete
-
How can I change iTunes 11 default view?
I really DO NOT LIKE th new iTunes, but I guess I'm stuck with it since I was dumb enough to download it. At least I hope I can change the default view from Albums (totally useless to me) to Songs so I don't have to go through manually changing it e
-
went to remove edge animate says error
-
Help with updating adobe flash player
I am using a macbook pro (safari) and trying to update my flash player but I can't seem to have any luck. I am on the webpage to download the player and when I double tap on the icon to install the player it takes me to a webpage which seems to be a
-
New Router, New PC, but my old wireless laptop still keeps the old information
Also 1) The laptop's "view wireless networks" still shows the old network name. 2) When selecting the new network name and hitting Connect, it does not even let me enter the new key (which linksys router sets and is a very long number). It goes ahe