axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "alfredo.s.g_uam_spain" <alfredo.salva...@gmail.com>
Subject Re: Sending simple message to axis2 service
Date Thu, 03 Jan 2008 09:50:15 GMT

The problem was client.sendReceive(new QName(wsaAction),payload); doesn't
need the QName Action  and then i needed to include full namespaces for
canonicalization. Now im facing http problems: 

  org.apache.axis2.AxisFault: Transport out has not been set
     [java]     at
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:439)

Did I need to include options.setTransportOut ( or similar ) or is some
missconfiguration in axis2.xml file?



alfredo.s.g_uam_spain wrote:
> 
> I want to send a notificacion ( WS-Notification ) to a webservice
> developed in muse.
> Because muse uses its own http transport i have overwritten the
> SimpleSOAPClient.send ( ) method to send the SOAP message using  a Axis2
> configuration.
> 
> CODE: 
> 
> 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);
> 	       
> 		
> 		//necesito enviar un OMElement y tengo Element[]
> 
> 		OMElement payload;
> 
> 		try{
> 			payload = XMLUtils.toOM(body[0]);
> 					
> 		}
> 		catch (Exception e ) { return null; }
> 
> 		devolver[0]=(Element)client.sendReceive(new QName(wsaAction),payload);
> 
> But when i try to send the message it returns this Exception : 
> 
> org.apache.axis2.AxisFault: The
> http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/NotifyRequest
> operation cannot be found.
>      [java]     at
> org.apache.axis2.client.ServiceClient.createClient(ServiceClient.java:584)
>      [java]     at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:518)
>      [java]     at
> org.apache.muse.ws.addressing.soap.SimpleSoapClient.send(SimpleSoapClient.java:321)
>      [java]     at
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:285)
>      [java]     at
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:254)
> 
> So i am creating the client wrong or i must do some extra configuration? 
> 

-- 
View this message in context: http://www.nabble.com/Sending-simple-message-to-axis2-service-tp14593791p14594296.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Mime
View raw message