cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bozhong Lin (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CXF-450) JAXWS JavaFirst throws NPE when @WebParameter is not defined in SEP for doc/lit/wrap
Date Wed, 07 Mar 2007 06:33:24 GMT

     [ 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.


Mime
View raw message