[R] SSOAP access to a j2EE-ws service
Olivier Cailloux
mlsmg at ulb.ac.be
Thu Jun 18 16:01:00 CEST 2009
I am currently trying to access a SOAP web service (hosted on a JBoss5
server and defined as a J2EE-ws service) via the SSOAP R-package. But
all I can get is a NULL answer. The web service seems to work as it can
be accessed using a general web-service tester.
The web service wsdl is here: http://smg8.ulb.ac.be:8080/web2?wsdl.
This is how I try to call the web service from R:
---
> library("SSOAP")
Loading required package: XML
Loading required package: RCurl
Loading required package: bitops
Loading required package: XMLSchema
> greeter <- SOAPServer("smg8.ulb.ac.be", "/web2/TestService", 8080)
> .SOAP(greeter, "greetMe", action="", xmlns="http://web2.web/",
.opts=list(verbose = TRUE))
---
The result of the .SOAP call follows:
---
* About to connect() to smg8.ulb.ac.be port 8080 (#0)
* Trying 127.0.0.1... * connected
* Connected to smg8.ulb.ac.be (127.0.0.1) port 8080 (#0)
> POST /web2/TestService HTTP/1.1
Host: smg8.ulb.ac.be:8080
Accept: text/xml
Accept: multipart/*
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://web2.web/#greetMe"
Content-Length: 424
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.1
< Content-Type: text/xml;charset=UTF-8
< Transfer-Encoding: chunked
< Date: Thu, 18 Jun 2009 13:51:23 GMT
<
* Connection #0 to host smg8.ulb.ac.be left intact
NULL
Warning message:
Ambiguous method selection for "fromXML", target
"NULL#missing#missing#missing#missing" (the first of the signatures
shown will be used)
NULL#ANY#ANY#ANY#ANY
ANY#ANY#ANY#ANY#missing
---
According to the web service server logs, the request is received and
the answer sent. The service is supposed to return the following string:
---
<env:Envelope>
<env:Body>
<greetMeResponse>
<return>Hello, null.</return>
</greetMeResponse>
</env:Body>
</env:Envelope>
---
--- Environment info ---
> sessionInfo()
R version 2.7.1 (2008-06-23)
i486-pc-linux-gnu
locale:
C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] SSOAP_0.5-0 XMLSchema_0.1-1 RCurl_0.97-3 bitops_1.0-4.1
[5] XML_2.3-0
loaded via a namespace (and not attached):
[1] tools_2.7.1
Thank you for any help.
Olivier
More information about the R-help
mailing list