You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-user@ws.apache.org by "alfredo.s.g_uam_spain" <al...@gmail.com> on 2008/01/02 10:44:06 UTC

Re: AW: AW: axis2 deployment and configuration

Finally I did overwrite the class send from SimpleSoapClient but i get an
error when runing the code: 

 [java] Exception in thread "main" java.lang.NullPointerException
     [java]     at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:290)
     [java]     at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:254)
     [java]     at
org.apache.muse.ws.notification.remote.NotificationConsumerClient.notify(NotificationConsumerClient.java:99)
     [java]     at
org.apache.muse.ws.notification.remote.NotificationConsumerClient.notify(NotificationConsumerClient.java:83)
     [java]     at org.apache.rampart.samples.sample05.Client.main(Unknown
Source)

I think its from the 	     	ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(REPOPATH,REPOPATH+"/conf 

I need to send the message through axis and this is the way the rampart
examples do it but there is other way to do it without asking for the
repopath? is this well done??

CODE ::

if(REPOPATH.equals(""))
		{				
			System.out.println(" repository path?? \n");
			try{
				BufferedReader bf = new BufferedReader (new
InputStreamReader(System.in));
				REPOPATH = bf.readLine();
			} catch (IOException e){ return null;}
	
		}

		
	     	ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(REPOPATH,REPOPATH+"/conf/axis2.xml");
	        
	        ServiceClient client = new ServiceClient(ctx, null);
	        Options options = new Options();
	        options.setAction(wsaAction);

		org.apache.axis2.addressing.EndpointReference destination = new
org.apache.axis2.addressing.EndpointReference(dest.toString());
		org.apache.axis2.addressing.EndpointReference source = new
org.apache.axis2.addressing.EndpointReference(dest.toString());

	        options.setTo(destination);
		options.setFrom(source);

	        client.setOptions(options);
	       
		

		OMElement payload;

		try{
			payload = XMLUtils.toOM(body[0]);
		}
		catch (Exception e ) { return null; } 
	     	devolver[0]=(Element)client.sendReceive(payload);





beil wrote:
> 
> Hi,
> 
> I don't know if there was or is a change in the way Muse send messages
> out? 
> 
> As long as Muse uses http connectors to write outgoing messages, there
> will be no way to use the Rampart module of Axis2. This will be only
> possible if Muse sends the outgoing messages trough Axis2 and uses the
> Axis2 engine.
> 
> To use WSSE in the outgoing direction you have to setup the WSSE header
> yourself and overwrite the Muse classes to allow the addition of the
> header parameter.
> 
> Hopes this helps.
> 
> Matthias
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: alfredo.s.g_uam_spain [mailto:alfredo.salvador@gmail.com] 
> Gesendet: Dienstag, 11. Dezember 2007 11:48
> An: muse-user@ws.apache.org
> Betreff: RE: AW: axis2 deployment and configuration
> 
> 
> Im now trying to do this task and i found out that for sending notifys
> with
> muse is a little more complicated to add the ws-security.
> Has someone made it and can give me some guidelines to force muse to use
> axis outgoing or to force muse to use ws-security somehow?
> for incoming soap messages with ws-security is much easier ¿isnt it?
> 
> thanks
> 
> 
> 
> Daniel Jemiolo wrote:
>> 
>> I recall a number of other users having success setting up the
>> WS-Security 
>> module in Axis2 (w/ Muse). In fact, I think Matthias (the other 
>> participant in this thread) is one of them. I don't think you'll run into 
>> any issues, but if you do, please report them so we can fix Muse and
>> allow 
>> the WS-Security module to work as expected.
>> 
>> Dan
>> 
> -- 
> View this message in context:
> http://www.nabble.com/axis2-deployment-and-configuration-tp9736934p14271129.html
> Sent from the Muse User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/axis2-deployment-and-configuration-tp9736934p14575602.html
Sent from the Muse User mailing list archive at Nabble.com.


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


Re: AW: AW: axis2 deployment and configuration

Posted by "alfredo.s.g_uam_spain" <al...@gmail.com>.
I have double checked it and the problem is in the 
client.sendreceive(payload ) call
Payload is created ok so its a problem inside axis? 



alfredo.s.g_uam_spain wrote:
> 
> Finally I did overwrite the class send from SimpleSoapClient but i get an
> error when runing the code: 
> 
>  [java] Exception in thread "main" java.lang.NullPointerException
>      [java]     at
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:290)
>      [java]     at
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:254)
>      [java]     at
> org.apache.muse.ws.notification.remote.NotificationConsumerClient.notify(NotificationConsumerClient.java:99)
>      [java]     at
> org.apache.muse.ws.notification.remote.NotificationConsumerClient.notify(NotificationConsumerClient.java:83)
>      [java]     at org.apache.rampart.samples.sample05.Client.main(Unknown
> Source)
> 
> I think its from the 	     	ConfigurationContext ctx =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem(REPOPATH,REPOPATH+"/conf 
> 
> I need to send the message through axis and this is the way the rampart
> examples do it but there is other way to do it without asking for the
> repopath? is this well done??
> 
> CODE ::
> 
> if(REPOPATH.equals(""))
> 		{				
> 			System.out.println(" repository path?? \n");
> 			try{
> 				BufferedReader bf = new BufferedReader (new
> InputStreamReader(System.in));
> 				REPOPATH = bf.readLine();
> 			} catch (IOException e){ return null;}
> 	
> 		}
> 
> 		
> 	     	ConfigurationContext ctx =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem(REPOPATH,REPOPATH+"/conf/axis2.xml");
> 	        
> 	        ServiceClient client = new ServiceClient(ctx, null);
> 	        Options options = new Options();
> 	        options.setAction(wsaAction);
> 
> 		org.apache.axis2.addressing.EndpointReference destination = new
> org.apache.axis2.addressing.EndpointReference(dest.toString());
> 		org.apache.axis2.addressing.EndpointReference source = new
> org.apache.axis2.addressing.EndpointReference(dest.toString());
> 
> 	        options.setTo(destination);
> 		options.setFrom(source);
> 
> 	        client.setOptions(options);
> 	       
> 		
> 
> 		OMElement payload;
> 
> 		try{
> 			payload = XMLUtils.toOM(body[0]);
> 		}
> 		catch (Exception e ) { return null; } 
> 	     	devolver[0]=(Element)client.sendReceive(payload);
> 
> 
> 
> 
> 
> beil wrote:
>> 
>> Hi,
>> 
>> I don't know if there was or is a change in the way Muse send messages
>> out? 
>> 
>> As long as Muse uses http connectors to write outgoing messages, there
>> will be no way to use the Rampart module of Axis2. This will be only
>> possible if Muse sends the outgoing messages trough Axis2 and uses the
>> Axis2 engine.
>> 
>> To use WSSE in the outgoing direction you have to setup the WSSE header
>> yourself and overwrite the Muse classes to allow the addition of the
>> header parameter.
>> 
>> Hopes this helps.
>> 
>> Matthias
>> 
>> 
>> -----Ursprüngliche Nachricht-----
>> Von: alfredo.s.g_uam_spain [mailto:alfredo.salvador@gmail.com] 
>> Gesendet: Dienstag, 11. Dezember 2007 11:48
>> An: muse-user@ws.apache.org
>> Betreff: RE: AW: axis2 deployment and configuration
>> 
>> 
>> Im now trying to do this task and i found out that for sending notifys
>> with
>> muse is a little more complicated to add the ws-security.
>> Has someone made it and can give me some guidelines to force muse to use
>> axis outgoing or to force muse to use ws-security somehow?
>> for incoming soap messages with ws-security is much easier ¿isnt it?
>> 
>> thanks
>> 
>> 
>> 
>> Daniel Jemiolo wrote:
>>> 
>>> I recall a number of other users having success setting up the
>>> WS-Security 
>>> module in Axis2 (w/ Muse). In fact, I think Matthias (the other 
>>> participant in this thread) is one of them. I don't think you'll run
>>> into 
>>> any issues, but if you do, please report them so we can fix Muse and
>>> allow 
>>> the WS-Security module to work as expected.
>>> 
>>> Dan
>>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/axis2-deployment-and-configuration-tp9736934p14271129.html
>> Sent from the Muse User mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: muse-user-help@ws.apache.org
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: muse-user-help@ws.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/axis2-deployment-and-configuration-tp9736934p14575921.html
Sent from the Muse User mailing list archive at Nabble.com.


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