You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by DSL <dl...@gmail.com> on 2011/11/04 17:13:47 UTC
Issue on configuration
I am having an issue when I am trying to configure my client to talk
to my sts secured web service. I am getting the following error:
NPE at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(
AbstractWSDLBasedEndpointFactory.java:239 )
I am hoping that someone else has seen this issue and can offer a
solution to my issue.
Here is my current configuration:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:cxf="http://cxf.apache.org/core"
xsi:schemaLocation="
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
http://cxf.apache.org/configuration/security
http://cxf.apache.org/schemas/configuration/security.xsd
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension*.xml" />
<bean id="logInbound"
class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
<bean id="logOutbound"
class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
<bean id="mapAggregator" class="org.apache.cxf.ws.addressing.MAPAggregator">
<property name="allowDuplicates" value="false"/>
</bean>
<bean id="mapCodec" class="org.apache.cxf.ws.addressing.soap.MAPCodec"/>
<cxf:bus>
<cxf:inInterceptors>
<ref bean="logInbound"/>
<ref bean="mapAggregator"/>
<ref bean="mapCodec"/>
</cxf:inInterceptors>
<cxf:outInterceptors>
<ref bean="logOutbound"/>
<ref bean="mapAggregator"/>
<ref bean="mapCodec"/>
</cxf:outInterceptors>
<cxf:outFaultInterceptors>
<ref bean="logOutbound"/>
<ref bean="mapAggregator"/>
<ref bean="mapCodec"/>
</cxf:outFaultInterceptors>
<cxf:inFaultInterceptors>
<ref bean="logInbound"/>
<ref bean="mapAggregator"/>
<ref bean="mapCodec"/>
</cxf:inFaultInterceptors>
<cxf:features>
<bean class="org.apache.cxf.ws.addressing.WSAddressingFeature"/>
<bean class="org.apache.cxf.ws.policy.WSPolicyFeature"/>
</cxf:features>
</cxf:bus>
<bean id="clientImpl"
class="com.example.helloworldservice.HelloWorldServicePortType"
factory-bean="clientFactory"
factory-method="create"/>
<bean id="clientFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
<property name="serviceClass"
value="com.example.helloworldservice.HelloWorldServicePortType"/>
<property name="address"
value="http://localhost:8080/HelloWorld/HelloWorldService"/>
<property name="bus" ref="cxf" />
<property name="features">
<list>
<bean class="org.apache.cxf.ws.addressing.WSAddressingFeature"/>
<bean class="org.apache.cxf.ws.policy.WSPolicyFeature"/>
</list>
</property>
<property name="handlers">
<list>
<bean class="....somehandlers"/>
</list>
</property>
</bean>
</beans>
Re: Issue on configuration
Posted by Daniel Kulp <dk...@apache.org>.
On Friday, November 04, 2011 12:13:47 PM DSL wrote:
> I am having an issue when I am trying to configure my client to talk
> to my sts secured web service. I am getting the following error:
>
> NPE at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo
> ( AbstractWSDLBasedEndpointFactory.java:239 )
You obviously are not using a current version of CXF as there isn't any code
at that line. Can you try upgrading to newer versions of CXF and see if that
fixes it?
Thanks!
Dan
>
> I am hoping that someone else has seen this issue and can offer a
> solution to my issue.
>
> Here is my current configuration:
>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:jaxws="http://cxf.apache.org/jaxws"
> xmlns:cxf="http://cxf.apache.org/core"
> xsi:schemaLocation="
> http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
> http://cxf.apache.org/policy
> http://cxf.apache.org/schemas/policy.xsd
> http://cxf.apache.org/configuration/security
> http://cxf.apache.org/schemas/configuration/security.xsd
> http://cxf.apache.org/transports/http/configuration
> http://cxf.apache.org/schemas/configuration/http-conf.xsd">
>
> <import resource="classpath:META-INF/cxf/cxf.xml" />
> <import resource="classpath:META-INF/cxf/cxf-extension*.xml" />
>
> <bean id="logInbound"
> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
> <bean id="logOutbound"
> class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
>
> <bean id="mapAggregator"
> class="org.apache.cxf.ws.addressing.MAPAggregator"> <property
> name="allowDuplicates" value="false"/>
> </bean>
> <bean id="mapCodec" class="org.apache.cxf.ws.addressing.soap.MAPCodec"/>
>
> <cxf:bus>
> <cxf:inInterceptors>
> <ref bean="logInbound"/>
> <ref bean="mapAggregator"/>
> <ref bean="mapCodec"/>
> </cxf:inInterceptors>
> <cxf:outInterceptors>
> <ref bean="logOutbound"/>
> <ref bean="mapAggregator"/>
> <ref bean="mapCodec"/>
> </cxf:outInterceptors>
> <cxf:outFaultInterceptors>
> <ref bean="logOutbound"/>
> <ref bean="mapAggregator"/>
> <ref bean="mapCodec"/>
> </cxf:outFaultInterceptors>
> <cxf:inFaultInterceptors>
> <ref bean="logInbound"/>
> <ref bean="mapAggregator"/>
> <ref bean="mapCodec"/>
> </cxf:inFaultInterceptors>
> <cxf:features>
> <bean class="org.apache.cxf.ws.addressing.WSAddressingFeature"/>
> <bean class="org.apache.cxf.ws.policy.WSPolicyFeature"/> </cxf:features>
> </cxf:bus>
>
> <bean id="clientImpl"
> class="com.example.helloworldservice.HelloWorldServicePortType"
> factory-bean="clientFactory"
> factory-method="create"/>
>
> <bean id="clientFactory"
> class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean"> <property
> name="serviceClass"
> value="com.example.helloworldservice.HelloWorldServicePortType"/>
> <property name="address"
> value="http://localhost:8080/HelloWorld/HelloWorldService"/>
> <property name="bus" ref="cxf" />
> <property name="features">
> <list>
> <bean
> class="org.apache.cxf.ws.addressing.WSAddressingFeature"/> <bean
> class="org.apache.cxf.ws.policy.WSPolicyFeature"/> </list>
> </property>
> <property name="handlers">
> <list>
> <bean class="....somehandlers"/>
> </list>
> </property>
> </bean>
>
>
>
> </beans>
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com