PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > web service client
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
web service client

Réponse
 
LinkBack Outils de la discussion
Vieux 04/12/2007, 13h13   #1
Zablon Ochomo
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut web service client

Hello All,

I have a simple web-service that i quickly generated using netbeans java
IDE.

I would like to consume the web service from a ruby program.

Is it possible?

How can I go about this?

ochomo z. o.
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 04/12/2007, 19h59   #2
Siep Korteling
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: web service client

>
> How can I go about this?
>
> ochomo z. o.


This stuff should get you going with both a client and a server:
http://sitekreator.com/satishtalim/web_services.html

--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 05/12/2007, 11h38   #3
Zablon Ochomo
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: web service client

I have done a small ruby app to consume a web service on SUN App Server.
But I have an error when running the app.

here is the code:

require 'soap/rpc/driver'

driver = SOAP::RPC:river.new(
'http://localhost:8085/helloservice/HelloService',
'urn:http://endpoint.helloservice/')

driver.add_method('sayHello')
puts driver.sayHello

the error message i get:

: Cannot find the dispatch method (SOAP::FaultError)

can someone in identifying the right parameters.

my WSDL

<?xml version="1.0" encoding="UTF-8"?><definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://endpoint.helloservice/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
targetNamespace="http://endpoint.helloservice/" name="HelloService">
<types>
<xsd:schema>
<xsd:import namespace="http://endpoint.helloservice/"
schemaLocation="http://localhost:8085/helloservice/HelloService/__container$publishing$subctx/WEB-INF/wsdl/HelloService_schema1.xsd"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
</xsd:schema>
</types>
<message name="sayHello">
<part name="parameters" element="tns:sayHello"/>
</message>
<message name="sayHelloResponse">
<part name="parameters" element="tns:sayHelloResponse"/>
</message>
<portType name="Hello">
<operation name="sayHello">
<input message="tns:sayHello"/>
<output message="tns:sayHelloResponse"/>
</operation>
</portType>
<binding name="HelloPortBinding" type="tns:Hello">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
<operation name="sayHello">
<soapperation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="HelloService">
<port name="HelloPort" binding="tns:HelloPortBinding">
<soap:address
location="http://localhost:8085/helloservice/HelloService"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
</port>
</service>
</definitions>
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 00h22.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10684 seconds with 11 queries