Author |
Message
|
sambati |
Posted: Wed Sep 16, 2009 5:51 am Post subject: Reg CDATA |
|
|
Novice
Joined: 14 Nov 2006 Posts: 19
|
Hi,
This is ambati. I am getting xml input. I need to create a soap request and has to copy whole xml as a string to an element. I have done till this.
I need to pass whole xml as CDATA. Could you any one suggest me on CDATA.
right now i am sending whole xml as follows.
SET soapenv.env:Body.ser:CreateServiceRequest.ser:accord = InputRoot.XML;
Suggest me how can i keep InputRoot.XML; in <!CDATA |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 16, 2009 5:58 am Post subject: Re: Reg CDATA |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sambati wrote: |
has to copy whole xml as a string to an element. I have done till this. |
Why? What's the point?
sambati wrote: |
I need to pass whole xml as CDATA. |
Why? What's the point?
sambati wrote: |
right now i am sending whole xml as follows.
SET soapenv.env:Body.ser:CreateServiceRequest.ser:accord = InputRoot.XML; |
Which doesn't do what you initially said - put the input XML into a single element, it copies the input under the accord element.
sambati wrote: |
Suggest me how can i keep InputRoot.XML; in <!CDATA |
By coding a CDATA section - see the WMB infocentre for full details and syntax. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sambati |
Posted: Wed Sep 16, 2009 6:20 am Post subject: |
|
|
Novice
Joined: 14 Nov 2006 Posts: 19
|
I have created the request for webservice call
<NS1:Envelope xmlns:NS1="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:NS2="http://nksraghavan.india.aalayance.com:9014/teamworks/webservices/ServiceRequestWS_v2.tws">
<NS1:Header/>
<NS1:Body>
<NS2:CreateServiceRequest>
<NS2:accord>
<InsuranceSvcRq>
<PolicyInqRq>
<RqUID></RqUID>
<TransactionRequestDt>2009-08-27</TransactionRequestDt>
<CurCd></CurCd>
<Requestor></Requestor>
</InsuranceSvcRq>
</NS2:accord>
</NS2:CreateServiceRequest>
</NS1:Body>
</NS1:Envelope>
But i need the Request as below.
<NS1:Envelope xmlns:NS1="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:NS2="http://nksraghavan.india.aalayance.com:9014/teamworks/webservices/ServiceRequestWS_v2.tws">
<NS1:Header/>
<NS1:Body>
<NS2:CreateServiceRequest>
<NS2:accord>
<![CDATA[<InsuranceSvcRq>
<PolicyInqRq>
<RqUID></RqUID>
<TransactionRequestDt>2009-08-27</TransactionRequestDt>
<CurCd></CurCd>
<Requestor></Requestor>
</InsuranceSvcRq>]]>
</NS2:accord>
</NS2:CreateServiceRequest>
</NS1:Body>
</NS1:Envelope>
I need to add the CDATA to created request. I didnt find in infocentre. Please guide me on this. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Sep 16, 2009 6:31 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
This question is asked and answered about every two or three weeks.
Happy Searching. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Sep 16, 2009 6:40 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
right now i am sending whole xml as follows.
SET soapenv.env:Body.ser:CreateServiceRequest.ser:accord = InputRoot.XML; |
That was a typo, I assume. You surely would not be silly enough to use the XML domain in an environment where SOAP messages ( which have namespaces ) are being processed! |
|
Back to top |
|
 |
sambati |
Posted: Wed Sep 16, 2009 6:41 am Post subject: |
|
|
Novice
Joined: 14 Nov 2006 Posts: 19
|
Please provide me if you have the solution for my problem.
I couldn't get the solution for last one hour.
Regards,
Ambati. |
|
Back to top |
|
 |
gregop |
Posted: Wed Sep 16, 2009 6:52 am Post subject: |
|
|
Voyager
Joined: 24 Nov 2006 Posts: 81
|
|
Back to top |
|
 |
sambati |
Posted: Wed Sep 16, 2009 6:54 am Post subject: |
|
|
Novice
Joined: 14 Nov 2006 Posts: 19
|
Hi vitor
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://nksraghavan.india.aalayance.com:9014/teamworks/webservices/ServiceRequestWS_v2.tws">
<soapenv:Header/>
<soapenv:Body>
<ser:CreateServiceRequest>
<ser:accord>?</ser:accord>
</ser:CreateServiceRequest>
</soapenv:Body>
</soapenv:Envelope>
I am pushing whole xml into single element 'accord' by using this
SET soapenv.env:Body.ser:CreateServiceRequest.ser:accord = InputRoot.XML;
That xml i need to keep in <![CDATA
<ser:accord><![CDATA ? ]]> </ser:accord>
Thanks,
ambati |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 16, 2009 6:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sambati wrote: |
I am pushing whole xml into single element 'accord' by using this
SET soapenv.env:Body.ser:CreateServiceRequest.ser:accord = InputRoot.XML;
|
- you said you were putting it as a single element in your original post; that statement copies the tree;
- as my most worthy associate points out, why are you using InputRoot.XML? For anything?
- this still doesn't explain why you want or need the document in a CDATA section. Or why you find the InfoCentre so valueless. And the forum search facility valueless. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sivareddypv |
Posted: Wed Sep 16, 2009 4:16 pm Post subject: |
|
|
 Newbie
Joined: 11 Aug 2005 Posts: 4 Location: Australia
|
Try this
SET soapenv.env:Body.ser:CreateServiceRequest.ser:accord.(XML.CDataSection) = InputRoot.XML; _________________ sivareddy |
|
Back to top |
|
 |
kimbert |
Posted: Thu Sep 17, 2009 12:16 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
sivareddypv: That advice is wrong. Please be accurate with your contributions in future. |
|
Back to top |
|
 |
|