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

Benjamin Coiffe updated CXF-1603:
---------------------------------

    Attachment: SOConverter.xml

The wsdl attached is the one from Sun Star Office and CXF fails to do anything 
with it. With the fix suggested above, it can generate the stubs. 

> Can not generate subs or dynamic client for a web service with no Body Parts 
> (NullPointerException)
> ---------------------------------------------------------------------------------------------------
>
>                 Key: CXF-1603
>                 URL: https://issues.apache.org/jira/browse/CXF-1603
>             Project: CXF
>          Issue Type: Bug
>          Components: Soap Binding
>    Affects Versions: 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.1.1
>            Reporter: Benjamin Coiffe
>             Fix For: 2.1.1
>
>         Attachments: SOConverter.xml
>
>
> Stacktrace is:
> at 
> org.apache.cxf.binding.soap.SoapBindingFactory.initializeMessage(SoapBindingFactory.java:576)
>       at 
> org.apache.cxf.binding.soap.SoapBindingFactory.initializeBindingOperation(SoapBindingFactory.java:500)
>       at 
> org.apache.cxf.binding.soap.SoapBindingFactory.createBindingInfo(SoapBindingFactory.java:475)
>       at 
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildBinding(WSDLServiceBuilder.java:364)
>       at 
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:253)
>       at 
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:147)
>       at 
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:136)
>       at 
> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:94)
>       at org.apache.cxf.endpoint.ClientImpl.<init>(ClientImpl.java:109)
> Code is:
> if (sb.getParts().size() == 1) {
>       partName = (String) sb.getParts().get(0);
> }
> and certainly should be:
>  if (sb.getParts() != null  && sb.getParts().size() == 1) {
>               partName = (String) sb.getParts().get(0);
>  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to