当WSDL查看时,SOAPAction中的额外正斜杠。 [英] Extra forward slash in SOAPAction when WSDL viewed.
问题描述
我编写了一个由Java客户端使用的Web服务。
客户为我提供了一个SoapUI项目,以便我可以完成测试。
在我的课堂上,我有以下定义:
I have coded a web service that is to be consumed by a Java client.
The customer has supplied me with a SoapUI project so that I can complete testing.
Within my class I have the following defined:
<WebService(Namespace:="urn:myserv:us:gd:dis:supplierengagement:v02:SupplierEngagement:", Name:="")> _
<SoapDocumentService(RoutingStyle:=SoapServiceRoutingStyle.SoapAction)> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class SupplierEngagement
Inherits System.Web.Services.WebService
<WebMethod(MessageName:="appointSupplier"), _
SoapHeader("ESBContext", Direction:=SoapHeaderDirection.In), _
SoapHeader("unKnownHeaders")> _
Public Function AppointSupplier() As XmlDocument
End Fucntion
End Class
当我通过在Internet Explorer中查看来查看WSDL时,SOAPAction返回:
When I view the WSDL by viewing in Internet explorer the SOAPAction comes back as:
urn:myserv:us:gd:dis:supplierengagement:v02:SupplierEngagement:/appointSupplier
当我尝试对提供的SoapUI项目运行时,它失败并显示以下代码。
When I try and run this against the supplied SoapUI project, it fails with the following code.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: urn:urn:myserv:us:gd:dis:supplierengagement:v02:SupplierEngagement:/AppointSupplier.
at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)</faultstring>
<detail/>
</soap:Fault>
</soap:Body>
</soap:Envelope>
正如您所看到的,我在SOAPAction值中选择了一个额外的正斜杠。现在,在网上查看之后,我知道这是在.Net框架内的设计,但有没有办法改变它,以便我可以摆脱额外的正斜杠?
我不介意有人回复c#或vb.net。
谢谢
As you can see, I have picked up an extra forward slash in the SOAPAction value. Now, after checking around the web, I know that this is by design within the .Net framework, but is there a way to change it so that I can get rid of the extra forward slash?
I don't mind if someone replies in either c# or vb.net.
Thanks
推荐答案
无法对此进行排序,但我现在已经转移到WCF,它可以接受正确的值。
Have not been able to sort this out, but I have now moved to WCF, which can accept the correct value.
这篇关于当WSDL查看时,SOAPAction中的额外正斜杠。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!