S
Stefan Cuypers
Hi,
I'm currently implementing a client layer for a web service we use for the
Compact Framework and am experiencing a problem with the
XmlAnyElementAttribute. When we use the code below to call the
GetEnvironments web method from the full .NET Framework everything works
fine, but when we use it on the Compact Framework it seems that the
arguments marked with the XmlAnyElementAttribute are ommitted in the SOAP
message (no error or exception is generated, the argument just isn't present
in the SOAP message). Does anyone have any idea what could be the cause of
this?
The return value of the function is also marked with the
XmlAnyElementAttribute and that one works fine.
The web service is defined in WSDL at
http://www.computerscuypers.be/wsdl/CCAppLogon.wsdl
Code to call the web service:
[System.Web.Services.WebServiceBindingAttribute(Name="CCAppLogonSoap",
Namespace="http://www.computerscuypers.be/CCAppManagement/CCAppLogon")]
internal class CCAppLogonWS :
System.Web.Services.Protocols.SoapHttpClientProtocol
{
public CCAppLogonWS(string url)
{
Url = url;
}
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.compu
terscuypers.be/CCAppManagement/CCAppLogon/GetEnvironments",
RequestNamespace="http://www.computerscuypers.be/CCAppManagement/CCAppLogon"
,
ResponseNamespace="http://www.computerscuypers.be/CCAppManagement/CCAppLogon
",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return:
XmlAnyElement("environments",Namespace="http://www.computerscuypers.be/CCApp
Management")]
public XmlElement GetEnvironments(
[XmlAnyElement("logonParams","http://www.computerscuypers.be/CCAppManagement
")] XmlElement logonParams,
string cultureName)
{
object[] results = this.Invoke("GetEnvironments", new object[] {
logonParams,
cultureName});
return ((XmlElement)(results[0]));
}
....
regards,
Stefan Cuypers
I'm currently implementing a client layer for a web service we use for the
Compact Framework and am experiencing a problem with the
XmlAnyElementAttribute. When we use the code below to call the
GetEnvironments web method from the full .NET Framework everything works
fine, but when we use it on the Compact Framework it seems that the
arguments marked with the XmlAnyElementAttribute are ommitted in the SOAP
message (no error or exception is generated, the argument just isn't present
in the SOAP message). Does anyone have any idea what could be the cause of
this?
The return value of the function is also marked with the
XmlAnyElementAttribute and that one works fine.
The web service is defined in WSDL at
http://www.computerscuypers.be/wsdl/CCAppLogon.wsdl
Code to call the web service:
[System.Web.Services.WebServiceBindingAttribute(Name="CCAppLogonSoap",
Namespace="http://www.computerscuypers.be/CCAppManagement/CCAppLogon")]
internal class CCAppLogonWS :
System.Web.Services.Protocols.SoapHttpClientProtocol
{
public CCAppLogonWS(string url)
{
Url = url;
}
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.compu
terscuypers.be/CCAppManagement/CCAppLogon/GetEnvironments",
RequestNamespace="http://www.computerscuypers.be/CCAppManagement/CCAppLogon"
,
ResponseNamespace="http://www.computerscuypers.be/CCAppManagement/CCAppLogon
",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return:
XmlAnyElement("environments",Namespace="http://www.computerscuypers.be/CCApp
Management")]
public XmlElement GetEnvironments(
[XmlAnyElement("logonParams","http://www.computerscuypers.be/CCAppManagement
")] XmlElement logonParams,
string cultureName)
{
object[] results = this.Invoke("GetEnvironments", new object[] {
logonParams,
cultureName});
return ((XmlElement)(results[0]));
}
....
regards,
Stefan Cuypers