Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.4
-
None
Description
Steps:
Edit axis2-1.4/samples/userguide/src/userguide/example1/MyService.java and make it look like shown below:
package userguide.example1;
import org.apache.axiom.om.OMElement;
import org.apache.axis2.AxisFault;
import javax.xml.stream.XMLStreamException;
public class MyService {
public OMElement echo(OMElement element) throws XMLStreamException
{ return org.apache.axiom.om.OMAbstractFactory.getSOAP11Factory().getDefaultFaultEnvelope().getBody().getFirstElement(); }public void ping(OMElement element) throws XMLStreamException
{ //Do some processing }public void pingF(OMElement element) throws AxisFault
{ throw new AxisFault("Fault being thrown"); }}
Invoking the echo service now returns:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 03 Jul 2008 08:42:40 GMT
fd
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode></faultcode>
<faultstring></faultstring>
<detail />
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
0