metadata.xml:

<ipojo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="org.apache.felix.ipojo
http://felix.apache.org/ipojo/schemas/CURRENT/core.xsd";
  xmlns="org.apache.felix.ipojo">
  <instance component="br.com.ws.helloService.impl.HelloServiceImpl">
    <property name="service.exported.interfaces" value="*"/>
      <property name="service.exported.configs " value="org.apache.cxf.ws"
/>
      <property name="org.apache.cxf.ws.address" value="
http://localhost:9090/helloService"; />
  </instance>
</ipojo>


Abs,
__
*Dhiego** **Abrantes** de Oliveira Martins*
*Computer Science, M.Sc. Candidate at UFPE*
www.dhiegoabrantes.com
+55 83 9999.1081
***Any fool can write code that a computer can understand. Good programmers
write code that humans can understand*. (Martin Fowler)


2013/4/12 Dhiego Abrantes de Oliveira Martins <[email protected]>

> Hi,
>
> Before try it in mobile client, I try in desktop client. The client calls
> the service, the return value is in soap message, but is null when 'is
> converted' in object.
>
> As follow:
>
> @WebService
> public interface HelloService {
> public String sayHello();
> }
>
> @Component(propagation=true)
> @Provides
> @WebService(endpointInterface = "br.com.ws.helloService.HelloService",
> serviceName = "HelloService")
> public class HelloServiceImpl implements HelloService {
>
> @WebMethod
> public String sayHello() {
>  String hello = "Hello!";
> System.out.println(hello);
> return hello;
>  }
>
> }
>
>
> In client, the call was implemented as follow:
>
> JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>
> factory.getInInterceptors().add(new LoggingInInterceptor());
> factory.getOutInterceptors().add(new LoggingOutInterceptor());
> factory.setServiceClass(HelloService.class);
> factory.setAddress("http://localhost:9090/helloService?wsdl";);
> HelloService client = (HelloService) factory.create();
>
> *String serviceReturn = client.sayHello();*
> System.out.println(serviceReturn);
>
> After execute the bold line, serviceReturn is null.
>
>
> LOG:
> Abr 12, 2013 11:08:01 AM
> org.springframework.context.support.AbstractApplicationContext
> prepareRefresh
> INFO: Refreshing org.apache.cxf.bus.spring.BusApplicationContext@6632dd29:
> display name [org.apache.cxf.bus.spring.BusApplicationContext@6632dd29];
> startup date [Fri Apr 12 11:08:01 BRT 2013]; root of context hierarchy
> Abr 12, 2013 11:08:01 AM org.apache.cxf.bus.spring.BusApplicationContext
> getConfigResources
> INFO: No cxf.xml configuration file detected, relying on defaults.
> Abr 12, 2013 11:08:01 AM
> org.springframework.context.support.AbstractApplicationContext
> obtainFreshBeanFactory
> INFO: Bean factory for application context
> [org.apache.cxf.bus.spring.BusApplicationContext@6632dd29]:
> org.springframework.beans.factory.support.DefaultListableBeanFactory@4f6ac7f
> Abr 12, 2013 11:08:01 AM
> org.springframework.beans.factory.support.DefaultListableBeanFactory
> preInstantiateSingletons
> INFO: Pre-instantiating singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@4f6ac7f:
> defining beans
> [cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.jaxws.context.WebServiceContextResourceResolver,org.apache.cxf.jaxws.context.WebServiceContextImpl,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.ws.addressing.policy.AddressingAssertionBuilder,org.apache.cxf.ws.addressing.policy.AddressingPolicyInterceptorProvider,org.apache.cxf.ws.addressing.policy.UsingAddressingAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider,org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory];
> root of factory hierarchy
> Abr 12, 2013 11:08:02 AM
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromClass
> INFO: Creating Service 
> {http://helloService.ws.com.br/}HelloServiceServicefrom class 
> br.com.ws.helloService.HelloService
> Abr 12, 2013 11:08:02 AM
> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose
> INFO: Outbound Message
> ---------------------------
> ID: 1
> Address: http://localhost:9090/helloService?wsdl
> Encoding: UTF-8
> Content-Type: text/xml
> Headers: {SOAPAction=[""], Accept=[*/*]}
> Payload: <soap:Envelope xmlns:soap="
> http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><ns2:sayHello
> xmlns:ns2="http://helloService.ws.com.br/"/></soap:Body></soap:Envelope>
> --------------------------------------
> Abr 12, 2013 11:08:02 AM org.apache.cxf.interceptor.LoggingInInterceptor
> logging
> INFO: Inbound Message
> ----------------------------
> ID: 1
> Encoding: UTF-8
> Content-Type: text/xml;charset=UTF-8
> Headers: {content-type=[text/xml;charset=UTF-8], Content-Length=[238],
> Server=[Jetty(7.x.y-SNAPSHOT)]}
> Payload: <soap:Envelope xmlns:soap="
> http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><ns1:sayHelloResponse
> xmlns:ns1="http://helloService.ws.com.br/";><ns1:return>*Hello!*
> </ns1:return></ns1:sayHelloResponse></soap:Body></soap:Envelope>
> --------------------------------------
>
> Where my mistake?
>
>
>
> Abs,
> __
>
> *Dhiego** **Abrantes** de Oliveira Martins*
> *Computer Science, M.Sc. Candidate at UFPE*
> www.dhiegoabrantes.com
> +55 83 9999.1081
> ***Any fool can write code that a computer can understand. Good
> programmers write code that humans can understand*. (Martin Fowler)
>
>
> 2013/4/12 Clement Escoffier <[email protected]>
>
>> Hi,
>>
>> It's a regular web service based on SOAP. So any library to consume SOAP
>> would be ok.
>>
>> For iOS there is a tool called WSDL2Objc generating the client code based
>> on the service WSDL.
>> For Android, I used ksoap for Android (
>> https://code.google.com/p/ksoap2-android/).
>>
>> Regards,
>>
>> Clement
>>
>> On 12 avr. 2013, at 05:15, Dhiego Abrantes de Oliveira Martins <
>> [email protected]> wrote:
>>
>> > Hi,
>> >
>> > I have some iPOJO Services running over DOSGi (WebServices) in Felix.
>> The
>> > client is a mobile, is in outside from container osgi and need to access
>> > (consume) the service provided by webservice (supported by ipojo service
>> > over dosgi).
>> >
>> > How the mobile client can 'consume' this webservice?
>> >
>> > Best regards,
>> >
>> > Dhiego
>>
>>
>

Reply via email to