You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jim Alateras <ji...@comware.com.au> on 2007/05/11 02:05:53 UTC

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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: WSDL retrieval

Posted by Demetris G <de...@ece.neu.edu>.
Will do - thanks Jeff.

Jeff Greif wrote:
> Use GET, not POST.  POST might work but has the wrong semantics with
> respect to caching, etc.
>
> Jeff
>
> On 5/14/07, Demetris G <de...@ece.neu.edu> wrote:
>>
>> I guess I can try to use the Jakarta HTTP Client API and use the POST to
>> send the
>> '... ?wsdl' command to the remote Axis server. What do you think ?
>>
>> Demetris G wrote:
>> >
>> > Hi Amila,
>> >
>> >    I am just looking for something pretty simple - I want to run a
>> > client that can trigger the Axis server
>> > to send the WSDL XML doc over. I know I can do it manually as you are
>> > describing in your other
>> > email but is there an API that I can use to do this ? I will go over
>> > your code below and see if it can
>> > help me.
>> >
>> > Thanks very much
>> >
>> >
>> > Amila Suriarachchi wrote:
>> >> I am not clear about what you are saying. we can help you if you
>> >> explain a bit.
>> >>
>> >> See AxisService class has a method called printWSDL
>> >>
>> >> if (isUseUserWSDL()) {
>> >>             Parameter wsld4jdefinition = getParameter(
>> >> WSDLConstants.WSDL_4_J_DEFINITION);
>> >>             if (wsld4jdefinition != null) {
>> >>                 try {
>> >>                     Definition definition = (Definition)
>> >> wsld4jdefinition.getValue();
>> >>                     if (isModifyUserWSDLPortAddress()) {
>> >>                         setPortAddress(definition);
>> >>                     }
>> >>                     WSDLWriter writer =
>> >> WSDLFactory.newInstance().newWSDLWriter();
>> >>                     writer.writeWSDL(definition, out);
>> >>                 } catch (WSDLException e) {
>> >>                     throw new AxisFault(e);
>> >>                 }
>> >>             } else {
>> >>                 printWSDLError(out);
>> >>             }
>> >>         } else {
>> >>             setWsdlFound(true);
>> >>             //pick the endpointName and take it as the epr for the 
>> WSDL
>> >>             getWSDL(out, new String[]{this.endpointName}, 
>> "services");
>> >>         }
>> >>
>> >> Which actually called when generating the wsdl file.
>> >>
>> >> On 5/14/07, *Demetris G* <demetris@ece.neu.edu
>> >> <ma...@ece.neu.edu>> wrote:
>> >>
>> >>
>> >>     Hi all,
>> >>
>> >>         I asked this before and didn't hear much back about it. How
>> >> would
>> >>     one retrieve WSDL
>> >>     files from an Axis server programmatically? I can't find it in 
>> the
>> >>     API.
>> >>
>> >>     Thanks
>> >>
>> >>     >
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> >>     <ma...@ws.apache.org>
>> >>     For additional commands, e-mail: axis-user-help@ws.apache.org
>> >>     <ma...@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
>>
>>
>
> ---------------------------------------------------------------------
> 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


Re: WSDL retrieval

Posted by Jeff Greif <jg...@alumni.princeton.edu>.
Use GET, not POST.  POST might work but has the wrong semantics with
respect to caching, etc.

Jeff

