2 Replies Latest reply on Dec 3, 2009 5:10 PM by Marcel Casado

    Accessing WSDL from an CXF NMR endpoint

    Marcel Casado Novice

      Hi,

       

      I have a CXF web service deployed with an NMR endpoint. I also have a camel route with a jetty endpoint to expose the NMR CXF endpoint. Is there a way to get the WSDL for my service (https://localhost:8084/services/thresholds?wsdl) ? I'm actually getting an exception :

       

      org.apache.servicemix.nmr.api.ServiceMixException: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: Source object passed to '''' has no contents.      at org.apache.servicemix.cxf.transport.nmr.NMRDestination.process(NMRDestination.java:120)      at org.apache.servicemix.nmr.core.InternalEndpointWrapper.process(InternalEndpointWrapper.java:86)      at org.apache.servicemix.nmr.core.ChannelImpl.process(ChannelImpl.java:255)      at org.apache.servicemix.nmr.core.ChannelImpl$1.run(ChannelImpl.java:215)      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)      at java.lang.Thread.run(Thread.java:637) Caused by: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: Source object passed to '''' has no contents.

           at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:756)

           at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:349)

           at org.apache.servicemix.cxf.transport.nmr.NMRMessageHelper.convertMessageToInputStream(NMRMessageHelper.java:51)

           at org.apache.servicemix.cxf.transport.nmr.NMRDestination.process(NMRDestination.java:113)

           ... 6 more

      Caused by: javax.xml.transform.TransformerException: Source object passed to '''' has no contents.

           at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:704)

           at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:744)

           ... 9 more

       

      My camel route :

       

      <camel:route>

                     <camel:from ref="serverURL" />               

                     <camel:choice>

                          <camel:when>

                           <camel:simple>in.header.wsdl</camel:simple>

                           <camel:setHeader headerName="CamelHttpMethod">

                          <camel:constant>GET</camel:constant>

                        </camel:setHeader>

                         

                        <camel:convertBodyTo type="org.apache.camel.converter.jaxp.StringSource" />

                          <!-- <camel:to

                                    uri="nmr:DecisionService" /> -->

                            <camel:to

                                    uri="nmr:wcs1.1" />

                                     

                          </camel:when>

                          <camel:otherwise>

                             <camel:to uri="direct:processRequest"/>

                          </camel:otherwise>

                     </camel:choice>

                </camel:route>

       

       

      Thanks in advance,

       

      -Marcel