You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Phani Madgula <ph...@gmail.com> on 2009/01/26 09:17:55 UTC

Not able to run the sample

Hi,

I am trying to run the sample given at -->
http://tuscany.apache.org/build-your-first-web-services-with-tuscany.html
through
eclipse.

I tried to install Tuscany Eclipse plugin but failed half through
installation. But I used a java client to execute the sample as follows.

*********
*

package* launch;
*import* org.apache.tuscany.sca.host.embedded.SCADomain;

*public* *class* Launch {
*public* *static* *void* main(String[] args) *throws* Exception {
System.*out*.println("Starting ...");
SCADomain scaDomain = SCADomain.*newInstance*("helloworld.composite");
System.*out*.println("store.composite ready for big business !!!");
System.*in*.read();
System.*out*.println("Stopping ...");
scaDomain.close();
System.*out*.println();
}
}

*********

I am using Webservices explorer in the eclipse to test the service. I opened
WS explorer and load the WSDL file successfully and sent a soap request. But
I get the following error.

************

IWAB0135E An unexpected error has occurred.
java.lang.NullPointerException
null

*************

Any clues as to what the error is ??

Thanks
phani

Re: Not able to run the sample

Posted by Phani Madgula <ph...@gmail.com>.
Hi Simon,

I guess, it's the problem with Eclipse's WebService explorer. I tried to
access the web service using Firefox's poster plugin and it worked fine. I
sent a soap message as follows.

*********
<soapenv:Envelope
  xmlns:q0="http://helloworld/"
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Header>
</soapenv:Header>
  <soapenv:Body>
<q0:sayHello>
  <arg0>Phani</arg0>
</q0:sayHello>
</soapenv:Body>
</soapenv:Envelope>
***********

Received the following response.

************
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns2:sayHelloResponse<http://schemas.xmlsoap.org/soap/envelope/%22%3E%3Csoapenv:Body%3E%3Cns2:sayHelloResponse>xmlns:ns2="
http://helloworld/"><return>HelloPhani</return></ns2:sayHelloResponse></soapenv:Body></soapenv:Envelope<http://helloworld/%22%3E%3Creturn%3EHelloPhani%3C/return%3E%3C/ns2:sayHelloResponse%3E%3C/soapenv:Body%3E%3C/soapenv:Envelope>
>
**************

In the eclipse, apart from the message I posted earlier, it did not give any
error. Nor I see any exception stace traces in the SCA runtime console. I
have added TUSCANY user library to the project and is in the classpath of
the Launch.class.

Need to check where this went wrong in the eclipse.I am using Eclipse3.3.
May be, the latest version might work.

Thanks for help
Phani
On Mon, Jan 26, 2009 at 9:05 PM, Simon Laws <si...@googlemail.com>wrote:

>
>
> On Mon, Jan 26, 2009 at 8:17 AM, Phani Madgula <
> phanibalaji.madgula@gmail.com> wrote:
>
>> Hi,
>>
>> I am trying to run the sample given at -->
>> http://tuscany.apache.org/build-your-first-web-services-with-tuscany.html through
>> eclipse.
>>
>> I tried to install Tuscany Eclipse plugin but failed half through
>> installation. But I used a java client to execute the sample as follows.
>>
>> *********
>> *
>>
>> package
>> *launch;
>> *import* org.apache.tuscany.sca.host.embedded.SCADomain;
>>
>> *public* *class* Launch {
>> *public* *static* *void* main(String[] args) *throws* Exception {
>> System.*out*.println("Starting ...");
>> SCADomain scaDomain = SCADomain.*newInstance*("helloworld.composite");
>> System.*out*.println("store.composite ready for big business !!!");
>> System.*in*.read();
>> System.*out*.println("Stopping ...");
>> scaDomain.close();
>> System.*out*.println();
>> }
>> }
>>
>> *********
>>
>> I am using Webservices explorer in the eclipse to test the service. I
>> opened WS explorer and load the WSDL file successfully and sent a soap
>> request. But I get the following error.
>>
>> ************
>>
>> IWAB0135E An unexpected error has occurred.
>> java.lang.NullPointerException
>> null
>>
>> *************
>>
>> Any clues as to what the error is ??
>>
>> Thanks
>> phani
>>
> Hi Phani
>
> Difficult to tell from the information here.
>
> - what error did you get during the Eclipse install?
> - how are including the Tuscany runtime on the "Launch" classpath?
> - do you see any stack trace associated with the NPE?
>
> Regards
>
> Simon
>

Re: Not able to run the sample

Posted by Simon Laws <si...@googlemail.com>.
On Mon, Jan 26, 2009 at 8:17 AM, Phani Madgula <
phanibalaji.madgula@gmail.com> wrote:

> Hi,
>
> I am trying to run the sample given at -->
> http://tuscany.apache.org/build-your-first-web-services-with-tuscany.html through
> eclipse.
>
> I tried to install Tuscany Eclipse plugin but failed half through
> installation. But I used a java client to execute the sample as follows.
>
> *********
> *
>
> package
> * launch;
> *import* org.apache.tuscany.sca.host.embedded.SCADomain;
>
> *public* *class* Launch {
> *public* *static* *void* main(String[] args) *throws* Exception {
> System.*out*.println("Starting ...");
> SCADomain scaDomain = SCADomain.*newInstance*("helloworld.composite");
> System.*out*.println("store.composite ready for big business !!!");
> System.*in*.read();
> System.*out*.println("Stopping ...");
> scaDomain.close();
> System.*out*.println();
> }
> }
>
> *********
>
> I am using Webservices explorer in the eclipse to test the service. I
> opened WS explorer and load the WSDL file successfully and sent a soap
> request. But I get the following error.
>
> ************
>
> IWAB0135E An unexpected error has occurred.
> java.lang.NullPointerException
> null
>
> *************
>
> Any clues as to what the error is ??
>
> Thanks
> phani
>
Hi Phani

Difficult to tell from the information here.

- what error did you get during the Eclipse install?
- how are including the Tuscany runtime on the "Launch" classpath?
- do you see any stack trace associated with the NPE?

Regards

Simon