cancel
Showing results for 
Search instead for 
Did you mean: 

Remove extra xml tags

Former Member
0 Kudos

Hi Experts,

I have a sync scenario which is a Proxy to WebService. My concern is that the response message from the WebService, it encounters some parsing problem.

I tried adding a XSL Mapping on the Operation Mapping before the Message Mapping, but still the xml format doesn't match. Please take a look on the following:

This is the XML message returned by WebService:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <ExecuteC2OFlowResponse xmlns="http://www.ca.com/itpam">
         <ExecuteC2OFlowResult>
            <ROID>xxxxxx</ROID>
            <flow-name>xxxxxxx</flow-name>
            <flow-action>xxxxxxxx</flow-action>
            <auth-user>xxxxxxxx</auth-user>
            <submission-time>xxxxxxxx</submission-time>
            <sender-address>xxxxxxxx</sender-address>
            <connection-id>xxxxxxxx</connection-id>
            <message>Document accepted for processing</message>
            <params>
               <param name="RuntimeROID">xxxxxxxx</param>
               <param name="ServerId">xxxxxxxx</param>
               <param name="effectiveUser">xxxxxxxx</param>
               <param name="Message">xxxxxxxx</param>
               <param name="InstanceUUID">xxxxxxxx</param>
               <param name="Common_DS__">xxxxxxxx</param>
               <param name="UserName">xxxxxxxx</param>
               <param name="ProcessName">xxxxxxxx</param>
               <param name="AlertSubject"/>
               <param name="ServerName">xxxxxxxx</param>
               <param name="DisplayName">xxxxxxxx</param>
               <param name="TouchpointName">xxxxxxxx</param>
               <param name="CallerUser">xxxxxxxx</param>
               <param name="ScheduledStartTime">xxxxxxxx</param>
               <param name="rootUUID">xxxxxxxx</param>
               <param name="AlertMessage"/>
               <param name="ProcessAction">xxxxxxxx</param>
               <param name="Tenant_DS__">xxxxxxxx</param>
               <param name="InstanceName">xxxxxxxx</param>
               <param name="sendAlert">xxxxxxxx</param>
            </params>
         </ExecuteC2OFlowResult>
      </ExecuteC2OFlowResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

After applying the XSL Mapping, here's the transform message

<?xml version="1.0" encoding="UTF-8"?>
<Envelope>
   <Header/>
   <Body>
      <ExecuteC2OFlowResponse>
         <ExecuteC2OFlowResult>
            <ROID>xxxxxx</ROID>
            <flow-name>xxxxxxx</flow-name>
            <flow-action>xxxxxxxx</flow-action>
            <auth-user>xxxxxxxx</auth-user>
            <submission-time>xxxxxxxx</submission-time>
            <sender-address>xxxxxxxx</sender-address>
            <connection-id>xxxxxxxx</connection-id>
            <message>Document accepted for processing</message>
            <params>
               <param name="RuntimeROID">xxxxxxxx</param>
               <param name="ServerId">xxxxxxxx</param>
               <param name="effectiveUser">xxxxxxxx</param>
               <param name="Message">xxxxxxxx</param>
               <param name="InstanceUUID">xxxxxxxx</param>
               <param name="Common_DS__">xxxxxxxx</param>
               <param name="UserName">xxxxxxxx</param>
               <param name="ProcessName">xxxxxxxx</param>
               <param name="AlertSubject"/>
               <param name="ServerName">xxxxxxxx</param>
               <param name="DisplayName">xxxxxxxx</param>
               <param name="TouchpointName">xxxxxxxx</param>
               <param name="CallerUser">xxxxxxxx</param>
               <param name="ScheduledStartTime">xxxxxxxx</param>
               <param name="rootUUID">xxxxxxxx</param>
               <param name="AlertMessage"/>
               <param name="ProcessAction">xxxxxxxx</param>
               <param name="Tenant_DS__">xxxxxxxx</param>
               <param name="InstanceName">xxxxxxxx</param>
               <param name="sendAlert">xxxxxxxx</param>
            </params>
         </ExecuteC2OFlowResult>
      </ExecuteC2OFlowResponse>
   </Body>
</Envelope>

But what I need is in this format:

<?xml version="1.0" encoding="UTF-8"?>
<ns0:ExecuteC2OFlowResponse xmlns:ns0="http://www.ca.com/itpam">
   <ns0:ExecuteC2OFlowResult>
      <ns0:ROID/>
      <ns0:flow-name/>
      <ns0:flow-action/>
      <ns0:auth-user/>
      <ns0:submission-time/>
      <ns0:sender-address/>
      <ns0:connection-id/>
      <ns0:message/>
      <ns0:message-status/>
      <ns0:params>
         <ns0:param name=""/>
      </ns0:params>
   </ns0:ExecuteC2OFlowResult>
</ns0:ExecuteC2OFlowResponse>

Any suggestion will be highly appreciate.

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Using XSL mapping you need to add the namespace xmlns="http://www.ca.com/itpam" first. Then Simple. You need to add namespace prefix ns0 tag using XMLAnonymizerBean adapter module. That is the solution.

http://help.sap.com/saphelp_nw04/helpdata/en/45/d169186a29570ae10000000a114a6b/content.htm

Edited by: Baskar Gopal on Feb 29, 2012 10:45 PM

Former Member
0 Kudos

Thanks. I did some additional work on my XSL to add the namespace at prefix ns0 and it worked.