You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Li, Weiye" <We...@STJUDE.ORG> on 2008/02/25 16:35:16 UTC

How to work with document type?

My testing Jax-WS with Aegis worked only with RPC style. When I changed soapbinding with RPC style, the same codes give exception. Here's my WS file:

@WebService(name="EmicroManager", targetNamespace="http://emicro.test") @SOAPBinding(style=Style.DOCUMENT, use=Use.LITERAL, parameterStyle=ParameterStyle.WRAPPED) public interface EmicroService {
.....
}

When client tried to use the service: ws.addEmployee(Employee) or any other method, exception thrown as:
Feb 25, 2008 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: NO_MESSAGE_FOR_PART    at org.apache.cxf.aegis.databinding.XMLStreamDataWriter.write(XMLStreamDataWriter.java:72)    at org.apache.cxf.aegis.databinding.XMLStreamDataWriter.write(XMLStreamDataWriter.java:45)    at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:93)    at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)    at $Proxy24.addEmployee(Unknown Source)


Where the "Employee" extends a base class "People". Both of them are simple Java bean.

The same codes works if I change DOCUMENT to RPC. I believe I must miss something, but what's that?
Help?

Thanks.


Re: How to work with document type?

Posted by Benson Margulies <bi...@gmail.com>.
If you get rid of all your JAX-WS annotations except @WebParam, which are
not needed for CXF, you won't get this error. I tried it with your test
case.

On Mon, Feb 25, 2008 at 10:35 AM, Li, Weiye <We...@stjude.org> wrote:

> My testing Jax-WS with Aegis worked only with RPC style. When I changed
> soapbinding with RPC style, the same codes give exception. Here's my WS
> file:
>
> @WebService(name="EmicroManager", targetNamespace="http://emicro.test")
> @SOAPBinding(style=Style.DOCUMENT, use=Use.LITERAL, parameterStyle=
> ParameterStyle.WRAPPED) public interface EmicroService {
> .....
> }
>
> When client tried to use the service: ws.addEmployee(Employee) or any
> other method, exception thrown as:
> Feb 25, 2008 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChaindoIntercept INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: NO_MESSAGE_FOR_PART    at
> org.apache.cxf.aegis.databinding.XMLStreamDataWriter.write(
> XMLStreamDataWriter.java:72)    at
> org.apache.cxf.aegis.databinding.XMLStreamDataWriter.write(
> XMLStreamDataWriter.java:45)    at
> org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(
> AbstractOutDatabindingInterceptor.java:93)    at
> org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(
> BareOutInterceptor.java:68)    at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> PhaseInterceptorChain.java:208)    at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)    at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)    at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)    at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
>  at $Proxy24.addEmployee(Unknown Source)
>
>
> Where the "Employee" extends a base class "People". Both of them are
> simple Java bean.
>
> The same codes works if I change DOCUMENT to RPC. I believe I must miss
> something, but what's that?
> Help?
>
> Thanks.
>
>