I know this doesn't really answer your question, but the advice might
help you more than a direct answer: don't use a ref parameter on a web
service method.
It doesn't make sense. Web services are a cross-process (usually
cross-machine) communication mechanism. The ref keyword is used to allow
the client to change the object reference that a variable points to.
There is no way that your server side code (web service method) will be
able to change the reference to the variable in the client code.
Perhaps you can explain what you were trying to accomplish with the ref
parameter, and we can suggest a better alternative?
Or, if the ref parameter is required by other (non web service) clients
of the method, you might want to make a "wrapper" method without any ref
parameters that is exposed as a web service, and it just calls your
other method internally.
Joshua Flanagan
http://flimflan.com/blog
Pratcp wrote:
Hello,
I have an asp.net Web app in vb.net trying to call a C# web service
which takes a reference parameter. I tried a simple C# web app to call
the Web service and it works perfectly. However, when I try it in the
vb.net web app, I run into XML definition errors. Looks like the proxy
class is not able to generate the correct XML with the ref parameter.
Here is error:
The element 'urn:test-com:document:test:rfc:functions:T_RETURN has
invalid child element 'urn:test-com:document:test:rfc:functions:item'.
Expected 'urn:test-com:document:test:rfc:functions:ITEM_NUMBER
urn:test-com:document:test:rfc:functions:PO_ITEM_NO
Here is how I am declaring the ref parameter in vb.net
Dim oReturnObj(0) as com.abc.qa.ZRETURNOBJ
oReturnObj(0) = New com.abc.qa.ZRETURNOBJ
Any help will be great.
-PCP