cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivanto (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CXF-6445) javax.xml.ws.soap.SOAPFaultException: Attachments of type class [CLASS] are not supported
Date Tue, 09 Jun 2015 05:42:01 GMT

     [ https://issues.apache.org/jira/browse/CXF-6445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ivanto updated CXF-6445:
------------------------
    Description: 
hi, 
I'm using a customer wsdl for sending web service request as SOAP with attachment. 

Below are operation generated by cxf wsdl2java
{{
@WebService(targetNamespace = "http://customs.govt.nz/jbms/msggate/match/v1", name = "SubmitLodgementPortType")
@XmlSeeAlso({un.unece.uncefact.codelist.standard.iana.mimemediatype._2013_01_03.ObjectFactory.class,
ObjectFactory.class, nz.govt.customs.jbms.msggate.ackresp.v1.ObjectFactory.class, nz.govt.customs.jbms.msggate.dochdr.v2.ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface SubmitLodgementPortType {

    @WebResult(name = "MessageInfo", targetNamespace = "http://customs.govt.nz/jbms/msggate/ackresp/v1",
partName = "MessageInfo")
    @WebMethod(operationName = "executeTSW_BP_SUBMIT_WS_LODGEMENT", action = "sii:TSW_BP_SUBMIT_WS_LODGEMENT")
    public nz.govt.customs.jbms.msggate.ackresp.v1.MessageInfo executeTSWBPSUBMITWSLODGEMENT(
        @WebParam(partName = "manifest", name = "DocumentManifest", targetNamespace = "http://customs.govt.nz/jbms/msggate/dochdr/v2")
        nz.govt.customs.jbms.msggate.dochdr.v2.Manifest manifest,
        @WebParam(partName = "attachment", name = "attachment", targetNamespace = "http://customs.govt.nz/jbms/msggate/match/v1")
        Binary attachment
    );
}}
The operation suppose to send attachment in Binary object. 
I execute the operation under my WSClient code as below: 
{{
	        attachment.setHref("cid:attachment=149883119_1433466652776");
attachment.setValue(test.getBytes(Charset.forName("UTF-8")));
MessageInfo m = port.executeTSWBPSUBMITWSLODGEMENT(manifest, attachment);
}}

And I'm getting below error message when doing the web service call: 
{{
javax.xml.ws.soap.SOAPFaultException: Attachments of type class nz.govt.customs.jbms.msggate.match.v1.Binary
are not supported.
        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:161)
        at com.sun.proxy.$Proxy40.executeTSWBPSUBMITWSLODGEMENT(Unknown Source)
        at WSClient.main(WSClient.java:67)
Caused by: org.apache.cxf.interceptor.Fault: Attachments of type class nz.govt.customs.jbms.msggate.match.v1.Binary
are not supported.
        at org.apache.cxf.jaxws.interceptors.SwAOutInterceptor.processAttachments(SwAOutInterceptor.java:235)
        at org.apache.cxf.jaxws.interceptors.SwAOutInterceptor.handleMessage(SwAOutInterceptor.java:153)
        at org.apache.cxf.jaxws.interceptors.SwAOutInterceptor.handleMessage(SwAOutInterceptor.java:74)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:516)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:425)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:279)
        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
}}
Looking at SwAOutInterceptor.java code, it only some attachment object (String, Image, etc).
My attachment is a custom object / complex type.
Just wondering anyone can help me to work around this issue? 

Regards,
ivanto

  was:
hi, I'm 
just wondering if anyone can help me with below error message:

javax.xml.ws.soap.SOAPFaultException: Attachments of type class nz.govt.customs.jbms.msggate.match.v1.Binary
are not supported.
        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:161)
        at com.sun.proxy.$Proxy40.executeTSWBPSUBMITWSLODGEMENT(Unknown Source)
        at WSClient.main(WSClient.java:67)
