Need help with reading XML using File Adapter
I have created a simple BPEL process that uses a file adapter to read files containing XML messages of a simple xsd schema. But when reading the xml, I get the following error message:
[2010/03/01 23:43:13] Invalid data: The value for variable "Receive_1_Read_InputVariable", part "revision-report" does not match the schema definition for this part.The invalid xml document is shown below: More...
[2010/03/01 23:43:13] "{http://schemas.oracle.com/bpel/extension}invalidVariables" has been thrown. less
-<invalidVariables xmlns="http://schemas.oracle.com/bpel/extension">
-<part name="code">
<code>
9710
</code>
</part>
-<part name="summary">
<summary>
Invalid xml document.
According to the xml schemas, the xml document is invalid. The reason is: Error::cvc-complex-type.4: Attribute 'doc' must appear on element 'revision-report'.
Error::cvc-complex-type.4: Attribute 'model' must appear on element 'revision-report'.
Error::cvc-complex-type.4: Attribute 'pubdate' must appear on element 'revision-report'.
Error::cvc-complex-type.2.4.b: The content of element 'revision-report' is not complete. One of '{"http://xmlns.oracle.com/xmlfile":alternategroup}' is expected.
Please make sure that the xml document is valid against your schemas.
</summary>
</part>
</invalidVariables>
It seems that there is some issue with the namespace, but even after trying out various combinations, I am not able to resolve this.
Here the message schema (xsd):
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema elementFormDefault="qualified"
targetNamespace="http://xmlns.oracle.com/xmlfile"
xmlns:tns="http://xmlns.oracle.com/xmlfile"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="revision-report">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="alternategroup">
<xs:complexType>
<xs:attribute name="name" use="required" type="xs:string"/>
<xs:attribute name="Desc" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="doc" use="required" type="xs:string"/>
<xs:attribute name="model" use="required" type="xs:string"/>
<xs:attribute name="pubdate" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>
And here is the xml file to be read by the file adapter:
<?xml version="1.0" encoding="UTF-8" ?>
<revision-report doc="doc2" model="model4" pubdate="pubdate5">
<alternategroup Name="ABC" Desc="ABC-Desc">
</alternategroup>
<alternategroup Name="DEF" Desc="DEF-Desc">
</alternategroup>
<alternategroup Name="GHI" Desc="GHI-Desc">
</alternategroup>
</revision-report>
Appreciate any help.
Thanks in advance for your attention.
Jay
Thanks for your response.
I am not sure if there is any easier way, but I tried out the following tool available on the net to check an xml against a xsd:
http://tools.decisionsoft.com/schemaValidate/
There were a few issues, that I corrected and finally had a xsd and xml that were matching and valid. I tried this out in my file reading BPEL process, but the error still remained the same!
Here is my updated/simplified xsd and xml:
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema targetNamespace="http://xmlns.oracle.com/xmlfile"
xmlns:tns="http://xmlns.oracle.com/xmlfile"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://xmlns.oracle.com/xmlfile">
<xs:element name="revision-report">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="alternategroup"/>
</xs:sequence>
<xs:attribute name="doc" use="required" type="xs:string"/>
<xs:attribute name="model" use="required" type="xs:string"/>
<xs:attribute name="pubdate" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="alternategroup">
<xs:complexType>
<xs:attribute name="Name" use="required" type="xs:string"/>
<xs:attribute name="Desc" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="UTF-8" ?>
<revision-report doc="doc2" model="model4" pubdate="pubdate5" xmlns="http://xmlns.oracle.com/xmlfile">
<alternategroup Name="ABC" Desc="ABC-Desc"/>
<alternategroup Name="DEF" Desc="DEF-Desc"/>
<alternategroup Name="GHI" Desc="GHI-Desc"/>
</revision-report>
I even tried the option that is available in JDeveloper to generate a sample xml from a xsd (when in the context of a Transformation activity). The xml generated by this also seems exactly like the one above.
So, I am not able to figure out why my BPEL process errors out with the message Invalid xml document.
Similar Messages
-
Need help with reading a midi file!!!
I want to be able to make a java program that can read midi files. I need to know what notes are played and when. how can i do this.
A bit of code would be nice to to use as a resource.
thnxhttp://java.sun.com/products/java-media/sound/
There are links to code samples and maybe a tutorial -
I had to put my computer by together without migration or time machine I NEED help with order of the files?
Hi, where are these other files exactly?
-
Need help with Berkeley XML DB Performance
We need help with maximizing performance of our use of Berkeley XML DB. I am filling most of the 29 part question as listed by Oracle's BDB team.
Berkeley DB XML Performance Questionnaire
1. Describe the Performance area that you are measuring? What is the
current performance? What are your performance goals you hope to
achieve?
We are measuring the performance while loading a document during
web application startup. It is currently taking 10-12 seconds when
only one user is on the system. We are trying to do some testing to
get the load time when several users are on the system.
We would like the load time to be 5 seconds or less.
2. What Berkeley DB XML Version? Any optional configuration flags
specified? Are you running with any special patches? Please specify?
dbxml 2.4.13. No special patches.
3. What Berkeley DB Version? Any optional configuration flags
specified? Are you running with any special patches? Please Specify.
bdb 4.6.21. No special patches.
4. Processor name, speed and chipset?
Intel Xeon CPU 5150 2.66GHz
5. Operating System and Version?
Red Hat Enterprise Linux Relase 4 Update 6
6. Disk Drive Type and speed?
Don't have that information
7. File System Type? (such as EXT2, NTFS, Reiser)
EXT3
8. Physical Memory Available?
4GB
9. Are you using Replication (HA) with Berkeley DB XML? If so, please
describe the network you are using, and the number of Replica’s.
No
10. Are you using a Remote Filesystem (NFS) ? If so, for which
Berkeley DB XML/DB files?
No
11. What type of mutexes do you have configured? Did you specify
–with-mutex=? Specify what you find inn your config.log, search
for db_cv_mutex?
None. Did not specify -with-mutex during bdb compilation
12. Which API are you using (C++, Java, Perl, PHP, Python, other) ?
Which compiler and version?
Java 1.5
13. If you are using an Application Server or Web Server, please
provide the name and version?
Oracle Appication Server 10.1.3.4.0
14. Please provide your exact Environment Configuration Flags (include
anything specified in you DB_CONFIG file)
Default.
15. Please provide your Container Configuration Flags?
final EnvironmentConfig envConf = new EnvironmentConfig();
envConf.setAllowCreate(true); // If the environment does not
// exist, create it.
envConf.setInitializeCache(true); // Turn on the shared memory
// region.
envConf.setInitializeLocking(true); // Turn on the locking subsystem.
envConf.setInitializeLogging(true); // Turn on the logging subsystem.
envConf.setTransactional(true); // Turn on the transactional
// subsystem.
envConf.setLockDetectMode(LockDetectMode.MINWRITE);
envConf.setThreaded(true);
envConf.setErrorStream(System.err);
envConf.setCacheSize(1024*1024*64);
envConf.setMaxLockers(2000);
envConf.setMaxLocks(2000);
envConf.setMaxLockObjects(2000);
envConf.setTxnMaxActive(200);
envConf.setTxnWriteNoSync(true);
envConf.setMaxMutexes(40000);
16. How many XML Containers do you have? For each one please specify:
One.
1. The Container Configuration Flags
XmlContainerConfig xmlContainerConfig = new XmlContainerConfig();
xmlContainerConfig.setTransactional(true);
xmlContainerConfig.setIndexNodes(true);
xmlContainerConfig.setReadUncommitted(true);
2. How many documents?
Everytime the user logs in, the current xml document is loaded from
a oracle database table and put it in the Berkeley XML DB.
The documents get deleted from XML DB when the Oracle application
server container is stopped.
The number of documents should start with zero initially and it
will grow with every login.
3. What type (node or wholedoc)?
Node
4. Please indicate the minimum, maximum and average size of
documents?
The minimum is about 2MB and the maximum could 20MB. The average
mostly about 5MB.
5. Are you using document data? If so please describe how?
We are using document data only to save changes made
to the application data in a web application. The final save goes
to the relational database. Berkeley XML DB is just used to store
temporary data since going to the relational database for each change
will cause severe performance issues.
17. Please describe the shape of one of your typical documents? Please
do this by sending us a skeleton XML document.
Due to the sensitive nature of the data, I can provide XML schema instead.
18. What is the rate of document insertion/update required or
expected? Are you doing partial node updates (via XmlModify) or
replacing the document?
The document is inserted during user login. Any change made to the application
data grid or other data components gets saved in Berkeley DB. We also have
an automatic save every two minutes. The final save from the application
gets saved in a relational database.
19. What is the query rate required/expected?
Users will not be entering data rapidly. There will be lot of think time
before the users enter/modify data in the web application. This is a pilot
project but when we go live with this application, we will expect 25 users
at the same time.
20. XQuery -- supply some sample queries
1. Please provide the Query Plan
2. Are you using DBXML_INDEX_NODES?
Yes.
3. Display the indices you have defined for the specific query.
XmlIndexSpecification spec = container.getIndexSpecification();
// ids
spec.addIndex("", "id", XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
spec.addIndex("", "idref", XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
// index to cover AttributeValue/Description
spec.addIndex("", "Description", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ELEMENT | XmlIndexSpecification.KEY_SUBSTRING, XmlValue.STRING);
// cover AttributeValue/@value
spec.addIndex("", "value", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
// item attribute values
spec.addIndex("", "type", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
// default index
spec.addDefaultIndex(XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ELEMENT | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
spec.addDefaultIndex(XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
// save the spec to the container
XmlUpdateContext uc = xmlManager.createUpdateContext();
container.setIndexSpecification(spec, uc);
4. If this is a large query, please consider sending a smaller
query (and query plan) that demonstrates the problem.
21. Are you running with Transactions? If so please provide any
transactions flags you specify with any API calls.
Yes. READ_UNCOMMITED in some and READ_COMMITTED in other transactions.
22. If your application is transactional, are your log files stored on
the same disk as your containers/databases?
Yes.
23. Do you use AUTO_COMMIT?
No.
24. Please list any non-transactional operations performed?
No.
25. How many threads of control are running? How many threads in read
only mode? How many threads are updating?
We use Berkeley XML DB within the context of a struts web application.
Each user logged into the web application will be running a bdb transactoin
within the context of a struts action thread.
26. Please include a paragraph describing the performance measurements
you have made. Please specifically list any Berkeley DB operations
where the performance is currently insufficient.
We are clocking 10-12 seconds of loading a document from dbd when
five users are on the system.
getContainer().getDocument(documentName);
27. What performance level do you hope to achieve?
We would like to get less than 5 seconds when 25 users are on the system.
28. Please send us the output of the following db_stat utility commands
after your application has been running under "normal" load for some
period of time:
% db_stat -h database environment -c
% db_stat -h database environment -l
% db_stat -h database environment -m
% db_stat -h database environment -r
% db_stat -h database environment -t
(These commands require the db_stat utility access a shared database
environment. If your application has a private environment, please
remove the DB_PRIVATE flag used when the environment is created, so
you can obtain these measurements. If removing the DB_PRIVATE flag
is not possible, let us know and we can discuss alternatives with
you.)
If your application has periods of "good" and "bad" performance,
please run the above list of commands several times, during both
good and bad periods, and additionally specify the -Z flags (so
the output of each command isn't cumulative).
When possible, please run basic system performance reporting tools
during the time you are measuring the application's performance.
For example, on UNIX systems, the vmstat and iostat utilities are
good choices.
Will give this information soon.
29. Are there any other significant applications running on this
system? Are you using Berkeley DB outside of Berkeley DB XML?
Please describe the application?
No to the first two questions.
The web application is an online review of test questions. The users
login and then review the items one by one. The relational database
holds the data in xml. During application load, the application
retrieves the xml and then saves it to bdb. While the user
is making changes to the data in the application, it writes those
changes to bdb. Finally when the user hits the SAVE button, the data
gets saved to the relational database. We also have an automatic save
every two minues, which saves bdb xml data and saves it to relational
database.
Thanks,
Madhav
[email protected]Could it be that you simply do not have set up indexes to support your query? If so, you could do some basic testing using the dbxml shell:
milu@colinux:~/xpg > dbxml -h ~/dbenv
Joined existing environment
dbxml> setverbose 7 2
dbxml> open tv.dbxml
dbxml> listIndexes
dbxml> query { collection()[//@date-tip]/*[@chID = ('ard','zdf')] (: example :) }
dbxml> queryplan { collection()[//@date-tip]/*[@chID = ('ard','zdf')] (: example :) }Verbosity will make the engine display some (rather cryptic) information on index usage. I can't remember where the output is explained; my feeling is that "V(...)" means the index is being used (which is good), but that observation may not be accurate. Note that some details in the setVerbose command could differ, as I'm using 2.4.16 while you're using 2.4.13.
Also, take a look at the query plan. You can post it here and some people will be able to diagnose it.
Michael Ludwig -
Hi,
I am trying do very simple demo which reads a simple XML message from a ftp server and post that message directly to the same ftp server using FILE adapter.
So, I add my xml message like this:
<?xml version="1.0" encoding="UTF-8"?>
<ns:TxMessage xmlns:ns="http://bsa.sisl.com">
<Name>Bibinu</Name>
<Address>Kalyan</Address>
</ns:TxMessage>
but I get a error message back from the Integration Server as:
<SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>XIServer</SAP:Category>
<SAP:Code area="INTERNAL">HTTP_RESP_STATUS_CODE_NOT_OK</SAP:Code>
<SAP:P1>401</SAP:P1>
<SAP:P2>Unauthorized</SAP:P2>
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Error Report</title> <style> td {font-family : Arial, Tahoma, Helvetica, sans-serif; font-size : 14px;} A:link A:visited A:active </style> </head> <body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" rightmargin="0"> <table width="100%" cellspacing="0" cellpadding="0" border="0" align="left" height="75"> <tr bgcolor="#FFFFFF"> <td align="left" colspan="2" height="48"><font face="Arial, Verdana, Helvetica" size="4" color="#666666"><b>&nbsp;&nbsp;401 &nbsp Unauthorized</b></font></td> </tr> <tr bgcolor="#3F73A3"> <td height="23" width="84"><img width=1 height=1 border=0 alt=""></td> <td height="23"><img width=1 height=1 border=0 alt=""></td> <td align="right" height="23"><font face="Arial, Verdana, Helvetica" size="2" color="#FFFFFF"><b>SAP J2EE Engine/6.40&nbsp;</b></font></td> </tr> <tr bgcolor="#9DCDFD"> <td height="4" colspan="3"><img width=1 height=1 border=0 alt=""></td> </tr> </table> <br><br><br><br><br><br> <p><font face="Arial, Verdana, Helvetica" size="3" color="#000000"><b>&nbsp;&nbsp;User is locked.</b></font></p> <p><font face="Arial, Verdana, Helvetica" size="2" color="#000000"><table><tr><td valign="top"><b>&nbsp;Details:</b></td><td valign="top"><PRE>No details available</PRE></font></td></tr></table></font></p> </body> </html></SAP:AdditionalText>
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>HTTP response contains status code 401 with the description Unauthorized XML tag Envelope missing in SOAP message header (SAP XI Extension)</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Seems like I am missing the Envelope. What does the Envelope supposed to look like or should contain so that the scenario should work?
Thanks !Did you resolve the problem?? I have the same problem, and there's no informatin about it.
Thanks!! -
<p>Need help with the following error.....what does it mean....</p><p>28943 3086739136 XML-240304 3/7/07 7:13:23 PM |SessionNew_Job1<br /><font color="#ff0000">28943 3086739136 XML-240304 3/7/07 7:13:23 PM XML parser failed: Error <An exception occurred! Type:UnexpectedEOFException, Message:The end of input was not expected> at</font><br />28943 3086739136 XML-240304 3/7/07 7:13:23 PM line <7>, char <8> in <<?xml version="1.0" encoding="WINDOWS-1252" ?><br />28943 3086739136 XML-240304 3/7/07 7:13:23 PM <DSConfigurations><br />28943 3086739136 XML-240304 3/7/07 7:13:23 PM <DSConfiguration default="true" name="Configuration1"><br />28943 3086739136 XML-240304 3/7/07 7:13:23 PM <case_sensitive>no</case_sensitive><br />28943 3086739136 XML-240304 3/7/07 7:13:23 PM <database_type>Oracle</database_type><br />28943 3086739136 XML-240304 3/7/07 7:13:23 PM <db_alias_name1>ODS_OWNER</db_alias_name1><br />28943 3086739136 XML-240304 3/7/07 7:13:23 PM <db_ali>, file <>.<br />28943 3086739136 XML-240307 3/7/07 7:13:23 PM |SessionNew_Job1<br />28943 3086739136 XML-240307 3/7/07 7:13:23 PM XML parser failed: See previously displayed error message.</p><p>Any help would be greatly appreciated. It's something to do with my datasource and possibly the codepage but I'm really not sure.</p><p>-m<br /></p>
please export your datastore as ATL and send it to support. Somehow the internal language around configurations got corrupted - never seen before.
-
Need help with this xml gallery !!!
i have build a gallery but its very simple...... it takes images from xml file.
i have attached all files in zip.
i just want two things if anyone can help.
first when i press next button it goes to next image but with no effect. it just displays next image ... i want to incorporate a sliding effect when the image is changed to another.
and second i want to use autoplay feature.
as soon as swf starts the images came one by one with difference of few seconds.
thx in advance... i really need help in this....!You're welcome.
I don't have an example to offer for the autorun. You should be able to think it thru. One key, as I mentioned is to preload all of the images first, that will allow for smooth playing of the show--no waiting for images to load between changes. You can load them into empty movieclips and hide them (_viisible = false) until they are needed. You could load them when called for, but you would have to put conditions on the displaying of things until the image loads, which will change when they are all loaded, so I recommend just loading them all first.
For the timing you can use setInterval. If something is going to be allowed to interupt the autorun, then you will need to make use of the clearInterval function as well, so that you stop the clock.
Since you will be wanting to know when things are loaded, you will need to use the MovieClipLoader.loadClip method for loading the images instead of using loadMovie. This is because the MovieClipLoader class supports having an event listener. If you look in the help documents in the MovieClipLoader.addListener section, there is an example there that provides a fairly good complete overview of using the code. The only difference is you'd be looking for the onLoadComplete event rather than the onLoadInit event. -
Need Help With Military DTD Using FrameMaker 8
Fellow Forum Members,
I hope someone out there with experience in using Department of Defense DTDs with FrameMaker can contribute to this thread.
Attached is the MIL STD 400051-2 DTD that needs to play with FrameMaker. Does anyone out there know where I could find FrameMaker templates already setup that comply and play with the MIL STD 400051-2 DTD standard? If the Department of Defense is freely distributing the MIL STD 400051-2 DTD, shouldn't somebody in the Department of Defense also be providing MIL STD 400051-2 FrameMaker Templates for free that are already setup? I would greatly appreciate if anyone out there could provide an online source where I could download MIL STD 400051-2 FrameMaker templates.
Lastly, can anyone out there clarify what the purpose of the entities are inside the "Charant" and "Boilerplate" folders? The Department of Defense does not provide a readme file that define what the "Charant" and "Boilerplate" folders are about.
Any info will be greatly appreciated. Thanks.I'll answer the specifics that I know about your questions, but please look at the post from Srini for additional info:
1) Do i need to do full export using SYS/SYSTEM user.
exp80 system/manager file=c:full.dmp log=c:\full.txt full=y consistent=yA full export will move as much information (metadata/data) as possible. In order to do a full export/import, you need to do this from a
privileged account. A privileged account is one with EXP_FULL_DATABASE for export and IMP_FULL_DATABASE for import.
2) Will there be any data corruption while export.The data in the objects that you are exporting is being read, nothing is written to user data. I'm not sure what this is available in 8.0.6,
but if you need a consistent export, look to see if consistent=y is available in 8.0.6. All this means is that the dump file created will have
consistent data in it.
3) Is export/import the only method of migration/upgradation.If you are changing hardware, the only supported way from 8.0 to 10.2.0.4, that I know of, is using exp/imp.
Hope this helps.
Dean -
Need help with database migration using export/import
Hi,
I am planning to do a database migration from 8.0.6 to 10.2.0.4. I am using export/import. Please answer some of my queries:
1) Do i need to do full export using SYS/SYSTEM user.
exp80 system/manager file=c:full.dmp log=c:\full.txt full=y consistent=y
2) Will there be any data corruption while export.
3) Is export/import the only method of migration/upgradation.
Please help
Thanks.I'll answer the specifics that I know about your questions, but please look at the post from Srini for additional info:
1) Do i need to do full export using SYS/SYSTEM user.
exp80 system/manager file=c:full.dmp log=c:\full.txt full=y consistent=yA full export will move as much information (metadata/data) as possible. In order to do a full export/import, you need to do this from a
privileged account. A privileged account is one with EXP_FULL_DATABASE for export and IMP_FULL_DATABASE for import.
2) Will there be any data corruption while export.The data in the objects that you are exporting is being read, nothing is written to user data. I'm not sure what this is available in 8.0.6,
but if you need a consistent export, look to see if consistent=y is available in 8.0.6. All this means is that the dump file created will have
consistent data in it.
3) Is export/import the only method of migration/upgradation.If you are changing hardware, the only supported way from 8.0 to 10.2.0.4, that I know of, is using exp/imp.
Hope this helps.
Dean -
Receiving multiple files with dual extension using file adapter
Hi,
The scenario where I am implementing requires multiple files of different names to be picked(ABC.txt) and dropped at destination(ABC.txt.pgp) up by my File Sender and Receiver adapters. Any idea on about how the configuration for receiving multiple files with dual extension for receiver adapter is to be done?
Note:- currently, The scenario is working fine without dual extension. i.e Its picking all files which starts with ABC and creating at destination as it is. even I configured as ABC.txt.pgp, but its not creating the second extension.
Thanks in Advance
ManmadhaHi,
Try to concatenate '.pgp ' to the source file name to create the target file name for the receiver file adapter, by accessing the Adapter Specific Attributes using Java user defined function. This might work.
Reference links:
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm">SAP Help - Accessing Adapter Specific Attributes</a>
<a href="/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14 - XI: The same filename from a sender to a receiver file adapter - SP14</a>
Regards,
S.Santhosh Kumar -
Need help with reading RSS feed from SSIS
Hi all,
I am trying to read RSS feed from SSIS by using the Script Component. So far I am able to read some information from the RSS feed from the following items included in the code, Title, PublishDate, LastUpdateTime, Id and Summary.
There are still more item but I am unable to identify the proper data type for the following:
//Output0Buffer.Description = item.Content;
//Output0Buffer.Category = item.Categories;
//Output0Buffer.Comments = item.Summary;
//Output0Buffer.Source = item.SourceFeed;
When I define the data for item.Content as Unicode String in the column properties for the Output column I get the following error message:
Error 1 Cannot implicitly convert type 'System.ServiceModel.Syndication.SyndicationContent' to 'string'
And the same error for the other three variables.
I am using HTTP Connection manager to read the xml link.
I tried to google around for some help but I could not find more information about the datatype.
I appreciate any help if someone can point me to the right solution for reading RSS feed from SSIS.
Code:
/* Microsoft SQL Server Integration Services Script Component
* Write scripts using Microsoft Visual C# 2008.
* ScriptMain is the entry point class of the script.*/
using System;
using System.Data;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
using System.ServiceModel.Syndication;
using System.Xml;
using System.Text;
[Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
public class ScriptMain : UserComponent
private string url = string.Empty;
private SyndicationFeed feed = null;
private XmlReader reader = null;
public override void PreExecute()
base.PreExecute();
// Get the URL from the Http Connection Manager.
// Note, we're not actually using the connection manager's connection object,
// just it's URL setting. This is because using the .NET connection classes
// give us more flexibility.
reader = XmlReader.Create(Connections.HttpConnection.ConnectionString);
feed = SyndicationFeed.Load(reader);
public override void PostExecute()
base.PostExecute();
reader.Close();
public override void CreateNewOutputRows()
if (feed != null)
foreach (var item in feed.Items)
Output0Buffer.AddRow();
Output0Buffer.Title = item.Title.Text;
Output0Buffer.PublishDate = item.PublishDate;
Output0Buffer.LastUpdatedTime = item.LastUpdatedTime;
Output0Buffer.Link = item.Id;
//Output0Buffer.Description = item.Content;
//Output0Buffer.Category = item.Categories;
//Output0Buffer.Comments = item.Summary;
//Output0Buffer.Source = item.SourceFeed;
Output0Buffer.FeedImage.AddBlobData(ConvertToBytes(item.Summary));
string authorName = string.Empty;
if (item.Authors.Count > 0)
// take the first author
authorName = item.Authors[0].Name;
Output0Buffer.Author = authorName;
Output0Buffer.SetEndOfRowset();
private byte[] ConvertToBytes(TextSyndicationContent content)
if (content != null && !string.IsNullOrEmpty(content.Text))
// convert the string buffer to UTF8 so we can store it in an NTEXT column
var encoding = new UTF8Encoding();
return encoding.GetBytes(content.Text);
return new byte[0];
Thanks in return.You need to make it running outside SSIS 1st. I just do not see why you need to publish it here at the moment.
And to solve it, doesn't C# has the
VAR datatype so you do not have to guess.
Arthur
MyBlog
Twitter -
Need help with query from .csv file
I am trying to import a csv file with only 1 column in it.
The column will only contain a 9 digit ID number. I want to read
the file then use the contents to query a table to get the names
and other information and display it. Here is what I have so far:
<cffile action="read" file="#form.FiletoUpload#"
variable="csvfile">
<cfloop index="index" list="#csvfile#">
<cfquery name="massimport" datasource="data1">
SELECT * FROM IDTable
WHERE CardNumber = ('#csvfile#')
</cfquery>
</cfloop>
<cfoutput>#Name# #ID# #Site#</cfoutput>
I get no errors but I am not getting any results. Just a
blank page. Does anyone know how to query directly from a csv
import? Thanks.You need to convert your file to a list somehow. Not sure if
this is the most efficient way but, you can use the cfhttp tag to
produce a query. Then your where clause becomes,
where cardnumber in (#quotedvaluelist(query.column)#)
and you won't need a loop. -
Need help with read/write to MODBUS RTU registers in Labview 8.0
I’m trying to write and read the registers in G3800xx016. controlling temperatures and lightning. Please look at the attached pdf file for this unit..
I have used Lookout for about three years, and it works fine.. Now I want to expand my system and try to use Labview 8.0
My temperature register start adress is 100 Hex (256 dec) I read from Register with Function code 03.
This register have values from 0-255 witch mean in labview for me as unsigned byte U8
I read my temperature from the register like this: eks.: 40257 lets say value=5
Slave FC Start Adress Byte Value CRC
01 03 0100 02 0005 7847
This is the status received from the Modbus tester when I use null-modem connection..
I receive the same value if I use Modscan32
I have used null-modem cable to read out the values.
I have also PIR detectors that control movements and light of and on, and I read these starts at 40017.1
01 03 0010 02
The register to switch on and of heating and lights starts at 404097.1 FC16
Values mention here is read from Lookout 5.0
I have tried examples and read for weeks about this, but everything stops when I try to use Labview 8.0 I can’t read any values from my Master unit, neither write to it, or read any values in Modbus testers when I use null-modem cable.. I have tried different baud rates in my serial connection and it works perfect in Lookout, but Not Labview..
I have even bought DSC module, but I can’t write to either com ports or Modbus testers..
Please anybody… is there anybody that can give me help with this??
Start address for for PIR detectors is 40017.1 (FC03) and for writing bits for on of to light and heatsystem is 404097.1 (FC16)
I would be very happy for any idea that can give me some positive results… Look at the attached pdf file.
Thanks.. and very best regards from
Benjii…
Attachments:
G3800x016_02-2005_eng.pdf 70 KBHi... and thanks for your answer..
Yes, I have downloaded the NI Modbus drivers.. I have downloaded that one + a lot of other things about Modbus..
I have also tried communication between lokout and labview true null-modem cable.. and it works..
I have tried several Modbus examples and I communicate with most of them with null-modem cable.
I write to the right registers as well, cause I use Modbus scanner to read the information..
I have used the same settings for serial communication as my Master device use, bust still I can't get any response..
There was an error message in one of my example from the Modbus INIT module.. Maybe I should try to set up a new connection using VISA ??
Maybe the problem is to INIT my serial port? I have tried restarting my computer after closing my system.. But still, I have the same problem..
I hope you can give me any idea...
Thanks again.. by the way.. is it possible to write and read directly to serial port with the DSC module?? If so.. how??
Very best regards..
Benjii.. -
Need help with simple XML validation
I am new to Spry and need some help creating a simple
validation. There is a form field which must not contain a value
already in the database. I have a script which accepts a parameter
and returns a boolean result. Here is the XML:
<samples>
<sample>
<ISFOUND>0</ISFOUND>
</sample>
</samples>
1. How do I call this script when the form field changes and
pass the form value as the parameter?
2. How do I check the returned value in the XML and throw an
error if true?
I appreciate any help with this. Please let me know if there
is a better way to achieve the same result.
Thanks,
RichI enabled the call to the XML response. However, I am having
trouble identifying when the call is complete so I can parse the
result. How do I run my check after the data load and display the
proper message? -
Txt file to XML using File Adapter
Dear ALL,
I am doing file to file scenario, where i have to convert txt file from sender to xml as receiver .
I have done with all the conversion content parameters at the sender file adapter as below:
DocumentName:
DocumentNamespace:
RecordsetName:
RecordsetStructure:
Row.fieldNames :
Row.fieldSeparator:
Row.endSeperator:
Row.fromConfiguration;
Row.fieldFixedLengths:
Am i missing anything
still i am getting error as .
Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'Row.fieldFixedLengths' or 'Row.fieldSeparator' is missing Consistency check: no. of arguments in 'Row.fieldFixedLength' does not match 'Row.fieldNames' (0 <> 6)
Could anyone let me know where i am wrong in config.
Kind Regards,
VijayRaj,
Please find the details
DocumentName: sto_dc.txt
DocumentNamespace: http://........
RecordsetName: MT_STO_FILEOUT
RecordsetStructure: Row,*
Row.fieldNames : Document_number,Site,Date,Item_number,
Article_number,Quantity
Row.fieldSeparator: ,
Row.endSeperator: 'nl'
Row.fromConfiguration; fromConfiguration
Row.fieldFixedLengths: 8,4,8,2,6,2
Regards,
Vijay
Maybe you are looking for
-
Error Deploying to IntegratedWebLogicServer
Hello, While deploying a JSF application into IntegratedWebLogicServer, I'm getting the following message. I'm using Jdeveloper Studio Edition Version 11.1.1.3.0 build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. Can you suggest me what I could be
-
How to raise an event from a program
Hi, I am creating a workflow for HR, the person will request a basic pay change than, this will start the workflow. For this i am making a screen from where i need to triger the event for the workflow. Does anybody has any idea? of how to raise an ev
-
Cannot open message catalog LIBWSC_CAT
I'm posting a reworked version of an earlier question, hoping to get an answer this way. I have compiled an executable that acts as a tuxedo client. When I run it, invocations to the function tpstrerror() work ok. If I compile the exact same code as
-
Using Broadcaster to run a query for sequential Variable Values
Hi SDN Community I came across a powerpoint slide regarding broadcasting which i hope to use in one of our reports. We are on SAP BW 35. Broadcaster has been used Your opinion would be greatly valued in regards to the direction i should proceed for o
-
Trust Key Store - Interesting question ....
Hi, Currently, using one way SSL, we get a 200 millisecond overhead from the client perspective. I have a gut feel that the trust key store check adds a lot of overhead (since it does an I/O check) if my gut is right ... IS there anyway to cache the