axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michele Mazzucco <Michele.Mazzu...@ncl.ac.uk>
Subject Re: axis 2 & WS-Addressing problems
Date Fri, 21 Apr 2006 15:18:26 GMT
Sure,

H:\workspace\Axis2Sample\bin;D:\Programs\apache-ant-1.6.5\lib\ant-launcher.jar;C:\Program

Files\Java\jre1.5.0_03\lib\ext\QTJava.zip;D:\Programs\apache-ant-1.6.5\lib\ant-antlr.jar;D:\Programs\apache-ant-1.6.5\lib\ant-apache-bcel.jar;D:\Programs\apache-ant-1.6.5\lib\ant-apache-bsf.jar;D:\Programs\apache-ant-1.6.5\lib\ant-apache-log4j.jar;D:\Programs\apache-ant-1.6.5\lib\ant-apache-oro.jar;D:\Programs\apache-ant-1.6.5\lib\ant-apache-regexp.jar;D:\Programs\apache-ant-1.6.5\lib\ant-apache-resolver.jar;D:\Programs\apache-ant-1.6.5\lib\ant-commons-logging.jar;D:\Programs\apache-ant-1.6.5\lib\ant-commons-net.jar;D:\Programs\apache-ant-1.6.5\lib\ant-icontract.jar;D:\Programs\apache-ant-1.6.5\lib\ant-jai.jar;D:\Programs\apache-ant-1.6.5\lib\ant-javamail.jar;D:\Programs\apache-ant-1.6.5\lib\ant-jdepend.jar;D:\Programs\apache-ant-1.6.5\lib\ant-jmf.jar;D:\Programs\apache-ant-1.6.5\lib\ant-jsch.jar;D:\Programs\apache-ant-1.6.5\lib\ant-junit.jar;D:\Programs\apache-ant-1.6.5\lib\ant-netrexx.jar;D:\Programs\apache-ant-1.6.5\lib\ant-nodeps.jar;D:\Programs\apache-ant-1.6.5\lib\ant-
starteam.jar;D:\Programs\apache-ant-1.6.5\lib\ant-stylebook.jar;D:\Programs\apache-ant-1.6.5\lib\ant-swing.jar;D:\Programs\apache-ant-1.6.5\lib\ant-trax.jar;D:\Programs\apache-ant-1.6.5\lib\ant-vaj.jar;D:\Programs\apache-ant-1.6.5\lib\ant-weblogic.jar;D:\Programs\apache-ant-1.6.5\lib\ant-xalan1.jar;D:\Programs\apache-ant-1.6.5\lib\ant-xslp.jar;D:\Programs\apache-ant-1.6.5\lib\ant.jar;D:\Programs\apache-ant-1.6.5\lib\xercesImpl.jar;D:\Programs\apache-ant-1.6.5\lib\xml-apis.jar;C:\Program

