Hello,
No, Actually I am doing the thing with the OMFactory. I also tried to
get the OMFactory that is used by the soap header OMElement
(getOMFactory() or something) and create the subelement using this. But
that did yield the same error.
Simon
Eran Chinthaka schrieb:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I think the problem is the following.
You must be creating an OMElement like this.
OMElement omElement = new OMElementImpl(....);
This is not recommended as you are trying to use a particular impl of
OMElement implementation.
So this is how it should be done.
OMFactory omFac = OMAbstractFactory.getOMFactory();
OMElement omElement = omFac.createOMElement(...);
Please read one of the Axiom tutorials found on the web.
Chinthaka
Simon Steinacker wrote:
Hello,
I am creating a custom OMElement that I need to send inside the soap
header. I do this by adding a handler to the handler chain and through
that I modify the MessageContext (the header inside it).
But when this modified MessageContext is processed by the axis engine I
get the following weird exception:
org.apache.axis2.AxisFault: java.lang.ClassCastException:
org.apache.axiom.om.impl.llom.OMElementImpl
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
at
org.txservice1.testservice.TestServiceStub.helloMe(TestServiceStub.java:348)
at
org.txservice1.testservice.TxService1Test.testCall(TxService1Test.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
at
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
at
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Does anyone know what the problem could be?
Thanks a lot,
Simon
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGahdMjON2uBzUhh8RAqbBAKCAcNoMIt7wO19f6m6AAlkQfVaHyACgs8X1
gdAZbmJ+bR0jjNnP89WZY1A=
=I6cp
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]