This is exactly what I am using, although the Spring Axis2
directives go in
the services.xml, not in web.xml.
Here is what I have in both files:
web.xml
<?xml version="1.0"?>
<web-app xmlns="http://java.sun.com/xml/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:applicationContext.xml
classpath:messageProviderContext.xml
classpath:userManagerServiceContext.xml
classpath:bindpointManagerServiceContext.xml
</param-value>
</context-param>
<!-- Listener for Spring IOC -->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<!-- Http Flex Session attribute and binding listener support -->
<listener>
<listener-class>flex.messaging.HttpFlexSession</listener-
class>
</listener>
<!-- Axis2 Servlet -->
<servlet>
<servlet-name>AxisServlet</servlet-name>
<display-name>Apache-Axis Servlet</display-name>
<servlet-class>
org.apache.axis2.transport.http.AxisServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<!-- BlazeDS/Flex MessageBroker Servlet -->
<servlet>
<servlet-name>MessageBrokerServlet</servlet-name>
<display-name>MessageBrokerServlet</display-name>
<servlet-class>flex.messaging.MessageBrokerServlet</servlet-
class>
<init-param>
<param-name>services.configuration.file</param-name>
<param-value>/WEB-INF/flex/services-config.xml</param-
value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>MessageBrokerServlet</servlet-name>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>
</web-app>
services.xml
<?xml version="1.0" encoding="UTF-8"?>
<serviceGroup>
<service name="BindpointService">
<messageReceivers>
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"
class
=
"com
.bindpoint.server.providers.BindpointServiceMessageReceiverInOut"/>
</messageReceivers>
<parameter
name
=
"ServiceObjectSupplier
">
org
.apache
.axis2
.extensions.spring.receivers.SpringAppContextAwareObjectSupplier</
parameter>
<parameter name="SpringBeanName">bindpointService</parameter>
<!-- <parameter
name
=
"ServiceClass">com.bindpoint.server.providers.BindpointServiceImpl</
parameter>
-->
<parameter name="useOriginalwsdl">false</parameter>
<parameter name="modifyUserWSDLPortAddress">true</parameter>
<operation name="opLogin" mep="http://www.w3.org/ns/wsdl/in-out
">
<actionMapping>http://www.bindpoint.com/bp_server/opLogin</
actionMapping>
<outputActionMapping>http://providers.server.bindpoint.com/BindpointService/opLoginResponse
</outputActionMapping>
</operation>
<operation name="opCloseSession"
mep="http://www.w3.org/ns/wsdl/in-out">
<actionMapping>http://www.bindpoint.com/bp_server/opCloseSession</
actionMapping>
<outputActionMapping>http://providers.server.bindpoint.com/BindpointService/opCloseSessionResponse
</outputActionMapping>
</operation>
<operation name="opSendMessage"
mep="http://www.w3.org/ns/wsdl/in-out">
<actionMapping>http://www.bindpoint.com/bp_server/opSendMessage</
actionMapping>
<outputActionMapping>http://providers.server.bindpoint.com/BindpointService/opSendMessageResponse
</outputActionMapping>
</operation>
<operation name="opGetPendingMessages"
mep="http://www.w3.org/ns/wsdl/in-out">
<actionMapping>http://www.bindpoint.com/bp_server/opGetPendingMessages
</actionMapping>
<outputActionMapping>http://providers.server.bindpoint.com/BindpointService/opGetPendingMessagesResponse
</outputActionMapping>
</operation>
</service>
</serviceGroup>
The weird thing to me is that it only does this
whenuseOriginalwsdl is set
to false. If I set it to true, I can get the wsdl 2.0 back, but
the wsdl
1.1 doesn't work. When its set to true and I try to get the WSDL
1.1, I
get:
<error>
<description>Unable to generate WSDL 1.1 for this service</
description>
<reason>If you wish Axis2 to automatically generate the WSDL 1.1,
then
please +set useOriginalwsdl as false in your services.xml</reason>
</error>
On May 2, 2008, at 9:50 AM, robert lazarski wrote:
Well you seem to have a lot of problems! Let me try and help you with
the spring stuff...
The error you point to is an advanced use case, and while I'm
confident it works because I tested it, I suggest you try something
simpler. The link you point to, while old, never the less tries to
init spring without the help of a servlet container via axis2
lifecycle stuff.
What is far easier is configuring spring as most apps do - outside
even of axis2 - via web.xml .
http://ws.apache.org/axis2/1_4/spring.html
Try the "With a ServletContext" example . (the sublinks are broken in
the 1.4 spring docs, argh! ).
HTH,
Robert
On Fri, May 2, 2008 at 10:15 AM, Michael Bauer
<[EMAIL PROTECTED]> wrote:
I am getting really desperate for help here. Its possible that my
emails
are not making it to the group, but I hope someone can get me
pointed in the
right direction.
I am trying to deploy a WS in Axis2 that was created using
wsdl2java.sh. I
took the generated files, extended the Skeleton, and modified the
services.xml to grab the Impl class from Spring.
The end-goal is to have a web service that I can import using
FlexBuilder
3's WS import function. When I kicked off the process, however,
FlexBuilder
complained that the WSDL 2.0 file produced was not a valid WSDL.
Further
digging showed that FlexBuilder doesn't seem to support WSDL 2.0,
so I tried
to follow the recommendation of the WSDL 1.1 page and set the
useOriginalwsdl to false (it was set to true). However, doing so
leaves a
nasty stack trace:
08:58:43,038 ERROR [STDERR]
org.apache.axis2.deployment.DeploymentException:
The following error occurred during schema generation: null
08:58:43,039 ERROR [STDERR] at
org
.apache
.axis2
.deployment
.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:
106)
08:58:43,039 ERROR [STDERR] at
org
.apache
.axis2
.deployment
.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:
110)
08:58:43,039 ERROR [STDERR] at
org
.apache
.axis2
.deployment
.repository
.util.ArchiveReader.processServiceGroup(ArchiveReader.java:179)
08:58:43,039 ERROR [STDERR] at
org
.apache
.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:81)
08:58:43,039 ERROR [STDERR] at
org
.apache
.axis2
.deployment
.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:
136)
...
Whats interesting is further below in the stack trace:
...
08:58:43,081 ERROR [STDERR] Caused by: org.apache.axis2.AxisFault:
Axis2
Can't find Spring's ApplicationContext
08:58:43,081 ERROR [STDERR] at
org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
08:58:43,081 ERROR [STDERR] at
org
.apache
.axis2
.extensions
.spring
.receivers
.SpringAppContextAwareObjectSupplier
.getServiceObject(SpringAppContextAwareObjectSupplier.java:63)
08:58:43,081 ERROR [STDERR] ... 159 more
Through some research on Google, I found an article suggesting this
was a
coding problem in Axis2:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg23055.html
It says its been resolved, but I just updated my maven2 POMs to
pull Axis2
1.4 (was using Axis2 1.3), and I still get the same problem. I
even removed
all the 1.3 generated files and re-generated them all using Axis2 1.4
version of wsdl2java.sh. I am not quite sure I understand the bug
report
fully, nor how to fix it.
I could really use some assistance here.
Michael Bauer
[EMAIL PROTECTED]
http://www.codechimp.net
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Michael Bauer
[EMAIL PROTECTED]
http://www.codechimp.net