Bille (JIRA) wrote:
>     [ 
> http://issues.apache.org/jira/browse/AXIS2-801?page=comments#action_12415618 
> ] 
> 
> Bille commented on AXIS2-801:
> -----------------------------
> 
> since my last comment mysteriously faded away, here again:
> Hi Eran,
> 
> Three things is left concerning the SOAP Version.
> 1) I read that Axis2 uses SOAP 1.2 per default, so I wondered why my 
> SOAP-response is SOAP 1.1. I used SOAP12Factory to build the SOAPFault, so 
> why this ?

This is bit strange to me. Is the request message you received is SOAP
1.1 ? Then we reply using SOAP 1.1. But in that case if you have
explicitly made the objects using SOAP12Factory, it can not happen.
Please let us know where you are trying to do this and the request you get.
Can you help to reproduce this problem, so that I can look in to this
better.

> 2) How can I set that the server is the errorcause, till the response says 
> 'Client' ?

Where do u wanna do this? If its within the Service implementation
class, first get access to the message context (this [1] might help you
in doing that). Then if you only need to change the fault code,

SOAPFactory soapFactory;
if (inMessageContext.isSOAP11()) {
soapFactory = OMAbstractFactory.getSOAP11Factory();
} else {
soapFactory = OMAbstractFactory.getSOAP12Factory();
}

soapFaultCode = soapFactory.createSOAPFaultCode();
SOAPFaultValue soapFaultValue =
soapFactory.createSOAPFaultValue(soapFaultCode);
soapFaultValue.setText(new QName("Client"));

inMessageContext.setProperty(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME,
soapFaultCode);

> 3) If I don't use stubs and skeletons from wsdl2java generation, do I have to 
> create the SOAPFaults manually like I did? Or is there a nicer way to do 
> that. If manually, so then Userexptions-classes do not make really sense, do 
> they?

Did u read this [2] ?

-- Chinthaka

[1] : http://www.wso2.net/kb/106
[2] : http://www.wso2.net/kb/171

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to