Hi all.

I'm wrtiting a simple web service and I have a NPE. I'm running smix 3.3.1
and I cannot find the right sources for this version so it's quite hard to
debug it myself.

This is the service  definition

@WebService(serviceName = "PECService", targetNamespace = "
http://www.klever.it/kdv/pec/ws";)
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use =
SOAPBinding.Use.LITERAL, parameterStyle =
SOAPBinding.ParameterStyle.WRAPPED)
public class PECService {

    @WebMethod(operationName = "sendMessage", action = "urn:sendMessage")
    public void sendMessage(
            @WebParam(name = "to", targetNamespace = "
http://www.klever.it/kdv/pec/ws";) String to,
            @WebParam(name = "document", targetNamespace = "
http://www.klever.it/kdv/pec/ws";) Document document) throws
PECServiceException {

        System.out.println("sendMessage");

        PECMailService mailService = new PECMailService();
        mailService.send(to, document);
    }
}

the wsdl is generated with jaxws. This is the endpoint definition

    <cxfse:endpoint mtomEnabled="true" useJBIWrapper="false">
        <cxfse:pojo>
            <bean class="it.klever.kdv.pec.PECService" />
        </cxfse:pojo>
    </cxfse:endpoint>

and this is the consumer definition

  <cxfbc:consumer wsdl="classpath:wsdl/PECService.wsdl"
                      targetService="pec:PECService"
                      targetInterface="pec:PECServicePort"
                      locationURI="http://localhost:8092/PECService/";
                      mtomEnabled="true" useJBIWrapper="false" />

This is what I get on the console when I call it with a jaxws generated
client.

INFO  - JBITransportFactory            - configuring DeliveryChannel:
org.apache.servicemix.common.endpointdeliverychan...@2310ff2b
ERROR - CxfSeComponent                 - Error processing exchange InOut[
  id: ID:127.0.1.1-129d12553b7-29:6
  status: Active
  role: provider
  interface: {http://www.klever.it/kdv/pec/ws}PECServicePort
  service: {http://www.klever.it/kdv/pec/ws}PECService
  endpoint: PECServicePort
  operation: {http://www.klever.it/kdv/pec/ws}sendMessage
  in: <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><ns3:sendMessage
xmlns:ns3="http://www.klever.it/kdv/pec/ws"; xmlns:ns2="
http://www.klever.it/kdv/registry";><ns3:to>aaa</ns3:to><ns3:document
ns2:name="pippo"/></ns3:sendMessage></soap:Body></soap:Envelope>
]
java.lang.NullPointerException
    at
org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:359)
    at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)
    at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581)
    at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:535)
    at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
    at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623)
    at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
    at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
    at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
    at java.lang.Thread.run(Thread.java:595)
INFO  - PhaseInterceptorChain          - Interceptor has thrown exception,
unwinding now null


I noticed that it is trying to do a InOut exchange where I expect an InOnly
one. Could this be the problem?


Thanks in advance.


Bye

Lorenzo

Reply via email to