Hi all
I have tried using above method but i am getting error while pasting the request xml ..Below is XML request i was trying to create and here i need to add the account number and phone number dynamically. can anyone please suggest way to create this? can i use tool "XML Create Document" to create below? but how can i add the account number and phone number dynamically?
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:add="http://www.w3.org/2005/08/addressing" xmlns:ivr="http://schemas.company.com/ivr/">
<soapenv:Header>
<oas:Timestamp oas:Id="?">
<oas:Created oas:Id="?">?</oas:Created>
<oas:Expires oas:Id="?">?</oas:Expires>
</oas:Timestamp>
<add:RelatesTo RelationshipType="http://www.w3.org/2005/08/addressing/reply">?</add:RelatesTo>
<add:MessageID>?</add:MessageID>
<add:ReplyTo>
<add:Address>?</add:Address>
<add:ReferenceParameters>
</add:ReferenceParameters>
<add:Metadata>
</add:Metadata>
</add:ReplyTo>
<add:Action>?</add:Action>
<add:To>?</add:To>
<add:From>
<add:Address>?</add:Address>
<add:ReferenceParameters>
</add:ReferenceParameters>
<add:Metadata>
</add:Metadata>
</add:From>
</soapenv:Header>
<soapenv:Body>
<ivr:IVRMessage>
<ivr:Request>
<ivr:CustomerInfo>
<ivr:AccountNumber>?</ivr:AccountNumber>
<ivr:PhoneNumber>?</ivr:PhoneNumber>
</ivr:CustomerInfo>
</ivr:Request>
</ivr:IVRMessage>
</soapenv:Body>
</soapenv:Envelope
------------------------------
Halesha Nagarajappa
Accenture India
------------------------------
Original Message:
Sent: 04-30-2019 11:11
From: Mark Tatera
Subject: create the SOAP body in handler
I typically use an assignment step to create the SOAP request envelope in a string. There is a little known "feature" where if you paste a string into an assignment step with carriage returns or spaces the tool step will keep the formatting. Simply taking the above string and pasting it in will add the \r\n characters. I will usually mock up the SOAP envelope and then add variable names for the values which change. After the input XML is saved as a string I put the string into a XML Create Document From String tool step and then use that XMLDocument as my request envelope. I adopted this approach after seeing how Genesys PSO writes SOAP integrations. I figured if this approach was good enough for PSO it was good enough for my needs.
------------------------------
Mark Tatera
ConvergeOne
Opinions are my own and not the views of my employer. Any suggestions or programming changes I suggest come with no warranty and should be tried at your own risk.
Original Message:
Sent: 04-30-2019 08:58
From: Halesha Nagarajappa
Subject: create the SOAP body in handler
Hi All
I have to create the below soap body as a part of my soap request . The challenge i am facing here is to create the array elements.
Can anyone help me/suggest way to create the below soap body.
<soapenv:Body>
<ivr:IVRMessage>
<ivr:Request>
<ivr:MeterReading>
<ivr:AccountNumber>1234</ivr:AccountNumber>
<ivr:PhoneNumber>5467</ivr:PhoneNumber>
<ivr:Reading>
<ivr:MeterNumber>5555</ivr:MeterNumber>
<ivr:Installation>4444</ivr:Installation>
<ivr:Value>1111</ivr:Value>
</ivr:Reading>
<ivr:Reading>
<ivr:MeterNumber>666</ivr:MeterNumber>
<ivr:Installation>777</ivr:Installation>
<ivr:Value>222</ivr:Value>
</ivr:Reading>
<ivr:Reading>
<ivr:MeterNumber>333</ivr:MeterNumber>
<ivr:Installation>999</ivr:Installation>
<ivr:Value>888</ivr:Value>
</ivr:Reading>
</ivr:MeterReading>
</ivr:Request>
</ivr:IVRMessage>
</soapenv:Body>
#Handlers
------------------------------
Halesha Nagarajappa
Accenture Solutions Pvt. Ltd.
------------------------------