ServiceMix usually sends a redirect when the url used in an HTTP
request does not end with a '/'.
So instead of
  locationURI="http://localhost:9920/MockGeo/MockWriteJob";
try with
 locationURI="http://localhost:9920/MockGeo/MockWriteJob/";


On 5/21/07, Rob de Jong <[EMAIL PROTECTED]> wrote:

Hello,

Having started trying to get more understanding on Servicemix,
I've made a simple test-assembly for the smx http component.
It's setup is quite simple: poll for a file using the smx file
component. Its content will then be sent from via smx http
provider to an in-only smx http consumer, and finally written
back to file.

When I deploy the assembly, all seems to be in order. Yet when
the process is activated by placing a file in the poll location,
an exception is thrown on the http component:
    java.lang.Exception: Invalid status response: 302
(The complete trace will be added after the question.)

Status response 302 indicates a redirect in the consumer url,
which strikes me as an odd result for a direct smx to smx http
transaction.

In further testing, I found the result differs when I rewrite
the units to an in-out MEP. This time, the exception turns out
to be:
    error: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in
            prolog at [row,col {unknown-source}]: [1,0]

The message that's being sent is an normal xml message, so I
don't think this is the issue.

At the moment, I'm grasping at straws; If this is a MEP problem,
it seems it would require a robust-in-out, of which I'm not sure
how to create it. (Maybe a drools router?) And if it's not a MEP
problem, I'm flat out of ideas at the moment.

If anyone could give me a pointer in the right direction, that
would be great. In short, the question would be:
    How do I get this silly little thing to work?

I'll add snippets of the file and http SU xbeans, containing
the relevant configuration information. The in-out version has
been made by adjusting the MEP value in the http consumer and
abusing a EIP pipeline to force the file output into an in-out
exchange.

Kind regards,
Rob.


Snippet from: FileUnit-SU/.../xbean.xml

        <file:poller service="test:readFrom"
                endpoint="filebinding1"
                targetService="test:httpFrom"
                file="file:target/simple/From/test.xml"
                autoCreateDirectory ="false"
                deleteFile="true"
                period="500" />

        <file:sender service="test:writeTo"
                endpoint="filebinding3"
                directory="file:target/simple/To" />


Snippet from: HttpUnit-SU/.../xbean.xml

    <classpath>.</classpath>

    <http:endpoint service="test:httpFrom"
        endpoint="httpbinding1"
        role="provider"
        locationURI="http://localhost:9920/MockGeo/MockWriteJob";
        soap="true"
        soapVersion="1.1"
        soapAction="http://www.egem.nl/StUF";
        wsdlResource="classpath:begeoqueue.wsdl" />

    <http:endpoint service="test:httpTo"
        endpoint="httpbinding2"
        targetService="test:writeTo"
        role="consumer"
        locationURI="http://localhost:9920/MockGeo/MockWriteJob";
        defaultMep="http://www.w3.org/2004/08/wsdl/in-only";
        soap="true"
        soapVersion="1.1"
        soapAction="http://www.egem.nl/StUF";
        wsdlResource="classpath:begeoqueue.wsdl" />


Trace extract from servicemix.log
(Contained message has been trimmed to <data /> ):

