Try using the annotation service factory to create your client:
Service serviceModel =
new AnnotationServiceFactory(
new Jsr181WebAnnotations(),
XFireFactory.newInstance().getXFire().getTransportManager(),
new AegisBindingProvider(new
JaxbTypeRegistry())).create(ProfileService.class);
(I added this to the Client API guide to help future users who come across
this...
- Dan
Julio.A.Mistral wrote:
Hi Dan-
Thanks for taking a look at this, it's been stumping me for 2 days now...as
requested:
I'm using the XFire API for a client:
Service serviceModel = new
JaxbServiceFactory().create(ProfileService.class);
ProfileService client = (ProfileService)
new
XFireProxyFactory().create(serviceModel,
"http://localhost:8081/xfire/services/ProfileService");
// Send message
SubmitProfileRequest request = new SubmitProfileRequest();
SubmitProfileRequestChoice profile = new
SubmitProfileRequestChoice();
profile.setProfileL3( getProfileL3() );
request.setApproverId( "MISTRAJ" );
request.setWfContext( getWFContext() );
request.setSaveIfValid( true );
request.setProfile( profile );
SubmitProfileResponse response = client.submit( request );
And here's my web.xml
=================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:META-INF/application/applContext-service.xml
classpath:META-INF/dao/applContext-dao.xml
classpath:org/codehaus/xfire/spring/xfire.xml
</param-value>
</context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:log4j.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>xfire</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>xfire</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
And my xfire-servlet.xml
================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans
PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="webAnnotations"
class="org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations"/>
<bean id="handlerMapping"
class="org.codehaus.xfire.spring.remoting.Jsr181HandlerMapping">
<property name="typeMappingRegistry">
<ref bean="xfire.typeMappingRegistry"/>
</property>
<property name="xfire">
<ref bean="xfire"/>
</property>
<property name="webAnnotations">
<ref bean="webAnnotations"/>
</property>
</bean>
<bean
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="urlMap">
<map>
<entry key="/">
<ref bean="handlerMapping"/>
</entry>
</map>
</property>
</bean>
<!-- Set up profile service -->
<bean id="profileService"
class="cv.profile.service.impl.ProfileServiceImpl" >
<property name="profileValidator">
<ref bean="profileValidator" />
</property>
</bean>
</beans>
--
View this message in context:
http://www.nabble.com/The-inbound-web-parameter-for-my-service-is-always-null-t1520040.html#a4128463
Sent from the XFire - User forum at Nabble.com.
--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com
http://netzooid.com/blog