You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Dimuthu Leelarathne (JIRA)" <ji...@apache.org> on 2008/05/21 04:50:55 UTC

[jira] Closed: (AXIS2-3803) AxisFault does not properly serialize into SOAP12 SOAPFault when a org.apache.axiom.soap.SOAPFaultValue is present in the SOAPFaultCode

     [ https://issues.apache.org/jira/browse/AXIS2-3803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dimuthu Leelarathne closed AXIS2-3803.
--------------------------------------

    Resolution: Invalid

> AxisFault does not properly serialize into SOAP12 SOAPFault when a org.apache.axiom.soap.SOAPFaultValue is present in the SOAPFaultCode
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3803
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3803
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>            Reporter: Dimuthu Leelarathne
>
> Here is the result I want to create.
> <soapenv:Fault>
> <soapenv:Code>
> <soapenv:Value>soapenv:Receiver</soapenv:Value>
> <soapenv:Subcode>
> <soapenv:Value xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">wsse:InvalidSecurity</soapenv:Value>
> </soapenv:Subcode>
> </soapenv:Code>
> <soapenv:Reason>
> <soapenv:Text xml:lang="en-US">Missing wsse:Security header in request</soapenv:Text>
> </soapenv:Reason>
> </soapenv:Fault>
> But the closest that I managed is this.
>          <soapenv:Fault>
>             <soapenv:Code>
>                <soapenv:Value>soapenv:Receiver</soapenv:Value>
>             </soapenv:Code>
>             <soapenv:Reason>
>                <soapenv:Text xml:lang="en-US">unknown</soapenv:Text>
>             </soapenv:Reason>
>             <soapenv:Detail>
>                <Exception>java.lang.NullPointerException	at org.apache.axiom.soap.impl.llom.soap12.SOAP12FaultReasonImpl.getText(SOAP12FaultReasonImpl.java:68)
>             </soapenv:Detail>
>          </soapenv:Fault>
> Here are the methods I tried with. But none of them yeild the exact result.
> private AxisFault buildAxisFaultForSOAP12(QName qNameSubFaultCode, 
>                                                 String reason, Exception e){
>         SOAPFactory factory = OMAbstractFactory.getSOAP12Factory();
>         
>         SOAPFaultCode faultCode = factory.createSOAPFaultCode();
>         SOAPFaultValue faultValue = factory.createSOAPFaultValue(faultCode);
>         faultValue.setText(SOAP12Constants.FAULT_CODE_SENDER);
>                
>         SOAPFaultReason faultReason = factory.createSOAPFaultReason();
>         faultReason.setText(reason);
>     
>         AxisFault fault = new AxisFault(faultCode, faultReason, null, null,
>                null);
>         
>         List subCodes = new ArrayList();
>         subCodes.add(qNameSubFaultCode);
>         fault.setFaultSubCodes(subCodes);
>         
>         return fault;        
>         
> }
>     private AxisFault buildAxisFaultForSOAP12(QName qNameSubFaultCode, 
>                                                 String reason, Exception e){
>         SOAPFactory factory = OMAbstractFactory.getSOAP12Factory();
>         
>         SOAPFaultCode faultCode = factory.createSOAPFaultCode();
>         SOAPFaultValue faultValue = factory.createSOAPFaultValue(faultCode);
>         faultValue.setText(SOAP12Constants.FAULT_CODE_SENDER);
>         
>         SOAPFaultSubCode subCode = factory.createSOAPFaultSubCode(faultCode);
>         subCode.setText(qNameSubFaultCode);
>         faultCode.setSubCode(subCode);
>         
>         SOAPFaultReason faultReason = factory.createSOAPFaultReason();
>         faultReason.setText(reason);
>     
>         AxisFault fault = new AxisFault(faultCode, faultReason, null, null,
>                null);
>                 
>         return fault;        
>         
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org