User login

Unable to invoke web services

Forums :

Hi,

I am using WSO2 WSF/Ruby webservices framework.

I have written my own webservices which perform the basic operations of adding two numbers and printing Hello World.

I am unable to invoke them using the framework. Authentication errors and errors in action pack are reported.

I dont want to use only those web services which are provided along with this framework as it hampers interoperability and prevents me from using other standard services.

Kindly suggest any solutions to this problem.

Pranav.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Unable to invoke web services

Hi Pranav,

Could you provide us the client code you have written.

Please note that WSF/Ruby is NOT limited to the services provided with it. You can use an existing webservice with WSF/Ruby.

Also, WSF/Ruby is interoperable.

thanks,

Janapriya.

Re: Unable to invoke web services

Hi Janapriya,

I am attaching my simple "helloWorld" client code.

I am relatively new to Ruby and implementing web services.

I have been trying to work with this code but it gives errors in authentication as well as  in action pack.

Please suggest any solution(s) to this problem.

Pranav.

AttachmentSize
helloWorld.txt2.1 KB

Re: Unable to invoke web services

Hi Pranav,

I went through the code (though I didn't test with ruby) and found nothing wrong.

Could you kindly tell me, whether the samples came with the framework worked for you.

And please give me the exact output you have recieved.

regards,

Janapriya.

Re: Unable to invoke web services

Hi Janapriya,

I have been working with the samples that are available with the framework, only to achieve little  success.  But my objective would  be acieved only when I would be able to use serivces that i write.

I was able to get the simple "echo_client " to work .

refer to : http://wso2.org/forum/thread/3193

But the "hello_client" does not work .

The exact output that I get when I execute my code(which I had previously sent) is as follows:

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

$ruby add_client.rb

Sending OM :
<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <env:Body>
    <n1:Greet xmlns:n1="http://tempuri.org/"
        env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    </n1:Greet>
  </env:Body>
</env:Envelope>

Client invocation FAILED !!!
WSFault :

----------
NULL-REPLY
----------
No response from the server
----------

----------

----------

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

This is at the client side.

I have made a few changes in the req_payload_string ; but these changes shouldnt matter.

The contents of the log files that get generated are as follows:

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

[error] libxml2_reader_wrapper.c(456)  error occured in reading xml stream
[error] WSFC_wrapper.c(2195) [wsf-ruby] Failed to create a valid AXIOM payload for request
[error] http_sender.c(727) status_code < 0
[error] http_sender.c(695) Error in setting HTTP Authentication header
[error] http_sender.c(704) HTTP Authentication failed
[error] http_sender.c(727) status_code < 0

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

This suggests that there is some error in authentication and hence i have included

"policy_object " and "security_object" as per the instructions provided in your manual.

But this additional information does not reslove the problem and i recieve this error again:

[error] http_sender.c(727) status_code < 0

Kindly suggest any solution to the same.

regards,

Pranav.

Re: Unable to invoke web services

Hi Pranav,

Could you provide me the add_client.rb source. So I can have a look.

regards,

Janapriya.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.