FAQ
Hello,
I have proxied real web service by defining proxy. I am tracing messages via
camel's tracer and writing to database and after that presenting on the web
application. The XML Request and Responses are quite long and i wanted to
make them smaller by setting dataFormat=PAYLOAD at CXF endpoint but when i
change this dataFormat=MESSAGE to dataFormat=PAYLOAD, i got this exception :
HTTP operation failed invoking http://localhost:9082/webservices/payment
with statusCode: 500
What is wrong with the configuration? Could you please help?
Here is my endpoint configuration:

  <cxf:cxfEndpoint id="reportIncident"

address="http://localhost:${proxy.port}/gadget-ws-proxy/webservices/payment"
   endpointName="s:PaymentEndpoint" serviceName="s:PaymentEndpointService"
   wsdlURL="etc/wsdl/report_incident.wsdl" xmlns:s="http://gadget.com" />

  <bean id="realWebService" class="com.gadget.ws.proxy.RealWebServiceBean"
   init-method="start" destroy-method="stop">

   <property name="url"
    value="http://localhost:${real.port}/webservices/payment" />
  </bean>

<camelContext>

   <endpoint id="callRealWebService"
    uri="http://localhost:${real.port}/webservices/payment" />

   <route>
    <from uri="cxf:bean:reportIncident?dataFormat=PAYLOAD" />

    <to uri="log:input" />
    <removeHeaders pattern="CamelHttp*" />

    <to ref="callRealWebService" />

    <to uri="log:output" />
   </route>

</camelContext>

Thanks in advance.
Best regards.
Ercan



