pgrhome
12 years agoOccasional Contributor
.Net code SOAPAction problems
Hi everyone,
I am having a little problem at the moment and just cannot find a way out of it, so I hope that you can help.
I have had to create a new .Net application that allows a Java client to call it via Soap.
To enable this company has supplied me with a SoapUI project for testing the pre defined interface.
I have completed the code and if I create a separate project within SoapUI at the same endpoint, the application works perfectly.
However when I try using the project that was sent, It fails with the following error:
As you can see from the SOAPAction attribute, the .Net code has added a forward slash.
There are tons of examples out there, but none have so far shown me how to work around the problem.
To create this, the .Net code has the following code against the class definition:
And this code against the function:
So the forward slash is getting generated automatically by .Net somehow.
Any help in the removal of this unwanted extra character would be gratefully received.
Paul.
I am having a little problem at the moment and just cannot find a way out of it, so I hope that you can help.
I have had to create a new .Net application that allows a Java client to call it via Soap.
To enable this company has supplied me with a SoapUI project for testing the pre defined interface.
I have completed the code and if I create a separate project within SoapUI at the same endpoint, the application works perfectly.
However when I try using the project that was sent, It fails with the following error:
<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:mySoapService:us:gd:dir: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>
As you can see from the SOAPAction attribute, the .Net code has added a forward slash.
There are tons of examples out there, but none have so far shown me how to work around the problem.
To create this, the .Net code has the following code against the class definition:
<WebService(Namespace:="urn:mycode:uk:gy:dis:suppliermanager:v02:SupplierManager:")> _
And this code against the function:
<WebMethod(MessageName:="appointSupplierRq")
So the forward slash is getting generated automatically by .Net somehow.
Any help in the removal of this unwanted extra character would be gratefully received.
Paul.