Caused by: org.apache.cxf.interceptor.Fault: Attachments of type class nz.govt.customs.jbms.msggate.match.v1.Binary
are not supported.
        at org.apache.cxf.jaxws.interceptors.SwAOutInterceptor.processAttachments(SwAOutInterceptor.java:235)
        at org.apache.cxf.jaxws.interceptors.SwAOutInterceptor.handleMessage(SwAOutInterceptor.java:153)
        at org.apache.cxf.jaxws.interceptors.SwAOutInterceptor.handleMessage(SwAOutInterceptor.java:74)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:516)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:425)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:279)
        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)

regards,
ivanto


> javax.xml.ws.soap.SOAPFaultException: Attachments of type class [CLASS] are not supported
> -----------------------------------------------------------------------------------------
>
>                 Key: CXF-6445
>                 URL: https://issues.apache.org/jira/browse/CXF-6445
>             Project: CXF
>          Issue Type: Task
>          Components: JAX-WS Runtime
>    Affects Versions: 2.7.16
>         Environment: Linux
>            Reporter: Ivanto
>            Priority: Blocker
>
> hi, 
> I'm using a customer wsdl for sending web service request as SOAP with attachment. 
> Below are operation generated by cxf wsdl2java
> {{
> @WebService(targetNamespace = "http://customs.govt.nz/jbms/msggate/match/v1", name =
"SubmitLodgementPortType")
> @XmlSeeAlso({un.unece.uncefact.codelist.standard.iana.mimemediatype._2013_01_03.ObjectFactory.class,
ObjectFactory.class, nz.govt.customs.jbms.msggate.ackresp.v1.ObjectFactory.class, nz.govt.customs.jbms.msggate.dochdr.v2.ObjectFactory.class})
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> public interface SubmitLodgementPortType {
>     @WebResult(name = "MessageInfo", targetNamespace = "http://customs.govt.nz/jbms/msggate/ackresp/v1",
partName = "MessageInfo")
>     @WebMethod(operationName = "executeTSW_BP_SUBMIT_WS_LODGEMENT", action = "sii:TSW_BP_SUBMIT_WS_LODGEMENT")
>     public nz.govt.customs.jbms.msggate.ackresp.v1.MessageInfo executeTSWBPSUBMITWSLODGEMENT(
>         @WebParam(partName = "manifest", name = "DocumentManifest", targetNamespace =
"http://customs.govt.nz/jbms/msggate/dochdr/v2")
>         nz.govt.customs.jbms.msggate.dochdr.v2.Manifest manifest,
>         @WebParam(partName = "attachment", name = "attachment", targetNamespace = "http://customs.govt.nz/jbms/msggate/match/v1")
>         Binary attachment
>     );
> }}
> The operation suppose to send attachment in Binary object. 
> I execute the operation under my WSClient code as below: 
> {{
> 	        attachment.setHref("cid:attachment=149883119_1433466652776");
> attachment.setValue(test.getBytes(Charset.forName("UTF-8")));
> MessageInfo m = port.executeTSWBPSUBMITWSLODGEMENT(manifest, attachment);
> }}
> And I'm getting below error message when doing the web service call: 
> {{
> javax.xml.ws.soap.SOAPFaultException: Attachments of type class nz.govt.customs.jbms.msggate.match.v1.Binary
are not supported.
>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:161)
>         at com.sun.proxy.$Proxy40.executeTSWBPSUBMITWSLODGEMENT(Unknown Source)
>         at WSClient.main(WSClient.java:67)
> Caused by: org.apache.cxf.interceptor.Fault: Attachments of type class nz.govt.customs.jbms.msggate.match.v1.Binary
are not supported.
>         at org.apache.cxf.jaxws.interceptors.SwAOutInterceptor.processAttachments(SwAOutInterceptor.java:235)
>         at org.apache.cxf.jaxws.interceptors.SwAOutInterceptor.handleMessage(SwAOutInterceptor.java:153)
>         at org.apache.cxf.jaxws.interceptors.SwAOutInterceptor.handleMessage(SwAOutInterceptor.java:74)
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
>         at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:516)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:425)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:279)
>         at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
> }}
> Looking at SwAOutInterceptor.java code, it only some attachment object (String, Image,
etc). My attachment is a custom object / complex type.
> Just wondering anyone can help me to work around this issue? 
> Regards,
> ivanto



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message