Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Method XX cannot be reflected

Reply
Thread Tools

Method XX cannot be reflected

 
 
Peter van der veen
Guest
Posts: n/a
 
      11-14-2006
Hi

In my porject i use a custom header to be added to the SOAP message.
I added the the custom SOAP header to the follwoing function which is
in the proxy class.

But when invoking the proxy for the first time i got the message

Method XX cannot be reflected, where XX is the name of this function.
When i remove the soapheader attribute everythings works, but no
custom header is then send

How to solve?


<System.Web.Services.Protocols.SoapHeader("Vendor" ,
Direction:=SoapHeaderDirection.InOut)> _
<System.Web.Services.Protocols.SoapRpcMethodAttrib ute("",
RequestNamespace:="http://berichten.communicatie.ech.bevalue.com",
ResponseNamespace:="https://echstag.ilcampo.com/axis/services/ECHBerichtenServices")>
_
Public Function zetAflosOpdracht(ByVal in0 As AflosOpdracht)
As
<System.Xml.Serialization.SoapElementAttribute("ze tAflosOpdrachtReturn")>
Acknowledgement
Dim results() As Object = Me.Invoke("zetAflosOpdracht",
New Object() {in0})
Return CType(results(0), Acknowledgement)
End Function

 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      11-14-2006
<Peter van der veen> wrote in message
news:(E-Mail Removed)...
> Hi
>
> In my porject i use a custom header to be added to the SOAP message.
> I added the the custom SOAP header to the follwoing function which is
> in the proxy class.
>
> But when invoking the proxy for the first time i got the message
>
> Method XX cannot be reflected, where XX is the name of this function.
> When i remove the soapheader attribute everythings works, but no
> custom header is then send
>
> How to solve?


Usually, the SoapHeader attribute is used in the server side. The client
proxy would then be updated via Update Web Reference.

Is the soap header defined on the server? Also, did you define the
corresponding public field in the client?

John


 
Reply With Quote
 
 
 
 
Peter van der veen
Guest
Posts: n/a
 
      11-15-2006
The ws is an axis server, so the header as not present in the
WSDL/proxy. But the header must be repsent in the SOAP message.

i did add the following to the project

<System.Serializable()> _
<System.Diagnostics.DebuggerStepThrough()> _
<System.ComponentModel.DesignerCategory("code")> _
<System.Xml.Serialization.XmlType(Namespace:="http ://ech.client.nl/vendor")>
_
<System.Xml.Serialization.XmlRoot(Namespace:="http ://ech.client.nl/vendor",
IsNullable:=False)> _
Public Class Vendor : Inherits SoapHeader
Public VENDOR As String
End Class

and in the proxy i added the line to the function that needs the
header

<System.Web.Services.Protocols.SoapHeader("Vendor" ,
Direction:=SoapHeaderDirection.InOut)> _
<System.Web.Services.Protocols.SoapRpcMethodAttrib ute("",
RequestNamespace:="http://berichten.communicatie.ech.bevalue.com",
ResponseNamespace:="https://echstag.ilcampo.com/axis/services/ECHBerichtenServices")>
_
Public Function zetAflosOpdracht(ByVal in0 As AflosOpdracht)
As
<System.Xml.Serialization.SoapElementAttribute("ze tAflosOpdrachtReturn")>
Acknowledgement
Dim results() As Object = Me.Invoke("zetAflosOpdracht",
New Object() {in0})
Return CType(results(0), Acknowledgement)
End Function

Peter

On Tue, 14 Nov 2006 18:34:17 -0500, "John Saunders" <john.saunders at
trizetto.com> wrote:

><Peter van der veen> wrote in message
>news:(E-Mail Removed).. .
>> Hi
>>
>> In my porject i use a custom header to be added to the SOAP message.
>> I added the the custom SOAP header to the follwoing function which is
>> in the proxy class.
>>
>> But when invoking the proxy for the first time i got the message
>>
>> Method XX cannot be reflected, where XX is the name of this function.
>> When i remove the soapheader attribute everythings works, but no
>> custom header is then send
>>
>> How to solve?

