[ 
http://issues.apache.org/jira/browse/AXIS-2530?page=comments#action_12423159 ] 
            
Christopher Sahnwaldt commented on AXIS-2530:
---------------------------------------------

And for the ones who don't use Spring, here's how to publish your objects 
without Spring.

First create the AxisServer and export it to the ServletContext:

SoapServerConfiguration soapServerConfiguration = new SoapServerConfiguration();
soapServerConfiguration.setAttachmentDir(new 
FileSystemResource("my/soap/attachments")); 
soapServerConfiguration.setDisableServicesList(false); 
soapServerConfiguration.setServicesPath("AxisServletPathFromWebXml");

AxisServer axisServer = new AxisServer(soapServerConfiguration);
axisServer.setName("AxisServletNameFromWebXml");
servletContext.setAttribute("AxisEngine", axisServer);


Now make methods "method1" and "method2" of object myBean accessible as web 
service operations:

SoapReceiver publisher = new SoapReceiver();
publisher.setServiceName("MyService");
publisher.setTarget(myBean); 
publisher.setAllowedMethods(new String[] { "method1","method2" }); 
publisher.setServerConfiguration(soapServerConfiguration);

soapServerConfiguration.deployService("MyService", publisher.createService());


When you're done, remove the service:

soapServerConfiguration.undeployService("MyService");


> publish any object as web service
> ---------------------------------
>
>                 Key: AXIS-2530
>                 URL: http://issues.apache.org/jira/browse/AXIS-2530
>             Project: Apache Axis
>          Issue Type: New Feature
>          Components: Deployment / Registries
>    Affects Versions: current (nightly)
>            Reporter: Christopher Sahnwaldt
>         Attachments: AxisServerExporter.java, ObjectRPCProvider.java, 
> SoapConfiguration.java, SoapInterface.java, SoapReceiver.java, 
> SoapServerConfiguration.java
>
>
> It would be great if one could take any object and publish it as a service. 
> See for example http://marc.theaimsgroup.com/?l=axis-dev&m=115168170301873 . 
> We have similar requirements (we configure objects using Spring), so we 
> figured out a way to  create our own Axis configuration and fill it with 
> service handlers for our objects. To make the AxisServlet use our handmade 
> configuration, we create an AxisServer object and store it as an attribute in 
> the ServletContext.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to