在SQL Server SOAP请求上获取ParsingError,InvalidSoapActionHeader [英] Getting ParsingError, InvalidSoapActionHeader on SQL Server SOAP request

查看:124
本文介绍了在SQL Server SOAP请求上获取ParsingError,InvalidSoapActionHeader的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将SOAP请求发送到SQL Server 2005,但是响应中却出现了模糊的错误.谁能为我解释?

I am attempting to send a SOAP request to SQL Server 2005, but I am getting a vague error in response. Can anyone interpret for me?

这是我的要求(已添加换行符以提高可读性):

Here is my request (linebreaks have been added for readability):

<v:Envelope 
xmlns:i="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:d="http://www.w3.org/2001/XMLSchema" 
xmlns:c="http://www.w3.org/2001/12/soap-encoding" 
xmlns:v="http://www.w3.org/2001/12/soap-envelope">

<v:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>cgtyoder</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">SooperSekrit</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</v:Header>

<v:Body>
<MyFunction xmlns="http://tempuri.org/" id="o0" c:root="1">
<OutputParam i:nil="true" />
</MyFunction>
</v:Body>
</v:Envelope>

这是XML响应(添加了换行符):

And here is the XML response (linebreaks added):

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xml:space="preserve" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:sql="http://schemas.microsoft.com/sqlserver/2004/SOAP" 
xmlns:sqlsoaptypes="http://schemas.microsoft.com/sqlserver/2004/SOAP/types" 
xmlns:sqlrowcount="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlRowCount" 
xmlns:sqlmessage="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlMessage" 
xmlns:sqlresultstream="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream" 
xmlns:sqltransaction="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlTransaction" 
xmlns:sqltypes="http://schemas.microsoft.com/sqlserver/2004/sqltypes" 
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">

<SOAP-ENV:Body>
<SOAP-ENV:Fault xmlns:sqlsoapfaultcode="http://schemas.microsoft.com/sqlserver/2004/SOAP/SqlSoapFaultCode">
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>There was an error in the incoming SOAP request packet: Client, ParsingError, InvalidSoapActionHeader</faultstring>
<faultactor>http://schemas.microsoft.com/sqlserver/2004/SOAP</faultactor>
<detail xmlns:SOAP-1_2-ENV="http://www.w3.org/2003/05/soap-envelope">
<SOAP-1_2-ENV:Code>
<SOAP-1_2-ENV:Value>SOAP-1_2-ENV:Sender</SOAP-1_2-ENV:Value>
<SOAP-1_2-ENV:Subcode>
<SOAP-1_2-ENV:Value>sqlsoapfaultcode:ParsingError</SOAP-1_2-ENV:Value>
<SOAP-1_2-ENV:Subcode>
<SOAP-1_2-ENV:Value>sqlsoapfaultcode:InvalidSoapActionHeader</SOAP-1_2-ENV:Value>
</SOAP-1_2-ENV:Subcode>
</SOAP-1_2-ENV:Subcode>
</SOAP-1_2-ENV:Code>
<SOAP-1_2-ENV:Reason>
<SOAP-1_2-ENV:Text xml:lang="en-US">There was an error in the incoming SOAP request packet: Sender, ParsingError, InvalidSoapActionHeader</SOAP-1_2-ENV:Text>
</SOAP-1_2-ENV:Reason>
<SOAP-1_2-ENV:Node>https://10.199.5.116:444/dt2</SOAP-1_2-ENV:Node>
<SOAP-1_2-ENV:Role>http://schemas.microsoft.com/sqlserver/2004/SOAP</SOAP-1_2-ENV:Role>
<SOAP-1_2-ENV:Detail/>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

这是我在服务器上的SOAP端点定义:

Here is my SOAP Endpoint definition on the server:

CREATE ENDPOINT [DroidTest2] 
    AUTHORIZATION [cgtyoder]
    STATE=STARTED
    AS HTTP (PATH=N'/dt2', PORTS = (SSL), AUTHENTICATION = (BASIC), SITE=N'*', SSL_PORT = 444, COMPRESSION=DISABLED)
    FOR SOAP (
WEBMETHOD 'DroidFunction'( NAME=N'[pubs].[dbo].[DroidFunction]'
, SCHEMA=DEFAULT
, FORMAT=ROWSETS_ONLY), LOGIN_TYPE=MIXED, BATCHES=DISABLED, WSDL=N'[master].[sys].[sp_http_generate_wsdl_defaultsimpleorcomplex]'
, SESSIONS=ENABLED, SESSION_TIMEOUT=600, DATABASE=N'pubs', NAMESPACE=N'http://tempuri.org/', SCHEMA=STANDARD
, CHARACTER_SET=XML)
GO

UDF DroidFunction不接受任何参数,并返回一个字符串(VarChar(30)).我能够连接到 https://10.199.5.116/dt2?wsdl 并获得WSDL.感谢您在此提出的任何建议.

The UDF DroidFunction takes no arguments and returns a string (VarChar(30)). I am able to connect to https://10.199.5.116/dt2?wsdl and get the WSDL. Thanks for any pointers here.

推荐答案

请参见

See http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/7619d2e0-a5eb-4379-b027-234103e7f171 for my solution.

这篇关于在SQL Server SOAP请求上获取ParsingError,InvalidSoapActionHeader的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