thanks for the reply. We are using soap 1.1 in hopes of being compatible
with non-axis2 clients. I'll have to check to see if we can change.
Mary
Ruchith Fernando wrote:
This is a know issues as reported here :
https://issues.apache.org/jira/browse/AXIS2-1643
https://issues.apache.org/jira/browse/WSCOMMONS-104
If you can use SOAP 1.2 then this issue can be avoided.
Thanks,
Ruchith
On 12/16/06, Mary Thompson <[EMAIL PROTECTED]> wrote:
I have been fighting with SoapFaults failing to parse once rampart 1.1
is deployed ever since I moved to Axis2.1.1. It did work in axis2.1.0.
I am currently using the December 15 snapshot of axis1.1.1.1 and the
rampart1.1 release. Maybe I am missing some trick in deploying
rampart. If any one else is getting this to work, I would love to know
how.
I have been working with the code is samples/faulthandling since it
parallels my real code. The stub is is generated by WSDL2Java. The
response message looks correct to me:
<Soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Client</faultcode>
<faultstring>Account does not exist!</faultstring>
<detail>
<ns1:AccountNotExistFault xmlns:ns1="http://example">
<ns1:account>13</ns1:account>
</ns1:AccountNotExistFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
Without rampart deployed the client program catches a
AccountNotExistFaultMessageException. With rampart deployed it geta the
following exception:
[java] Withdrawing 1000 dollars from account#13
[java] java.lang.ClassCastException:
org.apache.axiom.om.impl.llom.OMElementImpl
[java] at
org.apache.axiom.soap.impl.llom.SOAPFaultImpl.getCode(SOAPFaultImpl.java:101)
[java] at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:215)
[java] at
example.BankServiceStub.withdraw(BankServiceStub.java:173)
[java] at example.BankClient.main(BankClient.java:59)
To duplicate this result try:
a recent axis2-1.1 release.
set AXIS2_HOME to where the zip file was unziped
start the server running locally by bin/axis2server.sh
cd to samples/faulthandling
ant generate.service - builds and deploys the service locally
ant run.client -Durl=http://localhost:8080/axis2/services/BankService
-Daccount=13 -Damt=400
should work
[java] Withdrawing 400 dollars from account#13
[java] Account#13 does not exist
Then deploy a rampart module in the samples/faulthandling client.
Download and unzip rampart.1.1.zip
http://www.apache.org/dyn/mirrors/mirrors.cgi/ws/rampart/1_1/rampart-1.1.zip
Copy the rampart libraries to axis2-home per rampart release instructions
pd ../../../rampart-1.1/samples
ant -- copies 7 jar files from ../lib to AXIS2_HOME/lib
ant run.client -Durl=http://localhost:8080/axis2/services/BankService
-Daccount=13 -Damt=400
Test still works
Deploy rampart
create client/repo/axis2.xml by copying
rampart-1.1/samples/basic/sample01/client.axis2.xml, then copy the
rampart.1.1.mar file to client/repo/modules/rampart.1.1.mar
Then you need to edit BankClient.java to add the line
ConfigurationContext configContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem("client/repo",
"client/repo/axis2.xml");
now
ant run.client -Durl=http://localhost:8080/axis2/services/BankService
-Daccount=13 -Damt=400
fails with
[java] Withdrawing 1000 dollars from account#13
[java] java.lang.ClassCastException:
org.apache.axiom.om.impl.llom.OMElementImpl
[java] at
org.apache.axiom.soap.impl.llom.SOAPFaultImpl.getCode(SOAPFaultImpl.java:101)
[java] at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:215)
[java] at
example.BankServiceStub.withdraw(BankServiceStub.java:173)
[java] at example.BankClient.main(BankClient.java:59)
It seems like it is caused by some confusion of classes, but I haven't
figured which ones yet.
Mary Thompson
---------------------------------------------------------------------
Mary R. Thompson <[EMAIL PROTECTED]>
Secure Grid Technologies Group (510) 486-7408
Lawrence Berkeley National Lab http://dsd.lbl.gov/~mrt
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]