You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Guillaume Dufrene <Gu...@lifl.fr> on 2006/04/27 10:07:41 UTC
Helloworldwsclient broken ?
Hi,
I have a problem with this sample.
When I launch HelloWorldClient, A NullPointerException is thrown :
java.lang.NullPointerException
at
org.apache.tuscany.binding.axis2.util.AxiomHelper.toDataObject(AxiomHelper.java:190)
at
org.apache.tuscany.binding.axis2.util.AxiomHelper.toOMElement(AxiomHelper.java:96)
at
org.apache.tuscany.binding.axis2.handler.ExternalWebServiceClient.invoke(ExternalWebServiceClient.java:73)
at
org.apache.tuscany.binding.axis2.handler.ExternalWebServiceTargetInvoker.invokeTarget(ExternalWebServiceTargetInvoker.java:73)
at
org.apache.tuscany.binding.axis2.handler.ExternalWebServiceTargetInvoker.invoke(ExternalWebServiceTargetInvoker.java:85)
at
org.apache.tuscany.core.wire.impl.InvokerInterceptor.invoke(InvokerInterceptor.java:39)
at
org.apache.tuscany.core.wire.jdk.JDKInvocationHandler.invoke(JDKInvocationHandler.java:112)
at $Proxy15.getGreetings(Unknown Source)
at
org.apache.tuscany.samples.helloworldwsclient.HelloWorldServiceComponentImpl.getGreetings(HelloWorldServiceComponentImpl.java:40)
at
org.apache.tuscany.samples.helloworldwsclient.HelloWorldClient.main(HelloWorldClient.java:44)
The problem seems to come from this method (In AxiomHelper) :
public static DataObject toDataObject(TypeHelper typeHelper,
Object[] os, QName typeQN) {
XSDHelper xsdHelper = new XSDHelperImpl(typeHelper);
Property property =
xsdHelper.getGlobalProperty(typeQN.getNamespaceURI(),
typeQN.getLocalPart(),
true);
System.out.println( "TypeQN : " + typeQN.toString() ); // <---
Added for degug
DataObject dataObject = new
DataFactoryImpl(typeHelper).create(property.getType());
List ips = dataObject.getInstanceProperties();
for (int i = 0; i < ips.size(); i++) {
dataObject.set(i, os[i]);
}
return dataObject;
}
The exception is thrown because property is null.
xsdHelper.getGlobalProperty return null when trying to get
"getGreetings" QName.
I don't really understand where does the problem come from ...
Are you aware of that problem ?
I checkout SVN release 397143, running mvn, configuring my Eclipse
environment according
to your wiki installation page.
Re: Helloworldwsclient broken ?
Posted by Guillaume Dufrene <Gu...@lifl.fr>.
>> Hi,
>>
>> I have a problem with this sample.
>> When I launch HelloWorldClient, A NullPointerException is thrown :
>>
>> java.lang.NullPointerException
>> at
>> org.apache.tuscany.binding.axis2.util.AxiomHelper.toDataObject(AxiomHelper.java:190)
>>
>> at
>> org.apache.tuscany.binding.axis2.util.AxiomHelper.toOMElement(AxiomHelper.java:96)
>>
>> at
>> org.apache.tuscany.binding.axis2.handler.ExternalWebServiceClient.invoke(ExternalWebServiceClient.java:73)
>>
>> at
>> org.apache.tuscany.binding.axis2.handler.ExternalWebServiceTargetInvoker.invokeTarget(ExternalWebServiceTargetInvoker.java:73)
>>
>> at
>> org.apache.tuscany.binding.axis2.handler.ExternalWebServiceTargetInvoker.invoke(ExternalWebServiceTargetInvoker.java:85)
>>
>> at
>> org.apache.tuscany.core.wire.impl.InvokerInterceptor.invoke(InvokerInterceptor.java:39)
>>
>> at
>> org.apache.tuscany.core.wire.jdk.JDKInvocationHandler.invoke(JDKInvocationHandler.java:112)
>>
>> at $Proxy15.getGreetings(Unknown Source)
>> at
>> org.apache.tuscany.samples.helloworldwsclient.HelloWorldServiceComponentImpl.getGreetings(HelloWorldServiceComponentImpl.java:40)
>>
>> at
>> org.apache.tuscany.samples.helloworldwsclient.HelloWorldClient.main(HelloWorldClient.java:44)
>>
>>
>>
>> The problem seems to come from this method (In AxiomHelper) :
>>
>> public static DataObject toDataObject(TypeHelper typeHelper,
>> Object[] os, QName typeQN) {
>> XSDHelper xsdHelper = new XSDHelperImpl(typeHelper);
>> Property property =
>> xsdHelper.getGlobalProperty(typeQN.getNamespaceURI(),
>>
>> typeQN.getLocalPart(),
>> true);
>> System.out.println( "TypeQN : " + typeQN.toString() ); // <---
>> Added for degug
>> DataObject dataObject = new
>> DataFactoryImpl(typeHelper).create(property.getType());
>> List ips = dataObject.getInstanceProperties();
>> for (int i = 0; i < ips.size(); i++) {
>> dataObject.set(i, os[i]);
>> }
>> return dataObject;
>> }
>>
>> The exception is thrown because property is null.
>> xsdHelper.getGlobalProperty return null when trying to get
>> "getGreetings" QName.
>>
>> I don't really understand where does the problem come from ...
>>
>> Are you aware of that problem ?
>> I checkout SVN release 397143, running mvn, configuring my Eclipse
>> environment according
>> to your wiki installation page.
>>
>
> Hi, I think this should be fixed by my fix to JIRA issue TUSCANY-237 /
> revision r397472. Could you please do an svn up and try again? Thanks.
>
Ok, I have just updated to rev 397476 and it works.
Huge Thanks.
--
Guillaume.
Re: Helloworldwsclient broken ?
Posted by Jean-Sebastien Delfino <js...@apache.org>.
Guillaume Dufrene wrote:
> Hi,
>
> I have a problem with this sample.
> When I launch HelloWorldClient, A NullPointerException is thrown :
>
> java.lang.NullPointerException
> at
> org.apache.tuscany.binding.axis2.util.AxiomHelper.toDataObject(AxiomHelper.java:190)
>
> at
> org.apache.tuscany.binding.axis2.util.AxiomHelper.toOMElement(AxiomHelper.java:96)
>
> at
> org.apache.tuscany.binding.axis2.handler.ExternalWebServiceClient.invoke(ExternalWebServiceClient.java:73)
>
> at
> org.apache.tuscany.binding.axis2.handler.ExternalWebServiceTargetInvoker.invokeTarget(ExternalWebServiceTargetInvoker.java:73)
>
> at
> org.apache.tuscany.binding.axis2.handler.ExternalWebServiceTargetInvoker.invoke(ExternalWebServiceTargetInvoker.java:85)
>
> at
> org.apache.tuscany.core.wire.impl.InvokerInterceptor.invoke(InvokerInterceptor.java:39)
>
> at
> org.apache.tuscany.core.wire.jdk.JDKInvocationHandler.invoke(JDKInvocationHandler.java:112)
>
> at $Proxy15.getGreetings(Unknown Source)
> at
> org.apache.tuscany.samples.helloworldwsclient.HelloWorldServiceComponentImpl.getGreetings(HelloWorldServiceComponentImpl.java:40)
>
> at
> org.apache.tuscany.samples.helloworldwsclient.HelloWorldClient.main(HelloWorldClient.java:44)
>
>
>
> The problem seems to come from this method (In AxiomHelper) :
>
> public static DataObject toDataObject(TypeHelper typeHelper,
> Object[] os, QName typeQN) {
> XSDHelper xsdHelper = new XSDHelperImpl(typeHelper);
> Property property =
> xsdHelper.getGlobalProperty(typeQN.getNamespaceURI(),
>
> typeQN.getLocalPart(),
> true);
> System.out.println( "TypeQN : " + typeQN.toString() ); // <---
> Added for degug
> DataObject dataObject = new
> DataFactoryImpl(typeHelper).create(property.getType());
> List ips = dataObject.getInstanceProperties();
> for (int i = 0; i < ips.size(); i++) {
> dataObject.set(i, os[i]);
> }
> return dataObject;
> }
>
> The exception is thrown because property is null.
> xsdHelper.getGlobalProperty return null when trying to get
> "getGreetings" QName.
>
> I don't really understand where does the problem come from ...
>
> Are you aware of that problem ?
> I checkout SVN release 397143, running mvn, configuring my Eclipse
> environment according
> to your wiki installation page.
>
Hi, I think this should be fixed by my fix to JIRA issue TUSCANY-237 /
revision r397472. Could you please do an svn up and try again? Thanks.
--
Jean-Sebastien