Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
gilbas99
Contributor
Contributor

[resolved] Using SOAP response on a second output from the same tXMLMap

Hello,
Can I use the response from a soap request as a value in a second output in the same tXMLMap?
Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi
Extract the value of AddSResult element from the response of tSOAP_2 and store it to a global variable for used later, store the document of UpdateFieldMoarada output to a global variable. The job looks like:
tSOAP_1--main--tXMLMap_1---main--tSOAP_2--main--tExtractXMLField_1--main--tJavaRow_1
-- UpdateFieldMoarada-->tJavaRow_2
|
onsubjobok
|
tFixedFlowInput_1--main--tXMLMap_2--main-->tSOAP_3
on tJavaRow_1: store the value of AddSResult element to global varaible, for example:
globalMap.get("processKey", input_row.AddSResult);
on tJavaRow_1: document of UpdateFieldMoarada output to a global variable, for example:
globalMap.get("UpdateFieldMoarada ", input_row.Soap);
on tFixedFlowInput_1: generate the UpdateFieldMoarada document and pass it to tXMLMap_2.
on tXMLMap_2, you can get the processKey with expression:
(Integer)globalMap.get("processKey")

View solution in original post

6 Replies
Anonymous
Not applicable

Hi
A screenshot of job design you are working will be helpful for us to understand your request.
Shong
gilbas99
Contributor
Contributor
Author

Ok Shong, here goes:
I'm querying a sharepoint list based on infopath forms submitted by users on one side, and opening support tickets on the other.
For each item in SP, I'm opening a ticket and getting in response a "processKey" (tSoap2)
Next I need to update additional fields with user information: Name, Address, phone... For this I need the "processKey" value to associate each of these additional fields with the correct ticket. I created a second output in tXMLMap_1 and hoped to get "processKey" tSoap_2, but cannot find a way to make it work. Tried globalVars, context, tFlowtoInterate...
Any help would be appreciated. Thanks
0683p000009MDPL.png 0683p000009MDTR.png
gilbas99
Contributor
Contributor
Author

Response from tSoap_2 is:
<root>
<row>
<Soap><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><AddSResponse xmlns="http://www.link.pt/e-doclink/webservices"><AddSResult>32527</AddSResult></AddSResponse></soap:Body></soap:Envelope></Soap>
</row>
<row>
<Soap><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><AddSResponse xmlns="http://www.link.pt/e-doclink/webservices"><AddSResult>32528</AddSResult></AddSResponse></soap:Body></soap:Envelope></Soap>
</row>
...
AddSResult has the processKey I need for tSoap_3
0683p000009MDTW.png
gilbas99
Contributor
Contributor
Author

output result from schema below is:

42637
<?xml version="1.0" encoding="UTF-8"?>
<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><updateField xmlns="http://www.link.pt/e-doclink/webservices"><processKey/><field>35</field><fieldValue>cx-103 Cabo Vilar do Monte</fieldValue></updateField></soap:Body></soap:Envelope>
42638
<?xml version="1.0" encoding="UTF-8"?>
<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><updateField xmlns="http://www.link.pt/e-doclink/webservices"><processKey/><field>35</field><fieldValue>E. N. 378, nº 34</fieldValue></updateField></soap:Body></soap:Envelope>
42639
<?xml version="1.0" encoding="UTF-8"?>
<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><updateField xmlns="http://www.link.pt/e-doclink/webservices"><processKey/><field>35</field><fieldValue>RUA ANTONIO ALVARES SANTOS JUNIOR, Nº50 R/C</fieldValue></updateField></soap:Body></soap:Envelope>
....
0683p000009MDTb.png
Anonymous
Not applicable

Hi
Extract the value of AddSResult element from the response of tSOAP_2 and store it to a global variable for used later, store the document of UpdateFieldMoarada output to a global variable. The job looks like:
tSOAP_1--main--tXMLMap_1---main--tSOAP_2--main--tExtractXMLField_1--main--tJavaRow_1
-- UpdateFieldMoarada-->tJavaRow_2
|
onsubjobok
|
tFixedFlowInput_1--main--tXMLMap_2--main-->tSOAP_3
on tJavaRow_1: store the value of AddSResult element to global varaible, for example:
globalMap.get("processKey", input_row.AddSResult);
on tJavaRow_1: document of UpdateFieldMoarada output to a global variable, for example:
globalMap.get("UpdateFieldMoarada ", input_row.Soap);
on tFixedFlowInput_1: generate the UpdateFieldMoarada document and pass it to tXMLMap_2.
on tXMLMap_2, you can get the processKey with expression:
(Integer)globalMap.get("processKey")
_AnonymousUser
Specialist III
Specialist III

Thanks Shong!
I can rule the world now!