Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Retrieve data from SOAP endpoint and save to a file

I am attempting to pull data back from a SOAP endpoint and am getting an error on the file output component:
0683p000009M8wj.png

The SOAP component is configured like:
0683p000009M8wo.png

 

In the WSDL there is no SOAPAction shown which is why I left that field blank. I believe that there is no data being returned and am wondering how to verify that this is the case and how to rectify the situation if that is the case.
Thanks

Labels (4)
6 Replies
TRF
Champion II
Champion II

This a compile error, not a runtime error.
Click the Code tab then click the red rectangle on the right side to reach the error line and move the mouse over the red circule on the left side to display the error message.
Anonymous
Not applicable
Author

Thanks for the pointer to the code tab.

The error showing in the code tab is SOAP cannot be resolved or is not a field:
0683p000009M8h1.png

I'm assuming this is due to something in the tSOAP component. Is there a way for me to test that tSOAP request is working as expected and generating output?

 

0683p000009M8xm.png

Anonymous
Not applicable
Author

I guess you have checked the 'Incoming is a document' box. tSOAP returns a string data, not a document. For testing, you can print the response on the console to check if it is XML format or Json format.
tSOAP-->tlogRow

If it is XMl format, use a tExtractXMLFields to extract the data from response, and write the data to a XML file.
tSOAP--tExtractXMLField--tAdvancedFileoutputXML

If it is Json format, use a tExtractJsonFields to extract the data from response, and write the data to a XML file.

tSOAP--tExtractJsonField--tAdvancedFileoutputXML

Hope it helps you!

Regards
Shong
Anonymous
Not applicable
Author

This was helpful as I am now able to pull the data for one tag. I attempted to pull for multiple tags by putting multiple tag labels in the XPath query for the Body at the same time but received an expected error. 

TOS_DI-win-x86_64_kqfXB1J0hH.png
Is there something in tExtractXMLField where I can pull for multiple tags in one pass or another component that I should use for multiple tag data extract?

Anonymous
Not applicable
Author

Can you show an example response?
Anonymous
Not applicable
Author

Sorry about that below is a sample response for one of the loops that I would want to retrieve the data from:

<?xml version="1.0" encoding="ISO-8859-15"?>
<soap:Envelope
	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<soap:Body>
		<GetUpdatedClientsWithChangesResponse
			xmlns="http://blablah.net/client">
			<GetUpdatedClientsWithChangesResult>
				<IsSuccessful>true</IsSuccessful>
				<Messages/>
				<UpdatedClients>
					<UpdatedClient>
						<FileNumber>23899813</FileNumber>
						<Statuses>
							<ClientStatus>
								<WorkflowId>fbd</WorkflowId>
								<WorkflowName>Workflow</WorkflowName>
								<StatusId>45</StatusId>
								<Name>Client</Name>
								<UpdatedOn>2019-11-14</UpdatedOn>
								<UpdatedBy>Trick</UpdatedBy>
							</ClientStatus>
							<ClientStatus>
								<WorkflowId>af8</WorkflowId>
								<WorkflowName>Terminations</WorkflowName>
								<StatusId>58</StatusId>
								<Name>120 Days</Name>
								<UpdatedOn>2019-11-15</UpdatedOn>
								<UpdatedBy>lake</UpdatedBy>
							</ClientStatus>
							<ClientStatus>
								<WorkflowId>c791</WorkflowId>
								<WorkflowName>Accounting</WorkflowName>
								<StatusId>25</StatusId>
								<Name>Active</Name>
								<UpdatedOn>2019-11-14</UpdatedOn>
								<UpdatedBy>Trick</UpdatedBy>
							</ClientStatus>
							<ClientStatus>
								<WorkflowId>6d8</WorkflowId>
								<WorkflowName>Status</WorkflowName>
								<StatusId>26</StatusId>
								<Name>Active</Name>
								<UpdatedOn>2019-11-14</UpdatedOn>
								<UpdatedBy>Trick</UpdatedBy>
							</ClientStatus>
							<ClientStatus>
								<WorkflowId>611</WorkflowId>
								<WorkflowName>Consultant</WorkflowName>
								<StatusId>46</StatusId>
								<Name>Complete</Name>
								<UpdatedOn>2019-11-14T</UpdatedOn>
								<UpdatedBy>diaz</UpdatedBy>
							</ClientStatus>
						</Statuses>
						<Assignees/>
						<Properties>
							<ClientProperty>
								<Name>Id</Name>
								<Value>6036</Value>
							</ClientProperty>
							<ClientProperty>
								<Name>CreatedOn</Name>
								<Value>11/14/2019</Value>
							</ClientProperty>
							<ClientProperty>
								<Name>Reason</Name>
								<Value>Program Issue</Value>
							</ClientProperty>
							<ClientProperty>
								<Name>StatusMacro</Name>
								<Value>Active</Value>
							</ClientProperty>
							<ClientProperty>
								<Name>Balance</Name>
								<Value>$0.00</Value>
							</ClientProperty>
							<ClientProperty>
								<Name>Name</Name>
								<Value>CARDalue>
							</ClientProperty>
							<ClientProperty>
								<Name>PaymentDate</Name>
								<Value>2/1/2020</Value>
							</ClientProperty>
							<ClientProperty>
								<Name>Rep</Name>
								<Value>Lake</Value>
							</ClientProperty>
							<ClientProperty>
								<Name>Phone</Name>
								<Value>390</Value>
							</ClientProperty>
							<ClientProperty>
								<Name>Name</Name>
								<Value>Lake</Value>
							</ClientProperty>
							<ClientProperty>
								<Name>Email</Name>
								<Value>com</Value>
							</ClientProperty>
							<ClientProperty>
								<Name>Macro</Name>
								<Value>Lake</Value>
							</ClientProperty>
							<ClientProperty>
								<Name>PhoneMacro</Name>
								<Value>390</Value>
							</ClientProperty>
						</Properties>
						<Assets>
							<Asset>
								<AssetId>a69</AssetId>
								<AssetTypeId>000</AssetTypeId>
								<Name>23899</Name>
								<Description/>
								<Type>file</Type>
								<IsDeleted>false</IsDeleted>
								<UpdatedOn>2019-11-14</UpdatedOn>
								<UpdatedBy>caw</UpdatedBy>
							</Asset>
						</Assets>
					</UpdatedClient>
				</UpdatedClients>
			</GetUpdatedClientsWithChangesResult>
		</GetUpdatedClientsWithChangesResponse>
	</soap:Body>
</soap:Envelope>