Question about .NET 2.0 web service proxy generation

  • Thread starter Thread starter gartnerjmoody
  • Start date Start date
G

gartnerjmoody

I have a web service that has a method that takes a created .NET class
like this:

method(my.Shared.BO.InfoClass info, bool isItem)

The actual web service gets this class from an assembly, Shared.BO.dll

I have a Windows Workflow that needs to call this, and the Workflow
itself is being passed an object of this type (my.Shared.BO.InfoClass)
as a property in the workflow. The same Shared.BO.dll that the web
service uses for the my.Shared.BO.InfoClass, is also a reference in
the Workflow.

So far so good. When, from the workflow, I do "Add Web Reference",
the proxy class that is generated creates its "own" version of that
class, so the method from the proxy looks like:

method(myworkflowLib.WSProxy.InfoClass info, bool isItem)

When compiling when the code uses the my.Shared.BO.InfoClass passed in
to the workflow in the WS proxy call like this:

Here is the property that the workflow has:
public my.namespace.class Info
{
get/set......
}

And here is how I setup/call the proxy:

public myworkflow.WSProxy infoProxy = new ......

infoProxy.StoreInfo(Info, false);

I am getting an error in the compiler:
Argument 1: cannot convert from my.Shared.BO.InfoClass to
myworkflow.WSProxy.InfoClass

How do I get the generated proxy to use the my.Shared.BO.InfoClass
from the referenced dll instead of it's own namespace version???


I DO realize that they shouldn't have this my.Shared.BO.InfoClass as
part of the web service method (it should take an XmlNode or string
and deserialize into the class inside the web service itself), but I
have no control over the web service code that needs to be called.

Is there any way to have a Generated proxy handle this?
I've commented out the reference.cs internal InfoClass, added a using
Shared.BO, but then I get a big thing about "There was an error
reflecting "info".......

The internal call in the proxy is:
public RetStatus
method([System.Xml.Serialization.XmlElementAttribute(Namespace="http://
oursite.com/schemas/myschema")] InfoClass info, bool isItem) <-- this
is the "info" that it gives the errors about reflecting

Help??
 
<snipped>

You need to post to MS.Public.dotnet.framework.webservices.

Your problem has been discussed there and how to correct it.
 
<snipped>

You need to post to MS.Public.dotnet.framework.webservices.

Your problem has been discussed there and how to correct it.

Thanks a ton for the pointer to that group!! Much appreciated.
 
Back
Top