axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahil Ali" <rahil....@tpsonline.com>
Subject RE: Problem with Service deployed
Date Mon, 10 Mar 2008 14:03:00 GMT
Hi Senaka, samisa,

I cannot run the WSDL2C.sh successfully...
I downloaded all the jar files and put them in to $AXIS2C_HOME/lib folder.
My WSDL2C.sh is like:

	#!/bin/sh

	#export AXIS2_HOME=/home/axis2java
	for f in $AXIS2C_HOME/lib/*.jar
	do
	  AXIS2_CLASSPATH=$AXIS2_CLASSPATH:$f
	done
	export AXIS2_CLASSPATH

	#echo the classpath $AXIS2_CLASSPATH
	java -classpath $AXIS2_CLASSPATH org.apache.axis2.wsdl.WSDL2C $*

It is giving me this error:
	Exception in thread "main" java.lang.NoSuchMethodError: method
java.io.File.toURI was not found.
	   at _Jv_ResolvePoolEntry(java.lang.Class, int)
(/usr/lib/libgcj.so.5.0.0)
	   at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(j
ava.lang.String) (Unknown Source)
   	at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.CodeGenerationEngin
e(org.apache.axis2.util.CommandLineOptionParser) (Unknown Source)
	   at org.apache.axis2.wsdl.WSDL2Code.main(java.lang.String[])
(Unknown Source)

I believe there is some library issue. Can you please guide me how to run
this. I cannot find any documentation of WSDL to C code conversion, please
help.

Thanks & Regards,
Rahil Ali

-----Original Message-----
From: Senaka Fernando [mailto:senaka@wso2.com] 
Sent: Friday, March 07, 2008 6:55 PM
To: axis-c-user@ws.apache.org
Subject: RE: Problem with Service deployed

Hi Rahil,

According to the present implementation, you need Axis2/Java to get the
codegen tool running. This can be found at [1]. And, you can read more on
WSDL2C in [2].

[1] http://people.apache.org/dist/axis2/nightly/
[2] http://ws.apache.org/axis2/c/docs/axis2c_manual.html#wsdl2c

Regards,
Senaka

>
> Hello Samisa and Senaka,
>
> That sounds simple. Please help me getting started here...
> I will use .net to generate a simple WSDL.
> I will put that wsdl into $AXIS2C_HOME/services/MYSERV folder and run
> WSDL2C.sh script. Right?
> Now when I am doing this I am having a problem:
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org.apache.axis2.wsdl.WSDL2C
>    at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)
>    at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)
>    at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean)
> (/usr/lib/libgcj.so.5.0.0)
>    at __gcj_personality_v0
> (/usr/local/axis2c/services/Calculator/java.version=1.4.2)
>    at __libc_start_main (/lib/tls/libc-2.3.4.so)
>    at _Jv_RegisterClasses
> (/usr/local/axis2c/services/Calculator/java.version=1.4.2)
>
> I am still not sure how WSDL2C.sh is working. I mean the script is looking
> for the *.jar files in $AXIS2C_HOME/lib folder. I modified that and put
> *.so
> but still no success. Can you please explain me how WSDL2C.sh works.. or
> gave me any article which help me implementing a C-Webservice using
> AXIS2/C.. AXIS2/C doesn't have that much help on Internet... Sorry for
> such
> Noob questions.
>
> Thanks & Regards,
> Rahil Ali
>
>
> -----Original Message-----
> From: Samisa Abeysinghe [mailto:samisa@wso2.com]
> Sent: Friday, March 07, 2008 5:33 PM
> To: Apache AXIS C User List
> Subject: Re: Problem with Service deployed
>
> If you want to interop with ease with .NET, the best is that you start
> with a WSDL, use that to code gen for service and statically server the
> WSDL form service. In short, you have to use contract first mode.
> What you are trying is the code first model, that is hard to get it
> working with interop mode.
>
> Samisa...
>
> Rahil Ali wrote:
>> Hi Senaka
>>
>> Another questions:
>> I am using the Calculator sample comes with AXIS2/C. the signature of
>> the
>> functions is :
>> 		axiom_node_t *axis2_calc_add(
>> 		    const axutil_env_t * env,
>> 		    axiom_node_t * node);
>>
>> 		axiom_node_t *axis2_calc_sub(
>> 		    const axutil_env_t * env,
>> 		    axiom_node_t * node);
>>
>> 		axiom_node_t *axis2_calc_mul(
>> 		    const axutil_env_t * env,
>> 		    axiom_node_t * node);
>>
>> 		axiom_node_t *axis2_calc_div(
>> 		    const axutil_env_t * env,
>> 		    axiom_node_t * node);
>>
>> How can I use these in .Net to generate WSDL or even if I am writing on
>> myself what datatypes should I be entering in the WSDL? Do I have to
>> write
>> the basic functions like (calc_init, calc_invoke,.. .etc) in the WSDL
> file.
>> I cannot find any test folder under my axis2c installation folder.
>>
>> Thanks for your prompt response.
>> Regards,
>> Rahil Ali
>>
>> -----Original Message-----
>> From: Senaka Fernando [mailto:senaka@wso2.com]
>> Sent: Friday, March 07, 2008 1:00 PM
>> To: axis-c-user@ws.apache.org
>> Subject: RE: Problem with Service deployed
>>
>> Hi Rahil,
>>
>> Yes, your service is ready to be used from a .NET client. But, you don't
>> get a WSDL generated.
>>
>> This is because you can't generate wsdl files from C code by simply
>> using
>> the Axis2/C distribution. I'm however not aware of any 3rd party tools.
>> We
>> do have WSDL to C code generation only. Thus, if you want to get a WSDL,
>> auto generated, for the moment, you will have to code your service (just
>> the methods without any code in it; the skeleton in other words) in
>> another language, say like Java or C#.NET, and get the WSDL. Then, you
>> can
>> use this WSDL to generate C code using the codegen tool. Several users
>> have chosen this approach.
>>
>> If not, you will have to manually write a WSDL file. This is also not
>> that
>> much of a hard job to do. We have some sample WSDLs in the
>> test/resources
>> folder.
>>
>> I strongly believe that a C code to WSDL tool is necessary. Looking
>> forward to have this included in the near future.
>>
>> Regards,
>> Senaka
>>
>>
>>> Hello Senaka,
>>>
>>> Thanks very much for your reply. I have some confusion, pls clarify it:
>>> - I want to  deploy a web-service; I will follow these steps
>>> 	+ write a code and implement these functions (Service operation,
>>> hello_init, hello_invoke, hello_on_fault, hello_free,
>>> axis2_get_instance and axis2_remove_instance) and write a
>>> service.xml
>>> 	+ I compiled that source and put it in the axis2c/service/Myservice
>>> folder. (libMyservice.so, service.xml)
>>> 	+ Now I restart apache web server.(I have tried this with
>>>
>>> 	  "axis2_http_server" as well. And access this
>>> URI("http://ip-address/asix2/services")
>>>
>>> - After following these steps is my service ready to be used by any
>>> .Net or other client?
>>>
>>> - If yes then I am having some problems. Because the client cannot
>>> access
>>> the .wsdl file for that service, and the browser only displays the
> service
>>> name and available functions, no Hyper-links like the one showed in
>>> AXIS/Java tutorial. Pls see the output of the browser from my previous
>>> email.
>>>
>>> - I believe that there must be some tool which will create the .wsdl
>>> for
>>> any
>>> service that I write.
>>>
>>> - Am I missing anything here.
>>>
>>> Please help me get the clear picture of AXIS2/C web service deployment.
>>>
>>> Thanks & Regards,
>>> Rahil Ali
>>>
>>>
>>> -----Original Message-----
>>> From: Senaka Fernando [mailto:senaka@wso2.com]
>>> Sent: Thursday, March 06, 2008 10:29 PM
>>> To: Apache AXIS C User List
>>> Subject: Re: Problem with Service deployed
>>>
>>> Hi Rahil,
>>>
>>> We do have support for displaying static .wsdl files. But, the issue is
> we
>>> don't simply publish the .wsdl file. For the moment, you can find the
>>> required .wsdl file in the test/resources/wsdl/ folder.
>>>
>>> I have started a discussion on the developer list regarding this
>>> concern,
>>> [1]. Hope to have this issue fixed soon.
>>>
>>> [1] http://marc.info/?l=axis-c-dev&m=120481700919297&w=2
>>>
>>> Regards,
>>> Senaka
>>>
>>>
>>>> Hello everyone,
>>>>
>>>>
>>>>
>>>> I have configured AXIS2/C with apache2 web server. I compiled
>>>> calculator
>>>> sample with the following command:
>>>>
>>>> "gcc -shared -olibCalculator.o -I/usr/local/axis2c/include/axis2-1.3.0
>>>> -L$AXIS2C_HOME/lib -laxutil -laxis2_axiom -laxis2_parser
>>>> -laxis2_engine
>>>> -lpthread -laxis2_http_sender -laxis2_http_receiver calc.c"
>>>>
>>>>
>>>>
>>>> Now when I access it through Internet explorer :
>>>> http://192.168.4.163/axis2/services/Calculator it displays :
>>>>
>>>>
>>>> Deployed Services
>>>>
>>>>
>>>> Calculator
>>>>
>>>>
>>>> This is a testing service, named 'Calculator' to test dynamic client
>>>>
>>>> Available Operations
>>>>
>>>> *	div
>>>> *	add
>>>> *	sub
>>>> *	mul
>>>>
>>>> Problem is when I try to access its WSDL file by adding "?wsdl" at the
>>>> end
>>>> of URL it gives an error:
>>>>
>>>> The XML page cannot be displayed
>>>>
>>>> Cannot view XML input using style sheet. Please correct the error and
>>>> then
>>>> click the Refresh <javascript:location.reload()>  button, or try again
>>>> later.
>>>>
>>>>   _____
>>>>
>>>> Invalid at the top level of the document. Error processing resource
>>>> 'http://192.168.4.163/axis2/services/Calculator?wsdl'. ...
>>>>
>>>> Unable to retreive wsdl for this service
>>>>
>>>> ^
>>>>
>>>>
>>>>
>>>> When I tried to add this as a web-reference in VS.Net it displayed
>>>> "The
>>>> HTML
>>>> document does not contain Web service discovery information.".
>>>>
>>>>
>>>> Please help me where I am doing wrong.
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Rahil Ali
>>>>
>>>>
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>
>>
>>
>>
>
>
> --
> Samisa Abeysinghe
> Software Architect; WSO2 Inc.
>
> http://www.wso2.com/ - "Oxygenating the Web Service Platform."
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message