Hi Esteban,

I forget to mention you need add
<cxfbc:outInterceptors>
<bean class="org.apache.cxf.binding.soap.interceptor.SoapActionOutInterceptor"/>
         </cxfbc:outInterceptors>
for your cxf bc provider configuration, this interceptor will
add soapAction according to the wsdl to your message.
Best Regards

Freeman

Esteban Forzani wrote:
Hi, I used ServiceMix-3.2.2-SNAPSHOT also, but don't work, throw it the
following exception:

09-abr-2008 15:54:32 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
java.lang.NullPointerException
        at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source)
        at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source)
        at
org.apache.servicemix.cxfbc.interceptors.JbiInWsdl1Interceptor.handleJBIFault(JbiInWsdl1I
nterceptor.java:220)
        at
org.apache.servicemix.cxfbc.interceptors.JbiInWsdl1Interceptor.handleMessage(JbiInWsdl1In
terceptor.java:142)
        at
org.apache.servicemix.cxfbc.interceptors.JbiInWsdl1Interceptor.handleMessage(JbiInWsdl1In
terceptor.java:60)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
        at
org.apache.servicemix.cxfbc.CxfBcProviderMessageObserver.onMessage(CxfBcProviderMessageOb
server.java:121)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.
java:1976)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1812
)
        at
org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:200)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:4
90)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImp
l.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:167)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)

I used to capture the messages TCPMon  and  I discovered that it are not
send the SOAPAction from the provider to external webservice.
The exception is thrown when trying parse the fault.

The request from the client to ESB is:

    POST /hello/ HTTP/1.1
    Content-Type: text/xml;charset=UTF-8
    SOAPAction: "http://tempuri.org/Operation1";
    User-Agent: Jakarta Commons-HttpClient/3.0.1
    Host: localhost:8082
    Content-Length: 424

    <soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"; xmlns:tem="http://tempuri.org/";>
       <soapenv:Header/>
       <soapenv:Body>
          <tem:Operation1>
             <!--Optional:-->
             <tem:aplicacion>app1</tem:aplicacion>
             <!--Optional:-->
             <tem:usuario>user1</tem:usuario>
          </tem:Operation1>
       </soapenv:Body>
    </soapenv:Envelope>


The request from de ESB is:

    POST /webservices/hello.asmx HTTP/1.1
    Content-Type: text/xml; charset=UTF-8
    Accept: *
    Cache-Control: no-cache
    Pragma: no-cache
    User-Agent: Java/1.5.0_09
    Host: test.intranet:8085
    Connection: keep-alive
    Transfer-Encoding: chunked

    18a
    <soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><tem:Operation1
xmlns:tem="http://tempuri.org/";>

             <tem:aplicacion xmlns:tem="http://tempuri.org/
">app1</tem:aplicacion>

             <tem:usuario xmlns:tem="http://tempuri.org/
">user1</tem:usuario>
          </tem:Operation1></soap:Body></soap:Envelope>
    0

The Response:

    HTTP/1.1 500 Internal Server Error.
    Date: Wed, 09 Apr 2008 18:56:49 GMT
    Server: Microsoft-IIS/6.0
    IISExport: This web site was exported using IIS Export v4.1
    X-Powered-By: ASP.NET
    X-AspNet-Version: 1.1.4322
    Cache-Control: private
    Content-Type: text/xml; charset=utf-8
    Content-Length: 848

    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="
http://www.w3.org/2001/XMLSchema";>
      <soap:Body>
        <soap:Fault>
          <faultcode>soap:Client</faultcode>
          <faultstring>System.Web.Services.Protocols.SoapException: Unable
to handle request without a valid action parameter. Please supply a valid
soap action.
       at
System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
       at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
       at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type
type, HttpContext context, HttpRequest request, HttpResponse response,
Boolean&amp; abortProcessing)</faultstring>
          <detail />
        </soap:Fault>
      </soap:Body>
    </soap:Envelope>


Regards

Esteban

