You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by IBeaumont <IB...@categoric.com> on 2012/01/18 14:12:05 UTC
Dealing with badly formatted responses to webservice calls
I'm calling a Sharepint SAOP 1.2 web service using the following...
ServiceClient dynamicClient = new ServiceClient(null, axisService);
...
OMElement res = dynamicClient.sendReceive(operationName,payLoad);
The problem is that if I use an incorrect parameter then Sharepoint returns
a SOAPFault that is incorrectly formatted (see below - note the "detail"
tag, it should be <soap:detail>). This then causes OMElement res to throw
an error (understandably) when I try to process the result. Is there anyway
I can get the result of the webservice call as just a string as I need to
present the information to the end user. All methods I try are failing as
they all seem to process the result through an XML parser and fail with the
invalid XML.
TIA
Ian
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<soap:Code>
<soap:Value>soap:Receiver</soap:Value>
</soap:Code>
<soap:Reason>
<soap:Text xml:lang="en">Exception of type
'Microsoft.SharePoint.SoapServer.SoapServerException' was
thrown.</soap:Text>
</soap:Reason>
<detail>
<errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">
List does not exist. The
page you selected contains a list that does not exist. It
may have been deleted by another user.</errorstring>
<errorcode xmlns="http://schemas.microsoft.com/sharepoint/soap/">
0x82000006</errorcode>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
--
View this message in context: http://old.nabble.com/Dealing-with-badly-formatted-responses-to-webservice-calls-tp33161019p33161019.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org