How to provide xml data as input while calling web services

Posted by dnessapkota10 on 23-Jul-2012 22:57

When I am going to consume sharepoint web services which needs xml input like <![CDATA[<?xml version="1.0"?><soap:query><Where><Lt><FieldRef Name="ID" /><Value Type="Counter">3</Value> </Lt> </Where></soap:query>]]> here soap:query is one xml input parameter. How to provide xml data as input while calling web services?

Thanks,

Dinesh

All Replies

Posted by dnessapkota10 on 25-Jul-2012 03:35

Here is xml input parameter and if I append just above the input parameter like "....." then it works fine but I have problem with appending CDATA using DOM.


SoapUI soap Request---



            xmlns:s1="http://microsoft.com/wsdl/types/" xmlns:s2="http://schemas.microsoft.com/sharepoint/soap/">
       
            test
           
                     
               
                   
                       
                        3
                   

               

           
]]>
                      
               
               
           
]]>

            1000
                       
                no
                yes
           
]]>
           
       
   

*note: With SoapUI with above request it receive the valid response.

SpySoap Soap Request:



   
        xmlns:s1="http://microsoft.com/wsdl/types/" xmlns:s2="http://schemas.microsoft.com/sharepoint/soap/">
       
            test
           
           
               
                   
                       
                        3
                   
               
           
           
               
               
           
            1000
           
                no
                yes
           
           
       
   

*note: But with above SOAP spy soap request it throws error soap response as,



    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   
       
            soap:Server
            Exception of type
                'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
           
               
                    xmlns="http://schemas.microsoft.com/sharepoint/soap/">Element
                    &lt;Query> of parameter query is missing or invalid.
                0x82000000
           
       
   

What could be the solution?

Thanks in advance,

Dinesh

Posted by Jens Dahlin on 30-Jul-2012 03:44

You don't have to think about the soap-envelope itself. That's handled by Progress.

But I suggest you check out the documentation for Web Services among the PDFs (download it if you havent already!). There's also a document called Working with XML that should answer your questions.

Posted by dnessapkota10 on 06-Aug-2012 02:17

Hi Jens,

Thanks for your suggestion. But this service worked while tested using .Net client but with progress client and using SOAP ui its not working even though the same input is provided. The service is SharePoint web service.

Any idea?

Thanks

Dinesh

Posted by Jens Dahlin on 06-Aug-2012 02:22

Hej!

Jag är på semester. Återkommer den 13/8.

Ha en trevlig sommar!

Jens Dahlin

Hi,

I'm on vacation. Will be back on August 13th.

Have a nice summer!

Best regards

Jens

Posted by Jens Dahlin on 13-Aug-2012 07:39

Try to check for errors in the ERROR-STATUS and SOAP-FAULT handles. Again: check the documentation on Web Services. It's really good!

This thread is closed