Monday 15 April 2013

sql - msxml3.dll in context sp_OAMethod 'send' -



sql - msxml3.dll in context sp_OAMethod 'send' -

working code win2003 + sql server 2005 not working under win2012 + sql server 2012 sp1.

the ~real solution found is:

i copied c:\windows\system32\msxml3.dll server 2008 same dir on server 2012. problem on 2012 server solved, sending post , working fine.

but cannot modify server , both msxml3.dll , msxml6.dll locked - need understand wrong , apply other way.

code simple usual grabbing soap web service:

declare @object int; declare @responsetext varchar(8000); declare @errcode int; exec sp_oacreate 'msxml2.serverxmlhttp', @object out; exec sp_oamethod @object, 'open', null, 'post','http://example.com/authentication.asmx','false' exec sp_oamethod @object ,'setrequestheader' ,null ,'content-type' ,'text/xml; charset=utf-8' exec sp_oamethod @object ,'setrequestheader' ,null ,'soapaction' ,'"http://www.example.com/login"' exec @errcode=sp_oamethod @object, 'send',null,'<soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <soap:body> <login xmlns="http://www.example.com/"> <databasename>db1</databasename> <username>login</username> <password>pass</password> </login> </soap:body> </soap:envelope>' exec sp_oamethod @object, 'responsetext', @responsetext output select @errcode,@responsetext exec sp_oadestroy @object

i tried both msxml2.xmlhttp , msxml2.serverxmlhttp (as .6.0 versions) objects. error id: -2147024809, remark 'send' failed. the parameter incorrect.

of course of study ole automation procedures enabled.

specify msxml2.serverxmlhttp.3.0 instead of 6.0.

sql tsql soap sql-server-2012 ole

No comments:

Post a Comment