You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by gigeril <ma...@knapp.com> on 2008/07/23 11:03:29 UTC

Simple HTTP does not work.

I've got a Problem with ServiceMix and the HTTP Connector.
I am using apache-servicemix-3.3-20080721.213539-7 for testing it. I am
always getting the following error:



WARN  - jetty                          - /
java.lang.IllegalStateException: Cannot write non xml faults for non soap
messages
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
        at
org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277)
        at
org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176)
        at
org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
        at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
        at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
        at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
        at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)


My Configuration:

SunHTTP -----HTTPConnector_Provider----ServiceMix ---

----  HTTPConnector_Consumer-----Apache Commons HTTP Client


xbean.xml from HTTP_Connector_Provider
<beans xmlns:http="http://servicemix.apache.org/http/1.0">
  <http:endpoint service="http:provider"
                 endpoint="httpprovider"
				 
				 targetEndpoint="httpconsumer"
				 soap="false"
                 role="provider" 
                 locationURI="http://localhost:8888/"
    />             

</beans>


xbean.xml from HTTP_Connector_Consumer

<beans xmlns:http="http://servicemix.apache.org/http/1.0">
  <http:endpoint service="http:consumer"
                 endpoint="httpconsumer"
				 
				 targetEndpoint="httpprovider"
				 soap="false"
                 role="consumer" 
                 locationURI="http://0.0.0.0:4444/"
   />             
</beans>



ty for your help






-- 
View this message in context: http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18606632.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Simple HTTP does not work.

Posted by gigeril <ma...@knapp.com>.
hi again!  

My xbean.xml for the Consumer now looks like this:

<beans xmlns:http="http://servicemix.apache.org/http/1.0">
  <http:provider service="http:provider"
                 endpoint="httpprovider"
		 marshaler="#marshaler"	
					/>	  
   <bean id="marshaler"
class="org.apache.servicemix.jbi.PlainHttpProviderMarshaler">
       <property name="locationURI" value="http://localhost:8888" />
   </bean>
</beans>

But it doesn't work i always get this error on the SMX Console:

Exception in thread "HttpClient-1" java.lang.NullPointerException         at
org.mortbay.jetty.HttpGenerator.completeHeader(HttpGenerator.java:284)        
at
org.mortbay.jetty.client.HttpConnection.commitRequest(HttpConnection.java:338)        
at org.mortbay.jetty.client.HttpConnection.handle(HttpConnection.java:194)        
at
org.mortbay.jetty.client.HttpClient$SocketConnector$1.run(HttpClient.java:341)        
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

I don't get any request /message deliverd to my http server.

ty for your quick response !! :-)


gnodet wrote:
> 
> The reason is that the http provider endpoint does a special
> initialization if the marshaler set is a DefaultHttpProviderMarshaler.
> To work around the problem, you can simply initialize the locationUri
> attribute on your marshaler:
> 
>    <bean class="org.apache.servicemix.jbi.PlainHttpProviderMarshaler">
>        <property name="locationURI" value="http://localhost:8888" />
>    </bean>
> 
> In such a case, you can remove the locationURI attribute on the endpoint
> itself.
> 
> On Thu, Jul 24, 2008 at 11:30 AM, gigeril <ma...@knapp.com> wrote:
>>
>> As i tried to implement a default marshaler for the consumer and producer
>> I
>> recognized that I've to change the <http:endpoint .. tag in the xbean.xml
>> file of the consumer and the producer to <http:consumer.... /
>> <http:provider...
>>
>> Now it doesn't work anymore so i tried to use the .
>> I always get this error message in the SMX Console Window:
>>
>>
>> INFO  - ServiceUnitLifeCycle           - Starting service unit:
>> http_connector-provider.su
>> ERROR - HttpComponent                  - Error processing exchange InOut[
>>  id: ID:10.22.20.113-11b546344cd-2:0
>>  status: Active
>>  role: provider
>>  service: {http://servicemix.apache.org/http/1.0}provider
>>  endpoint: httpprovider
>>  in: <?xml version="1.0" encoding="UTF-8"?><message>this is a
>> message</message>
>> ]
>> java.lang.IllegalStateException: Unable to find URI for exchange
>>        at
>> org.apache.servicemix.jbi.PlainHttpProviderMarshaler.getLocationUri(PlainHttpProviderMarshaler.java
>> :148)
>>        at
>> org.apache.servicemix.jbi.PlainHttpProviderMarshaler.createRequest(PlainHttpProviderMarshaler.java:
>> 203)
>>        at
>> org.apache.servicemix.http.endpoints.HttpProviderEndpoint.process(HttpProviderEndpoint.java:109)
>>        at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:585)
>>        at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:536)
>>        at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:490)
>>        at
>> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
>>        at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610
>> )
>>        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:885)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
>>        at java.lang.Thread.run(Thread.java:619)
>>
>>
>>
>>
>> This is my xbean.xml for the http-connector-consumer:
>>
>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>  <http:consumer service="http:consumer"
>>                 endpoint="httpconsumer"
>>                                 targetService="http:provider"
>>                                 targetEndpoint="httpprovider"
>>                 locationURI="http://0.0.0.0:4444/"
>>                                 marshaler="#marshaler"
>>                                        />
>>         <bean id="marshaler"
>> class="org.apache.servicemix.jbi.PlainHttpConsumerMarshaler"/>
>> </beans>
>>
>>
>> This is my xbean.xml for the http-connector-provider:
>>
>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>  <http:provider service="http:provider"
>>                 endpoint="httpprovider"
>>                 locationURI="http://localhost:8888/"
>>                                 marshaler="#marshaler"
>>
>>                                        />
>>         <bean id="marshaler"
>> class="org.apache.servicemix.jbi.PlainHttpProviderMarshaler" />
>> </beans>
>>
>>
>> Both marshaler classes are exactly (copy+paste) the same as the Default
>> (DefaultHttpProviderMarshaler.java, DefaultHttpConsumerMarshaler.java)
>> from
>> the SVN server.
>>
>>
>>
>>
>>
>>
>>
>> gnodet wrote:
>>>
>>> Yes, but as I said, the default marshaler assumes xml, so you'd have
>>> to write your own set of consumer / provider marshaler to transform
>>> the HTTP request from / to a JBI exchange.
>>> Here are the interfaces to define:
>>>
>>> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerMarshaler.java
>>>
>>> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderMarshaler.java
>>>
>>> But you can inherit the default marshalers and just override change
>>> what you need:
>>>
>>> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpConsumerMarshaler.java
>>>
>>> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpProviderMarshaler.java
>>>
>>> On Wed, Jul 23, 2008 at 2:20 PM, gigeril <ma...@knapp.com>
>>> wrote:
>>>>
>>>> Yes in this Case it is xml, but I also want to sent plaintext as an
>>>> Request
>>>> ist this possible?
>>>>
>>>>
>>>>
>>>> gnodet wrote:
>>>>>
>>>>> The "Content-Type=text/xml" header indicates the body of the POST
>>>>> method is an xml.  Isn't the body you are sending an xml ? At least,
>>>>> it seems so.  If you client is not able to handle xml payloads, I'd
>>>>> suggest using the new <http:consumer/> and <http:provider/> endpoint
>>>>> and define a custom marshaler to generate a request that suits your
>>>>> needs.
>>>>>
>>>>> On Wed, Jul 23, 2008 at 1:00 PM, gigeril <ma...@knapp.com>
>>>>> wrote:
>>>>>>
>>>>>> It works now to send messages over this I didn't configured the
>>>>>> targetService
>>>>>> properly.
>>>>>>
>>>>>> No i have another problem. My client sends the Tag "<Datum>?</Datum>"
>>>>>> with
>>>>>> an POST Method to the Server (RequestHeader="Content-type",
>>>>>> "text/xml").
>>>>>> On
>>>>>> the server i get the "<?xml version='1.0'
>>>>>> encoding='UTF-8'?><Datum>?</Datum>" within the RequestBody.
>>>>>>
>>>>>> This only happens if Servicemix and the Connectors are processing the
>>>>>> Message. If I connect the Server and the Client straid trough i get
>>>>>> the
>>>>>> right RequestBody.
>>>>>>
>>>>>> Why adds ServiceMix this xml Header to the RequestBody on the Server?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Freeman Fang wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I'm a little confused with your configuration.
>>>>>>> If you want to use htttp consumer and provider as a bridge (or
>>>>>>> proxy),
>>>>>>> the flow should be
>>>>>>>
>>>>>>> http client ===========> servicemix http
>>>>>>> consumer============>servicemix
>>>>>>> http provider============> http server
>>>>>>> And the targetService and targetEndpoint for http consumer should be
>>>>>>> the
>>>>>>> service and endpoint for http provider, which can route your message
>>>>>>> from the consumer to the provider.
>>>>>>>
>>>>>>> Regards
>>>>>>> Freeman
>>>>>>>
>>>>>>> gigeril wrote:
>>>>>>>> I've got a Problem with ServiceMix and the HTTP Connector.
>>>>>>>> I am using apache-servicemix-3.3-20080721.213539-7 for testing it.
>>>>>>>> I
>>>>>>>> am
>>>>>>>> always getting the following error:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> WARN  - jetty                          - /
>>>>>>>> java.lang.IllegalStateException: Cannot write non xml faults for
>>>>>>>> non
>>>>>>>> soap
>>>>>>>> messages
>>>>>>>>         at
>>>>>>>> org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124)
>>>>>>>>         at
>>>>>>>> org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
>>>>>>>>         at
>>>>>>>> org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277)
>>>>>>>>         at
>>>>>>>> org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176)
>>>>>>>>         at
>>>>>>>> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
>>>>>>>>         at
>>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>>>>>>>         at
>>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>>>>>>>         at org.mortbay.jetty.Server.handle(Server.java:324)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>>>>>>>>         at
>>>>>>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>>>>>>>>         at
>>>>>>>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
>>>>>>>>
>>>>>>>>
>>>>>>>> My Configuration:
>>>>>>>>
>>>>>>>> SunHTTP -----HTTPConnector_Provider----ServiceMix ---
>>>>>>>>
>>>>>>>> ----  HTTPConnector_Consumer-----Apache Commons HTTP Client
>>>>>>>>
>>>>>>>>
>>>>>>>> xbean.xml from HTTP_Connector_Provider
>>>>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>>>>>>>   <http:endpoint service="http:provider"
>>>>>>>>                  endpoint="httpprovider"
>>>>>>>>
>>>>>>>>                               targetEndpoint="httpconsumer"
>>>>>>>>                               soap="false"
>>>>>>>>                  role="provider"
>>>>>>>>                  locationURI="http://localhost:8888/"
>>>>>>>>     />
>>>>>>>>
>>>>>>>> </beans>
>>>>>>>>
>>>>>>>>
>>>>>>>> xbean.xml from HTTP_Connector_Consumer
>>>>>>>>
>>>>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>>>>>>>   <http:endpoint service="http:consumer"
>>>>>>>>                  endpoint="httpconsumer"
>>>>>>>>
>>>>>>>>                               targetEndpoint="httpprovider"
>>>>>>>>                               soap="false"
>>>>>>>>                  role="consumer"
>>>>>>>>                  locationURI="http://0.0.0.0:4444/"
>>>>>>>>    />
>>>>>>>> </beans>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ty for your help
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18608025.html
>>>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Cheers,
>>>>> Guillaume Nodet
>>>>> ------------------------
>>>>> Blog: http://gnodet.blogspot.com/
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18609478.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Guillaume Nodet
>>> ------------------------
>>> Blog: http://gnodet.blogspot.com/
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18628331.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18629277.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Simple HTTP does not work.