--
View this message in context: http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Search Discussions

  • Willem Jiang at Apr 21, 2015 at 8:42 am
    If you change the data format of the cxf endpoint, you can not just redirect the input stream to a http endpoint, as the PAYLOAD message doesn’t has the soap envelope.

    --
    Willem Jiang

    Red Hat, Inc.
    Web: http://www.redhat.com
    Blog: http://willemjiang.blogspot.com (English)
    http://jnn.iteye.com (Chinese)
    Twitter: willemjiang
    Weibo: 姜宁willem


    On April 21, 2015 at 12:42:41 PM, ercan.canlier (ercan.canlier@gmail.com) wrote:
    Hello,
    I have proxied real web service by defining proxy. I am tracing messages via
    camel's tracer and writing to database and after that presenting on the web
    application. The XML Request and Responses are quite long and i wanted to
    make them smaller by setting dataFormat=PAYLOAD at CXF endpoint but when i
    change this dataFormat=MESSAGE to dataFormat=PAYLOAD, i got this exception :
    HTTP operation failed invoking http://localhost:9082/webservices/payment
    with statusCode: 500
    What is wrong with the configuration? Could you please help?
    Here is my endpoint configuration:
    address="http://localhost:${proxy.port}/gadget-ws-proxy/webservices/payment"
    endpointName="s:PaymentEndpoint" serviceName="s:PaymentEndpointService"
    wsdlURL="etc/wsdl/report_incident.wsdl" xmlns:s="http://gadget.com" />
    init-method="start" destroy-method="stop">
    value="http://localhost:${real.port}/webservices/payment" />


    uri="http://localhost:${real.port}/webservices/payment" />













    Thanks in advance.
    Best regards.
    Ercan



    --
    View this message in context: http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Ercan.canlier at Apr 21, 2015 at 10:42 am
    Hi Jiang,
    First of all, thanks for your interest.
    Could you please give me some hints about it?
    How can i show only soap body also at response?
    Or how should i redirect the request with PAYLOAD mode?
    Thanks.
    Ercan



    --
    View this message in context: http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085p5766092.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Contactreji at Apr 21, 2015 at 4:38 pm
    Ercan

    Why are you using a separate implementation for invoking real target service
    as

         <bean id="realWebService" class="com.gadget.ws.proxy.RealWebServiceBean"
                     init-method="start" destroy-method="stop">

                     <property name=&quot;url&quot;
                             value=&quot;&lt;a
    href=&quot;http://localhost:$&quot;>http://localhost:${real.port}/webservices/payment"
    />
             </bean>

    I would advice on using the CXF framwork itself. It will take care of all
    low level stuffs. And I feel nervous seeing the statement <removeHeaders
    pattern="CamelHttp*" /> . You sure u want that to be there?

    Http 500 says internal error. As Jiang mentioned, maybe your soap envelop is
    missing and you might be sending only the soap body contents. Hence, try
    wrapping up your payload with soap envelop and give a try.

    Cheers
    Reji




    -----
    Reji Mathews
    Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel & Jboss Fuse ESB | Mule ESB )
    LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
    Twitter - reji_mathews
    --
    View this message in context: http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085p5766116.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Ercan.canlier at Apr 22, 2015 at 4:32 am
    Reji,
    I followed the report incident tutorial and that was the reason. I also
    thought to redesign this by using cxf endpoints. After i faced with the
    mentioned error, İ thought that was better idea. Additionally, this will
    bring me possibility to use placeholders for this endpoint declaration as
    well so i might generate cxf web services automatically. Thank you both,
    this hints reminded me for the design review and saved my hours.
    Best regards
    Ercan

    21 Nisan 2015 Salı tarihinde, contactreji [via Camel] <
    ml-node+s465427n5766116h82@n5.nabble.com> yazdı:
    Ercan

    Why are you using a separate implementation for invoking real target
    service as

    <bean id="realWebService"
    class="com.gadget.ws.proxy.RealWebServiceBean"
    init-method="start" destroy-method="stop">

    <property name="url"
    value="<a href="<a href="http://localhost:
    $&quot;">http://localhost:$"><a href="http://localhost:
    $">http://localhost:${real.port}/webservices/payment" />
    </bean>

    I would advice on using the CXF framwork itself. It will take care of all
    low level stuffs. And I feel nervous seeing the statement <removeHeaders
    pattern="CamelHttp*" /> . You sure u want that to be there?

    Http 500 says internal error. As Jiang mentioned, maybe your soap envelop
    is missing and you might be sending only the soap body contents. Hence, try
    wrapping up your payload with soap envelop and give a try.

    Cheers
    Reji
    Reji Mathews
    Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel
    & Jboss Fuse ESB | Mule ESB )
    LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
    Twitter - reji_mathews


    ------------------------------
    If you reply to this email, your message will be added to the discussion
    below:

    http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085p5766116.html
    To unsubscribe from HTTP operation failed invoking statusCode: 500, click
    here
    <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5766085&code=ZXJjYW4uY2FubGllckBnbWFpbC5jb218NTc2NjA4NXwxNjM0MzU3MDUy>
    .
    NAML
    <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

    --
    Ercan CANLIER




    --
    View this message in context: http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085p5766121.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Willem Jiang at Apr 23, 2015 at 5:36 am
    PAYLOAD message body just have the SOAP headers and SOAP body messages.
    If you want to send out the PAYLOAD message to a real web service endpoint, you need to use camel cxf endpoint to do it as it will put the message body into a soap envelope.

    --
    Willem Jiang

    Red Hat, Inc.
    Web: http://www.redhat.com
    Blog: http://willemjiang.blogspot.com (English)
    http://jnn.iteye.com (Chinese)
    Twitter: willemjiang
    Weibo: 姜宁willem


    On April 21, 2015 at 6:42:06 PM, ercan.canlier (ercan.canlier@gmail.com) wrote:
    Hi Jiang,
    First of all, thanks for your interest.
    Could you please give me some hints about it?
    How can i show only soap body also at response?
    Or how should i redirect the request with PAYLOAD mode?
    Thanks.
    Ercan



    --
    View this message in context: http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085p5766092.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Ercan.canlier at Apr 23, 2015 at 6:54 am
    Actually, i am trying with cxf endpoint but the real backend is not
    accessible and got connetion refused exception since it is not accessible
    via telnet as well. All the properties are same whereas ports are
    different. Is there any special property that i should set? I followed Fuse
    documentation as there is a topic proxy by payload but didnt work...

    23 Nisan 2015 Perşembe tarihinde, Willem.Jiang [via Camel] <
    ml-node+s465427n5766183h59@n5.nabble.com> yazdı:
    PAYLOAD message body just have the SOAP headers and SOAP body messages.
    If you want to send out the PAYLOAD message to a real web service
    endpoint, you need to use camel cxf endpoint to do it as it will put the
    message body into a soap envelope.

    --
    Willem Jiang

    Red Hat, Inc.
    Web: http://www.redhat.com
    Blog: http://willemjiang.blogspot.com (English)
    http://jnn.iteye.com (Chinese)
    Twitter: willemjiang
    Weibo: 姜宁willem



    On April 21, 2015 at 6:42:06 PM, ercan.canlier ([hidden email]
    <http:///user/SendEmail.jtp?type=node&node=5766183&i=0>) wrote:
    Hi Jiang,
    First of all, thanks for your interest.
    Could you please give me some hints about it?
    How can i show only soap body also at response?
    Or how should i redirect the request with PAYLOAD mode?
    Thanks.
    Ercan



    --
    View this message in context:
    http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085p5766092.html
    Sent from the Camel - Users mailing list archive at Nabble.com.


    ------------------------------
    If you reply to this email, your message will be added to the discussion
    below:

    http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085p5766183.html
    To unsubscribe from HTTP operation failed invoking statusCode: 500, click
    here
    <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5766085&code=ZXJjYW4uY2FubGllckBnbWFpbC5jb218NTc2NjA4NXwxNjM0MzU3MDUy>
    .
    NAML
    <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

    --
    Ercan CANLIER




    --
    View this message in context: http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085p5766184.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Ercan.canlier at Apr 27, 2015 at 8:45 am
    Hi,
    I try to proxy via payload but unfortunately, real web service can not be
    reachable. When i telnet to real web service port, i get connection refused
    exception that means it is not running at the specified port.
    What might be the reason? I don't see any mistake here. By following the
    below configuration, i can see the request but can't get the response?

    <cxf:cxfEndpoint id=&quot;paymentProxyService&quot;
                     address=&quot;&lt;a
    href=&quot;http://localhost:$&quot;>http://localhost:${proxy.port}/webservices/payment"
                     endpointName="s:PaymentEndpoint"
    serviceName="s:PaymentEndpointService"
                     wsdlURL="etc/wsdl/payment.wsdl" xmlns:s="http://gadget.com"
    />

    <cxf:cxfEndpoint id=&quot;paymentRealService&quot;
                     address=&quot;&lt;a
    href=&quot;http://localhost:$&quot;>http://localhost:${real.port}/webservices/payment"
                     endpointName="s:PaymentEndpoint"
    serviceName="s:PaymentEndpointService"
                     wsdlURL="etc/wsdl/payment.wsdl" xmlns:s="http://gadget.com"
    />

    <route>
                             <from
    uri="cxf:bean:paymentProxyService?dataFormat=PAYLOAD" />
                             <to uri="log:input" />
                             <to
    uri="cxf:bean:paymentRealService?dataFormat=PAYLOAD" />
                             <to uri="log:output" />
    </route>

    Best regards.
    Thanks.
    Ercan



    --
    View this message in context: http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085p5766377.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Ercan.canlier at Apr 30, 2015 at 7:12 am
    Hi,
    Could you please propose me a working example for message format= PAYLOAD?
    I implement the app in the same way but real web service does not work.
    Thanks
    Best regards.
    Ercan



    --
    View this message in context: http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085p5766544.html
    Sent from the Camel - Users mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedApr 21, '15 at 4:42a
activeApr 30, '15 at 7:12a
posts9
users3
websitecamel.apache.org

People

Translate

site design / logo © 2018 Grokbase