Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Fri, 4 Apr 2008 16:23:26 -0700,    group: microsoft.public.xml.soap        back       


setRequestHeader Content Type Error   
Hi 

  I have issue with my ASP page ascessing webservice(.net 2.0) which returns 
an XML document.

ASP Page

            dim strSoapMessage
            Dim url
            Dim XMLDoc
            Dim objError            
            Dim lResolve, lConnect, lSend, lReceive
            Dim status,  , strUrl, aryUrl, i, strTemp, pos
            Dim strUid, strPwd,strContent, rSuccess
            Dim hArr
            httpMd = 
            rSuccess = false
        
            strSoapMessage = "SOAP MESSAGE IN XML FORMAT"

            Set XMLDoc = Server.CreateObject("MSXML2.ServerXMLHTTP"'.4.0")
                        url="http://localhost/GrantPersmission.asmx"
 
            lResolve = 10 * 1000
            lConnect = 10 * 1000
            lSend = 15 * 1000
            lReceive = 900 * 1000
            Err.Clear
            XMLDoc.setTimeouts lResolve, lConnect, lSend, lReceive
            XMLDoc.open "POST", url, False
            XMLDoc.setRequestHeader "Content-Type", "text/xml;soap"'
             XMLDoc.setRequestHeader "SOAPAction", url
            XMLDoc.send strSoapMessage
            'XMLDoc.send strSoapMessage
            Response.Write (XMLdoc.responseText)

    When I set setRequestHeader "Content-Type", "text/xml;soap"' I am 
getting error 

System.InvalidOperationException: Request format is invalid: text/xml;soap.
   at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()
   at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()

    When I set XMLDoc.setRequestHeader "Content-Type", 
"application/x-www-form-urlencoded"  It works 

I am not in position to set "application/x-www-form-urlencoded" due to 
client cannot change there code.

Please le tme know if you need more information.
date: Fri, 4 Apr 2008 16:23:26 -0700   author:   Gopinath

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us