axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmed Al-Obaidy <ahmad_aloba...@yahoo.com>
Subject Re: namespace mismatch problem
Date Tue, 04 May 2010 09:35:05 GMT
I've solved it by adding this line:

 element.declareDefaultNamespace(
     "http://manager.units.standalone.ev.tracking.agp.obteq.com");

before sending the request!

--- On Tue, 5/4/10, Ahmed Al-Obaidy <ahmad_alobaidy@yahoo.com> wrote:

> From: Ahmed Al-Obaidy <ahmad_alobaidy@yahoo.com>
> Subject: namespace mismatch problem
> To: java-user@axis.apache.org
> Date: Tuesday, May 4, 2010, 11:33 AM
> I have Axis2 1.5.1 to expose and
> consume Web Service.
> I've got the following error in the server
> 
> org.apache.axis2.AxisFault: namespace mismatch require http://manager.units.standalone.ev.tracking.agp.obteq.com
> found none
>     at
> org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:172)
>     at
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:102)
>     at
> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
>     at
> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
>     at
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
> 
> I use the following code to consume the web service
> 
>   ServiceClient client = new ServiceClient();
>   Options opts = new Options();
>   opts.setTo(new EndpointReference(
>      "http://127.0.0.1:8082/axis2/services/HibernateUnitsManager"));
> 
>   opts.setAction("urn:getDomains");
>   client.setOptions(opts);
>   OMElement element = null;
>   XMLStreamReader reader =
> BeanUtil.getPullParser(parent);
>   StreamWrapper parser = new StreamWrapper(reader);
>   StAXOMBuilder stAXOMBuilder =
>  
>    OMXMLBuilderFactory.createStAXOMBuilder(
>    
>    OMAbstractFactory.getOMFactory(),
> parser);
> 
>   element = stAXOMBuilder.getDocumentElement();
>   OMElement result = client.sendReceive(element);
>   Object obj = BeanUtil.deserialize(Domain.class,
> result,
>     new DefaultObjectSupplier(), "Domain");
> 
> The WSDL can be found in:
> http://obaidy.net/pub/lists/HibernateUnitsManager.wsdl
> 
> The code that expose the web service is:
> 
>   ConfigurationContext context =
> ConfigurationContextFactory
>    
> .createConfigurationContextFromFileSystem(
>       null, null);
>   AxisService service = AxisService
>     .createService(
>    
> HibernateUnitsManager.class.getName(),context.
>         getAxisConfiguration());
>   context.getAxisConfiguration().addService(service);
>   SimpleHTTPServer server = new
> SimpleHTTPServer(context, 8082);
>   server.start();
> 
> 
> how to set the namespace? 
> 
> 
>       
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
> 
> 


      

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


Mime
View raw message