>
>Usually, the SoapHeader attribute is used in the server side. The client
>proxy would then be updated via Update Web Reference.
>
>Is the soap header defined on the server? Also, did you define the
>corresponding public field in the client?
>
>John
>


 
Reply With Quote
 
Peter van der veen
Guest
Posts: n/a
 
      11-15-2006
I got it.

I was reffering to the wrong class in the SOAP header

I had to reffer to the one present in the proxy class.
I can send the header and the webservice get the header

Only one problem exists. The header information has to be in a
certain namespace and ws is missing that.

i thought i had to place it in the vendor class, but it seems that is
not enough.any idea whre ot place?


On Wed, 15 Nov 2006 09:49:33 +0100, Peter van der veen <> wrote:

>The ws is an axis server, so the header as not present in the
>WSDL/proxy. But the header must be repsent in the SOAP message.
>
>i did add the following to the project
>
><System.Serializable()> _
><System.Diagnostics.DebuggerStepThrough()> _
><System.ComponentModel.DesignerCategory("code") > _
><System.Xml.Serialization.XmlType(Namespace:="htt p://ech.client.nl/vendor")>
>_
><System.Xml.Serialization.XmlRoot(Namespace:="htt p://ech.client.nl/vendor",
>IsNullable:=False)> _
>Public Class Vendor : Inherits SoapHeader
> Public VENDOR As String
>End Class
>
>and in the proxy i added the line to the function that needs the
>header
>
> <System.Web.Services.Protocols.SoapHeader("Vendor" ,
>Direction:=SoapHeaderDirection.InOut)> _
> <System.Web.Services.Protocols.SoapRpcMethodAttrib ute("",
>RequestNamespace:="http://berichten.communicatie.ech.bevalue.com",
>ResponseNamespace:="https://echstag.ilcampo.com/axis/services/ECHBerichtenServices")>
>_
> Public Function zetAflosOpdracht(ByVal in0 As AflosOpdracht)
>As
><System.Xml.Serialization.SoapElementAttribute("z etAflosOpdrachtReturn")>
>Acknowledgement
> Dim results() As Object = Me.Invoke("zetAflosOpdracht",
>New Object() {in0})
> Return CType(results(0), Acknowledgement)
> End Function
>
>Peter
>
>On Tue, 14 Nov 2006 18:34:17 -0500, "John Saunders" <john.saunders at
>trizetto.com> wrote:
>
>><Peter van der veen> wrote in message
>>news:(E-Mail Removed). ..
>>> Hi
>>>
>>> In my porject i use a custom header to be added to the SOAP message.
>>> I added the the custom SOAP header to the follwoing function which is
>>> in the proxy class.
>>>
>>> But when invoking the proxy for the first time i got the message
>>>
>>> Method XX cannot be reflected, where XX is the name of this function.
>>> When i remove the soapheader attribute everythings works, but no
>>> custom header is then send
>>>
>>> How to solve?

>>
>>Usually, the SoapHeader attribute is used in the server side. The client
>>proxy would then be updated via Update Web Reference.
>>
>>Is the soap header defined on the server? Also, did you define the
>>corresponding public field in the client?
>>
>>John
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Client side changes not reflected in page =?Utf-8?B?cGF0cmlja2RyZA==?= ASP .Net 24 03-28-2007 02:04 AM
I need my CSS in the master page to get reflected in content page pushpadant@gmail.com ASP .Net 7 07-03-2006 06:42 AM
urgent-changes getting reflected in other folder also monika ASP .Net 2 04-25-2005 04:41 AM
Database updates to be reflected on my grid Gino Python 0 11-22-2004 07:18 PM
client side scripting changes to be reflected back to server Sumit ASP .Net 1 10-16-2003 04:17 PM



Advertisments