NewsBot
1
Hi all,
I have a problem* (dont we all have)... so here's the story. I'm currently evaluating the feasibility of using Web Services rather than manually XSD and SOAP parsing solution that a system have. I have a problem that I have multiple definitions for the same class or enumerations but in different namespaces. So I would have something like:
namespace A {
***public enum Status {
*********Happy,
*********Sad,
*********Stressed,
*********BadlyDamagedBeyondRepair
***}
}
and
namespace B {
***public enum Status {
******Rich,
******Poor,
******Standard
***}
}
and maybe a class like
namespace C {
***public class EmployeeCondition {
*********private Status mood =*Status.Sad;
*********public Status Mood { get.. set..}
*********private*B.Status*monetary = B.Status.Poor;
*********public B.Status Monetary { get...set.. }
***}
}
then I have a web service that expose a web method:
public EmployeeCondition getEmployeeCondition ( String name ) {
*....
}
Now, my question is. Is this doable? Because when we are doing this via XSD, we used namespaces to avoid the naming problems. But it seems that .Net instead of creating new namespaces, it modifies the name of the class or enumerations (to Status1 for instance). If it is doable, can anyone tell me how?
My coleague tried to test this on Java and I havent really tried it in .net (coz he has the server, and I dont). But the result is that Java completely ignores the second Status class so that the second enum Status doesnt appear in the web service wsdl or in the class definitions. It just disappears... :s
Thanks in advance
More...
View All Our Microsoft Related Feeds
I have a problem* (dont we all have)... so here's the story. I'm currently evaluating the feasibility of using Web Services rather than manually XSD and SOAP parsing solution that a system have. I have a problem that I have multiple definitions for the same class or enumerations but in different namespaces. So I would have something like:
namespace A {
***public enum Status {
*********Happy,
*********Sad,
*********Stressed,
*********BadlyDamagedBeyondRepair
***}
}
and
namespace B {
***public enum Status {
******Rich,
******Poor,
******Standard
***}
}
and maybe a class like
namespace C {
***public class EmployeeCondition {
*********private Status mood =*Status.Sad;
*********public Status Mood { get.. set..}
*********private*B.Status*monetary = B.Status.Poor;
*********public B.Status Monetary { get...set.. }
***}
}
then I have a web service that expose a web method:
public EmployeeCondition getEmployeeCondition ( String name ) {
*....
}
Now, my question is. Is this doable? Because when we are doing this via XSD, we used namespaces to avoid the naming problems. But it seems that .Net instead of creating new namespaces, it modifies the name of the class or enumerations (to Status1 for instance). If it is doable, can anyone tell me how?
My coleague tried to test this on Java and I havent really tried it in .net (coz he has the server, and I dont). But the result is that Java completely ignores the second Status class so that the second enum Status doesnt appear in the web service wsdl or in the class definitions. It just disappears... :s
Thanks in advance
More...
View All Our Microsoft Related Feeds