Files\Java\jdk1.5.0_03\lib\tools.jar;D:\Programs\Axis\axis2-0_95\lib\XmlSchema-SNAPSHOT.jar;D:\Programs\Axis\axis2-0_95\lib\annogen-0.1.0.jar;D:\Programs\Axis\axis2-0_95\lib\axiom-api-0.95.jar;D:\Programs\Axis\axis2-0_95\lib\axiom-impl-0.95.jar;D:\Programs\Axis\axis2-0_95\lib\axis-wsdl4j-1.2.jar;D:\Programs\Axis\axis2-0_95\lib\axis2-adb-0.95.jar;D:\Programs\Axis\axis2-0_95\lib\axis2-codegen-0.95.jar;D:\Programs\Axis\axis2-0_95\lib\axis2-doom-0.95.jar;D:\Programs\Axis\axis2-0_95\lib\axis2-kernel-0.95.jar;D:\Programs\Axis\axis2-0_95\lib\backport-util-concurrent-2.0_01_pd.jar;D:\Programs\Axis\axis2-0_95\lib\commons-codec-1.3.jar;D:\Programs\Axis\axis2-0_95\lib\commons-httpclient-3.0.jar;D:\Programs\Axis\axis2-0_95\lib\commons-logging-1.0.4.jar;D:\Programs\Axis\axis2-0_95\lib\geronimo-spec-activation-1.0.2-rc4.jar;D:\Programs\Axis\axis2-0_95\lib\geronimo-spec-javamail-1.3.1-rc5.jar;D:\Programs\Axis\axis2-0_95\lib\geronimo-spec-jms-1.1-rc4.jar;D:\Programs\Axis\axis2-0_95\lib\jaxe
n-1.1-beta-7.jar;D:\Programs\Axis\axis2-0_95\lib\jaxme2-0.5.1.jar;D:\Programs\Axis\axis2-0_95\lib\jaxmejs-0.5.1.jar;D:\Programs\Axis\axis2-0_95\lib\jaxmexs-0.5.1.jar;D:\Programs\Axis\axis2-0_95\lib\log4j-1.2.13.jar;D:\Programs\Axis\axis2-0_95\lib\maven-itest-plugin-1.0.jar;D:\Programs\Axis\axis2-0_95\lib\policy-1.0.jar;D:\Programs\Axis\axis2-0_95\lib\servletapi-2.3.jar;D:\Programs\Axis\axis2-0_95\lib\stax-api-1.0.jar;D:\Programs\Axis\axis2-0_95\lib\wstx-asl-2.8.2.jar;D:\Programs\Axis\axis2-0_95\lib\xbean-2.1.0.jar;D:\Programs\Axis\axis2-0_95\lib\xercesImpl-2.7.1.jar;D:\Programs\Axis\axis2-0_95\lib\xml-apis-1.3.02.jar:D:\Programs\apache-tomcat-5.5.15\webapps\axis2\WEB-INF\modules\addressing-0.95.mar

(there are no spaces)

Regards,
Michele

Michel Drescher wrote:
> Can you please post your classpath?
> 
> Cheers,
> Michel
> 
> On 21 Apr 2006, at 16:06, Michele Mazzucco wrote:
> 
>> Hi Michel,
>>
>> thanks for your reply, but unfortunately it doesn't solve the issue.
>>
>> Given the following code:
>>
>> public class AsyncEchoClient {
>>     
>>     private static String toEpr = 
>> "http://localhost:8080/axis2/services/ServiceClass";
>>     
>>     
>>     
>>     public static void main(String[] args) {
>>         ServiceClient sender = null;
>>        
>>         try {
>>             OMElement payload = ClientUtil.getEchoOMElement();
>>             Options options = new Options();
>>            
>>             options.setTo(new EndpointReference(toEpr));
>>             options.setAction("urn:echo");
>>             options.setUseSeparateListener(true);
>>            
>>
>>             ConfigurationContext context =              
>> ConfigurationContextFactory.createConfigurationContextFromFileSystem(
>>                     null,
>>                     null);
>>            
>>             sender = new ServiceClient();
>>             sender.setOptions(options);
>>             sender.engageModule(new 
>> QName(Constants.MODULE_ADDRESSING));            <----- line 48
>>            
>>            
>>             Callback callback = new Callback() {
>>                
>>                 @Override
>>                 public void onComplete(AsyncResult result) {
>>                     try {
>>                         StringWriter writer = new StringWriter();
>>                         result.getResponseEnvelope().serialize(
>>                             
>> XMLOutputFactory.newInstance().createXMLStreamWriter(
>>                                 writer));
>>                         writer.flush();
>>                         System.out.println("================");
>>                         System.out.println("Result: " + 
>> writer.toString());
>>                         System.out.println("================");
>>                     } catch (XMLStreamException e) {
>>                         onError(e);
>>                     }
>>                 }
>>                
>>                 @Override
>>                 public void onError(Exception error) {
>>                     error.printStackTrace();
>>                 }
>>                
>>             };
>>            
>>             System.err.println(payload == null);
>>             sender.sendReceiveNonBlocking(payload, callback);
>>            
>>             long i = 0;
>>             while (! callback.isComplete()) {
>>                 i++;
>>             }
>>            
>>             System.out.println("Wait " + i);           
>>         } catch (AxisFault e) {
>>             e.printStackTrace();
>>         } finally {
>>             try {
>>                 sender.finalizeInvoke();
>>             } catch (AxisFault e) {
>>                 //
>>             }
>>         }
>>     }
>>     
>> }
>>
>>
>> I still get
>>
>> run-async:
>>      [java] org.apache.axis2.AxisFault: Module not found
>>      [java]     at 
>> org.apache.axis2.description.AxisService.engageModule(AxisService.java:311) 
>>
>>      [java]     at 
>> org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:273) 
>>
>>      [java]     at client.AsyncEchoClient.main(AsyncEchoClient.java:48)
>>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
>> Method)
>>      [java]     at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>>
>>      [java]     at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>>
>>      [java]     at java.lang.reflect.Method.invoke(Method.java:585)
>>      [java]     at 
>> org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:202)
>>      [java]     at 
>> org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:134)
>>      [java]     at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
>>      [java]     at 
>> org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178)
>>      [java]     at 
>> org.apache.tools.ant.taskdefs.Java.execute(Java.java:84)
>>      [java]     at 
>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>>      [java]     at org.apache.tools.ant.Task.perform(Task.java:364)
>>      [java]     at org.apache.tools.ant.Target.execute(Target.java:341)
>>      [java]     at 
>> org.apache.tools.ant.Target.performTasks(Target.java:369)
>>      [java]     at 
>> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>>      [java]     at 
>> org.apache.tools.ant.Project.executeTarget(Project.java:1185)
>>      [java]     at 
>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)

