J
Joel Zinn
I am trying to build a web service that will allow a class instance to be
passed to the web service via a method signature. When I write the client
to consume the web service, I get an error that states, "Value of type
"ExternalNameSpace.myClass" cannot be converted to "localhost/myClass"
Here is how this is set up.
1. I have a class(myClass) defined in a namespace. myClass includes:
a. a class that includes header info in 4 properties (all string values)
b. an array of a second class with one or more detail lines (all string
values)
2. I have a wrapper class the includes a copy of myClass in its definition
3. I have a Public Shared Sub that takes an instance of theWrapper Class as
an input parameter.
4. I create a webmethod on my web service that takes myClass as in input
parameter. The WebMethod:
a. instantiates the wrapper class
b. assigns the myClass parameter to the myClass property of the wrapper
class
c. builds the remaining info to populate the wrapper class
d. calls the method (in item 3 above), passing the wrapper class
5. I built a test harness to test consuming the web service. The test
harness:
a. has a web reference to the Webservice
b. instantiates the myClass object
c. populates the instance with some dummy data
d. instantiates the web service
e. calls the method in the web service, passing the myClass (with the
dummy data)
I get the error message shown at the top, on the signature of the call of
the web service method, where the dummy data myClass is passed
This is the first time I have attempted to create a web service where a
non-primative object is passed to a web method. Can anyone shed any light
on my problem?
Thanks in advance...
passed to the web service via a method signature. When I write the client
to consume the web service, I get an error that states, "Value of type
"ExternalNameSpace.myClass" cannot be converted to "localhost/myClass"
Here is how this is set up.
1. I have a class(myClass) defined in a namespace. myClass includes:
a. a class that includes header info in 4 properties (all string values)
b. an array of a second class with one or more detail lines (all string
values)
2. I have a wrapper class the includes a copy of myClass in its definition
3. I have a Public Shared Sub that takes an instance of theWrapper Class as
an input parameter.
4. I create a webmethod on my web service that takes myClass as in input
parameter. The WebMethod:
a. instantiates the wrapper class
b. assigns the myClass parameter to the myClass property of the wrapper
class
c. builds the remaining info to populate the wrapper class
d. calls the method (in item 3 above), passing the wrapper class
5. I built a test harness to test consuming the web service. The test
harness:
a. has a web reference to the Webservice
b. instantiates the myClass object
c. populates the instance with some dummy data
d. instantiates the web service
e. calls the method in the web service, passing the myClass (with the
dummy data)
I get the error message shown at the top, on the signature of the call of
the web service method, where the dummy data myClass is passed
This is the first time I have attempted to create a web service where a
non-primative object is passed to a web method. Can anyone shed any light
on my problem?
Thanks in advance...