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 "Vincent Brabant (JIRA)" <ji...@apache.org> on 2007/10/23 15:28:54 UTC
[jira] Created: (AXIS2-3296) When I am creating a AxisFault by
giving a SoapFault, the SoapFaultCode is ignored.
When I am creating a AxisFault by giving a SoapFault, the SoapFaultCode is ignored.
-----------------------------------------------------------------------------------
Key: AXIS2-3296
URL: https://issues.apache.org/jira/browse/AXIS2-3296
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: kernel
Affects Versions: 1.3, nightly
Environment: Windows XP / JDK 1.4 (but also Sun Machine with WebSphere 5.1 and JDK 1.4)
Reporter: Vincent Brabant
I have a SoapFault where the SoapFaultCode is soapenv:Client.
I am throwing an AxisFault by giving the SoapFault as argument
throw new AxisFaul(soapFault)
But it return always a soapenv:Receiver (SOAP1.2) or a soapenv:Server (SOAP1.1).
--
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
Re: [jira] Created: (AXIS2-3296) When I am creating a AxisFault by giving a SoapFault, the SoapFaultCode is ignored.
Posted by Nuwan Abeysiriwardana <ad...@nuwanonline.com>.
i want to know whether axis2 support smtp protocol.let me know.if not ,i
can work on it.
[jira] Commented: (AXIS2-3296) When I am creating a AxisFault by
giving a SoapFault, the SoapFaultCode is ignored.
Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542090 ]
Amila Chinthaka Suriarachchi commented on AXIS2-3296:
-----------------------------------------------------
hi my guess is it is better to do it in this way
i.e adding null check to test whether the soapFaultCode is available or not.
if (faultCode == null) {
if (context.isSOAP11() && (soapFaultCode != null) && (!soapFaultCode.equals(""))) {
fault.getCode().setText(soapFaultCode);
} else {
fault.getCode().getValue().setText(soapFaultCode);
}
}
I think the problem you try to overcome is that setting null value if the value is already set with
the axisFault.getFaultCodeElement()
but here we have to change it if there is an valid soapFaultCode.
> When I am creating a AxisFault by giving a SoapFault, the SoapFaultCode is ignored.
> -----------------------------------------------------------------------------------
>
> Key: AXIS2-3296
> URL: https://issues.apache.org/jira/browse/AXIS2-3296
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.3, nightly
> Environment: Windows XP / JDK 1.4 (but also Sun Machine with WebSphere 5.1 and JDK 1.4)
> Reporter: Vincent Brabant
> Assignee: Amila Chinthaka Suriarachchi
>
> I have a SoapFault where the SoapFaultCode is soapenv:Client.
> I am throwing an AxisFault by giving the SoapFault as argument
> throw new AxisFaul(soapFault)
> But it return always a soapenv:Receiver (SOAP1.2) or a soapenv:Server (SOAP1.1).
--
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
[jira] Assigned: (AXIS2-3296) When I am creating a AxisFault by
giving a SoapFault, the SoapFaultCode is ignored.
Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Deepal Jayasinghe reassigned AXIS2-3296:
----------------------------------------
Assignee: Amila Chinthaka Suriarachchi
> When I am creating a AxisFault by giving a SoapFault, the SoapFaultCode is ignored.
> -----------------------------------------------------------------------------------
>
> Key: AXIS2-3296
> URL: https://issues.apache.org/jira/browse/AXIS2-3296
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.3, nightly
> Environment: Windows XP / JDK 1.4 (but also Sun Machine with WebSphere 5.1 and JDK 1.4)
> Reporter: Vincent Brabant
> Assignee: Amila Chinthaka Suriarachchi
>
> I have a SoapFault where the SoapFaultCode is soapenv:Client.
> I am throwing an AxisFault by giving the SoapFault as argument
> throw new AxisFaul(soapFault)
> But it return always a soapenv:Receiver (SOAP1.2) or a soapenv:Server (SOAP1.1).
--
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
[jira] Commented: (AXIS2-3296) When I am creating a AxisFault by
giving a SoapFault, the SoapFaultCode is ignored.
Posted by "Vincent Brabant (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537004 ]
Vincent Brabant commented on AXIS2-3296:
----------------------------------------
Here is a proposal to fix the issue.
Problem is caused by a bug in the MessageContextBuilder
By replacing the following code (snapshot of 17/10/2007)
if (faultCode != null) {
fault.setCode((SOAPFaultCode) faultCode);
} else if (soapException != null) {
soapFaultCode = soapException.getFaultCode();
} else if (axisFault != null) {
if (axisFault.getFaultCodeElement() != null) {
fault.setCode(axisFault.getFaultCodeElement());
} else {
QName faultCodeQName = axisFault.getFaultCode();
if (faultCodeQName != null) {
if (faultCodeQName.getLocalPart().indexOf(":") == -1) {
String prefix = faultCodeQName.getPrefix();
String uri = faultCodeQName.getNamespaceURI();
// Get the specified prefix and uri
prefix = prefix == null ? "" : prefix;
uri = uri == null || "" .equals(uri) ?
fault.getNamespace().getNamespaceURI() : uri;
// Make sure the prefix and uri are declared on the fault, and
// get the resulting prefix.
prefix = fault.declareNamespace(uri, prefix).getPrefix();
soapFaultCode = prefix + ":" + faultCodeQName.getLocalPart();
} else {
soapFaultCode = faultCodeQName.getLocalPart();
}
}
}
}
by this one
if (faultCode != null) {
fault.setCode((SOAPFaultCode) faultCode);
} else if (soapException != null) {
soapFaultCode = soapException.getFaultCode();
} else if (axisFault != null) {
if (axisFault.getFaultCodeElement() != null) {
fault.setCode(axisFault.getFaultCodeElement());
soapFaultCode = faultCodeElement.getText(); // The line I added
} else {
QName faultCodeQName = axisFault.getFaultCode();
if (faultCodeQName != null) {
if (faultCodeQName.getLocalPart().indexOf(":") == -1) {
String prefix = faultCodeQName.getPrefix();
String uri = faultCodeQName.getNamespaceURI();
// Get the specified prefix and uri
prefix = prefix == null ? "" : prefix;
uri = uri == null || "" .equals(uri) ?
fault.getNamespace().getNamespaceURI() : uri;
// Make sure the prefix and uri are declared on the fault, and
// get the resulting prefix.
prefix = fault.declareNamespace(uri, prefix).getPrefix();
soapFaultCode = prefix + ":" + faultCodeQName.getLocalPart();
} else {
soapFaultCode = faultCodeQName.getLocalPart();
}
}
}
}
the problem is then solved. The response will contains a soapFault having the same error code than the one filled in the SoapFault given to the AxisFault.
Hope it helps a lot.
P.S. I also noted that the private method getSenderFaultCode(OMNamespace) of that MessageContextBuilder class is not used. Would be a good idea to remove it
> When I am creating a AxisFault by giving a SoapFault, the SoapFaultCode is ignored.
> -----------------------------------------------------------------------------------
>
> Key: AXIS2-3296
> URL: https://issues.apache.org/jira/browse/AXIS2-3296
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.3, nightly
> Environment: Windows XP / JDK 1.4 (but also Sun Machine with WebSphere 5.1 and JDK 1.4)
> Reporter: Vincent Brabant
>
> I have a SoapFault where the SoapFaultCode is soapenv:Client.
> I am throwing an AxisFault by giving the SoapFault as argument
> throw new AxisFaul(soapFault)
> But it return always a soapenv:Receiver (SOAP1.2) or a soapenv:Server (SOAP1.1).
--
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
[jira] Commented: (AXIS2-3296) When I am creating a AxisFault by
giving a SoapFault, the SoapFaultCode is ignored.
Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542672 ]
Amila Chinthaka Suriarachchi commented on AXIS2-3296:
-----------------------------------------------------
Here is what I thought
Here is the line it sets the soapFaultCode.
if (context.isSOAP11()) {
fault.getCode().setText(soapFaultCode);
} else {
fault.getCode().getValue().setText(soapFaultCode);
}
if the original AxisFault has a code it sets in an initial stage and text should also have set.
if (axisFault.getFaultCodeElement() != null) {
fault.setCode(axisFault.getFaultCodeElement());
So the problem is we replace the correct thing with an empty soapFaultCode.
What you have suggest is to keep the correct value in soapFaultCode and use it here.
in that case if there is a correct value for soapFaultCode then we override it.
> When I am creating a AxisFault by giving a SoapFault, the SoapFaultCode is ignored.
> -----------------------------------------------------------------------------------
>
> Key: AXIS2-3296
> URL: https://issues.apache.org/jira/browse/AXIS2-3296
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.3, nightly
> Environment: Windows XP / JDK 1.4 (but also Sun Machine with WebSphere 5.1 and JDK 1.4)
> Reporter: Vincent Brabant
> Assignee: Amila Chinthaka Suriarachchi
>
> I have a SoapFault where the SoapFaultCode is soapenv:Client.
> I am throwing an AxisFault by giving the SoapFault as argument
> throw new AxisFaul(soapFault)
> But it return always a soapenv:Receiver (SOAP1.2) or a soapenv:Server (SOAP1.1).
--
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
[jira] Commented: (AXIS2-3296) When I am creating a AxisFault by
giving a SoapFault, the SoapFaultCode is ignored.
Posted by "Vincent Brabant (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542486 ]
Vincent Brabant commented on AXIS2-3296:
----------------------------------------
Sorry but I am really not seeing the link between my proposal and your proposal.
Could you give more explanation ?
Thanks
Vincent
> When I am creating a AxisFault by giving a SoapFault, the SoapFaultCode is ignored.
> -----------------------------------------------------------------------------------
>
> Key: AXIS2-3296
> URL: https://issues.apache.org/jira/browse/AXIS2-3296
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.3, nightly
> Environment: Windows XP / JDK 1.4 (but also Sun Machine with WebSphere 5.1 and JDK 1.4)
> Reporter: Vincent Brabant
> Assignee: Amila Chinthaka Suriarachchi
>
> I have a SoapFault where the SoapFaultCode is soapenv:Client.
> I am throwing an AxisFault by giving the SoapFault as argument
> throw new AxisFaul(soapFault)
> But it return always a soapenv:Receiver (SOAP1.2) or a soapenv:Server (SOAP1.1).
--
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