6

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 the forward slash that is automatically being generated.

Nico
  • 12,493
  • 5
  • 42
  • 62
gilesrpa
  • 969
  • 1
  • 12
  • 35

2 Answers2

0

From reviewing the code, creating mock samples and such I don't see the problem. Yes I do see the extra forward slash as you mention in your post however that is by design. That is how the ASMX service notes the method within the class to execute.

Now from your SOAP message and your WebService \ WebMethod attributes there is something out of sync. Your SOAP Header action should be

urn:mycode:us:gu:das:supplierengagement:v02:SupplierEngagement:AppointSupplier/appointSupplierReq

not

urn:mycode:us:gu:das:supplierengagement:v02:SupplierEngagement:/AppointSupplier

This leads me to believe either you haven't updated the SOAP UI project to the new generated WSDL. Try creating a new Project in SOAP UI pointing the WSDL file of the ASMX web service such as.

http://<web host>/SupplierEngagement.asmx?wsdl

And run the test methods. If this does not fix the issue please post (as an edit) the full class for the SupplierEngagement asmx file (you can omit the method content) as we are only really interested in the full setup.

Nico
  • 12,493
  • 5
  • 42
  • 62
0

I had a similar issue that was finally a permissions issues on the server side that was providing the forward slash error, but other things can be done to diagnose the problem

Can the SoapAction of a SOAP REQUEST be altered by interoperability issues between .NET and JAVA or a network/infraestructure proxy

Community
  • 1
  • 1
Mauricio Gracia Gutierrez
  • 10,288
  • 6
  • 68
  • 99