PDA

View Full Version : How to expose web service attributes?


choenes
02-16-2006, 04:15 PM
Is there a way to expose web service attributes like the following using Spring's Web Service Exporter?



<System.Web.Services.WebMethodAttribute(), _
System.Web.Services.Protocols.SoapDocumentMethodAt tribute("quinton.com/Pyramis/2004", RequestNamespace:="quinton.com/Pyramis/2004", ResponseNamespace:="quinton.com/Pyramis/2004", Use:=System.Web.Services.Description.SoapBindingUs e.Literal, ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.Wrapped)>

Bruno Baia
02-16-2006, 06:26 PM
Hi,

You can only expose the WebMethodAttribute using the WebServiceExporter, here is an example (http://www.springframework.net/doc/reference/html/web.html#d0e7861).

For others attribute, an issue (http://opensource2.atlassian.com/projects/spring/browse/SPRNET-249) in JIRA have been created a while ago.

Between for your example, i don't see the need of the SoapDocumentMethodAttribute :


<System.Web.Services.WebMethodAttribute(), _
System.Web.Services.Protocols.SoapDocumentMethodAt tribute("quinton.com/Pyramis/2004", RequestNamespace:="quinton.com/Pyramis/2004", ResponseNamespace:="quinton.com/Pyramis/2004", Use:=System.Web.Services.Description.SoapBindingUs e.Literal, ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.Wrapped)>

is equivalent to

<WebServiceBinding(Namespace:="quinton.com/Pyramis/2004")>
Public Class MyWebService
{
<System.Web.Services.WebMethodAttribute>
Public Function HelloWorld() as String
{
....



-Bruno who hates VB ;)