On 5/14/07, Demetris G <de...@ece.neu.edu> wrote:
>
> I guess I can try to use the Jakarta HTTP Client API and use the POST to
> send the
> '... ?wsdl' command to the remote Axis server. What do you think ?
>
> Demetris G wrote:
> >
> > Hi Amila,
> >
> >    I am just looking for something pretty simple - I want to run a
> > client that can trigger the Axis server
> > to send the WSDL XML doc over. I know I can do it manually as you are
> > describing in your other
> > email but is there an API that I can use to do this ? I will go over
> > your code below and see if it can
> > help me.
> >
> > Thanks very much
> >
> >
> > Amila Suriarachchi wrote:
> >> I am not clear about what you are saying. we can help you if you
> >> explain a bit.
> >>
> >> See AxisService class has a method called printWSDL
> >>
> >> if (isUseUserWSDL()) {
> >>             Parameter wsld4jdefinition = getParameter(
> >> WSDLConstants.WSDL_4_J_DEFINITION);
> >>             if (wsld4jdefinition != null) {
> >>                 try {
> >>                     Definition definition = (Definition)
> >> wsld4jdefinition.getValue();
> >>                     if (isModifyUserWSDLPortAddress()) {
> >>                         setPortAddress(definition);
> >>                     }
> >>                     WSDLWriter writer =
> >> WSDLFactory.newInstance().newWSDLWriter();
> >>                     writer.writeWSDL(definition, out);
> >>                 } catch (WSDLException e) {
> >>                     throw new AxisFault(e);
> >>                 }
> >>             } else {
> >>                 printWSDLError(out);
> >>             }
> >>         } else {
> >>             setWsdlFound(true);
> >>             //pick the endpointName and take it as the epr for the WSDL
> >>             getWSDL(out, new String[]{this.endpointName}, "services");
> >>         }
> >>
> >> Which actually called when generating the wsdl file.
> >>
> >> On 5/14/07, *Demetris G* <demetris@ece.neu.edu
> >> <ma...@ece.neu.edu>> wrote:
> >>
> >>
> >>     Hi all,
> >>
> >>         I asked this before and didn't hear much back about it. How
> >> would
> >>     one retrieve WSDL
> >>     files from an Axis server programmatically? I can't find it in the
> >>     API.
> >>
> >>     Thanks
> >>
> >>     >
> >>
> >>
> >> ---------------------------------------------------------------------
> >>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >>     <ma...@ws.apache.org>
> >>     For additional commands, e-mail: axis-user-help@ws.apache.org
> >>     <ma...@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
>
>

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


Re: WSDL retrieval

Posted by Demetris G <de...@ece.neu.edu>.
I guess I can try to use the Jakarta HTTP Client API and use the POST to 
send the
'... ?wsdl' command to the remote Axis server. What do you think ?

Demetris G wrote:
>
> Hi Amila,
>
>    I am just looking for something pretty simple - I want to run a 
> client that can trigger the Axis server
> to send the WSDL XML doc over. I know I can do it manually as you are 
> describing in your other
> email but is there an API that I can use to do this ? I will go over 
> your code below and see if it can
> help me.
>
> Thanks very much
>
>
> Amila Suriarachchi wrote:
>> I am not clear about what you are saying. we can help you if you 
>> explain a bit.
>>
>> See AxisService class has a method called printWSDL
>>
>> if (isUseUserWSDL()) {
>>             Parameter wsld4jdefinition = getParameter( 
>> WSDLConstants.WSDL_4_J_DEFINITION);
>>             if (wsld4jdefinition != null) {
>>                 try {
>>                     Definition definition = (Definition) 
>> wsld4jdefinition.getValue();
>>                     if (isModifyUserWSDLPortAddress()) {
>>                         setPortAddress(definition);
>>                     }
>>                     WSDLWriter writer = 
>> WSDLFactory.newInstance().newWSDLWriter();
>>                     writer.writeWSDL(definition, out);
>>                 } catch (WSDLException e) {
>>                     throw new AxisFault(e);
>>                 }
>>             } else {
>>                 printWSDLError(out);
>>             }
>>         } else {
>>             setWsdlFound(true);
>>             //pick the endpointName and take it as the epr for the WSDL
>>             getWSDL(out, new String[]{this.endpointName}, "services");
>>         }
>>
>> Which actually called when generating the wsdl file.
>>
>> On 5/14/07, *Demetris G* <demetris@ece.neu.edu 
>> <ma...@ece.neu.edu>> wrote:
>>
>>
>>     Hi all,
>>
>>         I asked this before and didn't hear much back about it. How 
>> would
>>     one retrieve WSDL
>>     files from an Axis server programmatically? I can't find it in the
>>     API.
>>
>>     Thanks
>>
>>     >
>>
>>     
>> ---------------------------------------------------------------------
>>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>     <ma...@ws.apache.org>
>>     For additional commands, e-mail: axis-user-help@ws.apache.org
>>     <ma...@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


currentTimeMillis to UnisgnedInt

Posted by Simon Steinacker <si...@student.uibk.ac.at>.
Hello,

I have the problem, that I have to convert the long value provided by 
Calendar.getInstance().getTimeInMillis() into the 
org.apache.axis2.databinding.types.UnsignedInt type.

