PDA

View Full Version : How to expose web service attributes?



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




<System.Web.Services.WebMethodAttribute&#40;&#41;, _
System.Web.Services.Protocols.SoapDocumentMethodAt tribute&#40;"quinton.com/Pyramis/2004", RequestNamespace&#58;="quinton.com/Pyramis/2004", ResponseNamespace&#58;="quinton.com/Pyramis/2004", Use&#58;=System.Web.Services.Description.SoapBindingUs e.Literal, ParameterStyle&#58;=System.Web.Services.Protocols.Soap ParameterStyle.Wrapped&#41;>

Bruno Baia
02-16-2006, 05: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&#40;&#41;, _
System.Web.Services.Protocols.SoapDocumentMethodAt tribute&#40;"quinton.com/Pyramis/2004", RequestNamespace&#58;="quinton.com/Pyramis/2004", ResponseNamespace&#58;="quinton.com/Pyramis/2004", Use&#58;=System.Web.Services.Description.SoapBindingUs e.Literal, ParameterStyle&#58;=System.Web.Services.Protocols.Soap ParameterStyle.Wrapped&#41;>

is equivalent to


<WebServiceBinding&#40;Namespace&#58;="quinton.com/Pyramis/2004"&#41;>
Public Class MyWebService
&#123;
<System.Web.Services.WebMethodAttribute>
Public Function HelloWorld&#40;&#41; as String
&#123;
....



-Bruno who hates VB ;)