Posted by gigeril <ma...@knapp.com>.
I recognized that this error happened because i forgot to add an slash after
the locationURI.

Now i addet this and another error appears.

WARN  - jetty                          - handle failed
java.lang.IllegalStateException
        at
org.mortbay.jetty.client.HttpConnection$Handler.startRequest(HttpConnection.java:398)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:369)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
        at
org.mortbay.jetty.client.HttpConnection.handle(HttpConnection.java:240)
        at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
        at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)


I tried to exclude the marshaler so that the xbeanx.xml for the Consumer
looks like:

<beans xmlns:http="http://servicemix.apache.org/http/1.0">
  <http:consumer service="http:consumer"
                 endpoint="httpconsumer"
				 targetService="http:provider"
				 targetEndpoint="httpprovider"
                 locationURI="http://0.0.0.0:4444/" />
</beans>

and the xbeanx.xml for the Provider :

<beans xmlns:http="http://servicemix.apache.org/http/1.0">
  <http:provider service="http:provider"
                 endpoint="httpprovider"
		 locationURI="http://localhost:8888/" />
</beans>

The request is received by my http server and a response is send by it.

Anyway if i specify in the xbean.xml's a <http:endpoint it works.
So i think there is an error with my configuration but i can't figure out
what it could be..





gnodet wrote:
> 
> The reason is that the http provider endpoint does a special
> initialization if the marshaler set is a DefaultHttpProviderMarshaler.
> To work around the problem, you can simply initialize the locationUri
> attribute on your marshaler:
> 
>    <bean class="org.apache.servicemix.jbi.PlainHttpProviderMarshaler">
>        <property name="locationURI" value="http://localhost:8888" />
>    </bean>
> 
> In such a case, you can remove the locationURI attribute on the endpoint
> itself.
> 
> On Thu, Jul 24, 2008 at 11:30 AM, gigeril <ma...@knapp.com> wrote:
>>
>> As i tried to implement a default marshaler for the consumer and producer
>> I
>> recognized that I've to change the <http:endpoint .. tag in the xbean.xml
>> file of the consumer and the producer to <http:consumer.... /
>> <http:provider...
>>
>> Now it doesn't work anymore so i tried to use the .
>> I always get this error message in the SMX Console Window:
>>
>>
>> INFO  - ServiceUnitLifeCycle           - Starting service unit:
>> http_connector-provider.su
>> ERROR - HttpComponent                  - Error processing exchange InOut[
>>  id: ID:10.22.20.113-11b546344cd-2:0
>>  status: Active
>>  role: provider
>>  service: {http://servicemix.apache.org/http/1.0}provider
>>  endpoint: httpprovider
>>  in: <?xml version="1.0" encoding="UTF-8"?><message>this is a
>> message</message>
>> ]
>> java.lang.IllegalStateException: Unable to find URI for exchange
>>        at
>> org.apache.servicemix.jbi.PlainHttpProviderMarshaler.getLocationUri(PlainHttpProviderMarshaler.java
>> :148)
>>        at
>> org.apache.servicemix.jbi.PlainHttpProviderMarshaler.createRequest(PlainHttpProviderMarshaler.java:
>> 203)
>>        at
>> org.apache.servicemix.http.endpoints.HttpProviderEndpoint.process(HttpProviderEndpoint.java:109)
>>        at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:585)
>>        at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:536)
>>        at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:490)
>>        at
>> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
>>        at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610
>> )
>>        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:885)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
>>        at java.lang.Thread.run(Thread.java:619)
>>
>>
>>
>>
>> This is my xbean.xml for the http-connector-consumer:
>>
>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>  <http:consumer service="http:consumer"
>>                 endpoint="httpconsumer"
>>                                 targetService="http:provider"
>>                                 targetEndpoint="httpprovider"
>>                 locationURI="http://0.0.0.0:4444/"
>>                                 marshaler="#marshaler"
>>                                        />
>>         <bean id="marshaler"
>> class="org.apache.servicemix.jbi.PlainHttpConsumerMarshaler"/>
>> </beans>
>>
>>
>> This is my xbean.xml for the http-connector-provider:
>>
>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>  <http:provider service="http:provider"
>>                 endpoint="httpprovider"
>>                 locationURI="http://localhost:8888/"
>>                                 marshaler="#marshaler"
>>
>>                                        />
>>         <bean id="marshaler"
>> class="org.apache.servicemix.jbi.PlainHttpProviderMarshaler" />
>> </beans>
>>
>>
>> Both marshaler classes are exactly (copy+paste) the same as the Default
>> (DefaultHttpProviderMarshaler.java, DefaultHttpConsumerMarshaler.java)
>> from
>> the SVN server.
>>
>>
>>
>>
>>
>>
>>
>> gnodet wrote:
>>>
>>> Yes, but as I said, the default marshaler assumes xml, so you'd have
>>> to write your own set of consumer / provider marshaler to transform
>>> the HTTP request from / to a JBI exchange.
>>> Here are the interfaces to define:
>>>
>>> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerMarshaler.java
>>>
>>> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderMarshaler.java
>>>
>>> But you can inherit the default marshalers and just override change
>>> what you need:
>>>
>>> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpConsumerMarshaler.java
>>>
>>> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpProviderMarshaler.java
>>>
>>> On Wed, Jul 23, 2008 at 2:20 PM, gigeril <ma...@knapp.com>
>>> wrote:
>>>>
>>>> Yes in this Case it is xml, but I also want to sent plaintext as an
>>>> Request
>>>> ist this possible?
>>>>
>>>>
>>>>
>>>> gnodet wrote:
>>>>>
>>>>> The "Content-Type=text/xml" header indicates the body of the POST
>>>>> method is an xml.  Isn't the body you are sending an xml ? At least,
>>>>> it seems so.  If you client is not able to handle xml payloads, I'd
>>>>> suggest using the new <http:consumer/> and <http:provider/> endpoint
>>>>> and define a custom marshaler to generate a request that suits your
>>>>> needs.
>>>>>
>>>>> On Wed, Jul 23, 2008 at 1:00 PM, gigeril <ma...@knapp.com>
>>>>> wrote:
>>>>>>
>>>>>> It works now to send messages over this I didn't configured the
>>>>>> targetService
>>>>>> properly.
>>>>>>
>>>>>> No i have another problem. My client sends the Tag "<Datum>?</Datum>"
>>>>>> with
>>>>>> an POST Method to the Server (RequestHeader="Content-type",
>>>>>> "text/xml").
>>>>>> On
>>>>>> the server i get the "<?xml version='1.0'
>>>>>> encoding='UTF-8'?><Datum>?</Datum>" within the RequestBody.
>>>>>>
>>>>>> This only happens if Servicemix and the Connectors are processing the
>>>>>> Message. If I connect the Server and the Client straid trough i get
>>>>>> the
>>>>>> right RequestBody.
>>>>>>
>>>>>> Why adds ServiceMix this xml Header to the RequestBody on the Server?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Freeman Fang wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I'm a little confused with your configuration.
>>>>>>> If you want to use htttp consumer and provider as a bridge (or
>>>>>>> proxy),
>>>>>>> the flow should be
>>>>>>>
>>>>>>> http client ===========> servicemix http
>>>>>>> consumer============>servicemix
>>>>>>> http provider============> http server
>>>>>>> And the targetService and targetEndpoint for http consumer should be
>>>>>>> the
>>>>>>> service and endpoint for http provider, which can route your message
>>>>>>> from the consumer to the provider.
>>>>>>>
>>>>>>> Regards
>>>>>>> Freeman
>>>>>>>
>>>>>>> gigeril wrote:
>>>>>>>> I've got a Problem with ServiceMix and the HTTP Connector.
>>>>>>>> I am using apache-servicemix-3.3-20080721.213539-7 for testing it.
>>>>>>>> I
>>>>>>>> am
>>>>>>>> always getting the following error:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> WARN  - jetty                          - /
>>>>>>>> java.lang.IllegalStateException: Cannot write non xml faults for
>>>>>>>> non
>>>>>>>> soap
>>>>>>>> messages
>>>>>>>>         at
>>>>>>>> org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124)
>>>>>>>>         at
>>>>>>>> org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
>>>>>>>>         at
>>>>>>>> org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277)
>>>>>>>>         at
>>>>>>>> org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176)
>>>>>>>>         at
>>>>>>>> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
>>>>>>>>         at
>>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>>>>>>>         at
>>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>>>>>>>         at org.mortbay.jetty.Server.handle(Server.java:324)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>>>>>>>>         at
>>>>>>>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>>>>>>>>         at
>>>>>>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>>>>>>>>         at
>>>>>>>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
>>>>>>>>
>>>>>>>>
>>>>>>>> My Configuration:
>>>>>>>>
>>>>>>>> SunHTTP -----HTTPConnector_Provider----ServiceMix ---
>>>>>>>>
>>>>>>>> ----  HTTPConnector_Consumer-----Apache Commons HTTP Client
>>>>>>>>
>>>>>>>>
>>>>>>>> xbean.xml from HTTP_Connector_Provider
>>>>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>>>>>>>   <http:endpoint service="http:provider"
>>>>>>>>                  endpoint="httpprovider"
>>>>>>>>
>>>>>>>>                               targetEndpoint="httpconsumer"
>>>>>>>>                               soap="false"
>>>>>>>>                  role="provider"
>>>>>>>>                  locationURI="http://localhost:8888/"
>>>>>>>>     />
>>>>>>>>
>>>>>>>> </beans>
>>>>>>>>
>>>>>>>>
>>>>>>>> xbean.xml from HTTP_Connector_Consumer
>>>>>>>>
>>>>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>>>>>>>   <http:endpoint service="http:consumer"
>>>>>>>>                  endpoint="httpconsumer"
>>>>>>>>
>>>>>>>>                               targetEndpoint="httpprovider"
>>>>>>>>                               soap="false"
>>>>>>>>                  role="consumer"
>>>>>>>>                  locationURI="http://0.0.0.0:4444/"
>>>>>>>>    />
>>>>>>>> </beans>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ty for your help
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18608025.html
>>>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Cheers,
>>>>> Guillaume Nodet
>>>>> ------------------------
>>>>> Blog: http://gnodet.blogspot.com/
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18609478.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Guillaume Nodet
>>> ------------------------
>>> Blog: http://gnodet.blogspot.com/
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18628331.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18632730.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Simple HTTP does not work.

