You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Bozhong Lin (JIRA)" <ji...@apache.org> on 2007/03/07 07:33:24 UTC

[jira] Updated: (CXF-450) JAXWS JavaFirst throws NPE when @WebParameter is not defined in SEP for doc/lit/wrap

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

Bozhong Lin updated CXF-450:
----------------------------

          Component/s: Tooling
    Affects Version/s: 2.0-RC

> JAXWS JavaFirst throws NPE when @WebParameter is not defined in SEP for doc/lit/wrap
> ------------------------------------------------------------------------------------
>
>                 Key: CXF-450
>                 URL: https://issues.apache.org/jira/browse/CXF-450
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0-RC
>            Reporter: Johnson Ma
>
> *JAXWS, JAVA-First, Document/Lit/Wrapper
> * test java SEI class
> @WebService(targetNamespace = "http://iona.com/", name = "Hello")
> public interface Hello {
>     @ResponseWrapper(targetNamespace = "http://iona.com/", className = "com.iona.SayHiResponse", localName = "sayHiResponse")
>     @RequestWrapper(targetNamespace = "http://iona.com/", className = "com.iona.SayHi", localName = "sayHi")
>     @WebMethod(operationName = "sayHi")
>     public void sayHi(
>         long l1
>     );
> }
> * got nullpoint exception as following
> INFO: Creating Service {http://iona.com/}HelloService from WSDL.
> Exception in thread "main" java.lang.NullPointerException
> 	at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeParameter(ReflectionServiceFactoryBean.java:476)
> 	at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeParameter(JaxWsServiceFactoryBean.java:343)
> 	at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeClassInfo(JaxWsServiceFactoryBean.java:322)
> 	at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation(JaxWsServiceFactoryBean.java:160)
> * reason:
> In JaxWsServerFactoryBean, line number 342:
> if (isIn && !isOut) {
>             QName name = getInPartName(o, method, i);
>             part = o.getInput().getMessagePart(name);
>             initializeParameter(part, paramType, genericType);
>             part.setIndex(i);
>         } 
> The part is null, which caused the NPE,
> In JaxWSServiceConfiguration, line number 175.
> public QName getInPartName(OperationInfo op, Method method, int paramNumber) {
>         if (paramNumber < 0) {
>             return null;
>         }
>         
>         return getPartName(op, method, paramNumber, "arg" + paramNumber);
>     }
> But the wsdl we generated from SEI is using 
> <xs:element name="sayHi">
>     <xs:complexType>
>       <xs:sequence>
>         <xs:element form="qualified" name="l1" type="xs:long"/>
>       </xs:sequence>
>     </xs:complexType>
>   </xs:element>
>   <xs:element name="sayHiResponse">
>     <xs:complexType/>
>   </xs:element>
> </xsd:schema>
>   </wsdl:types>
>   <wsdl:message name="sayHi">
>     <wsdl:part name="sayHi" element="tns:sayHi">
>     </wsdl:part>
>   </wsdl:message>
> So it looking for arg0, but it is defined in generated wsdl as 'l1'.

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