how to read xml file from url in tibco BW - tibco

I want to read xml file from web url, when I specified that path in Read file pallette file location I'm getting an error .How can I do this one in tibco?
Please help me to solve this issue.

Use a "Send HTTP Request" Activity.
Host in the "Configuration" tab can be written as such : hostname:port/dir1/dir2/filename.xml
Data will be available in the "asciiContent" output field.

1.Use "HTTP receiver" Activity
2.Next use "Parse XML" Activity

Related

How to overwrite file while using tFileOutputDelimited in TOS

In TOS, i am getting the below error
Exception in component tFileOutputDelimited_1 (First_Practice_Job)
java.lang.RuntimeException: The particular file "C:\Users\himanshu\Desktop\tos\written_file.csv" already exist. If you want to overwrite the file, please uncheck the "Throw an error if the file already exist" option in Advanced settings.
at my_first_project.first_practice_job_0_1.First_Practice_Job.tFileInputDelimited_2Process(First_Practice_Job.java:2162)
at my_first_project.first_practice_job_0_1.First_Practice_Job.runJobInTOS(First_Practice_Job.java:2694)
at my_first_project.first_practice_job_0_1.First_Practice_Job.main(First_Practice_Job.java:2543)
As guided in this error, the option for unchecking is not available in advance settings,
So while using tFileOutputDelimited, how to overwrite file instead of deleting and then running the program again and again
The option disappears if you have checked "write after" in the simple parameters. Otherwise it should be available in advanced parameters
I am not using TOS, but Talend Cloud Api for Services 7.2.1 . Don't have a TOS to double check this

Tool to validate a web.config

Is there a tool that I can use to validate my web.config? The reason I ask is that the file appears to be valid XML and IIS is complaining that file is invalid. No explanation or indication as to why.
Thanks in advance.
Edit:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information:
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x8007000d
Config Error
Config File \?\C:\DignityFiles\Source\simplicity\Simplicity\web.config
Requested URL http://simplicity-local.dignitytest.co.uk:80/
Physical Path
Logon Method Not yet determined
Logon User Not yet determined
Config Source:
-1:
0:
More Information:
This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
View more information ยป [This takes you to "https://support.microsoft.com/en-gb/help/942055/-http-error-500-19-error-when-you-open-an-iis-7-0-webpage"]
Link to the web.config (Note: sensitive information has been redacted)
I have (eventually) found the answer: https://stackoverflow.com/a/41267673
Installing the URL rewrite module fixed my issue.
This answer addressses the immediate concern, but if you are looking for a general solution in powershell I have created a function that addresses this.
The full answer is here: how do i validate an IIS web.config in powershell
But the gist of it is you have to find all the "filters" and test each of them individually via Get-WebConfiguration

Jmeter: File upload Issues while Jmeter scripting

I have a scenario wherein I have to upload a .txt file which inserts records in database, for a batch job operation further. I am using Jmeter scripting to automate this flow. I think I have followed all the rules needed to upload a file but still I face this error:
Response code: 500
Response message: Internal Server Error
Here are the details of scripting the file upload
jmeter_fileUpload_1
jmeter_fileUpload_2
and the html code showing the paramter name for the input type "file"
<input type="file" size ="40" name="filename" class="textinputgroup_input" title="Use Browse button to select the file.">
I am not sure where I have made the mistake. I have properly used the request attributes in the HTTP sampler as per the Fiddler.
I will not be able to record due to some firewall restrictions
Your config looks good, just make sure that:
File exists under the ${filepath}
${filepath} should contain either full path to the txt file being uploaded or the file needs to live in JMeter's "bin" folder
In case if it doesn't help, check jmeter.log and/or server-side log file to get some clues regarding what's wrong. It may be something like missing header or whatever. As a last resort try comparing the requests which are being sent by JMeter and real browser with a sniffer tool like Wireshark to detect the differences and apply the appropriate JMeter configuration so requests would be identical.
See Performance testing: Upload and Download Scenarios with Apache JMeter article for more detailed instructions.

SOAP WSDL accessible in SoapUI, not in Visual Studio

I'm attempting to integrate a SOAP web service into my C# project via "Add Service Reference," as I have done successfully at least once before. The address works normally in SoapUI, and even entering the address in a browser brings up the WSDL file as expected. But when I enter the address in the Add Service Reference dialog, it results in an error.
The document at the url [redacted].com/uesas/WebService/Onboard-2_0.cfc?wsdl was not
recognized as a known document type. The error message from each known type may help you fix the problem:
Report from 'XML Schema' is 'The root element of a W3C XML Schema should be and its namespace should be 'http://www.w3.org/2001/XMLSchema'.'.
Report from 'DISCO Document' is 'Discovery document at the URL [redacted].com/uesas/WebService/Onboard-2_0.cfc?wsdl could
not be found.'.
The document format is not recognized.
Report from 'WSDL Document' is 'There is an error in XML document (2, 129).'.
The string 'http ://webservice.uesas._[redacted].webroot' is not a valid Uri value.
Metadata contains a reference that cannot be resolved: '[redacted].com/uesas/WebService/Onboard-2_0.cfc?wsdl'.
The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were:
... followed by the first several lines of what is clearly HTML code, instead of WSDL code. So evidently, VS doesn't even SEE the WSDL file, even though SoapUI and any standard browser confirm it's there. Does anyone have any thoughts why this would be?
Add ?WSDL after the endpoint address like: http://localhost:8088/mock_service?WSDL

Unable to record an upload file scenario in JMeter though it is possible by manual effort with specific browser settings

I am working on upload file module that works on internet explorer only and it requires following browser setting mandatory:
"Include local directory path when uploading files to server" should be enabled.
A failure message "Unable to upload file" displays when we do not make required setting in browser while manual attempt else it works fine.
Now when I am trying to record the scenario in JMeter, getting same error message even I made required browser settings.
Note: Additionally, I tried to include these calls by copying from browser tools and paste it in JMeter transaction but get the same result in response.
Have any one experience the same or can help me out?
Thanks,
Nitin
Few things to consider:
Make sure that you use Java implementation of HTTP Request
Make sure that "Use multipart/form-data for POST" is checked
Make sure that you provide a file within "Send Files With the Request" field providing correct path, parameter name and mime-type
If all above has already been applied and you still experience problems I would recommend to capture the data being sent by Internet Explorer with a sniffer (Fiddler, Wireshark, etc.) and compare it to data, being sent by JMeter. They must be the same. If they aren't - you'll need to customize it using HTTP Header Manager, HTTP Cookie Manager, etc. If JMeter is not flexible enough to set all the required parameters via GUI, i.e. still tries to send full path of file instead of just filename or vice versa, you can always go deeper and manually build multi-part post request via Java Request Sampler (see SleepTest and JavaTest source code for details) or via Beanshell which is 100% compatible with Java syntax but may be harder to debug due to it's script nature.
Path to SleepTest and JavaTest files is follows:
/src/protocol/java/org/apache/jmeter/protocol/java/test/JavaTest.java
/src/protocol/java/org/apache/jmeter/protocol/java/test/SleepTest.java
JMeter sources are available from JMeter download page
Steps to upload the image using jmeter:
locate the image in bin folder Select Post method and check the "Use
multipart/form-data for POST" in HTTP Request
Provide details of Send files With the Request in HTTP Request
Record the Upload scenario and stop button in Jmeter (Image wouldn't upload while recording in Jmeter)
Now before running the script, Go to upload response and give the full path of image in "Send files with request field"
Now Run the script. You can able to see the image

Resources