You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Crimor <cr...@web.de> on 2008/01/28 11:59:23 UTC

Error by creating a connetion over http-provider service to external php Service

Hi,

I have a service which call a HTTP-Provider service to send out a post
request to a external php application. But i got a BAD request respons. Her
are the logs what Servicemix doing.

DEBUG - CxfSeComponent                 - Correlation id retrieved from
ThreadLocal: ID:172.17.135.241-117bfe68a1b-4:0
DEBUG - DeliveryChannelImpl            - SendSync
ID:172.17.135.241-117bfe68a1b-5:0 in DeliveryChannel{servicemix-cxf-se}
DEBUG - SedaFlow                       - Called Flow send
DEBUG - DeliveryChannelImpl            - Waiting for exchange
ID:172.17.135.241-117bfe68a1b-5:0 (1885947) to be answered in
DeliveryChannel{servicemix-cxf-se} from sendSync
DEBUG - SedaQueue                      -
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@9c3ed1 dequeued
exchange: InOut[
  id: ID:172.17.135.241-117bfe68a1b-5:0
  status: Active
  role: provider
  service: {http://mycompany/mptbinding/v1/}MPTWebService
  endpoint: MPTWebService
  in: <?xml version="1.0" encoding="UTF-8"?><order
xmlns="http://mycompany/crmservice/v1/" campaignName="Xpats" currency="EUR"
id="id" orderno="no" state="prop
osal" version="1"><advertiser
id="id"><name>name</name><street1>street</street1><street2/><city>Brussel</city><zip>1080</zip><country>Belgium</country><mainphone>0
</mainphone><kickbackbound>0.0</kickbackbound><kickbackvalue>0.0</kickbackvalue></advertiser><agency
id="id"><name>name</name><street1>Chauss[0xe9]e de la Hulpe 18
9</street1><street2/><city>Brussel</city><zip>1170</zip><country>Belgium</country><mainphone>0</mainphone><kickbackbound>0.0</kickbackbound><kickbackvalue>0.0</kickbackvalue></agency><salesrep
id="id"><name>name</name><usermail>email</usermail></salesrep><comments>comment</comments><lineitems><lineitem
id="id"><adformatid>-1</adformatid><startdate>2008-01-10</startdate><enddate>2008-01-24</enddate><start
time>00:00:00</starttime><endtime>18:00:00</endtime><exclusive>false</exclusive><totalnet>5758.42</totalnet><nondart>false</nondart></lineitem><lineitem
id="id"><adformatid>-1
<startdate>2008-01-10</startdate><enddate>2008-01-24</enddate><starttime>00:00:00</starttime><en...
]
DEBUG - HttpComponent                  - Received exchange: status: Active,
role: provider
DEBUG - HttpComponent                  - Retrieved correlation id:
ID:172.17.135.241-117bfe68a1b-4:0
DEBUG - DefaultHttpParams              - Set parameter
http.method.retry-handler =
org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@636e13
DEBUG - MultiThreadedHttpConnectionManager -
HttpConnectionManager.getConnection:  config =
HostConfiguration[host=http://externalhost], timeout = 0
DEBUG - MultiThreadedHttpConnectionManager - Allocating new connection,
hostConfig=HostConfiguration[host=http://externalhost]
DEBUG - HttpConnection                 - Open connection to externalhost:80
DEBUG - header                         - >> "POST
/webservice/reservation.php HTTP/1.1[\r][\n]"
DEBUG - HttpMethodBase                 - Adding Host request header
DEBUG - header                         - >> "xmlvalue: <?xml version="1.0"
encoding="UTF-8" standalone="yes"?>[\n]"
DEBUG - header                         - >> "<order version="1"
state="proposal" orderno="no" id="id" currency="EUR" campaignName="Xpats"
xmlns="http://namespace.n
et/crmservice/v1/"><advertiser
id="id"><name>name</name><street1>street</street1><street2></street2><city>Brussel</city><zip>1080</zip><country>Belgium</country><m
ainphone>0</mainphone><kickbackbound>0.0</kickbackbound><kickbackvalue>0.0</kickbackvalue></advertiser><agency
id="id"><name>name</name><street1>Chauss[0xe9]e de l
a Hulpe
189</street1><street2></street2><city>Brussel</city><zip>1170</zip><country>Belgium</country><mainphone>0</mainphone><kickbackbound>0.0</kickbackbound><kickbackvalue>0.0</kickbackvalue></agenc
y><salesrep
id="id"><name>name</name><usermail>email</usermail></salesrep><comments>comment</comments><lineitems><lineitem
id="id"><adformatid>-1</adformatid><startdate>2008-01-10</startdate><enddate>2008-01
-24</enddate><starttime>00:00:00</starttime><endtime>18:00:00</endtime><exclusive>false</exclusive><totalnet>5758.42</totalnet><nondart>false</nondart></lineitem><lineitem
id="id
"><adformatid>-1</adformatid><startdate>2008-01-10</startdate><enddate>2008-01-24</enddate><starttime>00:00:00</starttime><endtime>18:00:00</endtime><exclusive>false</exclusive><totalnet>2992.5</total
net><nondart>false</nondart></lineitem><lineitem
id="id"><adformatid>-1</adformatid><startdate>2008-01-10</startdate><enddate>2008-01-24</enddate><starttime>00:00:00</starttime><
endtime>18:00:00</endtime><exclusive>false</exclusive><totalnet>141.08</totalnet><nondart>false</nondart></lineitem></lineitems></order>[\n]"
DEBUG - header                         - >> "[\n]"
DEBUG - header                         - >> "[\r][\n]"
DEBUG - header                         - >> "id: 2[\r][\n]"
DEBUG - header                         - >> "loginuseremail:
someemail[\r][\n]"
DEBUG - header                         - >> "auth_key:
aw8rth54r6g3rf6723hrt9823j9rs23f6g23789rgt23hfgaisuftgqd254tgdai85[\r][\n]"
DEBUG - header                         - >> "version: 1[\r][\n]"
DEBUG - header                         - >> "Content-Type:
text/xml;charset=UTF-8[\r][\n]"
DEBUG - header                         - >> "Content-Length: 1913[\r][\n]"
DEBUG - header                         - >> "User-Agent: Jakarta
Commons-HttpClient/3.0[\r][\n]"
DEBUG - header                         - >> "Host: externalhost[\r][\n]"
DEBUG - header                         - >> "[\r][\n]"
DEBUG - content                        - >> "<?xml version='1.0'
encoding='UTF-8'?><order xmlns="http://mycompany/crmservice/v1/"
campaignName="Xpats" currency="EUR" id="20071119_120608
_29466093" orderno="no" state="proposal" version="1"><advertiser
id="id"><name>name</name><street1>street</street1><street2
/><city>Brussel</city><zip>1080</zi
p><country>Belgium</country><mainphone>0</mainphone><kickbackbound>0.0</kickbackbound><kickbackvalue>0.0</kickbackvalue></advertiser><agency
id="id"><name>name</na
me><street1>Chauss[0xe9]e de la Hulpe 189</street1><street2
/><city>Brussel</city><zip>1170</zip><country>Belgium</country><mainphone>0</mainphone><kickbackbound>0.0</kickbackbound><kickbackvalue>0.0<
/kickbackvalue></agency><salesrep
id="id"><name>name</name><usermail>email</usermail></salesrep><comments>comment</comments><lineitems><lineitem
id="id"><adformatid>-1</adformatid><startdate>2008-01-10</star
tdate><enddate>2008-01-24</enddate><starttime>00:00:00</starttime><endtime>18:00:00</endtime><exclusive>false</exclusive><totalnet>5758.42</totalnet><nondart>false</nondart></lineitem><lineitem
id="20
071119_121933_94202703"><adformatid>-1</adformatid><startdate>2008-01-10</startdate><enddate>2008-01-24</enddate><starttime>00:00:00</starttime><endtime>18:00:00</endtime><exclusive>false</exclusive><
totalnet>2992.5</totalnet><nondart>false</nondart></lineitem><lineitem
id="id"><adformatid>-1</adformatid><startdate>2008-01-10</startdate><enddate>2008-01-24</enddate><starttime
>00:00:00</starttime><endtime>18:00:00</endtime><exclusive>false</exclusive><totalnet>141.08</totalnet><nondart>false</nondart></lineitem></lineitems></order>"
DEBUG - EntityEnclosingMethod          - Request body sent
DEBUG - header                         - << "HTTP/1.1 400 Bad
Request[\r][\n]"
DEBUG - header                         - << "Date: Mon, 28 Jan 2008 10:17:53
GMT[\r][\n]"
DEBUG - header                         - << "Server: Apache/2.2.6
(Fedora)[\r][\n]"
DEBUG - header                         - << "Content-Length: 304[\r][\n]"
DEBUG - header                         - << "Connection: close[\r][\n]"
DEBUG - header                         - << "Content-Type: text/html;
charset=iso-8859-1[\r][\n]"
DEBUG - DeliveryChannelImpl            - Send
ID:172.17.135.241-117bfe68a1b-5:0 in DeliveryChannel{servicemix-http}
DEBUG - SedaFlow                       - Called Flow send
DEBUG - content                        - << "<"
DEBUG - content                        - << "!"
DEBUG - content                        - << "D"
DEBUG - content                        - << "O"
DEBUG - content                        - << "CTYPE HTML PUBLIC "-//IETF//DTD
HTML 2.0//EN">[\n]"
DEBUG - content                        - << "<html><head>[\n]"
DEBUG - content                        - << "<title>400 Bad
Request</title>[\n]"
DEBUG - content                        - << "</head><body>[\n]"
DEBUG - content                        - << "<h1>Bad Request</h1>[\n]"
DEBUG - content                        - << "<p>Your browser sent a request
that this server could not understand.<br />[\n]"
DEBUG - content                        - << "</p>[\n]"
DEBUG - content                        - << "<hr>[\n]"
DEBUG - content                        - << "<address>Apache/2.2.6 (Fedora)
Server at 212.227.34.47 Port 80</address>[\n]"
DEBUG - content                        - << "</body></html>[\n]"
[Fatal Error] :1:50: White spaces are required between publicId and
systemId.
DEBUG - HttpMethodBase                 - Should close connection in response
to directive: close
DEBUG - HttpConnection                 - Releasing connection back to
connection manager.
DEBUG - MultiThreadedHttpConnectionManager - Freeing connection,
hostConfig=HostConfiguration[host=http://externalhost]
DEBUG - IdleConnectionHandler          - Adding connection at: 1201515475656
DEBUG - MultiThreadedHttpConnectionManager - Notifying no-one, there are no
waiting threads
DEBUG - SedaQueue                      -
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@9ca84f dequeued
exchange: InOut[
  id: ID:172.17.135.241-117bfe68a1b-5:0
  status: Active
  role: consumer
  service: {http://mycompany/mptbinding/v1/}MPTWebService
  endpoint: MPTWebService
  in: <?xml version="1.0" encoding="UTF-8"?><order
xmlns="http://mycompany/crmservice/v1/" campaignName="Xpats" currency="EUR"
id="id" orderno="no" state="prop
osal" version="1"><advertiser
id="id"><name>name</name><street1>street</street1><street2/><city>Brussel</city><zip>1080</zip><country>Belgium</country><mainphone>0
</mainphone><kickbackbound>0.0</kickbackbound><kickbackvalue>0.0</kickbackvalue></advertiser><agency
id="id"><name>name</name><street1>Chauss[0xe9]e de la Hulpe 18
9</street1><street2/><city>Brussel</city><zip>1170</zip><country>Belgium</country><mainphone>0</mainphone><kickbackbound>0.0</kickbackbound><kickbackvalue>0.0</kickbackvalue></agency><salesrep
id="id"><name>name</name><usermail>email</usermail></salesrep><comments>comment</comments><lineitems><lineitem
id="id"><adformatid>-1</adformatid><startdate>2008-01-10</startdate><enddate>2008-01-24</enddate><start
time>00:00:00</starttime><endtime>18:00:00</endtime><exclusive>false</exclusive><totalnet>5758.42</totalnet><nondart>false</nondart></lineitem><lineitem
id="id"><adformatid>-1
<startdate>2008-01-10</startdate><enddate>2008-01-24</enddate><starttime>00:00:00</starttime><en...
  fault: Unable to display: org.xml.sax.SAXParseException: White spaces are
required between publicId and systemId.


I don't have a clue what is the problem.
-- 
View this message in context: http://www.nabble.com/Error-by-creating-a-connetion-over-http-provider-service-to-external-php-Service-tp15132807s12049p15132807.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Error by creating a connetion over http-provider service to external php Service

Posted by Cybexion <cy...@email.de>.
... or is it that SM just always sends one XML document arround?
Means that if you send a document to a http provider this provider is not
allowed to have http parameters. I just gets posted on String of XML data.
If the provider is soap enabled, the xml data gets surounded with a soap
envelope ...

... qeustions over questions ...


Cybexion wrote:
> 
> Hi,
> 
> honestly, thats also not clear for me.
> Lets say I have a "Service" which is provided by an url like:
> coolservice.server.com/service&key1=value1&key2=value2&xmldata=<data>lots
> of xml</data>
> 
> How can this "Service" be included (and connected) into ServiceMix?
> Should the whole ...&....>... data be but into the content of jms or
> should all parameters be put into jms properties?
> How is the mapping done?
> Or is it that I do completely misunderstand SM?
> Which example is good to read?
> 
> Thanks in advance and regards
> 
> cybexion
> 
> 
> 
> 
> Crimor wrote:
>> 
>> Because i do not really understand how this post request is working in
>> servicemix. I have to send the follow request to  the php application:
>> 
>>     encString.append("auth_key=").append(URLEncoder.encode("key",
>> "UTF-8")); 
>>     encString.append("&id=").append(URLEncoder.encode("2", "UTF-8")); 
>>     encString.append("&version=").append(URLEncoder.encode("1",
>> "UTF-8"));
>>    
>> encString.append("&loginuseremail=").append(URLEncoder.encode("email",
>> "UTF-8"));
>>     encString.append("&xmlvalue=").append(URLEncoder.encode([komplex
>> order].toString(), "UTF-8"));
>> 
>>      auth_key="key"&id="id"&loginuseremail="email"&xmlvalur="komplex
>> order"
>> 
>> 
>> this works fine if i use the JAVA URL class, but we don't want to call
>> mptservice over the URL class in java directly. We want this to be done
>> by servicemix, but the understanding how servicemix, especially this
>> NormalizedMessage class, works isn't so clear. Is it even possible to
>> send this mentioned request over the HTTP-Bindingcomponent? What does
>> NormalizedMessage.setProperty stands for, can i use them to map my http
>> variable or should i stay by the JbiConstants.PROTOCOL_HEADERS? The
>> NormalizedMessage.setContend can't be clear so i set something in it.
>> Question over Question?
>> 
>> Crimor
>> 
>> 
>> 
>> 
>> Freeman Fang wrote:
>>> 
>>> Hi,
>>> 
>>> I am a little confused about the debug log in http component, seems you
>>> put
>>> the complex "order" xml fragment both in the header and the content, why
>>> you
>>> put this big xml fragment in your message header?
>>> 
>>> Freeman
>>> 
>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-by-creating-a-connetion-over-http-provider-service-to-external-php-Service-tp15132807s12049p15180893.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Error by creating a connetion over http-provider service to external php Service

Posted by Cybexion <cy...@email.de>.
Hi,

honestly, thats also not clear for me.
Lets say I have a "Service" which is provided by an url like:
coolservice.server.com/service&key1=value1&key2=value2&xmldata=<data>lots of
xml</data>

How can this "Service" be included (and connected) into ServiceMix?
Should the whole ...&....>... data be but into the content of jms or should
all parameters be put into jms properties?
How is the mapping done?
Or is it that I do completely misunderstand SM?
Which example is good to read?

Thanks in advance and regards

cybexion




Crimor wrote:
> 
> Because i do not really understand how this post request is working in
> servicemix. I have to send the follow request to  the php application:
> 
>     encString.append("auth_key=").append(URLEncoder.encode("key",
> "UTF-8")); 
>     encString.append("&id=").append(URLEncoder.encode("2", "UTF-8")); 
>     encString.append("&version=").append(URLEncoder.encode("1", "UTF-8"));
>     encString.append("&loginuseremail=").append(URLEncoder.encode("email",
> "UTF-8"));
>     encString.append("&xmlvalue=").append(URLEncoder.encode([komplex
> order].toString(), "UTF-8"));
> 
>      auth_key="key"&id="id"&loginuseremail="email"&xmlvalur="komplex
> order"
> 
> 
> this works fine if i use the JAVA URL class, but we don't want to call
> mptservice over the URL class in java directly. We want this to be done by
> servicemix, but the understanding how servicemix, especially this
> NormalizedMessage class, works isn't so clear. Is it even possible to send
> this mentioned request over the HTTP-Bindingcomponent? What does
> NormalizedMessage.setProperty stands for, can i use them to map my http
> variable or should i stay by the JbiConstants.PROTOCOL_HEADERS? The
> NormalizedMessage.setContend can't be clear so i set something in it.
> Question over Question?
> 
> Crimor
> 
> 
> 
> 
> Freeman Fang wrote:
>> 
>> Hi,
>> 
>> I am a little confused about the debug log in http component, seems you
>> put
>> the complex "order" xml fragment both in the header and the content, why
>> you
>> put this big xml fragment in your message header?
>> 
>> Freeman
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-by-creating-a-connetion-over-http-provider-service-to-external-php-Service-tp15132807s12049p15172278.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Error by creating a connetion over http-provider service to external php Service

Posted by Crimor <cr...@web.de>.
Because i do not really understand how this post request is working in
servicemix. I have to send the follow request to  the php application:

encString.append("auth_key=").append(URLEncoder.encode("key", "UTF-8"));
encString.append("&id=").append(URLEncoder.encode("2", "UTF-8"));
encString.append("&version=").append(URLEncoder.encode("1", "UTF-8")); 
encString.append("&loginuseremail=").append(URLEncoder.encode("email",
"UTF-8"));
encString.append("&xmlvalue=").append(URLEncoder.encode([komplex
order].toString(), "UTF-8"));

this works fine if i use the JAVA URL class, but we don't want to call
mptservice over the URL class in java directly. We want this to be done by
servicemix, but the understanding how servicemix, especially this
NormalizedMessage class, works isn't so clear. Is it even possible to send
this mentioned request  
over the HTTP-Bindingcomponent? What is message.setProperty stands for, can
i use them to map my http variable or should i stay by the
JbiConstants.PROTOCOL_HEADERS? Question over Question?

Crimor




Freeman Fang wrote:
> 
> Hi,
> 
> I am a little confused about the debug log in http component, seems you
> put
> the complex "order" xml fragment both in the header and the content, why
> you
> put this big xml fragment in your message header?
> 
> Freeman
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-by-creating-a-connetion-over-http-provider-service-to-external-php-Service-tp15132807s12049p15135757.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Error by creating a connetion over http-provider service to external php Service

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

I am a little confused about the debug log in http component, seems you put
the complex "order" xml fragment both in the header and the content, why you
put this big xml fragment in your message header?

Freeman


On 1/28/08, Crimor <cr...@web.de> wrote:
>
>
> If i insert something else in the post xmlvalue variable i got a response
> from the php but i need this komplex xmlstring to be posted.
>
>
> Endpoint provider bc
>
> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>               xmlns:order="http://mycompany/mptbinding/v1/"
>
>
> <http:endpoint service="order:MPTWebService"
>                 endpoint="MPTWebService"
>                 role="provider"
>
> locationURI="http://externalhost/webservice/reservation.php"
>                 defaultMep="http://www.w3.org/2004/08/wsdl/in-only" />
>
> </beans>
>
> Javacode: Call
>
>    ServiceMixClient client = new ServiceMixClientFacade(context);
>
>    InOut exchange = null;
>    try {
>      exchange = client.createInOutExchange();
>
>    }
>    catch (MessagingException e) {
>      System.out.println("Fehler in exchange");
>    }
>
>    NormalizedMessage message = exchange.getInMessage();
>    Map <String,String> headers = new HashMap <String,String>();
>    headers.put("auth_key", "key");
>    headers.put("id", "2");
>    headers.put("version", "1");
>    headers.put("loginuseremail", "email");
>
> headers.put("xmlvalue",mptMessage.generateXMLString
> ("crmservice").toString());
>       message.setProperty(JbiConstants.PROTOCOL_HEADERS,headers);
>
>    try {
>      message.setContent(new StreamSource(new StringReader(xmlval)));
>    }
>    catch (MessagingException e) {
>      System.out.println("Fehler in message");
>    }
>    logger.info("Call() - propertyValues - "+
>     message.getProperty(JbiConstants.PROTOCOL_HEADERS));
>    // lets use a specific service to dispatch to
>    QName service = new QName("http://mycompany.net/mptbinding/v1/",
>                                                 "MPTWebService");
>    exchange.setService(service);
>    try {
>      System.out.println("Sending.....");
>      client.sendSync(exchange);
>
>    }
>    catch (MessagingException e) {
>      System.out.println("Fehler im senden");
>    }
>
>    NormalizedMessage outMessage = exchange.getOutMessage();
>
>
>
> Freeman Fang wrote:
> >
> > Would you please append the configuration of your endpoint?
> >
> > Freeman
> >
> >
> --
> View this message in context:
> http://www.nabble.com/Error-by-creating-a-connetion-over-http-provider-service-to-external-php-Service-tp15132807s12049p15133911.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Re: Error by creating a connetion over http-provider service to external php Service

Posted by Crimor <cr...@web.de>.
If i insert something else in the post xmlvalue variable i got a response
from the php but i need this komplex xmlstring to be posted.


Endpoint provider bc

<beans xmlns:http="http://servicemix.apache.org/http/1.0"
               xmlns:order="http://mycompany/mptbinding/v1/"
               

  <http:endpoint service="order:MPTWebService"
                 endpoint="MPTWebService"
                 role="provider" 
                
locationURI="http://externalhost/webservice/reservation.php"
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-only" />

 </beans>

Javacode: Call

    ServiceMixClient client = new ServiceMixClientFacade(context);
    
    InOut exchange = null;
    try {
      exchange = client.createInOutExchange();
      
    }
    catch (MessagingException e) {
      System.out.println("Fehler in exchange");
    }

    NormalizedMessage message = exchange.getInMessage();
    Map <String,String> headers = new HashMap <String,String>();
    headers.put("auth_key", "key");
    headers.put("id", "2");
    headers.put("version", "1");
    headers.put("loginuseremail", "email");
                 
headers.put("xmlvalue",mptMessage.generateXMLString("crmservice").toString());
       message.setProperty(JbiConstants.PROTOCOL_HEADERS,headers);

    try {
      message.setContent(new StreamSource(new StringReader(xmlval)));
    }
    catch (MessagingException e) {
      System.out.println("Fehler in message");
    }
    logger.info("Call() - propertyValues - "+
     message.getProperty(JbiConstants.PROTOCOL_HEADERS));
    // lets use a specific service to dispatch to
    QName service = new QName("http://mycompany.net/mptbinding/v1/",
                                                 "MPTWebService");
    exchange.setService(service);
    try {
      System.out.println("Sending.....");
      client.sendSync(exchange);
      
    }
    catch (MessagingException e) {
      System.out.println("Fehler im senden");
    }
    
    NormalizedMessage outMessage = exchange.getOutMessage();



Freeman Fang wrote:
> 
> Would you please append the configuration of your endpoint?
> 
> Freeman
> 
> 
-- 
View this message in context: http://www.nabble.com/Error-by-creating-a-connetion-over-http-provider-service-to-external-php-Service-tp15132807s12049p15133911.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Error by creating a connetion over http-provider service to external php Service

Posted by Freeman Fang <fr...@gmail.com>.
Would you please append the configuration of your endpoint?

Freeman


On 1/28/08, Crimor <cr...@web.de> wrote:
>
>
> Hi,
>
> I have a service which call a HTTP-Provider service to send out a post
> request to a external php application. But i got a BAD request respons.
> Her
> are the logs what Servicemix doing.
>
> DEBUG - CxfSeComponent                 - Correlation id retrieved from
> ThreadLocal: ID:172.17.135.241-117bfe68a1b-4:0
> DEBUG - DeliveryChannelImpl            - SendSync
> ID:172.17.135.241-117bfe68a1b-5:0 in DeliveryChannel{servicemix-cxf-se}
> DEBUG - SedaFlow                       - Called Flow send
> DEBUG - DeliveryChannelImpl            - Waiting for exchange
> ID:172.17.135.241-117bfe68a1b-5:0 (1885947) to be answered in
> DeliveryChannel{servicemix-cxf-se} from sendSync
> DEBUG - SedaQueue                      -
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@9c3ed1 dequeued
> exchange: InOut[
> id: ID:172.17.135.241-117bfe68a1b-5:0
> status: Active
> role: provider
> service: {http://mycompany/mptbinding/v1/}MPTWebService
> endpoint: MPTWebService
> in: <?xml version="1.0" encoding="UTF-8"?><order
> xmlns="http://mycompany/crmservice/v1/" campaignName="Xpats"
> currency="EUR"
> id="id" orderno="no" state="prop
> osal" version="1"><advertiser
>
> id="id"><name>name</name><street1>street</street1><street2/><city>Brussel</city><zip>1080</zip><country>Belgium</country><mainphone>0
> </mainphone><kickbackbound>0.0</kickbackbound><kickbackvalue>0.0
> </kickbackvalue></advertiser><agency
> id="id"><name>name</name><street1>Chauss[0xe9]e de la Hulpe 18
>
> 9</street1><street2/><city>Brussel</city><zip>1170</zip><country>Belgium</country><mainphone>0</mainphone><kickbackbound>
> 0.0</kickbackbound><kickbackvalue>0.0</kickbackvalue></agency><salesrep
>
> id="id"><name>name</name><usermail>email</usermail></salesrep><comments>comment</comments><lineitems><lineitem
>
> id="id"><adformatid>-1</adformatid><startdate>2008-01-10</startdate><enddate>2008-01-24</enddate><start
>
> time>00:00:00</starttime><endtime>18:00:00</endtime><exclusive>false</exclusive><totalnet>
> 5758.42</totalnet><nondart>false</nondart></lineitem><lineitem
> id="id"><adformatid>-1
>
> <startdate>2008-01-10</startdate><enddate>2008-01-24</enddate><starttime>00:00:00</starttime><en...
> ]
> DEBUG - HttpComponent                  - Received exchange: status:
> Active,
> role: provider
> DEBUG - HttpComponent                  - Retrieved correlation id:
> ID:172.17.135.241-117bfe68a1b-4:0
> DEBUG - DefaultHttpParams              - Set parameter
> http.method.retry-handler =
> org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@636e13
> DEBUG - MultiThreadedHttpConnectionManager -
> HttpConnectionManager.getConnection:  config =
> HostConfiguration[host=http://externalhost], timeout = 0
> DEBUG - MultiThreadedHttpConnectionManager - Allocating new connection,
> hostConfig=HostConfiguration[host=http://externalhost]
> DEBUG - HttpConnection                 - Open connection to
> externalhost:80
> DEBUG - header                         - >> "POST
> /webservice/reservation.php HTTP/1.1[\r][\n]"
> DEBUG - HttpMethodBase                 - Adding Host request header
> DEBUG - header                         - >> "xmlvalue: <?xml version="1.0"
> encoding="UTF-8" standalone="yes"?>[\n]"
> DEBUG - header                         - >> "<order version="1"
> state="proposal" orderno="no" id="id" currency="EUR" campaignName="Xpats"
> xmlns="http://namespace.n
> et/crmservice/v1/"><advertiser
>
> id="id"><name>name</name><street1>street</street1><street2></street2><city>Brussel</city><zip>1080</zip><country>Belgium</country><m
> ainphone>0</mainphone><kickbackbound>0.0</kickbackbound><kickbackvalue>0.0
> </kickbackvalue></advertiser><agency
> id="id"><name>name</name><street1>Chauss[0xe9]e de l
> a Hulpe
>
> 189</street1><street2></street2><city>Brussel</city><zip>1170</zip><country>Belgium</country><mainphone>0</mainphone><kickbackbound>
> 0.0</kickbackbound><kickbackvalue>0.0</kickbackvalue></agenc
> y><salesrep
>
> id="id"><name>name</name><usermail>email</usermail></salesrep><comments>comment</comments><lineitems><lineitem
>
> id="id"><adformatid>-1</adformatid><startdate>2008-01-10</startdate><enddate>2008-01
>
> -24</enddate><starttime>00:00:00</starttime><endtime>18:00:00</endtime><exclusive>false</exclusive><totalnet>
> 5758.42</totalnet><nondart>false</nondart></lineitem><lineitem
> id="id
>
> "><adformatid>-1</adformatid><startdate>2008-01-10</startdate><enddate>2008-01-24</enddate><starttime>00:00:00</starttime><endtime>18:00:00</endtime><exclusive>false</exclusive><totalnet>
> 2992.5</total
> net><nondart>false</nondart></lineitem><lineitem
>
> id="id"><adformatid>-1</adformatid><startdate>2008-01-10</startdate><enddate>2008-01-24</enddate><starttime>00:00:00</starttime><
> endtime>18:00:00</endtime><exclusive>false</exclusive><totalnet>141.08
> </totalnet><nondart>false</nondart></lineitem></lineitems></order>[\n]"
> DEBUG - header                         - >> "[\n]"
> DEBUG - header                         - >> "[\r][\n]"
> DEBUG - header                         - >> "id: 2[\r][\n]"
> DEBUG - header                         - >> "loginuseremail:
> someemail[\r][\n]"
> DEBUG - header                         - >> "auth_key:
>
> aw8rth54r6g3rf6723hrt9823j9rs23f6g23789rgt23hfgaisuftgqd254tgdai85[\r][\n]"
> DEBUG - header                         - >> "version: 1[\r][\n]"
> DEBUG - header                         - >> "Content-Type:
> text/xml;charset=UTF-8[\r][\n]"
> DEBUG - header                         - >> "Content-Length: 1913[\r][\n]"
> DEBUG - header                         - >> "User-Agent: Jakarta
> Commons-HttpClient/3.0[\r][\n]"
> DEBUG - header                         - >> "Host: externalhost[\r][\n]"
> DEBUG - header                         - >> "[\r][\n]"
> DEBUG - content                        - >> "<?xml version='1.0'
> encoding='UTF-8'?><order xmlns="http://mycompany/crmservice/v1/"
> campaignName="Xpats" currency="EUR" id="20071119_120608
> _29466093" orderno="no" state="proposal" version="1"><advertiser
> id="id"><name>name</name><street1>street</street1><street2
> /><city>Brussel</city><zip>1080</zi
> p><country>Belgium</country><mainphone>0</mainphone><kickbackbound>0.0
> </kickbackbound><kickbackvalue>0.0</kickbackvalue></advertiser><agency
> id="id"><name>name</na
> me><street1>Chauss[0xe9]e de la Hulpe 189</street1><street2
>
> /><city>Brussel</city><zip>1170</zip><country>Belgium</country><mainphone>0</mainphone><kickbackbound>
> 0.0</kickbackbound><kickbackvalue>0.0<
> /kickbackvalue></agency><salesrep
>
> id="id"><name>name</name><usermail>email</usermail></salesrep><comments>comment</comments><lineitems><lineitem
> id="id"><adformatid>-1</adformatid><startdate>2008-01-10</star
>
> tdate><enddate>2008-01-24</enddate><starttime>00:00:00</starttime><endtime>18:00:00</endtime><exclusive>false</exclusive><totalnet>
> 5758.42</totalnet><nondart>false</nondart></lineitem><lineitem
> id="20
>
> 071119_121933_94202703"><adformatid>-1</adformatid><startdate>2008-01-10</startdate><enddate>2008-01-24</enddate><starttime>00:00:00</starttime><endtime>18:00:00</endtime><exclusive>false</exclusive><
> totalnet>2992.5</totalnet><nondart>false</nondart></lineitem><lineitem
>
> id="id"><adformatid>-1</adformatid><startdate>2008-01-10</startdate><enddate>2008-01-24</enddate><starttime
>
> >00:00:00</starttime><endtime>18:00:00</endtime><exclusive>false</exclusive><totalnet>
> 141.08</totalnet><nondart>false</nondart></lineitem></lineitems></order>"
> DEBUG - EntityEnclosingMethod          - Request body sent
> DEBUG - header                         - << "HTTP/1.1 400 Bad
> Request[\r][\n]"
> DEBUG - header                         - << "Date: Mon, 28 Jan 2008
> 10:17:53
> GMT[\r][\n]"
> DEBUG - header                         - << "Server: Apache/2.2.6
> (Fedora)[\r][\n]"
> DEBUG - header                         - << "Content-Length: 304[\r][\n]"
> DEBUG - header                         - << "Connection: close[\r][\n]"
> DEBUG - header                         - << "Content-Type: text/html;
> charset=iso-8859-1[\r][\n]"
> DEBUG - DeliveryChannelImpl            - Send
> ID:172.17.135.241-117bfe68a1b-5:0 in DeliveryChannel{servicemix-http}
> DEBUG - SedaFlow                       - Called Flow send
> DEBUG - content                        - << "<"
> DEBUG - content                        - << "!"
> DEBUG - content                        - << "D"
> DEBUG - content                        - << "O"
> DEBUG - content                        - << "CTYPE HTML PUBLIC
> "-//IETF//DTD
> HTML 2.0//EN">[\n]"
> DEBUG - content                        - << "<html><head>[\n]"
> DEBUG - content                        - << "<title>400 Bad
> Request</title>[\n]"
> DEBUG - content                        - << "</head><body>[\n]"
> DEBUG - content                        - << "<h1>Bad Request</h1>[\n]"
> DEBUG - content                        - << "<p>Your browser sent a
> request
> that this server could not understand.<br />[\n]"
> DEBUG - content                        - << "</p>[\n]"
> DEBUG - content                        - << "<hr>[\n]"
> DEBUG - content                        - << "<address>Apache/2.2.6
> (Fedora)
> Server at 212.227.34.47 Port 80</address>[\n]"
> DEBUG - content                        - << "</body></html>[\n]"
> [Fatal Error] :1:50: White spaces are required between publicId and
> systemId.
> DEBUG - HttpMethodBase                 - Should close connection in
> response
> to directive: close
> DEBUG - HttpConnection                 - Releasing connection back to
> connection manager.
> DEBUG - MultiThreadedHttpConnectionManager - Freeing connection,
> hostConfig=HostConfiguration[host=http://externalhost]
> DEBUG - IdleConnectionHandler          - Adding connection at:
> 1201515475656
> DEBUG - MultiThreadedHttpConnectionManager - Notifying no-one, there are
> no
> waiting threads
> DEBUG - SedaQueue                      -
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@9ca84f dequeued
> exchange: InOut[
> id: ID:172.17.135.241-117bfe68a1b-5:0
> status: Active
> role: consumer
> service: {http://mycompany/mptbinding/v1/}MPTWebService
> endpoint: MPTWebService
> in: <?xml version="1.0" encoding="UTF-8"?><order
> xmlns="http://mycompany/crmservice/v1/" campaignName="Xpats"
> currency="EUR"
> id="id" orderno="no" state="prop
> osal" version="1"><advertiser
>
> id="id"><name>name</name><street1>street</street1><street2/><city>Brussel</city><zip>1080</zip><country>Belgium</country><mainphone>0
> </mainphone><kickbackbound>0.0</kickbackbound><kickbackvalue>0.0
> </kickbackvalue></advertiser><agency
> id="id"><name>name</name><street1>Chauss[0xe9]e de la Hulpe 18
>
> 9</street1><street2/><city>Brussel</city><zip>1170</zip><country>Belgium</country><mainphone>0</mainphone><kickbackbound>
> 0.0</kickbackbound><kickbackvalue>0.0</kickbackvalue></agency><salesrep
>
> id="id"><name>name</name><usermail>email</usermail></salesrep><comments>comment</comments><lineitems><lineitem
>
> id="id"><adformatid>-1</adformatid><startdate>2008-01-10</startdate><enddate>2008-01-24</enddate><start
>
> time>00:00:00</starttime><endtime>18:00:00</endtime><exclusive>false</exclusive><totalnet>
> 5758.42</totalnet><nondart>false</nondart></lineitem><lineitem
> id="id"><adformatid>-1
>
> <startdate>2008-01-10</startdate><enddate>2008-01-24</enddate><starttime>00:00:00</starttime><en...
> fault: Unable to display: org.xml.sax.SAXParseException: White spaces are
> required between publicId and systemId.
>
>
> I don't have a clue what is the problem.
> --
> View this message in context:
> http://www.nabble.com/Error-by-creating-a-connetion-over-http-provider-service-to-external-php-Service-tp15132807s12049p15132807.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>