Forum Discussion

pgrhome's avatar
pgrhome
Occasional Contributor
12 years ago

.Net inserting extra forward slash

0 down vote favorite


I am using SoapUI to test a .Net Web Service that will be consumed by a Java client application.

When I hook up my Web Service to SoapUI but updating the WSDL location and call one of the preset testing scripts, the Web Service 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:mycode:us:gu:das: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&amp; abortProcessing)
</faultstring>
<detail/>
</soap:Fault>
</soap:Body>
</soap:Envelope>


As you can see from the above error, the problem is with the SOAPAction parameter having an extra forward slash.

I am using the following attribute on the class:

<WebService(Namespace:= "urn:mycode:us:gu:das:supplierengagement:v02:SupplierEngagement:AppointSupplier")>


and the following attribute on the method call:

<WebMethod(MessageName:="appointSupplierRq")>


From these, .Net is adding the forward slash.

It must be possible to remove this.

Can any one please inform me on how to undertake this?
  • pgrhome's avatar
    pgrhome
    Occasional Contributor
    I have posted there too, but as I am using SoapUI for testing, I thought someone else on this forum may have come across this problem also.
  • pgrhome's avatar
    pgrhome
    Occasional Contributor
    Thanks for the reply, but that really does not help me at all.

    Anyway, I have got around this issue by simply moving to WCF instead of ASMX.