cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 1234go1 <1234...@gmail.com>
Subject Error in setting headers as web params
Date Thu, 25 Apr 2013 06:33:22 GMT
Hi,I'm trying to write a web service that has only one massage param and the
rest are header params.My web service looks like this:
@BindingType(SOAPBinding.SOAP11HTTP_MTOM_BINDING)
@MTOM
@WebService(targetNamespace = WS_NAMESPACE + "/FileSvc")
@Service
public interface FileSvc
{
    void uploadFile(@WebParam(name = "dataHandler") @XmlMimeType(
            "application/octet-stream") DataHandler dataHandler,
                              @WebParam(header = true, name = "fileName")
String fileName,
                              @WebParam(header = true, name = "fileSize")
long fileSize);
}
The services factory is defined like this:
    &ltbean id="fileSvcProxyFactory"         
class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean"&gt
        &ltproperty name="serviceClass" value="com....FileSvc"/&gt
        &ltproperty name="address"                 
value="http://.../FileSvc"/&gt
        &ltproperty name="bus" ref="client_bus"/&gt
        &ltproperty name="dataBinding" ref="globalJAXBDataBinding" /&gt
    &lt/bean&gt
When I try testing this service -from a java client i get this error when I
try to load the service:
   Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
Message part {http://.../FileSvc}fileName of Message
{http://.../FileSvc}uploadFile cannot be processed. This can be caused by
the use of JAX-WS-specific types without the JAX-WS service factory bean.

Does someone know how I can use the parameter headers without getting this
error?

Thanks,



--
View this message in context: http://cxf.547215.n5.nabble.com/Error-in-setting-headers-as-web-params-tp5726732.html
Sent from the cxf-user mailing list archive at Nabble.com.

Mime
View raw message