axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Alateras <j...@comware.com.au>
Subject Re: problem trying to call a service using separate listener
Date Mon, 14 May 2007 14:09:44 GMT
okay, I turned on some log3j debugging and found that the http server on 
the client side was not starting because of a mismatch in the http-core 
jar. I was using 4.0alpha3 and had to go back to 4.0alpha2.

basically...problem has been solved.


cheers
</jima>
Jim Alateras wrote:
> Amila,
> 
> Here is the message going from the client to the server
> 
> INFO: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope 
> xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:soapenv="http:/
> /schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><wsa:To>http://localhost:5050/axis2/services/HelloService</wsa:To><wsa:ReplyTo>

> 
> <wsa:Address>http://192.168.1.100:5051/axis2/services/anonService161658991179147289562/anonOutInOp</wsa:Address></wsa:ReplyTo><wsa:M

> 
> essageID>urn:uuid:EB33FDC435BE59849F1179147289626</wsa:MessageID><wsa:Action>urn:www.comware.com.au:ws:hello:hello</wsa:Action></soa

> 
> penv:Header><soapenv:Body><tns1:hello 
> xmlns:tns1="http://www.comware.com.au/ws/200705/hello.wsdl"><tns2:helloRequest

> xmlns:tns2="htt
> p://www.comware.com.au/ws/hello.xsd"><tns2:name>Peter 
> Alateras</tns2:name></tns2:helloRequest></tns1:hello></soapenv:Body></soapenv:

> 
> Envelope>
> 
> The ws-a elements seem to be set up correctly and the client does have a 
> listener on 5051.
> 
> cheers
> </jima>
> 
> Amila Suriarachchi wrote:
> 
>>
>>
>> On 5/14/07, *Jim Alateras* <jima@comware.com.au 
>> <mailto:jima@comware.com.au>> wrote:
>>
>>     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
>>
>> It seems you have invalid  hander or module in you repository. Can you 
>> try with the axis2.xml and repository comes with the axis2-1.2 
>> distribution. Can you send your axis2.xml file and what are the .mar 
>> files in your modules directory?
>>
>>              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* < Michele.Mazzucco@ncl.ac.uk
>>     <mailto:Michele.Mazzucco@ncl.ac.uk>
>>      > <mailto:Michele.Mazzucco@ncl.ac.uk
>>     <mailto:Michele.Mazzucco@ncl.ac.uk>>> 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"
>>      >     <jima@comware.com.au <mailto:jima@comware.com.au>
>>     <mailto:jima@comware.com.au <mailto:jima@comware.com.au>>>
>>      >      > > To: < axis-user@ws.apache.org
>>     <mailto:axis-user@ws.apache.org> <mailto:axis-user@ws.apache.org
>>     <mailto:axis-user@ws.apache.org>>>
>>      >      > > 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
>>     <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
>>     <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:
>>     axis-user-unsubscribe@ws.apache.org
>>     <mailto:axis-user-unsubscribe@ws.apache.org>
>>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>>     <mailto:axis-user-unsubscribe@ws.apache.org>>
>>      >      > >> For additional commands, e-mail:
>>     axis-user-help@ws.apache.org <mailto:axis-user-help@ws.apache.org>
>>      >     <mailto:axis-user-help@ws.apache.org
>>     <mailto:axis-user-help@ws.apache.org>>
>>      >      > >>
>>      >      > >>
>>      >      > >
>>      >      > >
>>      >      > >
>>      >        
>> ---------------------------------------------------------------------
>>      >      > > To unsubscribe, e-mail:
>>     axis-user-unsubscribe@ws.apache.org
>>     <mailto:axis-user-unsubscribe@ws.apache.org>
>>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>>     <mailto:axis-user-unsubscribe@ws.apache.org>>
>>      >      > > For additional commands, e-mail:
>>     axis-user-help@ws.apache.org <mailto:axis-user-help@ws.apache.org>
>>      >     <mailto:axis-user-help@ws.apache.org
>>     <mailto:axis-user-help@ws.apache.org>>
>>      >      > >
>>      >      > >
>>      >      >
>>      >      >
>>      >      >
>>     ---------------------------------------------------------------------
>>      >      > To unsubscribe, e-mail:
>>     axis-user-unsubscribe@ws.apache.org
>>     <mailto:axis-user-unsubscribe@ws.apache.org>
>>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>>     <mailto:axis-user-unsubscribe@ws.apache.org>>
>>      >      > For additional commands, e-mail:
>>     axis-user-help@ws.apache.org <mailto:axis-user-help@ws.apache.org>
>>      >     <mailto:axis-user-help@ws.apache.org
>>     <mailto:axis-user-help@ws.apache.org>>
>>      >      >
>>      >
>>      >
>>      >        
>> ---------------------------------------------------------------------
>>      >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>     <mailto:axis-user-unsubscribe@ws.apache.org>
>>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>>     <mailto:axis-user-unsubscribe@ws.apache.org>>
>>      >     For additional commands, e-mail: axis-user-help@ws.apache.org
>>     <mailto:axis-user-help@ws.apache.org>
>>      >     <mailto:axis-user-help@ws.apache.org
>>     <mailto:axis-user-help@ws.apache.org>>
>>      >
>>      >
>>      >
>>      >
>>      > --
>>      > Amila Suriarachchi,
>>      > WSO2 Inc.
>>
>>
>>     ---------------------------------------------------------------------
>>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>     <mailto:axis-user-unsubscribe@ws.apache.org>
>>     For additional commands, e-mail: axis-user-help@ws.apache.org
>>     <mailto:axis-user-help@ws.apache.org>
>>
>>
>>
>>
>> -- 
>> Amila Suriarachchi,
>> WSO2 Inc.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message