But if I do that, I always obtain numberformat exceptions...
Does anyone know how to work around this problem?

Thanks a lot,
Simon

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


Re: WSDL retrieval

Posted by Demetris G <de...@ece.neu.edu>.
Oh sorry - and currenly I am running Axis 1.4

Demetris G wrote:
>
> Hi Amila,
>
>    I am just looking for something pretty simple - I want to run a 
> client that can trigger the Axis server
> to send the WSDL XML doc over. I know I can do it manually as you are 
> describing in your other
> email but is there an API that I can use to do this ? I will go over 
> your code below and see if it can
> help me.
>
> Thanks very much
>
>
> Amila Suriarachchi wrote:
>> I am not clear about what you are saying. we can help you if you 
>> explain a bit.
>>
>> See AxisService class has a method called printWSDL
>>
>> if (isUseUserWSDL()) {
>>             Parameter wsld4jdefinition = getParameter( 
>> WSDLConstants.WSDL_4_J_DEFINITION);
>>             if (wsld4jdefinition != null) {
>>                 try {
>>                     Definition definition = (Definition) 
>> wsld4jdefinition.getValue();
>>                     if (isModifyUserWSDLPortAddress()) {
>>                         setPortAddress(definition);
>>                     }
>>                     WSDLWriter writer = 
>> WSDLFactory.newInstance().newWSDLWriter();
>>                     writer.writeWSDL(definition, out);
>>                 } catch (WSDLException e) {
>>                     throw new AxisFault(e);
>>                 }
>>             } else {
>>                 printWSDLError(out);
>>             }
>>         } else {
>>             setWsdlFound(true);
>>             //pick the endpointName and take it as the epr for the WSDL
>>             getWSDL(out, new String[]{this.endpointName}, "services");
>>         }
>>
>> Which actually called when generating the wsdl file.
>>
>> On 5/14/07, *Demetris G* <demetris@ece.neu.edu 
>> <ma...@ece.neu.edu>> wrote:
>>
>>
>>     Hi all,
>>
>>         I asked this before and didn't hear much back about it. How 
>> would
>>     one retrieve WSDL
>>     files from an Axis server programmatically? I can't find it in the
>>     API.
>>
>>     Thanks
>>
>>     >
>>
>>     
>> ---------------------------------------------------------------------
>>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>     <ma...@ws.apache.org>
>>     For additional commands, e-mail: axis-user-help@ws.apache.org
>>     <ma...@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


Re: WSDL retrieval

Posted by Demetris G <de...@ece.neu.edu>.
Hi Amila,

    I am just looking for something pretty simple - I want to run a 
client that can trigger the Axis server
to send the WSDL XML doc over. I know I can do it manually as you are 
describing in your other
email but is there an API that I can use to do this ? I will go over 
your code below and see if it can
help me.

Thanks very much


Amila Suriarachchi wrote:
> I am not clear about what you are saying. we can help you if you 
> explain a bit.
>
> See AxisService class has a method called printWSDL
>
> if (isUseUserWSDL()) {
>             Parameter wsld4jdefinition = getParameter( 
> WSDLConstants.WSDL_4_J_DEFINITION);
>             if (wsld4jdefinition != null) {
>                 try {
>                     Definition definition = (Definition) 
> wsld4jdefinition.getValue();
>                     if (isModifyUserWSDLPortAddress()) {
>                         setPortAddress(definition);
>                     }
>                     WSDLWriter writer = 
> WSDLFactory.newInstance().newWSDLWriter();
>                     writer.writeWSDL(definition, out);
>                 } catch (WSDLException e) {
>                     throw new AxisFault(e);
>                 }
>             } else {
>                 printWSDLError(out);
>             }
>         } else {
>             setWsdlFound(true);
>             //pick the endpointName and take it as the epr for the WSDL
>             getWSDL(out, new String[]{this.endpointName}, "services");
>         }
>
> Which actually called when generating the wsdl file.
>
> On 5/14/07, *Demetris G* <demetris@ece.neu.edu 
> <ma...@ece.neu.edu>> wrote:
>
>
>     Hi all,
>
>         I asked this before and didn't hear much back about it. How would
>     one retrieve WSDL
>     files from an Axis server programmatically? I can't find it in the
>     API.
>
>     Thanks
>
>     >
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@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


Re: WSDL retrieval