On Wed, Apr 9, 2008 at 1:10 PM, antoniofer <[EMAIL PROTECTED]> wrote:

Yes, as suggested in the thread we are using ServiceMix-3.2.2-SNAPSHOT but
still getting that error :(



gnodet wrote:
Have you tried with 3.2.2-SNAPSHOT ? Lots of issues have been fixed in
the
cxf components afaik.

On Wed, Apr 9, 2008 at 4:32 PM, antoniofer <[EMAIL PROTECTED]>
wrote:
Hi Esteban, Freeman, Guillaume,

I've been following this thread because I was having the same issue
than
Esteban (SoapAction header) when proxying web services through
ServiceMix.
I'm getting an exception when the WS client tries to run the WS by
connecting to ServiceMix:

INFO  - AutoDeploymentService  - Directory: hotdeploy: Finished
installation
of archive:  wsproxy-cxf-sa.zip <- my SA
Apr 9, 2008 4:22:28 PM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
INFO: Interceptor has thrown exception, unwinding now
java.lang.NullPointerException
       at


org.apache.servicemix.cxfbc.CxfBcConsumer$JbiPostInvokerInterceptor.processFaultDetail(CxfBcConsumer.java:560)
       at


org.apache.servicemix.cxfbc.CxfBcConsumer$JbiPostInvokerInterceptor.handleMessage(CxfBcConsumer.java:518)
....etc.

My xbean.xml (gondor2 is the hostname of ServiceMix server and altair
is
the
hostname where the WebService is running) is:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0";
  xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0";
   xmlns:firma="http://currencyconverter.strast.dit.upm.es";>
          <cxfbc:consumer

wsdl="http://altair:8080/CurrencyConverter/services/EURUSD?wsdl";
              service="firma:EURUSDService"
              endpoint="EURUSDProxy"
              targetEndpoint="EURUSD"
              targetService="firma:EURUSDService"
              targetInterface="firma:EURUSDSoapBinding"

locationURI="http://gondor2:8080/CurrencyConverter/services/EURUSD";>
          </cxfbc:consumer>
          <cxfbc:provider

wsdl="http://altair:8080/CurrencyConverter/services/EURUSD?wsdl";

locationURI="http://altair:8080/CurrencyConverter/services/EURUSD";
              service="firma:EURUSDService"
              endpoint="EURUSD"
              interfaceName="firma:EURUSDSoapBinding">
          </cxfbc:provider>
</beans>

I don't know if you need the .wsdl file. I'm not sure if the endpoint,
service and interfaceName configuration is right. Perhaps the problem
is
different. Any suggestions?

Thank you very much!

Antonio


Freeman Fang wrote:
Hi Esteban,

The url is specified in the wsdl, or you can add
locationURI="http://whatyouwant"; to cxf bc consumer to override it.
Regards

Freeman

Esteban Forzani wrote:
OK, thanks Freeman, it worked!  and how can I invoke the consumer
from
a
client? Which is your URL?

Thanks

Regards

Esteban

On Tue, Apr 8, 2008 at 9:43 AM, Freeman Fang <[EMAIL PROTECTED]
wrote:


Hi Esteban,
If you deploy su into a standalone servicemix, you shouldn't
configure
an
embeded jbi bus, so just try

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0";
 xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0";
 xmlns:tempuri="http://tempuri.org/";>
         <cxfbc:consumer
             wsdl="http://test.intranet/webservices/hello.asmx?WSDL
"
             service="tempuri:helloPF"
             endpoint="helloPFPort"
             targetEndpoint="helloPFPortProxy"
             targetService="tempuri:helloPF"
             targetInterface="tempuri:helloPFSoap">
         </cxfbc:consumer>
         <cxfbc:provider
             wsdl="http://test.intranet/webservices/hello.asmx?WSDL
"
locationURI="http://test.intranet/webservices/hello.asmx";
             service="tempuri:helloPF"
             endpoint="helloPFPortProxy"
             interfaceName="tempuri:helloPFSoap">
         </cxfbc:provider>
</beans>

Regards
Freeman


Freeman

Esteban Forzani wrote:


Hi Freeman, my jbi.xml of the SA is:

<?xml version="1.0" encoding="UTF-8"?>
<jbi xmlns="http://java.sun.com/xml/ns/jbi"; version="1.0">
 <service-assembly>
   <identification>
     <name>HelloProxy-sa</name>
     <description>HelloProxy :: SA (Proxy Service)</description>
   </identification>
   <service-unit>
     <identification>
       <name>HelloProxy-cxfbc-su</name>
       <description>Este módulo es el encargado de configurar un
servicio
proxy usando el CXF BC del ESB.</description>
     </identification>
     <target>


 <artifacts-zip>HelloProxy-cxfbc-su-1.0-SNAPSHOT.zip</artifacts-zip>
       <component-name>servicemix-cxf-bc</component-name>
     </target>
   </service-unit>
 </service-assembly>
</jbi>

This is generated by maven when run the install.

Regards

Esteban


On Mon, Apr 7, 2008 at 11:50 AM, Freeman Fang
<[EMAIL PROTECTED]
wrote:




Hi Esteban,

Seems your jbi descriptor  didn't specify servicemix-cxf-bc as
component-name. Would you please append your jbi.xml of the SA?

Freeman


Esteban Forzani wrote:




Hi Freeman,

When I use cxf bc provider an consumer I couldn't deploy the SU
because
throws the following error:
"No endpoints found" in org.apache.servicemix.common
.xbean.AbstractXBeanDeployer

The xbean.xml for the cxf-bc-su is:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0";
  xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0";
  xmlns:tempuri="http://tempuri.org/";>
  <sm:container id="jbi" embedded="true">
      <sm:endpoints>
          <cxfbc:consumer
              wsdl="
http://test.intranet/webservices/hello.asmx?WSDL
"
              service="tempuri:helloPF"
              endpoint="helloPFPort"
              targetEndpoint="helloPFPortProxy"
              targetService="tempuri:helloPF"
              targetInterface="tempuri:helloPFSoap">
          </cxfbc:consumer>
          <cxfbc:provider
              wsdl="
http://test.intranet/webservices/hello.asmx?WSDL
"
              locationURI="
http://test.intranet/webservices/hello.asmx";
              service="tempuri:helloPF"
              endpoint="helloPFPortProxy"
              interfaceName="tempuri:helloPFSoap">
          </cxfbc:provider>
      </sm:endpoints>
  </sm:container>
</beans>

Thanks

Esteban

On Fri, Apr 4, 2008 at 9:58 PM, Freeman Fang <
[EMAIL PROTECTED]
wrote:






Hi Esteban,
They both should work.
For cxf bc consumer and provider, ensure the endpoint name used
in
consumer and provider is different, for example, use
helloPFPortProxy
for
provider in your case. And ensure the service / endpoint for
your
cxf
bc
consumer is same as it defined in the wsdl.
We have a test to show how to configure cxf bc as a bridge, [1]
is
the
configuration for more details.
For cxf bc provider and http consumer, ensure you add
useJBIWrapper="false" for cxf bc provider configuration, this
is
new
feature
([2] is jira to track it) after servicemix 3.2.1 release, so
you
should try
it with 3.2.2 snapshot.

Best Regards

Freeman

[1]



http://svn.apache.org/repos/asf/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/cxf_provider_consumer_bridge.xml
[2]http://issues.apache.org/activemq/browse/SM-1242

Esteban Forzani wrote:






Thanks Freeman and Guillaume, Can I try with cxf bc provider
and
cxf
bc
consumer or http consumer?

I tried both, when I use cxf bc provider an consumer I
couldn't
deploy
the
SU because throws the following error:
"No endpoints found" in
org.apache.servicemix.common.xbean.AbstractXBeanDeployer

 E.g:
the xbean.xml for the cxf-bc-su is:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0";
 xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0";
 xmlns:tempuri="http://tempuri.org/";>
 <sm:container id="jbi" embedded="true">
     <sm:endpoints>
         <cxfbc:consumer
             wsdl="
http://test.intranet/webservices/hello.asmx?WSDL
"
             service="tempuri:helloPF"
             endpoint="helloPFPort"
             targetEndpoint="helloPFPort"
             targetService="tempuri:helloPF"
             targetInterface="tempuri:helloPFSoap">
         </cxfbc:consumer>
         <cxfbc:provider
             wsdl="
http://test.intranet/webservices/hello.asmx?WSDL
"
             locationURI="
http://test.intranet/webservices/hello.asmx";
             service="tempuri:helloPF"
             endpoint="helloPFPort"
             interfaceName="tempuri:helloPFSoap">
         </cxfbc:provider>
     </sm:endpoints>
 </sm:container>
</beans>

When I tried with cxf bc provider and http consumer throw a
NullPointerException in
org.apache.servicemix.cxfbc.CxfBcProvider
becoause
exchange.getOperation() is null!
The xbean.xml for cxf-bc-su is:

<?xml version="1.0" encoding="UTF-8"?>
<beans
 xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0";
 xmlns:tempuri="http://tempuri.org/";>
         <cxfbc:provider
             wsdl="
http://test.intranet/webservices/hellopf.asmx?WSDL";
             locationURI="
http://test.intranet/webservices/hellopf.asmx";
             service="tempuri:helloPF"
             endpoint="helloPFPortProxy"
             interfaceName="tempuri:helloPFSoap"/>
</beans>

The xbean.xml for http-su is:

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns:http="http://servicemix.apache.org/http/1.0";
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
     xsi:schemaLocation="
http://servicemix.apache.org/http/1.0servicemix-http.3.2.xsd";

     xmlns:tempuri="http://tempuri.org/"; >
 <http:endpoint
             service="tempuri:helloPF"
             endpoint="soap"
             role="consumer"
             locationURI="http://0.0.0.0:8192/helloPF/";
             targetEndpoint="helloPFPortProxy"
             targetService="tempuri:helloPF"/>
</beans>

Thanks

Esteban


On Tue, Apr 1, 2008 at 3:30 AM, Freeman Fang <
[EMAIL PROTECTED]
         wrote:








Hi Esteban,

You can try with cxf bc provider, which needn't specify soap
action
explicitly in the xbean and abstract it dynamically from the
message.

Regards

Freeman




Esteban Forzani wrote:








Hello,

I have a web service with 5 operations, each with a
different
SOAPAction.
I'm using the servicemix-http component (proxy) to send a
soap
request
to
this webservice.
E.g.:

 <http:endpoint
service="WebServicesProxy-http-su:webServices"
             endpoint="providerEndpoint"
             role="provider"
             locationURI="
http://test.example/webservices/webservices.asmx";
             defaultMep="
http://www.w3.org/2004/08/wsdl/in-out";
             soap="true"
             soapVersion="1.1"/>

The request is send to the ESB with the SOAPAction (E.g.
SOAPAction:
operation1)
 but the HTTP-BC set the SOAPAction with "".

I used the property soapAction in xbean.xml, but fixed me
the
operation
to
the endpoint.
E.g.:
 <http:endpoint
service="WebServicesProxy-http-su:webServices"
             endpoint="providerEndpoint"
             role="provider"
             locationURI="
http://test.example/webservices/webservices.asmx";
             defaultMep="
http://www.w3.org/2004/08/wsdl/in-out";
             soap="true"
             soapVersion="1.1"
             soapAction="http://example.org/operation1"/>

Is it possible to put this property dynamically or take it
from
the
client's
request ?

Regards,

Esteban















--
View this message in context:

http://www.nabble.com/Take-SOAPAction-from-client%27s-request-tp16407528p16586203.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/Take-SOAPAction-from-client%27s-request-tp16407528p16589559.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.




Reply via email to