Posted by Guillaume Nodet <gn...@gmail.com>.
The reason is that the http provider endpoint does a special
initialization if the marshaler set is a DefaultHttpProviderMarshaler.
To work around the problem, you can simply initialize the locationUri
attribute on your marshaler:

   <bean class="org.apache.servicemix.jbi.PlainHttpProviderMarshaler">
       <property name="locationURI" value="http://localhost:8888" />
   </bean>

In such a case, you can remove the locationURI attribute on the endpoint itself.

On Thu, Jul 24, 2008 at 11:30 AM, gigeril <ma...@knapp.com> wrote:
>
> As i tried to implement a default marshaler for the consumer and producer I
> recognized that I've to change the <http:endpoint .. tag in the xbean.xml
> file of the consumer and the producer to <http:consumer.... /
> <http:provider...
>
> Now it doesn't work anymore so i tried to use the .
> I always get this error message in the SMX Console Window:
>
>
> INFO  - ServiceUnitLifeCycle           - Starting service unit:
> http_connector-provider.su
> ERROR - HttpComponent                  - Error processing exchange InOut[
>  id: ID:10.22.20.113-11b546344cd-2:0
>  status: Active
>  role: provider
>  service: {http://servicemix.apache.org/http/1.0}provider
>  endpoint: httpprovider
>  in: <?xml version="1.0" encoding="UTF-8"?><message>this is a
> message</message>
> ]
> java.lang.IllegalStateException: Unable to find URI for exchange
>        at
> org.apache.servicemix.jbi.PlainHttpProviderMarshaler.getLocationUri(PlainHttpProviderMarshaler.java
> :148)
>        at
> org.apache.servicemix.jbi.PlainHttpProviderMarshaler.createRequest(PlainHttpProviderMarshaler.java:
> 203)
>        at
> org.apache.servicemix.http.endpoints.HttpProviderEndpoint.process(HttpProviderEndpoint.java:109)
>        at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:585)
>        at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:536)
>        at
> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:490)
>        at
> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
>        at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610
> )
>        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:885)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
>        at java.lang.Thread.run(Thread.java:619)
>
>
>
>
> This is my xbean.xml for the http-connector-consumer:
>
> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>  <http:consumer service="http:consumer"
>                 endpoint="httpconsumer"
>                                 targetService="http:provider"
>                                 targetEndpoint="httpprovider"
>                 locationURI="http://0.0.0.0:4444/"
>                                 marshaler="#marshaler"
>                                        />
>         <bean id="marshaler"
> class="org.apache.servicemix.jbi.PlainHttpConsumerMarshaler"/>
> </beans>
>
>
> This is my xbean.xml for the http-connector-provider:
>
> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>  <http:provider service="http:provider"
>                 endpoint="httpprovider"
>                 locationURI="http://localhost:8888/"
>                                 marshaler="#marshaler"
>
>                                        />
>         <bean id="marshaler"
> class="org.apache.servicemix.jbi.PlainHttpProviderMarshaler" />
> </beans>
>
>
> Both marshaler classes are exactly (copy+paste) the same as the Default
> (DefaultHttpProviderMarshaler.java, DefaultHttpConsumerMarshaler.java) from
> the SVN server.
>
>
>
>
>
>
>
> gnodet wrote:
>>
>> Yes, but as I said, the default marshaler assumes xml, so you'd have
>> to write your own set of consumer / provider marshaler to transform
>> the HTTP request from / to a JBI exchange.
>> Here are the interfaces to define:
>>
>> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerMarshaler.java
>>
>> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderMarshaler.java
>>
>> But you can inherit the default marshalers and just override change
>> what you need:
>>
>> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpConsumerMarshaler.java
>>
>> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpProviderMarshaler.java
>>
>> On Wed, Jul 23, 2008 at 2:20 PM, gigeril <ma...@knapp.com> wrote:
>>>
>>> Yes in this Case it is xml, but I also want to sent plaintext as an
>>> Request
>>> ist this possible?
>>>
>>>
>>>
>>> gnodet wrote:
>>>>
>>>> The "Content-Type=text/xml" header indicates the body of the POST
>>>> method is an xml.  Isn't the body you are sending an xml ? At least,
>>>> it seems so.  If you client is not able to handle xml payloads, I'd
>>>> suggest using the new <http:consumer/> and <http:provider/> endpoint
>>>> and define a custom marshaler to generate a request that suits your
>>>> needs.
>>>>
>>>> On Wed, Jul 23, 2008 at 1:00 PM, gigeril <ma...@knapp.com>
>>>> wrote:
>>>>>
>>>>> It works now to send messages over this I didn't configured the
>>>>> targetService
>>>>> properly.
>>>>>
>>>>> No i have another problem. My client sends the Tag "<Datum>?</Datum>"
>>>>> with
>>>>> an POST Method to the Server (RequestHeader="Content-type",
>>>>> "text/xml").
>>>>> On
>>>>> the server i get the "<?xml version='1.0'
>>>>> encoding='UTF-8'?><Datum>?</Datum>" within the RequestBody.
>>>>>
>>>>> This only happens if Servicemix and the Connectors are processing the
>>>>> Message. If I connect the Server and the Client straid trough i get the
>>>>> right RequestBody.
>>>>>
>>>>> Why adds ServiceMix this xml Header to the RequestBody on the Server?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Freeman Fang wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I'm a little confused with your configuration.
>>>>>> If you want to use htttp consumer and provider as a bridge (or proxy),
>>>>>> the flow should be
>>>>>>
>>>>>> http client ===========> servicemix http
>>>>>> consumer============>servicemix
>>>>>> http provider============> http server
>>>>>> And the targetService and targetEndpoint for http consumer should be
>>>>>> the
>>>>>> service and endpoint for http provider, which can route your message
>>>>>> from the consumer to the provider.
>>>>>>
>>>>>> Regards
>>>>>> Freeman
>>>>>>
>>>>>> gigeril wrote:
>>>>>>> I've got a Problem with ServiceMix and the HTTP Connector.
>>>>>>> I am using apache-servicemix-3.3-20080721.213539-7 for testing it. I
>>>>>>> am
>>>>>>> always getting the following error:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> WARN  - jetty                          - /
>>>>>>> java.lang.IllegalStateException: Cannot write non xml faults for non
>>>>>>> soap
>>>>>>> messages
>>>>>>>         at
>>>>>>> org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124)
>>>>>>>         at
>>>>>>> org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
>>>>>>>         at
>>>>>>> org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277)
>>>>>>>         at
>>>>>>> org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176)
>>>>>>>         at
>>>>>>> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
>>>>>>>         at
>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>>>>>>         at
>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>>>>>>>         at
>>>>>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>>>>>>>         at
>>>>>>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
>>>>>>>         at
>>>>>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
>>>>>>>         at
>>>>>>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>>>>>>>         at
>>>>>>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>>>>>>         at
>>>>>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>>>>>>         at org.mortbay.jetty.Server.handle(Server.java:324)
>>>>>>>         at
>>>>>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>>>>>>>         at
>>>>>>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
>>>>>>>         at
>>>>>>> org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
>>>>>>>         at
>>>>>>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>>>>>>>         at
>>>>>>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>>>>>>>         at
>>>>>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>>>>>>>         at
>>>>>>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
>>>>>>>
>>>>>>>
>>>>>>> My Configuration:
>>>>>>>
>>>>>>> SunHTTP -----HTTPConnector_Provider----ServiceMix ---
>>>>>>>
>>>>>>> ----  HTTPConnector_Consumer-----Apache Commons HTTP Client
>>>>>>>
>>>>>>>
>>>>>>> xbean.xml from HTTP_Connector_Provider
>>>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>>>>>>   <http:endpoint service="http:provider"
>>>>>>>                  endpoint="httpprovider"
>>>>>>>
>>>>>>>                               targetEndpoint="httpconsumer"
>>>>>>>                               soap="false"
>>>>>>>                  role="provider"
>>>>>>>                  locationURI="http://localhost:8888/"
>>>>>>>     />
>>>>>>>
>>>>>>> </beans>
>>>>>>>
>>>>>>>
>>>>>>> xbean.xml from HTTP_Connector_Consumer
>>>>>>>
>>>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>>>>>>   <http:endpoint service="http:consumer"
>>>>>>>                  endpoint="httpconsumer"
>>>>>>>
>>>>>>>                               targetEndpoint="httpprovider"
>>>>>>>                               soap="false"
>>>>>>>                  role="consumer"
>>>>>>>                  locationURI="http://0.0.0.0:4444/"
>>>>>>>    />
>>>>>>> </beans>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ty for your help
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18608025.html
>>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Cheers,
>>>> Guillaume Nodet
>>>> ------------------------
>>>> Blog: http://gnodet.blogspot.com/
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18609478.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18628331.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



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

