Hi Ruwan,
First of all, Thank you for your attention to my problem.I am really stuck
here.
I do not have a client_repo present for my client. I have a SAAJ client
written using the saaj-api.jars from Sun.I construct the message using
javax.xml.soap classes and not from org.apache.axis2.saaj. classes.
But I have embedded this client as a class inside the Synapse sources. Based
on certain elements in the Synapse config xml [synapse.xml] I intend to run
this client. It so happens that I do not want to engage addressing.mar from
the Synapse environment.My client simply needs to send the constructed soap
to a certain webservice endpoint. So in effect, this client which I talk
about runs as part of the Synapse server .
This SAAJ client works fine when run outside of Synapse, as separate
standalone application. When I integrate into Synapse, the client side
message sending fails with the below mentioned exception. To experiment , I
went to the Synapse/repository/conf/axis2.xml and commented out <module
ref=addressing> . And this time, the client failed complaining that it could
not engage module 'synapse'. So I commented out <module ref=synapse> too.
And this time round the client went through.
However, this kind of a workaround is not an option for me. I assume there
will be other parts in the Synapse code that will need <module
ref=addressing> to be set as a global module.
I have begun to suspect that for every SOAP message that is meant to be sent
out from Synapse , the axis2.xml comes into play and tries to 'engage' the
modules defined in the <module ref=.../> settings. Is there a way I can
selectively disable engaging modules for certain classes.
Also I was a little surprised to see the exception trace contain
org.apache.axis2.saaj.SOAPConnectionImpl.call(SOAPConnectionImpl.java:106)
In my client code I had explicitly used :
javax.xml.soap.SOAPConnectionFactory conFactory =
javax.xml.soap.SOAPConnectionFactory.newInstance();
javax.xml.soap.SOAPConnection connection =
conFactory.createConnection();
And yet org.apache.axis2.saaj.SOAPConnectionImpl.call was being invoked.
A lot of questions. I hope I could outline my scenario in an comprehensible
manner.
Thanks,
Eric.
On 6/28/07, Ruwan Linton <[EMAIL PROTECTED]> wrote:
Hi Eric,
Is there an addressing.mar file in your client side repo.
It seems like your client side is unable to find the addressing module in
place.
Just a hint....
On 6/27/07, Eric Nygma <[EMAIL PROTECTED]> wrote:
>
> Also I did the following. Obtained an
> org.apache.axis2.engine.AxisConfiguration instance from the
> SynapseConfiguration instance.And then did a 'getEngagedModules()' on
the
> AxisConfiguration. That showed that addressing-1.1.051 was indeed
engaged.
This is on server side right? I think the error is on client side. Can
you
check the same on client side as well?
Thanks,
Ruwan.
Can someone please provide some help !
>
> E\.
>
> On 6/27/07, Eric Nygma <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I have a SAAJ client [ written using the saaj 1.3 api , package
> > javax.xml.soap ] to send a soap message to a webservice.
> >
> > I run this client from within an Apache Synapse environment - which I
> > believe has axis2-{version}.jar in its 'classpath'. I placed
> saaj-api.jarahead of the
> > axis2.jar in the pom.xml's dependency. Also the axis2.xml conf file
has
> > <module ref="addressing"> uncommented.
> >
> > When I run the client I get the following : -
> >
> > org.apache.axis2.deployment.DeploymentException : Trying to engage a
> > module which is not available : addressing; nested e
> > xception is:
> > org.apache.axis2.AxisFault: Trying to engage a module which is
> not
> > available : addressing
> > javax.xml.soap.SOAPException :
> > org.apache.axis2.deployment.DeploymentException: Trying to engage a
> module
> > which is not av
> > ailable : addressing; nested exception is:
> > org.apache.axis2.AxisFault: Trying to engage a module which is
> not
> > available : addressing
> > at org.apache.axis2.saaj.SOAPConnectionImpl.call(
> > SOAPConnectionImpl.java:109)
> >
> > Caused by: org.apache.axis2.deployment.DeploymentException : Trying to
> > engage a module which is not available : addressin
> > g; nested exception is:
> > org.apache.axis2.AxisFault: Trying to engage a module which is
> not
> > available : addressing
> > at
> org.apache.axis2.deployment.DeploymentEngine.loadFromClassPath(
> > DeploymentEngine.java:129)
> > at
> >
org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(
> > FileSystemConfigurator.java:118)
> > at
> >
>
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext
> (
> > ConfigurationContextFactory.j
> > ava:61)
> > at
> >
>
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem
> > (ConfigurationCo
> > ntextFactory.java:180)
> > at org.apache.axis2.client.ServiceClient.initializeTransports(
> > ServiceClient.java:189)
> > at
org.apache.axis2.client.ServiceClient.configureServiceClient(
> > ServiceClient.java:118)
> > at org.apache.axis2.client.ServiceClient.<init>(
> ServiceClient.java
> > :114)
> > at org.apache.axis2.client.ServiceClient.<init>(
> ServiceClient.java
> > :207)
> > at org.apache.axis2.saaj.SOAPConnectionImpl.call(
> > SOAPConnectionImpl.java:106)
> > ... 15 more
> >
> > Caused by: org.apache.axis2.AxisFault : Trying to engage a module
which
> is
> > not available : addressing
> > at org.apache.axis2.engine.AxisConfiguration.engageModule (
> > AxisConfiguration.java:356)
> > at org.apache.axis2.deployment.DeploymentEngine.engageModules(
> > DeploymentEngine.java:664)
> > at
> org.apache.axis2.deployment.DeploymentEngine.loadFromClassPath (
> > DeploymentEngine.java:125)
> >
> >
> > When I run the SAAJ client standalone-as in- outside of the Synapse
> > environment it works fine.
> > Can anyone help ?
> >
> > Many Thanks.
> > e\.
>
--
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"