Re: Axis2/C, C++ and 'undefined symbol: __gxx_personality_v0'

2008-03-18 Thread Manjula Peiris
Hi Bolgarov,

What is the Axis2/C version you are using?


On Tue, 2008-03-18 at 17:17 -0400, Alex Bolgarov wrote:
> Hi,
> 
> I'm trying to write a SOAP service using Axis2/C framework. I need the
> service to be written in a C++ language, so as a first step I took an
> 'echo service' example from the Axis distribution, renamed it to .cpp
> file  and compiled/linked it with 'g++' compiler. No compile errors
> reported, the resulting .so library I copied to the services
> directory, together with the corresponding services.xml file.
> 
> I compiled a sample client that tries to send something to my new service.
> 
> Than I strarted an 'axis2_http_server' application and run the client,
> which failed with a SOAP error message about failure to load a dll.
> 
> I found in the Axis2/C source code the place where it loads the .so
> file (axutil_class_loader_load_lib() in file 'class_loader.c'), and
> added debug log message that reports into the log the exact text of an
> error as it is returned by dlerror() function, not just a message that
> if failed to load a library, like this (after line 156 of the file
> 'class_loader.c'):
> 
> if (!dl_handler)
> {
> AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
> "AXIS2_PLATFORM_LOADLIB error: [%s]",
> AXIS2_PLATFORM_LOADLIB_ERROR);
> 
>...
>...
>...
> 
> after recompiling the Axis and running the test again, I see in the
> log following message:
> 
>  class_loader.c(159) AXIS2_PLATFORM_LOADLIB error:
> [/home/alexb/wsfcpp-repo/services/my_service/libmy_service.so:
> undefined symbol: __gxx_personality_v0]
> 
> I understand that the real problem is that the axis2_http_server
> application is not compiled/linked with the g++ support libraries.
> Several years ago I had similar problem when writing a C++ module for
> Apache's httpd server, but there the solution was to use an httpd's
> directive 'LoadFile' to load the g++ runtime library into the httpd
> environment before loading my C++ module with the LoadModule
> directive.
> 
> So the question is, does anyone knows how to make the
> axis2_http_server to load the g++ runtime library before it loads a
> C++ .so service library?
> 
> For the record, I'm doing all this on the Ubuntu 7.10, and here is a
> result of running 'g++ --version:
> 
> $ g++ --version
> g++ (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Axis2/C, C++ and 'undefined symbol: __gxx_personality_v0'

2008-03-18 Thread Alex Bolgarov
Hi,

I'm trying to write a SOAP service using Axis2/C framework. I need the
service to be written in a C++ language, so as a first step I took an
'echo service' example from the Axis distribution, renamed it to .cpp
file  and compiled/linked it with 'g++' compiler. No compile errors
reported, the resulting .so library I copied to the services
directory, together with the corresponding services.xml file.

I compiled a sample client that tries to send something to my new service.

Than I strarted an 'axis2_http_server' application and run the client,
which failed with a SOAP error message about failure to load a dll.

I found in the Axis2/C source code the place where it loads the .so
file (axutil_class_loader_load_lib() in file 'class_loader.c'), and
added debug log message that reports into the log the exact text of an
error as it is returned by dlerror() function, not just a message that
if failed to load a library, like this (after line 156 of the file
'class_loader.c'):

if (!dl_handler)
{
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
"AXIS2_PLATFORM_LOADLIB error: [%s]",
AXIS2_PLATFORM_LOADLIB_ERROR);

   ...
   ...
   ...

after recompiling the Axis and running the test again, I see in the
log following message:

 class_loader.c(159) AXIS2_PLATFORM_LOADLIB error:
[/home/alexb/wsfcpp-repo/services/my_service/libmy_service.so:
undefined symbol: __gxx_personality_v0]

I understand that the real problem is that the axis2_http_server
application is not compiled/linked with the g++ support libraries.
Several years ago I had similar problem when writing a C++ module for
Apache's httpd server, but there the solution was to use an httpd's
directive 'LoadFile' to load the g++ runtime library into the httpd
environment before loading my C++ module with the LoadModule
directive.

So the question is, does anyone knows how to make the
axis2_http_server to load the g++ runtime library before it loads a
C++ .so service library?

For the record, I'm doing all this on the Ubuntu 7.10, and here is a
result of running 'g++ --version:

$ g++ --version
g++ (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FW: Problem with Service deployed

2008-03-18 Thread Samisa Abeysinghe

Rahil Ali wrote:

Hello All,

Thanks a lot for your help Senaka, Saimsa, Senaka

One more thing: can I configure an IP at axis/apache, like only listed ip
can access my webservice.
  


You can do that with httpd configuration. This has nothing to do with 
the Axis2/C httpd module. In other words you can handle this at the Web 
server level.


Samisa...

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Regarding Axis2C architecture

2008-03-18 Thread Samisa Abeysinghe

Baxi, Rinilkumar (TCS) wrote:

Hi Kau,

Thanks, the links are really useful.

We plan to develop some custom handlers / modules to meet our requirement within the legacy system. Do we have any document or link which provides a detailed description of each phase (for example, pre-dispatch, postdispatch, and so on). 


These are not documented in formal documents. But you can find loads of 
information if you refer to both Axis2/Java and Axis2/C mail archives.



Apart this it would be helpful if we get details about the format in which 
information is passed between phases.
  


All information goes into message context. You can set parameters in 
message context and also capture SOAP message in AXIOM format.



This information will be really helpful in deciding design for the handlers / 
modules we plan to develop.
  


The best is to start with the logging module to understand the basics, 
then look at the addressing module and later look into something like 
the security modules in Rampart/C.


Samisa...


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Regarding Axis2C architecture

2008-03-18 Thread Senaka Fernando
Hi Rinil,

Apache Axis2/C comes with two built in modules.

1. WS-Addressing
2. Logging

These may help you in achieving what you want.

Also, we have three other modules that are separate apache projects which
are written to be used with apache Axis2/C. They are

1. Rampart/C (http://ws.apache.org/rampart/c)
2. Sandesha2/C (http://ws.apache.org/sandesha/sandesha2/c/)
3. Savan/C (http://ws.apache.org/savan/c/)

I think they are good examples to get started with. They do have
associated documentation, discussion lists, etc.

Regards,
Senaka

> Hi Kau,
>
> Thanks, the links are really useful.
>
> We plan to develop some custom handlers / modules to meet our requirement
> within the legacy system. Do we have any document or link which provides a
> detailed description of each phase (for example, pre-dispatch,
> postdispatch, and so on). Apart this it would be helpful if we get details
> about the format in which information is passed between phases.
>
> This information will be really helpful in deciding design for the
> handlers / modules we plan to develop.
>
> Thanking you in advance.
>
> Regards,
> Rinil Baxi
>
> -Original Message-
> From: Kaushalye Kapuruge [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 17, 2008 5:34 PM
> To: Apache AXIS C User List
> Subject: Re: Regarding Axis2C architecture
>
> Hi,
>
> This might be useful...
> http://wso2.org/library/777
>
> And this too...
> http://wso2.org/library/2406
>
> Cheers,
> Kau
>
> Baxi, Rinilkumar (TCS) wrote:
>>
>> Hi All,
>>
>> Currently I am working on the Axis2c 1.2 to make it communicate with a
>> legacy system. I have gone through the architecture given in the
>> manual on the website. But from that I am not able to get the exact
>> idea of the flow of the request.
>> Kindly let me know the architecture of the Axis2 C and how the request
>> flows from the client to the server and the response coming beck from
>> the server to the client.
>>
>> Thanks in advance.
>>
>> Regards,
>> Rinil Baxi
>>
>>
>
>
> --
> http://blog.kaushalye.org/
> http://wso2.org/
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: FW: Problem with Service deployed

2008-03-18 Thread Senaka Fernando
Hi Rahil,

Didn't quite get you. Like do you want to restrict access to apache
Axis2/C, so that only one IP can access it?

If this is your problem, try using the Axis2/C apache module, or Axis2/C
IIS module. Then you can configure IP level restrictions using your web
server. AFAIK the simple axis2 http server is not capable of such.
However, if you really need to do this, you can customize http_worker.c to
suit your requirement.

Regards,
Senaka

> Hello All,
>
> Thanks a lot for your help Senaka, Saimsa, Senaka
>
> One more thing: can I configure an IP at axis/apache, like only listed ip
> can access my webservice.
>
> Warm Regards,
> Rahil Ali
>
>
> -Original Message-
> From: Dimuthu Gamage [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 18, 2008 4:54 PM
> To: Apache AXIS C User List
> Subject: Re: FW: Problem with Service deployed
>
> Hi rahil,
>
> The problem in your wsdl is missing namespace declaration, may be it
> happened when you are copying the wsdl from a browser (normally
> firefox hides the namespace declrations)
>
> Try replacing
>
> http://tempuri.org/";>
>
> with this,
>
> http://tempuri.org/";
> xmlns:tns="http://tempuri.org/";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:s="http://www.w3.org/2001/XMLSchema";>
>
>
> And I 've not much familiar with C#, so I don't know exactly how to
> generate different WSDLs from them, but since you alreadfy have
> axis2/java, you can use java2wsdl.sh in (axis2snapshot/bin) to create
> wsdls,
>
> for an example the same wsdl can be generated from following java code,
>
> public interface Test
> {
> public ResponseData FundTransferRequest(String a, String b, String c);
> }
>
> abstract class ResponseData
>
> {
> public String a;
>
> public String b;
>
> public String x;
>
> }
>
> And you can use public String a[]; syntax in order to generate array
> types. I think simmilar thing should be able to do with your C#
> service as well.
>
> Thanks
> DImuthu
>
> On Tue, Mar 18, 2008 at 5:00 PM, Rahil Ali <[EMAIL PROTECTED]>
> wrote:
>>
>>
>>
>>
>> Hello Dimuthu,
>>
>>
>>
>> Thanks a lot.. I figured that out just a while aga :|
>>
>> My calculator webservice is now working fine :)
>>
>>
>>
>> I am trying to return a class from Webservice, so what I did: I created
>> a
>> class and a webservice using C#
>>
>>
>>
>> //CLASS
>>
>> public class ResponseData
>>
>> {
>>
>> string a;
>>
>> string b;
>>
>> string x;
>>
>> }
>>
>>
>>
>> WS
>>
>> [WebMethod]
>>
>> public ResponseData FundTransferRequest(string a, string b, string
>> c)
>>
>> {
>>
>> ResponseData RspD = new ResponseData();
>>
>> return RspD;
>>
>> }
>>
>>
>>
>> Now I am using the WSDL generated by .Net to generate C code using
> WSDL2C.sh
>>
>> http://tempuri.org/";>
>>
>>
>>
>>> targetNamespace="http://tempuri.org/";>
>>
>>
>>
>>
>>
>>
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>>
>>
>>
>>
>>
>>
>> > type="tns:ResponseData"/>
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>>
>>
>> 
>>
>> 
>>
>>
>>
>> 
>>
>> 
>>
>>
>>
>>
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>>
>>
>> http://schemas.xmlsoap.org/soap/http"/>
>>
>>
>>
>> http://tempuri.org/FundTransferRequest";
>> style="document"/>
>>
>>
>>
>> 
>>
>> 
>>
>>
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>>
>>
>> http://schemas.xmlsoap.org/soap/http"/>
>>
>>
>>
>> http://tempuri.org/FundTransferRequest";
>> style="document"/>
>>
>>
>>
>> 
>>
>> 
>>
>>
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>>
>>
>>
>>
>> > location="http://localhost:2140/FundTransferRequest/Service.asmx"/>
>>
>> 
>>
>>
>>
>> > location="http://localhost:2140/FundTransferRequest/Service.asmx"/>
>>
>> 
>>
>> 
>>
>> 
>>
>>
>>
>> WSD2C generates this error: WSDL2C.sh -uri FundTransferRequest.wsdl -ss
> -sd
>> -d adb -u
>>  Retrieving document at 'FundTransferRequest.wsdl'.
>>
>> [Fatal Error] FundTransferRequest.wsdl:1:57: The prefix "wsdl" for
>> element
>> "wsdl:definitions" is not bound.
>>
>>
>> Exception in thread "main"
>> org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing
>> WSDL
>>
>> at
>>
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngi
> ne.java:163)
>>
>> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>>
>> at org.apache.axis2.wsdl.WSDL2C.main(WSDL2C.java:31)
>>
>> Caused by: javax.wsdl.WSDLException: WSDLException:
> faultCode=PARSER_ERROR:
>> Problem parsing
>>
> 'file:/usr/local/axis2c/services/FundTransferRequest/FundTransferRequest.wsd
> l'.:
>> org.xml.sax.SAXParseException: The prefix "wsdl" for element
>> "wsdl:definitions" is not bound.
>>
>> at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
>>
>> at 

RE: FW: Problem with Service deployed

2008-03-18 Thread Rahil Ali
Hello All,

Thanks a lot for your help Senaka, Saimsa, Senaka

One more thing: can I configure an IP at axis/apache, like only listed ip
can access my webservice.

Warm Regards,
Rahil Ali


-Original Message-
From: Dimuthu Gamage [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 18, 2008 4:54 PM
To: Apache AXIS C User List
Subject: Re: FW: Problem with Service deployed

Hi rahil,

The problem in your wsdl is missing namespace declaration, may be it
happened when you are copying the wsdl from a browser (normally
firefox hides the namespace declrations)

Try replacing

http://tempuri.org/";>

with this,

http://tempuri.org/";
xmlns:tns="http://tempuri.org/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:s="http://www.w3.org/2001/XMLSchema";>


And I 've not much familiar with C#, so I don't know exactly how to
generate different WSDLs from them, but since you alreadfy have
axis2/java, you can use java2wsdl.sh in (axis2snapshot/bin) to create
wsdls,

for an example the same wsdl can be generated from following java code,

public interface Test
{
public ResponseData FundTransferRequest(String a, String b, String c);
}

abstract class ResponseData

{
public String a;

public String b;

public String x;

}

And you can use public String a[]; syntax in order to generate array
types. I think simmilar thing should be able to do with your C#
service as well.

Thanks
DImuthu

On Tue, Mar 18, 2008 at 5:00 PM, Rahil Ali <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Hello Dimuthu,
>
>
>
> Thanks a lot.. I figured that out just a while aga :|
>
> My calculator webservice is now working fine :)
>
>
>
> I am trying to return a class from Webservice, so what I did: I created a
> class and a webservice using C#
>
>
>
> //CLASS
>
> public class ResponseData
>
> {
>
> string a;
>
> string b;
>
> string x;
>
> }
>
>
>
> WS
>
> [WebMethod]
>
> public ResponseData FundTransferRequest(string a, string b, string c)
>
> {
>
> ResponseData RspD = new ResponseData();
>
> return RspD;
>
> }
>
>
>
> Now I am using the WSDL generated by .Net to generate C code using
WSDL2C.sh
>
> http://tempuri.org/";>
>
>
>
> targetNamespace="http://tempuri.org/";>
>
>
>
>
>
>
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
>
>
>
>
>
>
>  type="tns:ResponseData"/>
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
>
>
> 
>
> 
>
>
>
> 
>
> 
>
>
>
>
>
> 
>
> 
>
> 
>
> 
>
>
>
> http://schemas.xmlsoap.org/soap/http"/>
>
>
>
> http://tempuri.org/FundTransferRequest";
> style="document"/>
>
>
>
> 
>
> 
>
>
>
> 
>
> 
>
> 
>
> 
>
>
>
> http://schemas.xmlsoap.org/soap/http"/>
>
>
>
> http://tempuri.org/FundTransferRequest";
> style="document"/>
>
>
>
> 
>
> 
>
>
>
> 
>
> 
>
> 
>
> 
>
>
>
>
>
>  location="http://localhost:2140/FundTransferRequest/Service.asmx"/>
>
> 
>
>
>
>  location="http://localhost:2140/FundTransferRequest/Service.asmx"/>
>
> 
>
> 
>
> 
>
>
>
> WSD2C generates this error: WSDL2C.sh -uri FundTransferRequest.wsdl -ss
-sd
> -d adb -u
>  Retrieving document at 'FundTransferRequest.wsdl'.
>
> [Fatal Error] FundTransferRequest.wsdl:1:57: The prefix "wsdl" for element
> "wsdl:definitions" is not bound.
>
>
> Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
>
> at
>
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngi
ne.java:163)
>
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>
> at org.apache.axis2.wsdl.WSDL2C.main(WSDL2C.java:31)
>
> Caused by: javax.wsdl.WSDLException: WSDLException:
faultCode=PARSER_ERROR:
> Problem parsing
>
'file:/usr/local/axis2c/services/FundTransferRequest/FundTransferRequest.wsd
l'.:
> org.xml.sax.SAXParseException: The prefix "wsdl" for element
> "wsdl:definitions" is not bound.
>
> at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
>
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>
> at
>
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(CodeGen
erationEngine.java:295)
>
> at
>
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngi
ne.java:118)
>
> ... 2 more
>
> Caused by: org.xml.sax.SAXParseException: The prefix "wsdl" for element
> "wsdl:definitions" is not bound.
>
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>
> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
Source)
>
> ... 7 more
>
>
>
> Whats the problem here, I think WSDL2C cannot generated code for WSDL
> generated by C#...
>
> Please advice how to achieve this result, I want a We

RE: Regarding Axis2C architecture

2008-03-18 Thread Baxi, Rinilkumar (TCS)
Hi Kau,

Thanks, the links are really useful.

We plan to develop some custom handlers / modules to meet our requirement 
within the legacy system. Do we have any document or link which provides a 
detailed description of each phase (for example, pre-dispatch, postdispatch, 
and so on). Apart this it would be helpful if we get details about the format 
in which information is passed between phases.

This information will be really helpful in deciding design for the handlers / 
modules we plan to develop.

Thanking you in advance.

Regards,
Rinil Baxi

-Original Message-
From: Kaushalye Kapuruge [mailto:[EMAIL PROTECTED]
Sent: Monday, March 17, 2008 5:34 PM
To: Apache AXIS C User List
Subject: Re: Regarding Axis2C architecture

Hi,

This might be useful...
http://wso2.org/library/777

And this too...
http://wso2.org/library/2406

Cheers,
Kau

Baxi, Rinilkumar (TCS) wrote:
>
> Hi All,
>
> Currently I am working on the Axis2c 1.2 to make it communicate with a
> legacy system. I have gone through the architecture given in the
> manual on the website. But from that I am not able to get the exact
> idea of the flow of the request.
> Kindly let me know the architecture of the Axis2 C and how the request
> flows from the client to the server and the response coming beck from
> the server to the client.
>
> Thanks in advance.
>
> Regards,
> Rinil Baxi
>
>


--
http://blog.kaushalye.org/
http://wso2.org/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FW: Problem with Service deployed

2008-03-18 Thread Dimuthu Gamage
Hi rahil,

The problem in your wsdl is missing namespace declaration, may be it
happened when you are copying the wsdl from a browser (normally
firefox hides the namespace declrations)

Try replacing

http://tempuri.org/";>

with this,

http://tempuri.org/";
xmlns:tns="http://tempuri.org/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:s="http://www.w3.org/2001/XMLSchema";>


And I 've not much familiar with C#, so I don't know exactly how to
generate different WSDLs from them, but since you alreadfy have
axis2/java, you can use java2wsdl.sh in (axis2snapshot/bin) to create
wsdls,

for an example the same wsdl can be generated from following java code,

public interface Test
{
public ResponseData FundTransferRequest(String a, String b, String c);
}

abstract class ResponseData

{
public String a;

public String b;

public String x;

}

And you can use public String a[]; syntax in order to generate array
types. I think simmilar thing should be able to do with your C#
service as well.

Thanks
DImuthu

On Tue, Mar 18, 2008 at 5:00 PM, Rahil Ali <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Hello Dimuthu,
>
>
>
> Thanks a lot.. I figured that out just a while aga :|
>
> My calculator webservice is now working fine :)
>
>
>
> I am trying to return a class from Webservice, so what I did: I created a
> class and a webservice using C#
>
>
>
> //CLASS
>
> public class ResponseData
>
> {
>
> string a;
>
> string b;
>
> string x;
>
> }
>
>
>
> WS
>
> [WebMethod]
>
> public ResponseData FundTransferRequest(string a, string b, string c)
>
> {
>
> ResponseData RspD = new ResponseData();
>
> return RspD;
>
> }
>
>
>
> Now I am using the WSDL generated by .Net to generate C code using WSDL2C.sh
>
> http://tempuri.org/";>
>
>
>
> targetNamespace="http://tempuri.org/";>
>
>
>
>
>
>
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
>
>
>
>
>
>
>  type="tns:ResponseData"/>
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
>
>
> 
>
> 
>
>
>
> 
>
> 
>
>
>
>
>
> 
>
> 
>
> 
>
> 
>
>
>
> http://schemas.xmlsoap.org/soap/http"/>
>
>
>
> http://tempuri.org/FundTransferRequest";
> style="document"/>
>
>
>
> 
>
> 
>
>
>
> 
>
> 
>
> 
>
> 
>
>
>
> http://schemas.xmlsoap.org/soap/http"/>
>
>
>
> http://tempuri.org/FundTransferRequest";
> style="document"/>
>
>
>
> 
>
> 
>
>
>
> 
>
> 
>
> 
>
> 
>
>
>
>
>
>  location="http://localhost:2140/FundTransferRequest/Service.asmx"/>
>
> 
>
>
>
>  location="http://localhost:2140/FundTransferRequest/Service.asmx"/>
>
> 
>
> 
>
> 
>
>
>
> WSD2C generates this error: WSDL2C.sh -uri FundTransferRequest.wsdl -ss -sd
> -d adb -u
>  Retrieving document at 'FundTransferRequest.wsdl'.
>
> [Fatal Error] FundTransferRequest.wsdl:1:57: The prefix "wsdl" for element
> "wsdl:definitions" is not bound.
>
>
> Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
>
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.java:163)
>
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>
> at org.apache.axis2.wsdl.WSDL2C.main(WSDL2C.java:31)
>
> Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR:
> Problem parsing
> 'file:/usr/local/axis2c/services/FundTransferRequest/FundTransferRequest.wsdl'.:
> org.xml.sax.SAXParseException: The prefix "wsdl" for element
> "wsdl:definitions" is not bound.
>
> at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
>
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(CodeGenerationEngine.java:295)
>
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.java:118)
>
> ... 2 more
>
> Caused by: org.xml.sax.SAXParseException: The prefix "wsdl" for element
> "wsdl:definitions" is not bound.
>
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>
> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
>
> ... 7 more
>
>
>
> Whats the problem here, I think WSDL2C cannot generated code for WSDL
> generated by C#...
>
> Please advice how to achieve this result, I want a Webservice to return an
> ARRAY of String or a class…. How to generate a proper WSDL for such service.
>
>
>
> Thanks & Regards,
>
> Rahil Ali
>
>
>
>
>
> -Original Message-
>  From: Dimuthu Gamage [mailto:[EMAIL PROTECTED]
>  Sent: Tuesday, March 18, 2008 4:12 PM
>  To: Apache AXIS C User List
>
>  Subject: Re: FW: Problem with Service deployed
>
>
>
>
>
> Hi Rahil,
>
>
>
>

Re: FW: Problem with Service deployed

2008-03-18 Thread Dimuthu Gamage
Hi Rahil,

The example shown in the samples/codegen are generated from the
following wsdl.  ( as mentioned in the Readme)
http://svn.apache.org/viewvc/webservices/axis2/trunk/c/test/resources/wsdl/Calculator.wsdl?view=markup

Looks like you are  using a different Calculator.wsdl (that is taken
from samples/servers/Caclculator), You hve to change those mentioned
functions to suit to your generated code, for an example,
adb_add_get_param_1
adb_add_get_param_2
adb_addResponse_create
adb_addResponse_get_result

Calculator.wsdl in samples/server is added recently and is little bit
differnet from the Calculator.wsdl in the test/resources/wsdl, As
senaka said we should make both WSDL the same, otherwise user like you
can easily confused with different WSDL with same name.

Thanks
Dimuthu



On Tue, Mar 18, 2008 at 12:50 PM, Rahil Ali <[EMAIL PROTECTED]> wrote:
> Hello Dimuthu,
>
>  I was using the implementation from
>  "http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/codegen/serv
>  er/calculator/axis2_skel_Calculator.c?revision=599392&view=markup". Whenever
>  the execution reaches any of these functions:
>
>  -adb_add_get_in0
>  -adb_add_get_in1
>  -adb_addResponse_create
>  -adb_addResponse_set_addReturn
>  .
>  It generates error "Failed in creating DLL". If I remove all the code and
>  simple return NULL the service executes fine... I have placed
>  "libCalculator.so", service.xml, Calculator.wsdl in my services/Calculator
>  fodler. Please tell me where am I going wrong..
>
>  I cannot find any implemetation of these functions, how are these
>  executing...
>
> Thanks & Regards,
>  Rahil Ali
>
>
>  -Original Message-
>
> From: Dimuthu Gamage [mailto:[EMAIL PROTECTED]
>
>
> Sent: Saturday, March 15, 2008 11:33 AM
>  To: Apache AXIS C User List; [EMAIL PROTECTED]
>  Subject: Re: FW: Problem with Service deployed
>
>  Infact there is a sample for the Calculator with codegen support
>  inside the samples/codegen directory, Hope that set of samples are
>  usefull for you
>
>  Thanks
>  Dimuthu
>
>  On Fri, Mar 14, 2008 at 9:20 PM, Senaka Fernando <[EMAIL PROTECTED]> wrote:
>  > Hi Rahil,
>  >
>  >  You should be able to find samples in the "samples" folder, that is found
>  >  inside the distribution. If you are referring to a demo application that
>  >  utilizes the code generated for the Calculator WSDL, I'm sorry that it is
>  >  not available on Axis2/C at the moment.
>  >
>  >  Regards,
>  >  Senaka
>  >
>  >
>  >
>  >  On Fri, 2008-03-14 at 16:00 +0500, Rahil Ali wrote:
>  >  Hi Senaka,
>  >  >
>  >  > Please provide me some sample web services.. Thanks,
>  >  >
>  >  > -Original Message-
>  >  > From: Rahil Ali [mailto:[EMAIL PROTECTED]
>  >  > Sent: Thursday, March 13, 2008 4:19 PM
>  >  > To: 'Apache AXIS C User List'; '[EMAIL PROTECTED]'
>  >  > Subject: RE: FW: Problem with Service deployed
>  >  >
>  >  > Hello Senaka,
>  >  >
>  >  > Thanks very much for your support, It worked and I can now add the
>  >  reference
>  >  > in .Net. But when I tried to access its method "add" it gave an
>  exception:
>  >  > "Data element of the OM Node is NULL" I think this is because I havent
>  >  > implemented anything in the functions: Can you please send me a sample
>  >  > source code so that I can get an idea like what are the uses of " const
>  >  > axutil_env_t *env" or how to use parameteres/returning values "
>  adb_add_t*
>  >  > add" , " adb_addResponse_t*"
>  >  >
>  >  > Thanks & regards,
>  >  > Rahil Ali
>  >  >
>  >  > -Original Message-
>  >  > From: Senaka Fernando [mailto:[EMAIL PROTECTED]
>  >  > Sent: Wednesday, March 12, 2008 9:50 PM
>  >  > To: Apache AXIS C User List
>  >  > Subject: RE: FW: Problem with Service deployed
>  >  >
>  >  > Hi Rahil,
>  >  >
>  >  > This works fine for me. The WSDL discovery will work only if you use
>  the
>  >  > Axis2/C source found in the svn head. I was under the impression that
>  you
>  >  > were using that. However, if you are using the 1.3.0 distribution, I
>  think
>  >  > the other alternate to how a static WSDL can be deployed was available.
>  >  >
>  >  > This works as this.
>  >  >
>  >  > add this to your services.xml after the ServiceClass parameter
>  >  >
>  >  > [path]
>  >  >
>  >  > In here specify the absolute path to your wsdl, in the place of [path].
>  >  > You might be able to specify a relative path, but, the absolute path is
>  >  > guaranteed to work. (ex:-
>  >  > /home/user/axis2/c/deploy/services/Calculator/Calculator.wsdl)
>  >  >
>  >  > The lib.so is rather a Linux convention. And, when trying
>  to
>  >  > locate your service, the engine will try to find the dll by that name.
>  >  >
>  >  > Regards,
>  >  > Senaka
>  >  >
>  >  > > Hello Senaka,
>  >  > >
>  >  > > I have service.xml, Calculator.wsdl and libCalculator.so in my
>  >  > > $AXIS2C_HOME/services/Calculator folder, still I cannot access wsdl
>  using
>  >  > > this..
>  >  > > "http://192.168.4.163/axis2/services/C

RE: FW: Problem with Service deployed

2008-03-18 Thread Rahil Ali
Hello Dimuthu,

I was using the implementation from
"http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/codegen/serv
er/calculator/axis2_skel_Calculator.c?revision=599392&view=markup". Whenever
the execution reaches any of these functions:

-adb_add_get_in0
-adb_add_get_in1
-adb_addResponse_create
-adb_addResponse_set_addReturn
.
It generates error "Failed in creating DLL". If I remove all the code and
simple return NULL the service executes fine... I have placed
"libCalculator.so", service.xml, Calculator.wsdl in my services/Calculator
fodler. Please tell me where am I going wrong..

I cannot find any implemetation of these functions, how are these
executing...
Thanks & Regards,
Rahil Ali


-Original Message-
From: Dimuthu Gamage [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 15, 2008 11:33 AM
To: Apache AXIS C User List; [EMAIL PROTECTED]
Subject: Re: FW: Problem with Service deployed

Infact there is a sample for the Calculator with codegen support
inside the samples/codegen directory, Hope that set of samples are
usefull for you

Thanks
Dimuthu

On Fri, Mar 14, 2008 at 9:20 PM, Senaka Fernando <[EMAIL PROTECTED]> wrote:
> Hi Rahil,
>
>  You should be able to find samples in the "samples" folder, that is found
>  inside the distribution. If you are referring to a demo application that
>  utilizes the code generated for the Calculator WSDL, I'm sorry that it is
>  not available on Axis2/C at the moment.
>
>  Regards,
>  Senaka
>
>
>
>  On Fri, 2008-03-14 at 16:00 +0500, Rahil Ali wrote:
>  Hi Senaka,
>  >
>  > Please provide me some sample web services.. Thanks,
>  >
>  > -Original Message-
>  > From: Rahil Ali [mailto:[EMAIL PROTECTED]
>  > Sent: Thursday, March 13, 2008 4:19 PM
>  > To: 'Apache AXIS C User List'; '[EMAIL PROTECTED]'
>  > Subject: RE: FW: Problem with Service deployed
>  >
>  > Hello Senaka,
>  >
>  > Thanks very much for your support, It worked and I can now add the
>  reference
>  > in .Net. But when I tried to access its method "add" it gave an
exception:
>  > "Data element of the OM Node is NULL" I think this is because I havent
>  > implemented anything in the functions: Can you please send me a sample
>  > source code so that I can get an idea like what are the uses of " const
>  > axutil_env_t *env" or how to use parameteres/returning values "
adb_add_t*
>  > add" , " adb_addResponse_t*"
>  >
>  > Thanks & regards,
>  > Rahil Ali
>  >
>  > -Original Message-
>  > From: Senaka Fernando [mailto:[EMAIL PROTECTED]
>  > Sent: Wednesday, March 12, 2008 9:50 PM
>  > To: Apache AXIS C User List
>  > Subject: RE: FW: Problem with Service deployed
>  >
>  > Hi Rahil,
>  >
>  > This works fine for me. The WSDL discovery will work only if you use
the
>  > Axis2/C source found in the svn head. I was under the impression that
you
>  > were using that. However, if you are using the 1.3.0 distribution, I
think
>  > the other alternate to how a static WSDL can be deployed was available.
>  >
>  > This works as this.
>  >
>  > add this to your services.xml after the ServiceClass parameter
>  >
>  > [path]
>  >
>  > In here specify the absolute path to your wsdl, in the place of [path].
>  > You might be able to specify a relative path, but, the absolute path is
>  > guaranteed to work. (ex:-
>  > /home/user/axis2/c/deploy/services/Calculator/Calculator.wsdl)
>  >
>  > The lib.so is rather a Linux convention. And, when trying
to
>  > locate your service, the engine will try to find the dll by that name.
>  >
>  > Regards,
>  > Senaka
>  >
>  > > Hello Senaka,
>  > >
>  > > I have service.xml, Calculator.wsdl and libCalculator.so in my
>  > > $AXIS2C_HOME/services/Calculator folder, still I cannot access wsdl
using
>  > > this..
>  > > "http://192.168.4.163/axis2/services/Calculator?wsdl";
>  > > Whats going wrong here...
>  > >
>  > >
>  > > Besides this one other thing to ask: how is libCalculator comes in
>  action,
>  > > does AXIS2C always use lib.so file?
>  > >
>  > > Thanks,
>  > > Rahil
>  > >
>  > >
>  > > -Original Message-
>  > > From: Senaka Fernando [mailto:[EMAIL PROTECTED]
>  > > Sent: Wednesday, March 12, 2008 6:50 PM
>  > > To: axis-c-user@ws.apache.org
>  > > Subject: RE: FW: Problem with Service deployed
>  > >
>  > > Hi Rahil,
>  > >
>  > > Well the static WSDL deployment feature was fully supported after we
>  > > released 1.3.0. So it will be reflected in the online documentation
with
>  > > the next release. However, if you use the subversion source (for
>  > > developers) of Axis2/C; the manual found there has the necessary
updates.
>  > > Thus, in addition to copying the service.xml and the .so, you will
also
>  > > have to copy the wsdl and save it by the name, .wsdl
(ex:-
>  > > Calculator.wsdl). The META-INF folder is something related to
Axis2/Java.
>  > > It doesn't apply to you.
>  > >
>  > > Regards,
>  > > Senaka
>  > >
>  > >> Hello Senaka,
>  > >>
>  > >> A couple of things to clearup,
>  > >> I am standing on