I have run into a nasty little soap/c#/.net problem and would appreciate any assistance available.
below is the soap message being sent
HEADERS - identical to wsdl
"Content-Type", "text/xml; charset=utf-8"
"SOAPAction", "http://mfelcansmith.alpha.kaplaninc.com/Add"
"HOST","mfelcansmith.alpha.kaplaninc.com
Soap Request:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope ...namespaces...>
<soap:Body>
<DCT_test xmlns="http://mfelcansmith.alpha.kaplaninc.com">
<strKey_val>teststring</strKey_val>
</DCT_test>
</soap:Body>
</soap:Envelope>
C# web method
[WebMethod]
[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("http://mfelcansmith.alpha.kaplaninc.com/DCT_test",
Use=System.Web.Services.Description.SoapBindingUse .Literal, ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Wrapped)]
public return_code DCT_test(string strKey_val)
{
return_code return_code=new return_code();
return_code.intReturn_code = 0;
return_code.strReturn_code = "test";
return_code.strReturn_code = strKey_val + "-test";
return return_code;
}
The response does not include the passed parameter and in debug mode the parameter value is null.
soap-response:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope ...namespaces...>
<soap:Body>
<DCT_testResponse xmlns="http://mfelcansmith.alpha.kaplaninc.com/">
<DCT_testResult><intReturn_code>0</intReturn_code>
<strReturn_code>-test</strReturn_code>
<strReturn_code_desc />
</DCT_testResult>
</DCT_testResponse>
</soap:Body>
</soap:Envelope>
I have tried different soap parameter styles with the same effect.
Thanks for your time and assistance,
Daniel Bowden
[email protected]