Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
SQL
ce
clients
clustering
connect
datamining
datawarehouse
dts
fulltext
jdbcdriver
msde
mseq
newusers
notificationsvcs
odbc
olap
programming
replication
reportingsvcs
security
securitytools
server
setup
sqlxml.viewmapper
tools
xml
  
 
date: 12 Apr 2006 11:55:49 -0700,    group: microsoft.public.sqlserver.notificationsvcs        back       


SQL NS IHttpProtocolProvider generating incomplete content type   
Hello, I have been trying to implement the most simplest of WebService
calls from Notification Services. NS hits the Webservice, but fails out
with the a Request Format exception message.

Does anyone know how to rewrite the content type generated by NS in the
IHttpProtocolProvider
The webservice generated SOAP message wants Content-Type: text/xml;
charset=utf-8
However looks like NS is generating Content-Type: ;charset=utf-8
When I add the ContentType argument to Instance Config File, the value
gets prepended to the NS generated contenttype which ends up looking
like: text/xml;charset=utf-8 (no space after semi-colon?) which still
generates the invalid format exception.

Any ideas here?

The exception looks like:
System.InvalidOperationException: Request format is invalid:
;charset=utf-8.
   at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()
   at System.Web.Services.Protocols.WebServiceHandler.Invoke()
   at
System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()

The SOAP Message Header looks like this:

- <HTTPHeaders>
  <content-type>;charset=utf-8</content-type>
  <host>localhost:8080</host>
  <content-length>201</content-length>
  <expect>100-continue</expect>
  <connection>Keep-Alive</connection>
  </HTTPHeaders>


The constructed SOAP message looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<soap:envelope>
	<soap:body>
		<Diarise xmlns='http://Blah.BlahServices.Notifications'>
			<DiaryID>1078</DiaryID>
		</Diarise>
	</soap:body>
</soap:envelope>

The Webmethod looks like this:

[WebMethod]
public bool Diarise(int DiaryID)
{

	System.Diagnostics.Trace.WriteLine("Starting Diarise webmethod");
	return true;
}
date: 12 Apr 2006 11:55:49 -0700   author:   unknown

Re: SQL NS IHttpProtocolProvider generating incomplete content type   
the IHttpProtocolProvider does not generate a soap envelope so easiest
to take the call to an aspx page and then reformat the request to a
soap call

kate
date: 13 Apr 2006 03:03:09 -0700   author:   kate

Google
 
Web ureader.com


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