Hello,
I have created an web service in C# and accessing it thrugh C++ code.
But when i make a call through the client, the parameter does not reach the
server but it does not show any error code on client.
I have attached my code with this
Connector.CreateInstance(__uuidof(HttpConnector30) );
Connector->Property["EndPointURL"] = [WEbServiceURLname]
HRESULT hr = Connector->Connect();
// Begin message
Connector->Property["SoapAction"] = "http://tempuri.org/GetFloors";
hr =Connector->BeginMessage();
// Create the SoapSerializer
Serializer.CreateInstance(__uuidof(SoapSerializer3 0));
// Connect the serializer to the input stream of the connector
Serializer->Init(_variant_t((IUnknown*)Connector->InputStream));
// Build the SOAP Message
hr= Serializer->StartEnvelope("","NONE","");
hr = Serializer->StartBody("NONE");
hr = Serializer->StartElement("GetFloors","","NONE","");
hr = Serializer->StartElement("siteId","","NONE","");
Serializer->WriteString("1");
hr = Serializer->EndElement();
hr = Serializer->EndElement();
hr = Serializer->EndBody();
hr = Serializer->EndEnvelope();
// Send the message to the web service
hr = Connector->EndMessage();
// Let us read the response
hr = Reader.CreateInstance(__uuidof(SoapReader30));
// Connect the reader to the output stream of the connector
hr = Reader->Load(_variant_t((IUnknown*)Connector->OutputStream), "");
// Display the result
MSXML2::IXMLDOMElementPtr ptr = Reader->RpcResult->get_xml((BSTR*)&bstrXml);
But the value, which is coming in bstrXml is
<faultCode>soap:Server</faultCode>
The code on server is
C#:
[WebMethod]
public string GetFloors( string siteId )
{
return "tempString";
}
Please help
Thanks,