i received this error when load webservice:
the PacketReceived return this:
HTTP/1.1 500 Internal Server Error
Cache-Control: private
Content-Length: 53
Content-Type: text/plain; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Wed, 13 Mar 2013 15:18:31 GMT
Connection: close
Request format is invalid: text/xml; charset=utf-8.
My Code:
In saveTweakSettings:
! this is a good embed point to set all the xml and soap settings that we require for
! this service.
xmlFile.SOAPEnvelope = 1 ! tells xFiles to wrap the XML in a SOAP envelope
xmlFile.SaveEncoding = 'utf-8' ! default is 'ISO-8859-1'
xmlFile._pfileBoundary = '' ! no file boundary tag required by this server
xmlFile._pRecordBoundary = 'CRIMWebService'
xmlFile.TagCase = XF:CaseAsIs
! the following are default values in XFiles, so don't actually need to be set here,
! but are included so you can see what they are, and override them if you wish.
xmlFile.SOAPEnvelopeBoundaryAttribute = 'xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/"'
xmlFile.SOAPEnvelopeBoundary = 'soap:Envelope'
xmlFile.SOAPBodyBoundary = 'soap:Body'
In my Button
PacketReceived = ''
! Construct the SOAP packet to make a request of the web service
Forecast_Date = FORMAT(Glo:InterestDate,@D06)
PinNumber = Glo:PinNumber
xmlFile.save(RequestGroup)
PostString = xmlFile.xmldata
net.CanUseProxy = 1 ! Can use a proxy
net.HeaderOnly = 0 ! We want the whole page
net.AsyncOpenUse = 1 ! Use AsyncOpen 12 seconds (recommended)
net.AsyncOpenTimeOut = 1200 ! Up to 12 seconds to connect
net.InActiveTimeout = 9000 ! Set IdleTimeout 90 seconds
net.ConnectionKeepAlive = 0
net.ContentType = 'text/xml; charset=utf-8'
net.AcceptEncoding = ''
net.ContentLength = Len(Clip(PostString))
! Set the SOAPAction header to tell the web service which method to execute
net.customheader = 'SOAPAction: "
http://www.crimpr.net/ws/crimservice.asmx"'
! The packet is contstructed, so you can post it to the webservice
PacketSent = PostString
SetCursor(Cursor:Wait)
net.Post('
http://www.crimpr.net/ws/crimservice.asmx/CRIMWebService?', Clip(PostString))
If net.Error
Message ('Could not be post the SOAP request to this web service. Error ' & net.Error |
& ': ' & net.InterpretError())
SetCursor()
end
In PageReceived:
if Self.PageLen > 0
PacketReceived = self.Page
SETCLIPBOARD(PacketReceived)
DO Process
! xml.load(resultGroup,self.page,len(clip(self.page)))
display()
End
SetCursor()