J
Jimmy
With the bean definition in spring.xml below, I'm getting the
following exception. It seems like it's trying to consume the request
as a JSON formated string rather than XML. How can I have the
endpoint to consume XML request then produce JSON response back to
caller? What's wrong with the spring bean definition?
Thanks,
Jimmy
P.S.
WARN org.apache.cxf.phase.PhaseInterceptorChain - Interceptor has
thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Marshalling Error: Invalid JSON
namespace: http://mydomain.com/blah/webservices
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:
161)
at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:
169)
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:
114)
:
:
<jaxws:endpoint id="testServiceEndPoint" address="/testService"
bindingUri="http://apache.org/cxf/binding/http">
<jaxws:implementor>
<ref bean="testService" />
</jaxws:implementor>
<jaxws:serviceFactory>
<bean class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
<property name="wrapped" value="false"/>
<property name="properties">
<map>
<entry key="Content-Type" value="text/plain"/>
<entry>
<key>
<value>javax.xml.stream.XMLInputFactory</value>
</key>
<bean class="com.ctc.wstx.stax.WstxInputFactory">
</bean>
</entry>
<entry>
<key>
<value>javax.xml.stream.XMLOutputFactory</value>
</key>
<bean
class="org.codehaus.jettison.mapped.MappedXMLOutputFactory">
<constructor-arg>
<map>
</map>
</constructor-arg>
</bean>
</entry>
</map>
</property>
</bean>
</jaxws:serviceFactory>
</jaxws:endpoint>
following exception. It seems like it's trying to consume the request
as a JSON formated string rather than XML. How can I have the
endpoint to consume XML request then produce JSON response back to
caller? What's wrong with the spring bean definition?
Thanks,
Jimmy
P.S.
WARN org.apache.cxf.phase.PhaseInterceptorChain - Interceptor has
thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Marshalling Error: Invalid JSON
namespace: http://mydomain.com/blah/webservices
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:
161)
at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:
169)
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:
114)
:
:
<jaxws:endpoint id="testServiceEndPoint" address="/testService"
bindingUri="http://apache.org/cxf/binding/http">
<jaxws:implementor>
<ref bean="testService" />
</jaxws:implementor>
<jaxws:serviceFactory>
<bean class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
<property name="wrapped" value="false"/>
<property name="properties">
<map>
<entry key="Content-Type" value="text/plain"/>
<entry>
<key>
<value>javax.xml.stream.XMLInputFactory</value>
</key>
<bean class="com.ctc.wstx.stax.WstxInputFactory">
</bean>
</entry>
<entry>
<key>
<value>javax.xml.stream.XMLOutputFactory</value>
</key>
<bean
class="org.codehaus.jettison.mapped.MappedXMLOutputFactory">
<constructor-arg>
<map>
</map>
</constructor-arg>
</bean>
</entry>
</map>
</property>
</bean>
</jaxws:serviceFactory>
</jaxws:endpoint>