>>
>>      [java]     at 
>> org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>>      [java]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
>>      [java]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
>>      [java]     at 
>> org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
>>      [java]     at 
>> org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
>>
>> (and the addressing module is included into the class path).
>>
>>
>> Michele
>>
>>
>> Michel Drescher wrote:
>>> Hi Michele,
>>> the easiest thing is to put the required modules (e.g. 
>>> addressing.mar) in the classpath, and create the ConfigurationContext 
>>> like this:
>>>     ConfigurationContext ctx = 
>>> ConfigurationContextFactory.createConfigurationContextFromFileSystem( null, 
>>> null );
>>> But beware: You MUST NOT have any whitespaces in the class path!
>>> The alternative is to have a fixed directory, e.g.:
>>>     ConfigurationContext ctx =
>>>         
>>> ConfigurationContextFactory.createConfigurationContextFromFileSystem( "/axis2",

>>> null );
>>> THe second step looks like this:
>>>             _serviceClient.engageModule( new QName( 
>>> org.apache.axis2.Constants.MODULE_ADDRESSING ) );
>>> I have put this kind of code in my generated client stub for 
>>> convenience.
>>> HTH,
>>> Michel
>>> On 21 Apr 2006, at 15:34, Michele Mazzucco wrote:
>>>> Hi Deepal,
>>>>
>>>> could you explain me what do you mean in step 1?
>>>>
>>>> Thanks,
>>>> Michele
>>>>
>>>> Deepal Jayasinghe wrote:
>>>>> You have to engage addressing module in the client if you are 
>>>>> trying to
>>>>> invoke a service using dual channel. You can do that as follows
>>>>>   1 Create a ConfigurationContext using a repository witch contains
>>>>> addressing module in it
>>>>>   2. Then engage addressing module to ServiceCleint before invoke the
>>>>> service
>>>>>      (sc.engageModule(new QName("addressing")))
>>>>> Michele Mazzucco wrote:
>>>>>> Hi all,
>>>>>>
>>>>>> I've deployed Axis 2 (0.95) on Tomcat 5.5.15. I'm trying to execute
a
>>>>>> slightly modified version of the EchoNonBlockingDualClient example,
>>>>>> but unfortunately it doesn't work.
>>>>>> The client throws the following exception
>>>>>>
>>>>>> org.apache.axis2.AxisFault: In order to use two transport channels,
>>>>>> WS-Addressing module must be engaged
>>>>>>
>>>>>> but the "addressing" module is enabled in
>>>>>> %CATALINA_HOME%\webapps\axis2\WEB-INF\conf\axis2.xml (and in fact,
>>>>>> according to the Axis 2 web administration tool, it seems to be
>>>>>> deployed).
>>>>>>
>>>>>> Any suggestion is welcome.
>>>>>>
>>>>>> Thanks in advance,
>>>>>> Michele
>>>>>>
>>>>>>
> 

Mime
View raw message