on 2007 Jun 12 1:56 PM
Hi,
using this little program, I try to get a simple "Hello World" from a webservice in SAP.
-
require 'soap/rpc/driver'
s = SOAP::RPC::Driver.new('http://server:port/sap/bc/srt/rfc/sap/Z_WS_RUBY/', 'urn:sap-com:document:sap:soap:functions:mc-style')
s.add_method("Z_WS_RUBY", "StringIn" )
p s.Z_WS_RUBY("World")
-
Unfortunately there is an error:
in `parse_local': unknown namespace qualifier: xml (XSD::NS::FormatError)
from D:/rubyy/InstantRails/ruby/lib/ruby/1.8/soap/encodingstyle/soapHandler.rb:532:in `decode_attrs' ETC
In the WebService Recorder I find that the call is going through with request:
-
<?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:Z_WS_RUBY xmlns:n1="urn:sap-com:document:sap:soap:functions:mc-style" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<StringIn xsi:type="xsd:string">World</StringIn>
</n1:Z_WS_RUBY>
</env:Body>
</env:Envelope>
-
but response ist like:
-
- <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
- <soap-env:Body>
- <soap-env:Fault>
<faultcode>soap-env:Client</faultcode>
<faultstring xml:lang="en">Operation not supported</faultstring>
</soap-env:Fault>
</soap-env:Body>
</soap-env:Envelope>
-
What am I mssing here ?
Any help is appreciated.
Regards
Marcus
Message was edited by:
Marcus Schiffer
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi - sapwas allready does this, and works with sap4rails => http://raa.ruby-lang.org/project/sapwas
Cheers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.