2
I need to make a web service (asmx) where the Request Entry is in this structure:
Input XML (Request)
<RetrieveDeviceParentRequest>
<model query="">
<keys query="">
<ConfigurationItem type="String" ></ConfigurationItem>
<ParentDevice type="String"></ParentDevice>
</keys>
<instance>
<ConfigurationItem type="String"></ ConfigurationItem>
<ParentDevice type="String" ></ParentDevice>
</instance>
</model>
</RetrieveDeviceParentRequest>
Webmethod
Today I have this Web Method that does not meet the XML above
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
public class Device : System.Web.Services.WebService
{
[WebMethod]
public DataTable RetrieveDevice(string RetrieveDeviceRequest)
{
DeviceBusiness objDeviceBusiness = new DeviceBusiness();
return objDeviceBusiness.getDevice(RetrieveDeviceRequest);
}
}
What I have to do ?
The input parameter must be a Dataset instead of a string type ?
I don’t have the domain and I would like to have more time to search, but the situation is critical because they will shut down the server and I need to do another web service to replace it.
I reworked the post to get a better understanding
– hard123
You shouldn’t envelop this structure into one
RetrieveDeviceParentRequest
– Leandro Angelo
Good morning @Leandro Angelo what would be "envelopar"? as I said I have no domain and time is short, however I have solved the current problem by changing the signature of the web method to:
public XmlDocument RetrieveClienteRequest(model model))
, the more I came across another problem.– hard123