Hi there,
I'm a noob to web service and trying to interface an Axis service
using soap4r.
Brilliant utility wsdl2ruby generates classes for me and when I try to
connect to SOAP server, an exception was raised by saying
(No faultstring) (SOAP::FaultError)
Following is the wiredump
-----------------------------------------------------------------------------
Wire dump:
= Request
! CONNECT TO localhost:80
! CONNECTION ESTABLISHED
POST /axis/services/authority HTTP/1.1
SOAPAction: ""
Content-Type: text/xml; charset=utf-8
User-Agent: SOAP4R/1.5.8 (httpclient.rb/280, ruby 1.8.6 (2007-03-13)
[i686-linux])
Date: Tue, 07 Jul 2009 16:12:59 GMT
Content-Length: 1630
Host: localhost
<?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:authorizePurchase xmlns:n1="
http://authority.com"
env:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/">
<serviceAccessId xsi:type="xsd:string">...</serviceAccessId>
</n1:authorizePurchase>
</env:Body>
</env:Envelope>
= Response
HTTP/1.1 500 Internal Server Error
Date: Tue, 07 Jul 2009 08:34:17 GMT
Server: IBM_HTTP_Server
Connection: close
Transfer-Encoding: chunked
Content-Type: text/xml; charset=utf-8
Content-Language: en
46d
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.generalException</faultcode>
<faultstring></faultstring>
<detail>
<ns1:fault href="#id0" xmlns:ns1="
http://localhost:8080/axis/
services/authority"/>
<ns2:exceptionName xmlns:ns2="
http://xml.apache.org/
axis/">com.authority.ordermanagement.components.webservice.exceptions.ServiceException</
ns2:exceptionName>
</detail>
</soapenv:Fault>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:ServiceException"
xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns3="urn:
types.api.authority.com">
<statusCode xsi:type="xsd:string" xsi:nil="true"/>
<statusMessage xsi:type="xsd:string">An internal server error has
occured. Please try again.</statusMessage>
<customerMessage xsi:type="xsd:string" xsi:nil="true"/>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
0
! CONNECTION CLOSED
--------------------------------------------------------------------------
The error is raised as
#<SOAP::Mapping::Object:0xb7b3dc58>: (No faultstring)
(SOAP::FaultError)
I notice that, in the response SOAP XML, the faultstring tag is
empty.
The method call to web service driver object returns nil and does not
go beyound that line.
Is there any way to disable the exception raising upon empty
faultstring?
Although I can catch FaultError, I do not know how to access to the
object ServiceException (from multiRef tag) returns in Soap XML
response.
Please kindly guide me.
Thanks in advance,
Best Regards