Re: Simple HTTP does not work.

Posted by gigeril <ma...@knapp.com>.
As i tried to implement a default marshaler for the consumer and producer I
recognized that I've to change the <http:endpoint .. tag in the xbean.xml
file of the consumer and the producer to <http:consumer.... /
<http:provider... 

Now it doesn't work anymore so i tried to use the . 
I always get this error message in the SMX Console Window:


INFO  - ServiceUnitLifeCycle           - Starting service unit:
http_connector-provider.su
ERROR - HttpComponent                  - Error processing exchange InOut[
  id: ID:10.22.20.113-11b546344cd-2:0
  status: Active
  role: provider
  service: {http://servicemix.apache.org/http/1.0}provider
  endpoint: httpprovider
  in: <?xml version="1.0" encoding="UTF-8"?><message>this is a
message</message>
]
java.lang.IllegalStateException: Unable to find URI for exchange
        at
org.apache.servicemix.jbi.PlainHttpProviderMarshaler.getLocationUri(PlainHttpProviderMarshaler.java
:148)
        at
org.apache.servicemix.jbi.PlainHttpProviderMarshaler.createRequest(PlainHttpProviderMarshaler.java:
203)
        at
org.apache.servicemix.http.endpoints.HttpProviderEndpoint.process(HttpProviderEndpoint.java:109)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:585)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:536)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:490)
        at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610
)
        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:885)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)




This is my xbean.xml for the http-connector-consumer:

<beans xmlns:http="http://servicemix.apache.org/http/1.0">
  <http:consumer service="http:consumer"
                 endpoint="httpconsumer"
				 targetService="http:provider"
				 targetEndpoint="httpprovider"
                 locationURI="http://0.0.0.0:4444/"
				 marshaler="#marshaler"
					/>
	 <bean id="marshaler"
class="org.apache.servicemix.jbi.PlainHttpConsumerMarshaler"/> 
</beans>


This is my xbean.xml for the http-connector-provider:

<beans xmlns:http="http://servicemix.apache.org/http/1.0">
  <http:provider service="http:provider"
                 endpoint="httpprovider"
                 locationURI="http://localhost:8888/"
				 marshaler="#marshaler"	
					
					/>	  
	 <bean id="marshaler"
class="org.apache.servicemix.jbi.PlainHttpProviderMarshaler" />
</beans>


Both marshaler classes are exactly (copy+paste) the same as the Default
(DefaultHttpProviderMarshaler.java, DefaultHttpConsumerMarshaler.java) from
the SVN server. 







gnodet wrote:
> 
> Yes, but as I said, the default marshaler assumes xml, so you'd have
> to write your own set of consumer / provider marshaler to transform
> the HTTP request from / to a JBI exchange.
> Here are the interfaces to define:
>  
> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerMarshaler.java
>  
> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderMarshaler.java
> 
> But you can inherit the default marshalers and just override change
> what you need:
>  
> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpConsumerMarshaler.java
>  
> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpProviderMarshaler.java
> 
> On Wed, Jul 23, 2008 at 2:20 PM, gigeril <ma...@knapp.com> wrote:
>>
>> Yes in this Case it is xml, but I also want to sent plaintext as an
>> Request
>> ist this possible?
>>
>>
>>
>> gnodet wrote:
>>>
>>> The "Content-Type=text/xml" header indicates the body of the POST
>>> method is an xml.  Isn't the body you are sending an xml ? At least,
>>> it seems so.  If you client is not able to handle xml payloads, I'd
>>> suggest using the new <http:consumer/> and <http:provider/> endpoint
>>> and define a custom marshaler to generate a request that suits your
>>> needs.
>>>
>>> On Wed, Jul 23, 2008 at 1:00 PM, gigeril <ma...@knapp.com>
>>> wrote:
>>>>
>>>> It works now to send messages over this I didn't configured the
>>>> targetService
>>>> properly.
>>>>
>>>> No i have another problem. My client sends the Tag "<Datum>?</Datum>"
>>>> with
>>>> an POST Method to the Server (RequestHeader="Content-type",
>>>> "text/xml").
>>>> On
>>>> the server i get the "<?xml version='1.0'
>>>> encoding='UTF-8'?><Datum>?</Datum>" within the RequestBody.
>>>>
>>>> This only happens if Servicemix and the Connectors are processing the
>>>> Message. If I connect the Server and the Client straid trough i get the
>>>> right RequestBody.
>>>>
>>>> Why adds ServiceMix this xml Header to the RequestBody on the Server?
>>>>
>>>>
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I'm a little confused with your configuration.
>>>>> If you want to use htttp consumer and provider as a bridge (or proxy),
>>>>> the flow should be
>>>>>
>>>>> http client ===========> servicemix http
>>>>> consumer============>servicemix
>>>>> http provider============> http server
>>>>> And the targetService and targetEndpoint for http consumer should be
>>>>> the
>>>>> service and endpoint for http provider, which can route your message
>>>>> from the consumer to the provider.
>>>>>
>>>>> Regards
>>>>> Freeman
>>>>>
>>>>> gigeril wrote:
>>>>>> I've got a Problem with ServiceMix and the HTTP Connector.
>>>>>> I am using apache-servicemix-3.3-20080721.213539-7 for testing it. I
>>>>>> am
>>>>>> always getting the following error:
>>>>>>
>>>>>>
>>>>>>
>>>>>> WARN  - jetty                          - /
>>>>>> java.lang.IllegalStateException: Cannot write non xml faults for non
>>>>>> soap
>>>>>> messages
>>>>>>         at
>>>>>> org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124)
>>>>>>         at
>>>>>> org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
>>>>>>         at
>>>>>> org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277)
>>>>>>         at
>>>>>> org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176)
>>>>>>         at
>>>>>> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
>>>>>>         at
>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>>>>>         at
>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>>>>>>         at
>>>>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>>>>>>         at
>>>>>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
>>>>>>         at
>>>>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
>>>>>>         at
>>>>>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>>>>>>         at
>>>>>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>>>>>         at
>>>>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>>>>>         at org.mortbay.jetty.Server.handle(Server.java:324)
>>>>>>         at
>>>>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>>>>>>         at
>>>>>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
>>>>>>         at
>>>>>> org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
>>>>>>         at
>>>>>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>>>>>>         at
>>>>>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>>>>>>         at
>>>>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>>>>>>         at
>>>>>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
>>>>>>
>>>>>>
>>>>>> My Configuration:
>>>>>>
>>>>>> SunHTTP -----HTTPConnector_Provider----ServiceMix ---
>>>>>>
>>>>>> ----  HTTPConnector_Consumer-----Apache Commons HTTP Client
>>>>>>
>>>>>>
>>>>>> xbean.xml from HTTP_Connector_Provider
>>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>>>>>   <http:endpoint service="http:provider"
>>>>>>                  endpoint="httpprovider"
>>>>>>
>>>>>>                               targetEndpoint="httpconsumer"
>>>>>>                               soap="false"
>>>>>>                  role="provider"
>>>>>>                  locationURI="http://localhost:8888/"
>>>>>>     />
>>>>>>
>>>>>> </beans>
>>>>>>
>>>>>>
>>>>>> xbean.xml from HTTP_Connector_Consumer
>>>>>>
>>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>>>>>   <http:endpoint service="http:consumer"
>>>>>>                  endpoint="httpconsumer"
>>>>>>
>>>>>>                               targetEndpoint="httpprovider"
>>>>>>                               soap="false"
>>>>>>                  role="consumer"
>>>>>>                  locationURI="http://0.0.0.0:4444/"
>>>>>>    />
>>>>>> </beans>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ty for your help
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18608025.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Guillaume Nodet
>>> ------------------------
>>> Blog: http://gnodet.blogspot.com/
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18609478.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18628331.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Simple HTTP does not work.

Posted by gigeril <ma...@knapp.com>.
Ok i see!! thank you very much for your friendly and very fast help!!





gnodet wrote:
> 
> Yes, but as I said, the default marshaler assumes xml, so you'd have
> to write your own set of consumer / provider marshaler to transform
> the HTTP request from / to a JBI exchange.
> Here are the interfaces to define:
>  
> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerMarshaler.java
>  
> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderMarshaler.java
> 
> But you can inherit the default marshalers and just override change
> what you need:
>  
> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpConsumerMarshaler.java
>  
> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpProviderMarshaler.java
> 
> On Wed, Jul 23, 2008 at 2:20 PM, gigeril <ma...@knapp.com> wrote:
>>
>> Yes in this Case it is xml, but I also want to sent plaintext as an
>> Request
>> ist this possible?
>>
>>
>>
>> gnodet wrote:
>>>
>>> The "Content-Type=text/xml" header indicates the body of the POST
>>> method is an xml.  Isn't the body you are sending an xml ? At least,
>>> it seems so.  If you client is not able to handle xml payloads, I'd
>>> suggest using the new <http:consumer/> and <http:provider/> endpoint
>>> and define a custom marshaler to generate a request that suits your
>>> needs.
>>>
>>> On Wed, Jul 23, 2008 at 1:00 PM, gigeril <ma...@knapp.com>
>>> wrote:
>>>>
>>>> It works now to send messages over this I didn't configured the
>>>> targetService
>>>> properly.
>>>>
>>>> No i have another problem. My client sends the Tag "<Datum>?</Datum>"
>>>> with
>>>> an POST Method to the Server (RequestHeader="Content-type",
>>>> "text/xml").
>>>> On
>>>> the server i get the "<?xml version='1.0'
>>>> encoding='UTF-8'?><Datum>?</Datum>" within the RequestBody.
>>>>
>>>> This only happens if Servicemix and the Connectors are processing the
>>>> Message. If I connect the Server and the Client straid trough i get the
>>>> right RequestBody.
>>>>
>>>> Why adds ServiceMix this xml Header to the RequestBody on the Server?
>>>>
>>>>
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I'm a little confused with your configuration.
>>>>> If you want to use htttp consumer and provider as a bridge (or proxy),
>>>>> the flow should be
>>>>>
>>>>> http client ===========> servicemix http
>>>>> consumer============>servicemix
>>>>> http provider============> http server
>>>>> And the targetService and targetEndpoint for http consumer should be
>>>>> the
>>>>> service and endpoint for http provider, which can route your message
>>>>> from the consumer to the provider.
>>>>>
>>>>> Regards
>>>>> Freeman
>>>>>
>>>>> gigeril wrote:
>>>>>> I've got a Problem with ServiceMix and the HTTP Connector.
>>>>>> I am using apache-servicemix-3.3-20080721.213539-7 for testing it. I
>>>>>> am
>>>>>> always getting the following error:
>>>>>>
>>>>>>
>>>>>>
>>>>>> WARN  - jetty                          - /
>>>>>> java.lang.IllegalStateException: Cannot write non xml faults for non
>>>>>> soap
>>>>>> messages
>>>>>>         at
>>>>>> org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124)
>>>>>>         at
>>>>>> org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
>>>>>>         at
>>>>>> org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277)
>>>>>>         at
>>>>>> org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176)
>>>>>>         at
>>>>>> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
>>>>>>         at
>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>>>>>         at
>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>>>>>>         at
>>>>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>>>>>>         at
>>>>>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
>>>>>>         at
>>>>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
>>>>>>         at
>>>>>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>>>>>>         at
>>>>>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>>>>>         at
>>>>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>>>>>         at org.mortbay.jetty.Server.handle(Server.java:324)
>>>>>>         at
>>>>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>>>>>>         at
>>>>>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
>>>>>>         at
>>>>>> org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
>>>>>>         at
>>>>>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>>>>>>         at
>>>>>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>>>>>>         at
>>>>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>>>>>>         at
>>>>>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
>>>>>>
>>>>>>
>>>>>> My Configuration:
>>>>>>
>>>>>> SunHTTP -----HTTPConnector_Provider----ServiceMix ---
>>>>>>
>>>>>> ----  HTTPConnector_Consumer-----Apache Commons HTTP Client
>>>>>>
>>>>>>
>>>>>> xbean.xml from HTTP_Connector_Provider
>>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>>>>>   <http:endpoint service="http:provider"
>>>>>>                  endpoint="httpprovider"
>>>>>>
>>>>>>                               targetEndpoint="httpconsumer"
>>>>>>                               soap="false"
>>>>>>                  role="provider"
>>>>>>                  locationURI="http://localhost:8888/"
>>>>>>     />
>>>>>>
>>>>>> </beans>
>>>>>>
>>>>>>
>>>>>> xbean.xml from HTTP_Connector_Consumer
>>>>>>
>>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>>>>>   <http:endpoint service="http:consumer"
>>>>>>                  endpoint="httpconsumer"
>>>>>>
>>>>>>                               targetEndpoint="httpprovider"
>>>>>>                               soap="false"
>>>>>>                  role="consumer"
>>>>>>                  locationURI="http://0.0.0.0:4444/"
>>>>>>    />
>>>>>> </beans>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ty for your help
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18608025.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Guillaume Nodet
>>> ------------------------
>>> Blog: http://gnodet.blogspot.com/
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18609478.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18609628.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Simple HTTP does not work.

Posted by Guillaume Nodet <gn...@gmail.com>.
Yes, but as I said, the default marshaler assumes xml, so you'd have
to write your own set of consumer / provider marshaler to transform
the HTTP request from / to a JBI exchange.
Here are the interfaces to define:
  https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerMarshaler.java
  https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderMarshaler.java

But you can inherit the default marshalers and just override change
what you need:
  https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpConsumerMarshaler.java
  https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpProviderMarshaler.java

On Wed, Jul 23, 2008 at 2:20 PM, gigeril <ma...@knapp.com> wrote:
>
> Yes in this Case it is xml, but I also want to sent plaintext as an Request
> ist this possible?
>
>
>
> gnodet wrote:
>>
>> The "Content-Type=text/xml" header indicates the body of the POST
>> method is an xml.  Isn't the body you are sending an xml ? At least,
>> it seems so.  If you client is not able to handle xml payloads, I'd
>> suggest using the new <http:consumer/> and <http:provider/> endpoint
>> and define a custom marshaler to generate a request that suits your
>> needs.
>>
>> On Wed, Jul 23, 2008 at 1:00 PM, gigeril <ma...@knapp.com> wrote:
>>>
>>> It works now to send messages over this I didn't configured the
>>> targetService
>>> properly.
>>>
>>> No i have another problem. My client sends the Tag "<Datum>?</Datum>"
>>> with
>>> an POST Method to the Server (RequestHeader="Content-type", "text/xml").
>>> On
>>> the server i get the "<?xml version='1.0'
>>> encoding='UTF-8'?><Datum>?</Datum>" within the RequestBody.
>>>
>>> This only happens if Servicemix and the Connectors are processing the
>>> Message. If I connect the Server and the Client straid trough i get the
>>> right RequestBody.
>>>
>>> Why adds ServiceMix this xml Header to the RequestBody on the Server?
>>>
>>>
>>>
>>>
>>> Freeman Fang wrote:
>>>>
>>>> Hi,
>>>>
>>>> I'm a little confused with your configuration.
>>>> If you want to use htttp consumer and provider as a bridge (or proxy),
>>>> the flow should be
>>>>
>>>> http client ===========> servicemix http consumer============>servicemix
>>>> http provider============> http server
>>>> And the targetService and targetEndpoint for http consumer should be the
>>>> service and endpoint for http provider, which can route your message
>>>> from the consumer to the provider.
>>>>
>>>> Regards
>>>> Freeman
>>>>
>>>> gigeril wrote:
>>>>> I've got a Problem with ServiceMix and the HTTP Connector.
>>>>> I am using apache-servicemix-3.3-20080721.213539-7 for testing it. I am
>>>>> always getting the following error:
>>>>>
>>>>>
>>>>>
>>>>> WARN  - jetty                          - /
>>>>> java.lang.IllegalStateException: Cannot write non xml faults for non
>>>>> soap
>>>>> messages
>>>>>         at
>>>>> org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124)
>>>>>         at
>>>>> org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
>>>>>         at
>>>>> org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277)
>>>>>         at
>>>>> org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176)
>>>>>         at
>>>>> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
>>>>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>>>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>>>>>         at
>>>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>>>>>         at
>>>>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
>>>>>         at
>>>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
>>>>>         at
>>>>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>>>>>         at
>>>>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>>>>         at
>>>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>>>>         at org.mortbay.jetty.Server.handle(Server.java:324)
>>>>>         at
>>>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>>>>>         at
>>>>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
>>>>>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
>>>>>         at
>>>>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>>>>>         at
>>>>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>>>>>         at
>>>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>>>>>         at
>>>>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
>>>>>
>>>>>
>>>>> My Configuration:
>>>>>
>>>>> SunHTTP -----HTTPConnector_Provider----ServiceMix ---
>>>>>
>>>>> ----  HTTPConnector_Consumer-----Apache Commons HTTP Client
>>>>>
>>>>>
>>>>> xbean.xml from HTTP_Connector_Provider
>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>>>>   <http:endpoint service="http:provider"
>>>>>                  endpoint="httpprovider"
>>>>>
>>>>>                               targetEndpoint="httpconsumer"
>>>>>                               soap="false"
>>>>>                  role="provider"
>>>>>                  locationURI="http://localhost:8888/"
>>>>>     />
>>>>>
>>>>> </beans>
>>>>>
>>>>>
>>>>> xbean.xml from HTTP_Connector_Consumer
>>>>>
>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>>>>   <http:endpoint service="http:consumer"
>>>>>                  endpoint="httpconsumer"
>>>>>
>>>>>                               targetEndpoint="httpprovider"
>>>>>                               soap="false"
>>>>>                  role="consumer"
>>>>>                  locationURI="http://0.0.0.0:4444/"
>>>>>    />
>>>>> </beans>
>>>>>
>>>>>
>>>>>
>>>>> ty for your help
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18608025.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18609478.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



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

Re: Simple HTTP does not work.

Posted by gigeril <ma...@knapp.com>.
Yes in this Case it is xml, but I also want to sent plaintext as an Request
ist this possible?



gnodet wrote:
> 
> The "Content-Type=text/xml" header indicates the body of the POST
> method is an xml.  Isn't the body you are sending an xml ? At least,
> it seems so.  If you client is not able to handle xml payloads, I'd
> suggest using the new <http:consumer/> and <http:provider/> endpoint
> and define a custom marshaler to generate a request that suits your
> needs.
> 
> On Wed, Jul 23, 2008 at 1:00 PM, gigeril <ma...@knapp.com> wrote:
>>
>> It works now to send messages over this I didn't configured the
>> targetService
>> properly.
>>
>> No i have another problem. My client sends the Tag "<Datum>?</Datum>"
>> with
>> an POST Method to the Server (RequestHeader="Content-type", "text/xml").
>> On
>> the server i get the "<?xml version='1.0'
>> encoding='UTF-8'?><Datum>?</Datum>" within the RequestBody.
>>
>> This only happens if Servicemix and the Connectors are processing the
>> Message. If I connect the Server and the Client straid trough i get the
>> right RequestBody.
>>
>> Why adds ServiceMix this xml Header to the RequestBody on the Server?
>>
>>
>>
>>
>> Freeman Fang wrote:
>>>
>>> Hi,
>>>
>>> I'm a little confused with your configuration.
>>> If you want to use htttp consumer and provider as a bridge (or proxy),
>>> the flow should be
>>>
>>> http client ===========> servicemix http consumer============>servicemix
>>> http provider============> http server
>>> And the targetService and targetEndpoint for http consumer should be the
>>> service and endpoint for http provider, which can route your message
>>> from the consumer to the provider.
>>>
>>> Regards
>>> Freeman
>>>
>>> gigeril wrote:
>>>> I've got a Problem with ServiceMix and the HTTP Connector.
>>>> I am using apache-servicemix-3.3-20080721.213539-7 for testing it. I am
>>>> always getting the following error:
>>>>
>>>>
>>>>
>>>> WARN  - jetty                          - /
>>>> java.lang.IllegalStateException: Cannot write non xml faults for non
>>>> soap
>>>> messages
>>>>         at
>>>> org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124)
>>>>         at
>>>> org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
>>>>         at
>>>> org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277)
>>>>         at
>>>> org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176)
>>>>         at
>>>> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
>>>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>>>>         at
>>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>>>>         at
>>>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
>>>>         at
>>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
>>>>         at
>>>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>>>>         at
>>>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>>>         at
>>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>>>         at org.mortbay.jetty.Server.handle(Server.java:324)
>>>>         at
>>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>>>>         at
>>>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
>>>>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
>>>>         at
>>>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>>>>         at
>>>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>>>>         at
>>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>>>>         at
>>>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
>>>>
>>>>
>>>> My Configuration:
>>>>
>>>> SunHTTP -----HTTPConnector_Provider----ServiceMix ---
>>>>
>>>> ----  HTTPConnector_Consumer-----Apache Commons HTTP Client
>>>>
>>>>
>>>> xbean.xml from HTTP_Connector_Provider
>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>>>   <http:endpoint service="http:provider"
>>>>                  endpoint="httpprovider"
>>>>
>>>>                               targetEndpoint="httpconsumer"
>>>>                               soap="false"
>>>>                  role="provider"
>>>>                  locationURI="http://localhost:8888/"
>>>>     />
>>>>
>>>> </beans>
>>>>
>>>>
>>>> xbean.xml from HTTP_Connector_Consumer
>>>>
>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>>>   <http:endpoint service="http:consumer"
>>>>                  endpoint="httpconsumer"
>>>>
>>>>                               targetEndpoint="httpprovider"
>>>>                               soap="false"
>>>>                  role="consumer"
>>>>                  locationURI="http://0.0.0.0:4444/"
>>>>    />
>>>> </beans>
>>>>
>>>>
>>>>
>>>> ty for your help
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18608025.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18609478.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Simple HTTP does not work.

Posted by Guillaume Nodet <gn...@gmail.com>.
The "Content-Type=text/xml" header indicates the body of the POST
method is an xml.  Isn't the body you are sending an xml ? At least,
it seems so.  If you client is not able to handle xml payloads, I'd
suggest using the new <http:consumer/> and <http:provider/> endpoint
and define a custom marshaler to generate a request that suits your
needs.

On Wed, Jul 23, 2008 at 1:00 PM, gigeril <ma...@knapp.com> wrote:
>
> It works now to send messages over this I didn't configured the targetService
> properly.
>
> No i have another problem. My client sends the Tag "<Datum>?</Datum>" with
> an POST Method to the Server (RequestHeader="Content-type", "text/xml"). On
> the server i get the "<?xml version='1.0'
> encoding='UTF-8'?><Datum>?</Datum>" within the RequestBody.
>
> This only happens if Servicemix and the Connectors are processing the
> Message. If I connect the Server and the Client straid trough i get the
> right RequestBody.
>
> Why adds ServiceMix this xml Header to the RequestBody on the Server?
>
>
>
>
> Freeman Fang wrote:
>>
>> Hi,
>>
>> I'm a little confused with your configuration.
>> If you want to use htttp consumer and provider as a bridge (or proxy),
>> the flow should be
>>
>> http client ===========> servicemix http consumer============>servicemix
>> http provider============> http server
>> And the targetService and targetEndpoint for http consumer should be the
>> service and endpoint for http provider, which can route your message
>> from the consumer to the provider.
>>
>> Regards
>> Freeman
>>
>> gigeril wrote:
>>> I've got a Problem with ServiceMix and the HTTP Connector.
>>> I am using apache-servicemix-3.3-20080721.213539-7 for testing it. I am
>>> always getting the following error:
>>>
>>>
>>>
>>> WARN  - jetty                          - /
>>> java.lang.IllegalStateException: Cannot write non xml faults for non soap
>>> messages
>>>         at
>>> org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124)
>>>         at
>>> org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
>>>         at
>>> org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277)
>>>         at
>>> org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176)
>>>         at
>>> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
>>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>>>         at
>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>>>         at
>>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
>>>         at
>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
>>>         at
>>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>>>         at
>>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>>         at
>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>>         at org.mortbay.jetty.Server.handle(Server.java:324)
>>>         at
>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>>>         at
>>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
>>>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
>>>         at
>>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>>>         at
>>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>>>         at
>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>>>         at
>>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
>>>
>>>
>>> My Configuration:
>>>
>>> SunHTTP -----HTTPConnector_Provider----ServiceMix ---
>>>
>>> ----  HTTPConnector_Consumer-----Apache Commons HTTP Client
>>>
>>>
>>> xbean.xml from HTTP_Connector_Provider
>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>>   <http:endpoint service="http:provider"
>>>                  endpoint="httpprovider"
>>>
>>>                               targetEndpoint="httpconsumer"
>>>                               soap="false"
>>>                  role="provider"
>>>                  locationURI="http://localhost:8888/"
>>>     />
>>>
>>> </beans>
>>>
>>>
>>> xbean.xml from HTTP_Connector_Consumer
>>>
>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>>   <http:endpoint service="http:consumer"
>>>                  endpoint="httpconsumer"
>>>
>>>                               targetEndpoint="httpprovider"
>>>                               soap="false"
>>>                  role="consumer"
>>>                  locationURI="http://0.0.0.0:4444/"
>>>    />
>>> </beans>
>>>
>>>
>>>
>>> ty for your help
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18608025.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



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

Re: Simple HTTP does not work.

Posted by gigeril <ma...@knapp.com>.
It works now to send messages over this I didn't configured the targetService
properly.

No i have another problem. My client sends the Tag "<Datum>?</Datum>" with
an POST Method to the Server (RequestHeader="Content-type", "text/xml"). On
the server i get the "<?xml version='1.0'
encoding='UTF-8'?><Datum>?</Datum>" within the RequestBody.

This only happens if Servicemix and the Connectors are processing the
Message. If I connect the Server and the Client straid trough i get the
right RequestBody.

Why adds ServiceMix this xml Header to the RequestBody on the Server?




Freeman Fang wrote:
> 
> Hi,
> 
> I'm a little confused with your configuration.
> If you want to use htttp consumer and provider as a bridge (or proxy), 
> the flow should be
> 
> http client ===========> servicemix http consumer============>servicemix 
> http provider============> http server
> And the targetService and targetEndpoint for http consumer should be the 
> service and endpoint for http provider, which can route your message 
> from the consumer to the provider.
> 
> Regards
> Freeman
> 
> gigeril wrote:
>> I've got a Problem with ServiceMix and the HTTP Connector.
>> I am using apache-servicemix-3.3-20080721.213539-7 for testing it. I am
>> always getting the following error:
>>
>>
>>
>> WARN  - jetty                          - /
>> java.lang.IllegalStateException: Cannot write non xml faults for non soap
>> messages
>>         at
>> org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124)
>>         at
>> org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
>>         at
>> org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277)
>>         at
>> org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176)
>>         at
>> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>>         at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
>>         at
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
>>         at
>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>>         at
>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>         at
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>         at org.mortbay.jetty.Server.handle(Server.java:324)
>>         at
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>>         at
>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
>>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
>>         at
>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>>         at
>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>>         at
>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>>         at
>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
>>
>>
>> My Configuration:
>>
>> SunHTTP -----HTTPConnector_Provider----ServiceMix ---
>>
>> ----  HTTPConnector_Consumer-----Apache Commons HTTP Client
>>
>>
>> xbean.xml from HTTP_Connector_Provider
>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>   <http:endpoint service="http:provider"
>>                  endpoint="httpprovider"
>> 				 
>> 				 targetEndpoint="httpconsumer"
>> 				 soap="false"
>>                  role="provider" 
>>                  locationURI="http://localhost:8888/"
>>     />             
>>
>> </beans>
>>
>>
>> xbean.xml from HTTP_Connector_Consumer
>>
>> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>>   <http:endpoint service="http:consumer"
>>                  endpoint="httpconsumer"
>> 				 
>> 				 targetEndpoint="httpprovider"
>> 				 soap="false"
>>                  role="consumer" 
>>                  locationURI="http://0.0.0.0:4444/"
>>    />             
>> </beans>
>>
>>
>>
>> ty for your help
>>
>>
>>
>>
>>
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Simple-HTTP-does-not-work.-tp18606632p18608025.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Simple HTTP does not work.

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

I'm a little confused with your configuration.
If you want to use htttp consumer and provider as a bridge (or proxy), 
the flow should be

http client ===========> servicemix http consumer============>servicemix 
http provider============> http server
And the targetService and targetEndpoint for http consumer should be the 
service and endpoint for http provider, which can route your message 
from the consumer to the provider.

Regards
Freeman

gigeril wrote:
> I've got a Problem with ServiceMix and the HTTP Connector.
> I am using apache-servicemix-3.3-20080721.213539-7 for testing it. I am
> always getting the following error:
>
>
>
> WARN  - jetty                          - /
> java.lang.IllegalStateException: Cannot write non xml faults for non soap
> messages
>         at
> org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124)
>         at
> org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
>         at
> org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277)
>         at
> org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176)
>         at
> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>         at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>         at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
>         at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
>         at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>         at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>         at org.mortbay.jetty.Server.handle(Server.java:324)
>         at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>         at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>         at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>         at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
>
>
> My Configuration:
>
> SunHTTP -----HTTPConnector_Provider----ServiceMix ---
>
> ----  HTTPConnector_Consumer-----Apache Commons HTTP Client
>
>
> xbean.xml from HTTP_Connector_Provider
> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>   <http:endpoint service="http:provider"
>                  endpoint="httpprovider"
> 				 
> 				 targetEndpoint="httpconsumer"
> 				 soap="false"
>                  role="provider" 
>                  locationURI="http://localhost:8888/"
>     />             
>
> </beans>
>
>
> xbean.xml from HTTP_Connector_Consumer
>
> <beans xmlns:http="http://servicemix.apache.org/http/1.0">
>   <http:endpoint service="http:consumer"
>                  endpoint="httpconsumer"
> 				 
> 				 targetEndpoint="httpprovider"
> 				 soap="false"
>                  role="consumer" 
>                  locationURI="http://0.0.0.0:4444/"
>    />             
> </beans>
>
>
>
> ty for your help
>
>
>
>
>
>
>