13:59:06,922 | DEBUG | pool-component.servicemix-file-thread-4 |
DeliveryChannelImpl      | .messaging.DeliveryChannelImpl  674 | Waiting
for exchange ID:urbi-22-1220-1179748718335-4:1 (5d8e63) to be answered
in DeliveryChannel{servicemix-file} from sendSync
13:59:06,922 | DEBUG | pool-flow.seda.servicemix-http-thread-1 |
SedaQueue                | .jbi.nmr.flow.seda.SedaQueue$1  132 |
[EMAIL PROTECTED] dequeued
exchange: InOnly[
  id: ID:urbi-22-1220-1179748718335-4:1
  status: Active
  role: provider
  service: {http://nl.uds.broker.test/test/1.0}httpFrom
  endpoint: httpbinding1
  in: <?xml version="1.0" encoding="UTF-8"?><data />
]
13:59:06,922 | DEBUG | pool-flow.seda.servicemix-http-thread-1 |
HttpComponent            | emix.common.AsyncBaseLifeCycle  419 |
Received exchange: status: Active, role: provider
13:59:06,922 | DEBUG | pool-flow.seda.servicemix-http-thread-1 |
HttpComponent            | emix.common.AsyncBaseLifeCycle  487 |
Retrieved correlation id: null
13:59:07,203 | DEBUG | pool-component.servicemix-file-thread-3 |
FileComponent            | icemix.file.FilePollerEndpoint  196 |
Scheduling file target\Simple\From\test.xml for processing
13:59:07,203 | DEBUG | pool-component.servicemix-file-thread-3 |
FileComponent            | emix.file.FilePollerEndpoint$1  211 | Unable
to acquire lock on target\Simple\From\test.xml
13:59:07,313 | DEBUG | btpool0-0 - Acceptor0 SelectChannelConnector @
0.0.0.0:9920 | JettyContextManager      | ntextManager$ThreadPoolWrapper
437 | Dispatching job: [EMAIL PROTECTED],io=0,w=true,b=0|0]
13:59:07,328 | ERROR | pool-flow.seda.servicemix-http-thread-1 |
HttpComponent            | ervicemix.common.BaseLifeCycle   48 | Error
processing exchange InOnly[
  id: ID:urbi-22-1220-1179748718335-4:1
  status: Active
  role: provider
  service: {http://nl.uds.broker.test/test/1.0}httpFrom
  endpoint: httpbinding1
  in: <?xml version="1.0" encoding="UTF-8"?><data />
]
java.lang.Exception: Invalid status response: 302
        at
org.apache.servicemix.http.processors.ProviderProcessor.process(Provider
Processor.java:190)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeC
ycle.java:489)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas
eLifeCycle.java:441)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc
le.java:46)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D
eliveryChannelImpl.java:593)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j
ava:174)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java
:176)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:1
34)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
.runTask(ThreadPoolExecutor.java:665)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Thread.java:619)
13:59:07,328 | DEBUG | pool-flow.seda.servicemix-http-thread-1 |
DeliveryChannelImpl      | .messaging.DeliveryChannelImpl  411 | Send
ID:urbi-22-1220-1179748718335-4:1 in DeliveryChannel{servicemix-http}
13:59:07,328 | DEBUG | pool-flow.seda.servicemix-http-thread-1 |
SedaFlow                 | emix.jbi.nmr.flow.AbstractFlow  121 | Called
Flow send
13:59:07,328 | DEBUG | pool-flow.seda.servicemix-http-thread-2 |
SedaQueue                | .jbi.nmr.flow.seda.SedaQueue$1  132 |
[EMAIL PROTECTED] dequeued
exchange: InOnly[
  id: ID:urbi-22-1220-1179748718335-4:1
  status: Error
  role: consumer
  service: {http://nl.uds.broker.test/test/1.0}httpFrom
  endpoint: httpbinding1
  in: <?xml version="1.0" encoding="UTF-8"?><data />
  error: java.lang.Exception: Invalid status response: 302
]
13:59:07,328 | DEBUG | pool-flow.seda.servicemix-http-thread-2 |
DeliveryChannelImpl      | .messaging.DeliveryChannelImpl  690 |
Notifying exchange ID:urbi-22-1220-1179748718335-4:1(5d8e63) in
DeliveryChannel{servicemix-file} from processInboundSynchronousExchange
13:59:07,328 | DEBUG | pool-component.servicemix-file-thread-4 |
DeliveryChannelImpl      | .messaging.DeliveryChannelImpl  684 |
Notified: ID:urbi-22-1220-1179748718335-4:1(5d8e63) in
DeliveryChannel{servicemix-file} from sendSync



14:09:12,408 | DEBUG | pool-component.servicemix-file-thread-10 |
DeliveryChannelImpl      | .messaging.DeliveryChannelImpl  444 |
SendSync ID:urbi-22-1220-1179748718335-4:4 in
DeliveryChannel{servicemix-file}
14:09:12,408 | DEBUG | pool-component.servicemix-file-thread-10 |
SedaFlow                 | emix.jbi.nmr.flow.AbstractFlow  121 | Called
Flow send
14:09:12,408 | DEBUG | pool-component.servicemix-file-thread-10 |
DeliveryChannelImpl      | .messaging.DeliveryChannelImpl  674 | Waiting
for exchange ID:urbi-22-1220-1179748718335-4:4 (8a137c) to be answered
in DeliveryChannel{servicemix-file} from sendSync
14:09:12,408 | DEBUG | pool-flow.seda.servicemix-eip-thread-1 |
SedaQueue                | .jbi.nmr.flow.seda.SedaQueue$1  132 |
[EMAIL PROTECTED] dequeued
exchange: InOnly[
  id: ID:urbi-22-1220-1179748718335-4:4
  status: Active
  role: provider
  service: {http://nl.uds.broker.test/test/1.0}pipeFrom
  endpoint: pipebinding1
  in: <?xml version="1.0" encoding="UTF-8"?><data />
]
14:09:12,408 | DEBUG | pool-flow.seda.servicemix-eip-thread-1 |
EIPComponent             | emix.common.AsyncBaseLifeCycle  419 |
Received exchange: status: Active, role: provider
14:09:12,408 | DEBUG | pool-flow.seda.servicemix-eip-thread-1 |
EIPComponent             | emix.common.AsyncBaseLifeCycle  487 |
Retrieved correlation id: null
14:09:12,408 | DEBUG | pool-flow.seda.servicemix-eip-thread-1 |
MemoryStore              | cemix.store.memory.MemoryStore   51 | Storing
object with id: ID:urbi-22-1220-1179748718335-4:4
14:09:12,408 | DEBUG | pool-flow.seda.servicemix-eip-thread-1 |
EIPComponent             | emix.common.AsyncBaseLifeCycle  532 | Created
correlation id: ID:urbi-22-1220-1179748718335-3:0
14:09:12,408 | DEBUG | pool-flow.seda.servicemix-eip-thread-1 |
DeliveryChannelImpl      | .messaging.DeliveryChannelImpl  411 | Send
ID:urbi-22-1220-1179748718335-3:0 in DeliveryChannel{servicemix-eip}
14:09:12,408 | DEBUG | pool-flow.seda.servicemix-eip-thread-1 | SedaFlow
| emix.jbi.nmr.flow.AbstractFlow  121 | Called Flow send
14:09:12,423 | DEBUG | pool-flow.seda.servicemix-http-thread-5 |
SedaQueue                | .jbi.nmr.flow.seda.SedaQueue$1  132 |
[EMAIL PROTECTED] dequeued
exchange: InOut[
  id: ID:urbi-22-1220-1179748718335-3:0
  status: Active
  role: provider
  service: {http://nl.uds.broker.test/test/1.0}httpFrom
  endpoint: httpbinding1
  in: <?xml version="1.0" encoding="UTF-8"?><data />
]
14:09:12,423 | DEBUG | pool-flow.seda.servicemix-http-thread-5 |
HttpComponent            | emix.common.AsyncBaseLifeCycle  419 |
Received exchange: status: Active, role: provider
14:09:12,423 | DEBUG | pool-flow.seda.servicemix-http-thread-5 |
HttpComponent            | emix.common.AsyncBaseLifeCycle  487 |
Retrieved correlation id: ID:urbi-22-1220-1179748718335-3:0
14:09:12,423 | DEBUG | btpool0-0 - Acceptor0 SelectChannelConnector @
0.0.0.0:9920 | JettyContextManager      | ntextManager$ThreadPoolWrapper
437 | Dispatching job: [EMAIL PROTECTED],io=0,w=true,b=0|0]
14:09:12,517 | ERROR | pool-flow.seda.servicemix-http-thread-5 |
HttpComponent            | ervicemix.common.BaseLifeCycle   48 | Error
processing exchange InOut[
  id: ID:urbi-22-1220-1179748718335-3:0
  status: Active
  role: provider
  service: {http://nl.uds.broker.test/test/1.0}httpFrom
  endpoint: httpbinding1
  in: <?xml version="1.0" encoding="UTF-8"?><data />
]
com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
        at
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:628)
        at
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2021)
        at
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:
1927)
        at
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1054)
        at
javax.xml.stream.util.StreamReaderDelegate.next(StreamReaderDelegate.jav
a:60)
        at
org.apache.servicemix.jbi.jaxp.ExtendedXMLStreamReader.next(ExtendedXMLS
treamReader.java:60)
        at
org.apache.servicemix.jbi.jaxp.ExtendedXMLStreamReader.nextTag(ExtendedX
MLStreamReader.java:43)
        at
org.apache.servicemix.soap.marshalers.SoapReader.readSoapUsingStax(SoapR
eader.java:154)
        at
org.apache.servicemix.soap.marshalers.SoapReader.read(SoapReader.java:82
)
        at
org.apache.servicemix.soap.marshalers.SoapReader.read(SoapReader.java:73
)
        at
org.apache.servicemix.http.processors.ProviderProcessor.process(Provider
Processor.java:173)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeC
ycle.java:489)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas
eLifeCycle.java:441)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc
le.java:46)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D
eliveryChannelImpl.java:593)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j
ava:174)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java
:176)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:1
34)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
.runTask(ThreadPoolExecutor.java:665)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Thread.java:619)
14:09:12,533 | DEBUG | pool-flow.seda.servicemix-http-thread-5 |
DeliveryChannelImpl      | .messaging.DeliveryChannelImpl  411 | Send
ID:urbi-22-1220-1179748718335-3:0 in DeliveryChannel{servicemix-http}
14:09:12,533 | DEBUG | pool-flow.seda.servicemix-http-thread-5 |
SedaFlow                 | emix.jbi.nmr.flow.AbstractFlow  121 | Called
Flow send
14:09:12,533 | DEBUG | pool-flow.seda.servicemix-http-thread-6 |
SedaQueue                | .jbi.nmr.flow.seda.SedaQueue$1  132 |
[EMAIL PROTECTED] dequeued
exchange: InOut[
  id: ID:urbi-22-1220-1179748718335-3:0
  status: Error
  role: consumer
  service: {http://nl.uds.broker.test/test/1.0}httpFrom
  endpoint: httpbinding1
  in: <?xml version="1.0" encoding="UTF-8"?><data />
  error: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
]
14:09:12,533 | DEBUG | pool-flow.seda.servicemix-http-thread-6 |
EIPComponent             | emix.common.AsyncBaseLifeCycle  419 |
Received exchange: status: Error, role: consumer
14:09:12,533 | DEBUG | pool-flow.seda.servicemix-http-thread-6 |
EIPComponent             | emix.common.AsyncBaseLifeCycle  487 |
Retrieved correlation id: ID:urbi-22-1220-1179748718335-3:0
14:09:12,533 | DEBUG | pool-flow.seda.servicemix-http-thread-6 |
MemoryStore              | cemix.store.memory.MemoryStore   62 | Loading
object with id: ID:urbi-22-1220-1179748718335-4:4
14:09:12,533 | DEBUG | pool-flow.seda.servicemix-http-thread-6 |
DeliveryChannelImpl      | .messaging.DeliveryChannelImpl  411 | Send
ID:urbi-22-1220-1179748718335-4:4 in DeliveryChannel{servicemix-eip}
14:09:12,533 | DEBUG | pool-flow.seda.servicemix-http-thread-6 |
SedaFlow                 | emix.jbi.nmr.flow.AbstractFlow  121 | Called
Flow send
14:09:12,533 | DEBUG | pool-flow.seda.servicemix-eip-thread-2 |
SedaQueue                | .jbi.nmr.flow.seda.SedaQueue$1  132 |
[EMAIL PROTECTED] dequeued
exchange: InOnly[
  id: ID:urbi-22-1220-1179748718335-4:4
  status: Error
  role: consumer
  service: {http://nl.uds.broker.test/test/1.0}pipeFrom
  endpoint: pipebinding1
  in: <?xml version="1.0" encoding="UTF-8"?><data />
  error: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
]
14:09:12,533 | DEBUG | pool-flow.seda.servicemix-eip-thread-2 |
DeliveryChannelImpl      | .messaging.DeliveryChannelImpl  690 |
Notifying exchange ID:urbi-22-1220-1179748718335-4:4(8a137c) in
DeliveryChannel{servicemix-file} from processInboundSynchronousExchange
14:09:12,533 | DEBUG | pool-component.servicemix-file-thread-10 |
DeliveryChannelImpl      | .messaging.DeliveryChannelImpl  684 |
Notified: ID:urbi-22-1220-1179748718335-4:4(8a137c) in
DeliveryChannel{servicemix-file} from sendSync




--
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/

Reply via email to