PureConnect

 View Only

Discussion Thread View
  • 1.  XML flicking

    Posted 10-03-2011 08:35
    Hi.. I have created a soap request using the soap tools (soap create envelop and soap add rpc parameters), and have structure like this in my hSOAPEnvelope1 variable: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cus="http://siebel.com/CustomUI"> <soapenv:Body>
    <cus:RunServiceTelefon>
    <cus:CustomerId></cus:CustomerId>
    <cus:CellPhone>+479201669</cus:CellPhone>
    </cus:RunServiceTelefon> </soapenv:Body> </soapenv:Envelope>
    Regardless of what my xml look like as for now, I need it to look like this before sending the request: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://siebel.com/CustomUI" xmlns:ap01="http://www.siebel.com/xml/AP01_ServiceTelefon_Input_External"> <soapenv:Header/> <soapenv:Body> <cus:RunServiceTelefon> <SiebelMessage> <ap01:customer> <ap01:customerid></ap01:customerid> <ap01:phone>+4795027908</ap01:phone> </ap01:customer> </SiebelMessage> </cus:RunServiceTelefon> </soapenv:Body> </soapenv:Envelope> In short, I need to add two levels her by wrapping <SiebelMessage> and <ap01:customer> around my existing tags. I'm not that clever with xml (that's an understatement). Does anyone have the experience to guide meg through. I was thinking of the "XML Transform To Document" tool, but didn't get it right using 3 xsd files. I have also tried to create the start xml by using the xml tools (XML create document, XML get node info, XML select single node set value), but have trouble with setting an xml node value. Can anyone please point me to the easiest way here for fixing the structure? I appreciate any comments. Regards Mari


  • 2.  RE: XML flicking

    Posted 11-30-2011 19:07
    If anyone can help with this I would greatly appriciate it. I have tried create document from string but I have to have the namespace prefix on every line and when I try to add it to the string it gives a parsing error. The XML Create Document builds the structure but I need to insert a variable into it now (AcctId). Here is my xml. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns="http://www.fhnc.com/emm/1"> <soapenv:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken> <wsse:Username>xxxxxxxxxx</wsse:Username> <wsse:Password>xxxxxxxxxx</wsse:Password> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <ns:AcctCustRelSearchRq> <ns:RqUID>10000000-0000-0000-0000-000000000000</ns:RqUID> <ns:MsgRqHdr> <ns:ContextRqHdr> <ns:NetworkTrnData> <ns:TerminalIdent>term id</ns:TerminalIdent> <ns:Name>term name</ns:Name> </ns:NetworkTrnData> <ns:ClientApp> <ns:Org>FN Org</ns:Org> <ns:Name>name</ns:Name> <ns:UserName>user</ns:UserName> <ns:Version>1.0.0</ns:Version> <ns:Channel>ch</ns:Channel> </ns:ClientApp> </ns:ContextRqHdr> <ns:FeeRqHeaders> <ns:FeeRqHdr> <ns:CostCenter>9070</ns:CostCenter> </ns:FeeRqHdr> </ns:FeeRqHeaders> </ns:MsgRqHdr> <ns:AcctCustRelSearchSel> <ns:AcctKeys> <ns:AcctId>xxxxxxxxxxxxxxxx</ns:AcctId> <ns:AcctType> <ns:AcctTypeValue>CCA</ns:AcctTypeValue> <ns:AcctTypeSrc>IFX</ns:AcctTypeSrc> </ns:AcctType> </ns:AcctKeys> </ns:AcctCustRelSearchSel> </ns:AcctCustRelSearchRq> </soapenv:Body> </soapenv:Envelope>


  • 3.  RE: XML flicking

    Posted 11-30-2011 19:10
    Thanks in advance


  • 4.  RE: XML flicking

    Posted 11-30-2011 19:13
    I am having the same issues. I need to insert a variable into my XML. (AcctId) <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns="http://www.fhnc.com/emm/1"> <soapenv:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken> <wsse:Username>xxxxxxxxxx</wsse:Username> <wsse:Password>xxxxxxxxxx</wsse:Password> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <ns:AcctCustRelSearchRq> <ns:RqUID>10000000-0000-0000-0000-000000000000</ns:RqUID> <ns:MsgRqHdr> <ns:ContextRqHdr> <ns:NetworkTrnData> <ns:TerminalIdent>term id</ns:TerminalIdent> <ns:Name>term name</ns:Name> </ns:NetworkTrnData> <ns:ClientApp> <ns:Org>FN Org</ns:Org> <ns:Name>name</ns:Name> <ns:UserName>user</ns:UserName> <ns:Version>1.0.0</ns:Version> <ns:Channel>ch</ns:Channel> </ns:ClientApp> </ns:ContextRqHdr> <ns:FeeRqHeaders> <ns:FeeRqHdr> <ns:CostCenter>9070</ns:CostCenter> </ns:FeeRqHdr> </ns:FeeRqHeaders> </ns:MsgRqHdr> <ns:AcctCustRelSearchSel> <ns:AcctKeys> <ns:AcctId>xxxxxxxxxxxxxxxx</ns:AcctId> <ns:AcctType> <ns:AcctTypeValue>CCA</ns:AcctTypeValue> <ns:AcctTypeSrc>IFX</ns:AcctTypeSrc> </ns:AcctType> </ns:AcctKeys> </ns:AcctCustRelSearchSel> </ns:AcctCustRelSearchRq> </soapenv:Body> </soapenv:Envelope>


  • 5.  RE: XML flicking

    Posted 12-01-2011 18:02
    Try with this simple approach: 1. Convert to a string. 2. Search for the start point of <ns:AcctId> 3. Insert the Id 11 characters after that point 4. Convert back to XML


  • 6.  RE: XML flicking

    Posted 12-02-2011 15:03
    Robert, when I try to convert xml node to string it requires a stylesheet. I have never used these xml tools before. Can a stylesheet be created for the above xml?


  • 7.  RE: XML flicking

    Posted 12-06-2011 15:50
    For conversion to a string use "XML get XML" tool. After inserting node value, you can get XML document back using "XML Create Document From String". I have attached the test handler about this. Regards, Sonja


  • 8.  RE: XML flicking

    Posted 12-06-2011 17:38
    Thankyou very much. It works perfectly. After seeing what you did it makes perfect sense. I am now getting a good return from the http request. Jay


Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources