Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

The Wse-Proxy only returns XmlElement

3 views
Skip to first unread message

Henke

unread,
Jan 7, 2004, 8:30:27 AM1/7/04
to
I have a WebMethod that returns a typed dataset. From my webservice I can
choose to use either Web Service Enhanced proxy (MyProxyWse) or the MyProxy
proxy.
From the ordinary proxy (MyProxy) a method I'd like to call returns the
typed dataset but if I use the Wse-enabled proxy it only returns a
XmlElement. Why is that, and is there a way to have the Wse-enabled proxy to
return a typed dataset?

Thanks in advance!
/Henke


Lucien

unread,
Jan 7, 2004, 6:57:52 PM1/7/04
to
Henke,

Could you show the webmethod definition? I'll take a look. Otherwise it's
also sufficient to show me the data definition for input/output.

Lucien


"Henke" <henke...@hotmail.com> wrote in message
news:O9vE9JS1...@TK2MSFTNGP11.phx.gbl...

Henke

unread,
Jan 8, 2004, 2:48:15 AM1/8/04
to
Hi Lucien, and thanks for your answer. This is how me method looks:
[WebMethod]
public DBAccess.CompanyDataSet GetAllCompanies()
{
DBAccess.CompanyDataSet companyDataSet =
DBAccess.DBAdapter.GetAllCompanies();

return companyDataSet;
}

where DBAccess.CompanyDataSet is my typed dataset.
The thing is, as I said earlier, if I don't use the Wse-version of the
method everything works fine.
/Henke


"Lucien" <*lucien*@MicrosoftAccount.com> skrev i meddelandet
news:OWkTioX1...@TK2MSFTNGP09.phx.gbl...

Lucien

unread,
Jan 8, 2004, 6:40:58 PM1/8/04
to
I created a class called CompanyDataSet (see below) in namespace DBAccess
and I get this correct WSE proxy :

[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.o
rg/GetAllCompanies", RequestNamespace="http://tempuri.org/",
ResponseNamespace="http://tempuri.org/",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public CompanyDataSet GetAllCompanies() {

object[] results = this.Invoke("GetAllCompanies", new object[0]);

return ((CompanyDataSet)(results[0]));

}


Could you try it with this class? It could be that it was fixed. I did find
an error though in the namespace for CompanyDataSet and will file a bug. The
namespace on the proxy is incorrectly set to tempuri.org.

Namespace definition:
namespace DBAccess{

public class CompanyDataSet{

public string[] Name;

public int Total;

public CompanyDataSet(){}

}}


"Henke" <henke...@hotmail.com> wrote in message

news:uPGtYvb1...@TK2MSFTNGP11.phx.gbl...

Henke

unread,
Jan 11, 2004, 11:41:28 AM1/11/04
to
Hi!
With your class it works fine, but there is a big difference, your class
doesn't inherit DataSet maybe I forgot to tell you that in the beginning. My
CompanyDataSet is a strongly typed data set.

This is how my WSE-proxy looks:


[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.o
rg/GetAllCompanies", RequestNamespace="http://tempuri.org/",
ResponseNamespace="http://tempuri.org/",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]

public System.Xml.XmlElement GetAllCompanies()


{
object[] results = this.Invoke("GetAllCompanies", new object[0]);

return ((System.Xml.XmlElement)(results[0]));
}

And this is how my none WSE-proxy looks like:


[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.o
rg/GetAllCompanies", RequestNamespace="http://tempuri.org/",
ResponseNamespace="http://tempuri.org/",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public CompanyDataSet GetAllCompanies()
{
object[] results = this.Invoke("GetAllCompanies", new object[0]);
return ((CompanyDataSet)(results[0]));
}


/Henke

"Lucien" <*lucien*@MicrosoftAccount.com> skrev i meddelandet

news:eH1nfDk1...@TK2MSFTNGP11.phx.gbl...

Lucien

unread,
Jan 13, 2004, 7:51:11 PM1/13/04
to
Thanks. I was able to repro this and I have filed this issue. As a
workaround you could manually change the proxy.


"Henke" <henke...@hotmail.com> wrote in message

news:unhXVHG2...@TK2MSFTNGP10.phx.gbl...

0 new messages