Posted by Amila Suriarachchi <am...@gmail.com>.
I am not clear about what you are saying. we can help you if you explain a
bit.

See AxisService class has a method called printWSDL

if (isUseUserWSDL()) {
            Parameter wsld4jdefinition = getParameter(
WSDLConstants.WSDL_4_J_DEFINITION);
            if (wsld4jdefinition != null) {
                try {
                    Definition definition = (Definition)
wsld4jdefinition.getValue();
                    if (isModifyUserWSDLPortAddress()) {
                        setPortAddress(definition);
                    }
                    WSDLWriter writer = WSDLFactory.newInstance
().newWSDLWriter();
                    writer.writeWSDL(definition, out);
                } catch (WSDLException e) {
                    throw new AxisFault(e);
                }
            } else {
                printWSDLError(out);
            }
        } else {
            setWsdlFound(true);
            //pick the endpointName and take it as the epr for the WSDL
            getWSDL(out, new String[]{this.endpointName}, "services");
        }

Which actually called when generating the wsdl file.

On 5/14/07, Demetris G <de...@ece.neu.edu> wrote:
>
>
> Hi all,
>
>     I asked this before and didn't hear much back about it. How would
> one retrieve WSDL
> files from an Axis server programmatically? I can't find it in the API.
>
> Thanks
>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: WSDL retrieval

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Demetris ,

If you are using Axis2 , then go to
host:port/axis2/services

under that you will get all the available services click one of them ,
then you will get the corresponding wsdl

Thanks
Deepal

>
> Hi all,
>
>    I asked this before and didn't hear much back about it. How would
> one retrieve WSDL
> files from an Axis server programmatically? I can't find it in the API.
>
> Thanks
>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>

-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



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


WSDL retrieval

Posted by Demetris G <de...@ece.neu.edu>.
Hi all,

    I asked this before and didn't hear much back about it. How would 
one retrieve WSDL
files from an Axis server programmatically? I can't find it in the API.

Thanks

>

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


Re: problem trying to call a service using separate listener

Posted by Jim Alateras <ji...@comware.com.au>.
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 
>> <ma...@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
>>     <ma...@ncl.ac.uk>
>>      > <mailto:Michele.Mazzucco@ncl.ac.uk
>>     <ma...@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 <ma...@comware.com.au>
>>     <mailto:jima@comware.com.au <ma...@comware.com.au>>>
>>      >      > > To: < axis-user@ws.apache.org
>>     <ma...@ws.apache.org> <mailto:axis-user@ws.apache.org
>>     <ma...@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
>>     <ma...@ws.apache.org>
>>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>>     <ma...@ws.apache.org>>
>>      >      > >> For additional commands, e-mail:
>>     axis-user-help@ws.apache.org <ma...@ws.apache.org>
>>      >     <mailto:axis-user-help@ws.apache.org
>>     <ma...@ws.apache.org>>
>>      >      > >>
>>      >      > >>
>>      >      > >
>>      >      > >
>>      >      > >
>>      >        
>> ---------------------------------------------------------------------
>>      >      > > To unsubscribe, e-mail:
>>     axis-user-unsubscribe@ws.apache.org
>>     <ma...@ws.apache.org>
>>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>>     <ma...@ws.apache.org>>
>>      >      > > For additional commands, e-mail:
>>     axis-user-help@ws.apache.org <ma...@ws.apache.org>
>>      >     <mailto:axis-user-help@ws.apache.org
>>     <ma...@ws.apache.org>>
>>      >      > >
>>      >      > >
>>      >      >
>>      >      >
>>      >      >
>>     ---------------------------------------------------------------------
>>      >      > To unsubscribe, e-mail:
>>     axis-user-unsubscribe@ws.apache.org
>>     <ma...@ws.apache.org>
>>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>>     <ma...@ws.apache.org>>
>>      >      > For additional commands, e-mail:
>>     axis-user-help@ws.apache.org <ma...@ws.apache.org>
>>      >     <mailto:axis-user-help@ws.apache.org
>>     <ma...@ws.apache.org>>
>>      >      >
>>      >
>>      >
>>      >        
>> ---------------------------------------------------------------------
>>      >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>     <ma...@ws.apache.org>
>>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>>     <ma...@ws.apache.org>>
>>      >     For additional commands, e-mail: axis-user-help@ws.apache.org
>>     <ma...@ws.apache.org>
>>      >     <mailto:axis-user-help@ws.apache.org
>>     <ma...@ws.apache.org>>
>>      >
>>      >
>>      >
>>      >
>>      > --
>>      > Amila Suriarachchi,
>>      > WSO2 Inc.
>>
>>
>>     ---------------------------------------------------------------------
>>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>     <ma...@ws.apache.org>
>>     For additional commands, e-mail: axis-user-help@ws.apache.org
>>     <ma...@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


