Amila,
I have tried the changes below but I still get the following exception
when running the application.
Caused by: org.apache.axis2.deployment.DeploymentException: Invalid
Handler phase rule has not been specified
at
org.apache.axis2.deployment.DescriptionBuilder.processHandler(DescriptionBuilder.java:295)
at
org.apache.axis2.deployment.AxisConfigBuilder.processPhaseList(AxisConfigBuilder.java:261)
at
org.apache.axis2.deployment.AxisConfigBuilder.processPhaseOrders(AxisConfigBuilder.java:292)
at
org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:107)
at
org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:690)
at
org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:109)
at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:61)
at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory
.java:180)
at
com.comware.axis2.examples.VersionClient.main(VersionClient.java:30)
I have googled the error but am unable to find anything meaningful.
cheers
</jima>
Amila Suriarachchi wrote:
when creating the service you have to specify a configuration context
which points to a repository
eg .
ConfigurationContext configurationContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem
(AXIS2_REPOSITORY, AXIS2_CONF);
ServiceClient serviceClient = new
ServiceClient(configurationContext, null);
On 5/11/07, *Michele Mazzucco* < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Yes,
axis2.xml is for the server while the -Daxis2.repo property is for the
client.
Michele
On Fri, 2007-05-11 at 12:00 +1000, Jim Alateras wrote:
> Martin,
>
> The addressing module is enabled in the axis2.xml file. Do I
also need
> to set the -Daxis2.repo property?
>
> cheers
> </jima>
> Martin Gainty wrote:
> > can you check this module entry in %AXIS2_HOME%\conf\axis2.xml
> > <module ref="addressing"/>
> >
> > M--
> > This email message and any files transmitted with it contain
confidential
> > information intended only for the person(s) to whom this email
message is
> > addressed. If you have received this email message in error,
please notify
> > the sender immediately by telephone or email and destroy the
original
> > message without making a copy. Thank you.
> >
> > ----- Original Message ----- From: "Jim Alateras"
<[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
> > To: <[email protected] <mailto:[email protected]>>
> > Sent: Thursday, May 10, 2007 8:05 PM
> > Subject: problem trying to call a service using separate listener
> >
> >
> >> I have written a web service client to call the getVersion
operation
> >> of the Version service that is part of the axis2 distribution.
> >>
> >> The following code works fine
> >>
> >>
> >> ServiceClient client = new ServiceClient();
> >> client.setTargetEPR(new
> >>
EndpointReference("http://localhost:5050/axis2/services/Version?wsdl"));
> >>
> >> // set the options
> >> Options options = client.getOptions();
> >> options.setAction("urn:getVersion");
> >>
> >> // build the request
> >> OMFactory fac = OMAbstractFactory.getOMFactory();
> >> OMNamespace tns1 =
fac.createOMNamespace("http://axisversion.sample",
> >> "tns1");
> >> OMElement getVersion = fac.createOMElement("getVersion", tns1);
> >> OMElement response = client.sendReceive(getVersion);
> >>
> >>
> >>
> >> now I want to test being able to receive the response on a
different
> >> connection to the request. I have a couple of lines to the code to
> >> engage the addressing module and to use a separate listener.
> >>
> >> ServiceClient client = new ServiceClient();
> >> client.setTargetEPR(new
> >>
EndpointReference("http://localhost:5050/axis2/services/Version?wsdl"));
> >> client.engageModule(new QName(Constants.MODULE_ADDRESSING));
> >> options.setUseSeparateListener(true);
> >> options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
> >>
> >> // set the options
> >> Options options = client.getOptions();
> >> options.setAction("urn:getVersion");
> >>
> >> // build the request
> >> OMFactory fac = OMAbstractFactory.getOMFactory ();
> >> OMNamespace tns1 =
fac.createOMNamespace("http://axisversion.sample",
> >> "tns1");
> >> OMElement getVersion = fac.createOMElement ("getVersion", tns1);
> >> OMElement response = client.sendReceive(getVersion);
> >>
> >>
> >> When I execute the code I get the following exception
> >>
> >> Exception in thread "main" org.apache.axis2.AxisFault: Unable to
> >> engage module : addressing
> >> at
> >> org.apache.axis2.client.ServiceClient.engageModule
(ServiceClient.java:298)
> >>
> >> at
com.comware.axis2.examples.VersionClient.main(VersionClient.java:29)
> >>
> >>
> >> Can anyone provide some assistance in moving this forward. I have
> >> tried setting the -Daxsi2.xml=<path to axis2.xml file>
property on the
> >> command line but then I get the following error
> >>
> >> Caused by: org.apache.axis2.deployment.DeploymentException :
Invalid
> >> Handler phase rule has not been specified
> >> at
> >>
org.apache.axis2.deployment.DescriptionBuilder.processHandler(DescriptionBuilder.java:295)
> >>
> >> at
> >>
org.apache.axis2.deployment.AxisConfigBuilder.processPhaseList(AxisConfigBuilder.java:261)
> >>
> >> at
> >>
org.apache.axis2.deployment.AxisConfigBuilder.processPhaseOrders
(AxisConfigBuilder.java:292)
> >>
> >> at
> >>
org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:107)
> >>
> >> at
> >>
org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:690)
> >>
> >> at
> >>
org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration
(FileSystemConfigurator.java:109)
> >>
> >> at
> >>
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:61)
> >>
> >> at
> >>
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory
> >>
> >> .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
> >>
com.comware.axis2.examples.VersionClient.main(VersionClient.java:27)
> >>
> >> cheers
> >> </jima>
> >>
> >>
---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
> >> For additional commands, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
> >>
> >>
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
--
Amila Suriarachchi,
WSO2 Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]