Title: How to use HttpConnector?

Hi,

I'm trying to use the HttpConnector to take the output from an application (in XML), send it through a XSL transformation and then put it out to another URL.

The config I have is:

...
        <component id="posLogIn" service="demo:posLogIn" class="org.servicemix.components.http.HttpConnector" destinationService="demo:convertPOSLogToPOSTransaction">

                <property name="host" value="localhost"/>
                <property name="port" value="8900"/>
                <property name="defaultInOut" value="false"/>
        </component>

        <component id="convertPOSLogToPOSTransaction" service="demo:convertPOSLogToPOSTransaction" class="org.servicemix.components.xslt.XsltComponent" destinationService="demo:xmlOneOut">

          <property name="xsltResource" value="classpath:poslog2postransaction.xsl"/>
        <property name="disableOutput" value="true"/>
        </component>

        <component id="xmlOneOut" service="demo:xmlOneOut" class="org.servicemix.components.http.HttpInvoker">
              <property name="url" value="http://localhost:8080/star-cop/hostSimulator"/>
        </component>
...

I am sending the XML from the application to http://localhost:8900 using an HTTP POST and including the xml in the body. The output I get from service mix is as follows:

15:45:09.908 EVENT  Starting Jetty/4.2.20RC0
15:45:09.970 EVENT  Started ServletHttpContext[/]
15:45:09.986 EVENT  Started SocketListener on 127.0.0.1:8900
15:45:10.001 EVENT  Started [EMAIL PROTECTED]
15:45:47.251 EVENT  jbiServlet: init
[INFO] DeliveryChannel - -default destination serviceName for posLogIn = {http://www.pcmsgroup.com/demo}convertPOSLogToPOSTransaction

[INFO] DeliveryChannel - -default destination serviceName for convertPOSLogToPOSTransaction = {http://www.pcmsgroup.com/demo}xmlOneOut

; Line#: -1; Column#: -1
javax.xml.transform.TransformerException: Premature end of file.
        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerImpl.java:739)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:715)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
        at org.servicemix.components.xslt.XsltComponent.transformContent(XsltComponent.java:135)
        at org.servicemix.components.xslt.XsltComponent.transform(XsltComponent.java:119)
        at org.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:48)

        at org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:470)
        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
        at org.servicemix.jbi.nmr.flow.seda.SedaQueue.run(SedaQueue.java:205)
        at org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:534)

I tried redirecting to a file rather than the XSL transform and got an empty file. Am I sending my data in incorrectly, or is there a way of debugging what is happening inside the connector?

I am using version 1.1.


Thanks


Simon


The information contained in this e-mail is intended only for the person or
entity to which it is addressed and may contain confidential and/or
privileged material. If You are not the intended recipient of this e-mail,
the use of this information or any disclosure, copying or distribution is
Prohibited and may be unlawful. If you received this in error, please
contact the sender and delete the material from any computer. The views
expressed in this e-mail may not necessarily be the views of The PCMS Group
plc and should not be taken as authority to carry out any instruction
contained.
 



Reply via email to