Re: problem trying to call a service using separate listener

Posted by Jim Alateras <ji...@comware.com.au>.
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 
> <ma...@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
>     <ma...@ncl.ac.uk>
>      > <mailto:Michele.Mazzucco@ncl.ac.uk
>     <ma...@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 <ma...@comware.com.au>
>     <mailto:jima@comware.com.au <ma...@comware.com.au>>>
>      >      > > To: < axis-user@ws.apache.org
>     <ma...@ws.apache.org> <mailto:axis-user@ws.apache.org
>     <ma...@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
>     <ma...@ws.apache.org>
>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>>
>      >      > >> For additional commands, e-mail:
>     axis-user-help@ws.apache.org <ma...@ws.apache.org>
>      >     <mailto:axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>>
>      >      > >>
>      >      > >>
>      >      > >
>      >      > >
>      >      > >
>      >    
>     ---------------------------------------------------------------------
>      >      > > To unsubscribe, e-mail:
>     axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>>
>      >      > > For additional commands, e-mail:
>     axis-user-help@ws.apache.org <ma...@ws.apache.org>
>      >     <mailto:axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>>
>      >      > >
>      >      > >
>      >      >
>      >      >
>      >      >
>     ---------------------------------------------------------------------
>      >      > To unsubscribe, e-mail:
>     axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>>
>      >      > For additional commands, e-mail:
>     axis-user-help@ws.apache.org <ma...@ws.apache.org>
>      >     <mailto:axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>>
>      >      >
>      >
>      >
>      >    
>     ---------------------------------------------------------------------
>      >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>>
>      >     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>      >     <mailto:axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>>
>      >
>      >
>      >
>      >
>      > --
>      > Amila Suriarachchi,
>      > WSO2 Inc.
> 
> 
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@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


Re: problem trying to call a service using separate listener

Posted by Amila Suriarachchi <am...@gmail.com>.
On 5/14/07, Jim Alateras <ji...@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
> > <ma...@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 <ma...@comware.com.au>>
> >      > > To: <axis-user@ws.apache.org <ma...@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",
> >      > >> "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: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >      > >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >      > >>
> >      > >>
> >      > >
> >      > >
> >      > >
> >
> ---------------------------------------------------------------------
> >      > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >      > > For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >      > >
> >      > >
> >      >
> >      >
> >      >
> ---------------------------------------------------------------------
> >      > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >      > For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >      >
> >
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@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
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: problem trying to call a service using separate listener

Posted by Jim Alateras <ji...@comware.com.au>.
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* < Michele.Mazzucco@ncl.ac.uk 
> <ma...@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 <ma...@comware.com.au>>
>      > > To: <axis-user@ws.apache.org <ma...@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",
>      > >> "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: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>      > >> For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>      > >>
>      > >>
>      > >
>      > >
>      > >
>     ---------------------------------------------------------------------
>      > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>      > > For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>      > >
>      > >
>      >
>      >
>      > ---------------------------------------------------------------------
>      > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>      > For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>      >
> 
> 
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@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


Re: problem trying to call a service using separate listener

Posted by Amila Suriarachchi <am...@gmail.com>.
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 <Mi...@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
> >
> > > To: <ax...@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",
> > >> "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: 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
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: problem trying to call a service using separate listener

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
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" <ji...@comware.com.au>
> > To: <ax...@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", 
> >> "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: 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
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> 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


Re: problem trying to call a service using separate listener

Posted by Jim Alateras <ji...@comware.com.au>.
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" <ji...@comware.com.au>
> To: <ax...@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", 
>> "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: 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
> 
> 


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


Re: problem trying to call a service using separate listener

Posted by Martin Gainty <mg...@hotmail.com>.
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" <ji...@comware.com.au>
To: <ax...@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", 
> "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: 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