You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by komal bhola <ko...@gmail.com> on 2014/04/24 11:49:53 UTC

Handling soap request in http endpoint ? possible?

Hi ,

Currently I am using cxf endpoint to listen to soap requests. Actually I
want to use http endpoint only to listen to soap requests. I need to provide
different services on only 1 URL. So I want soap method name to be populated
in camel headers, based on which I can call different different services.
Please suggest a way out if any one has already tried this. 

Thanks 




--
View this message in context: http://camel.465427.n5.nabble.com/Handling-soap-request-in-http-endpoint-possible-tp5750524.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Handling soap request in http endpoint ? possible?

Posted by Willem Jiang <wi...@gmail.com>.
If you want to know the soap invocation name, you need to use camel-cxf POJO data formate.
In this way, camel cxf can help you find out the operation name which the SOAP request can be mapped.

I don’t this camel-http (or camel-servlet) component can do that job for you.

--  
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 24, 2014 at 6:02:54 PM, komal bhola (komalbhola@gmail.com) wrote:
> Hi ,
>  
> Currently I am using cxf endpoint to listen to soap requests. Actually I
> want to use http endpoint only to listen to soap requests. I need to provide
> different services on only 1 URL. So I want soap method name to be populated
> in camel headers, based on which I can call different different services.
> Please suggest a way out if any one has already tried this.
>  
> Thanks
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Handling-soap-request-in-http-endpoint-possible-tp5750524.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  


Re: Handling soap request in http endpoint ? possible?

Posted by Aki Yoshida <el...@gmail.com>.
I don't know what you mean by the soap method name. the soap action
header should be in the camel headers.
the operation name (i.e., the operations defined in the wsdl) is not
available, unless you use an endpoint that has the operation meta info
(e.g., a wsdl or a generated jaxws service class) that can determine
the operation based on the request message.

But going back to the beginning, I don't know what motivates you to
switch to camel-http to handle soap invocations.
If there is no particular reason except that you want to handle
arbitrary soap messages (e.g., payload types), you can just expose a
provider based service or use the default generic provider based
service that can take any soap requests. When using the generic
provider, you get the flexibility of taking arbitrary request messages
while using some specific web service features or error handling. Its
limitation is that you cannot determine the operation name as you are
not using the meta data.

regards, aki


2014-04-24 11:49 GMT+02:00 komal bhola <ko...@gmail.com>:
> Hi ,
>
> Currently I am using cxf endpoint to listen to soap requests. Actually I
> want to use http endpoint only to listen to soap requests. I need to provide
> different services on only 1 URL. So I want soap method name to be populated
> in camel headers, based on which I can call different different services.
> Please suggest a way out if any one has already tried this.
>
> Thanks
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Handling-soap-request-in-http-endpoint-possible-tp5750524.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Handling soap request in http endpoint ? possible?

Posted by komal bhola <ko...@gmail.com>.
Hi 

I am still facing issue please help!! 

What i want to do is something like this --> 

<route id="volt-soap-in">
		<from
uri="jetty:http://0.0.0.0:6062/volt/SchedulingEngineWeb/services/CallSubscription?sessionSupport=true&amp;enableJmx=true&amp;enableTrace=true"
id="soap">
            <description>This endpoint receives soap requests from any web
server.</description>
        </from>
        <camel:setHeader headerName="feId">
    		<camel:constant>WEB</camel:constant>
    	</camel:setHeader>
    	
    	<bean method="clearLogDetails" ref="serviceProcessor"/>
    	
        <bean method="validateIncomingHeaders" ref="glUssdAdapter"/>
        <bean method="adaptIncomingHeaders" ref="glUssdAdapter"/>
        <bean method="adaptIncomingBody" ref="glUssdAdapter"/>
        
        <to uri="direct:glmain"/>
        <to uri="direct:ussd-out"/>
    </route>


Suppose if soap request is like below then i should set my operation code as
"handle New Subscription"

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sub="http://SubscriptionEngine.ibm.com">
   <soapenv:Header>
	<username>SMART_API</username>
	<password>SMART_API</password>
   </soapenv:Header>
   <soapenv:Body>
      *<sub:handleNewSubscription>*
        <custAttributesDTO>
		<cpId>123</cpId>
		<cpPwd>abc</cpPwd>
		<msisdn>9999999999</msisdn>
		<channelName>WAP</channelName> 
          <productId>111</productId> 
		<cpName>abc</cpName> 
		<aocMsg1>1</aocMsg1>  
		<aocMsg2>1</aocMsg2>
		<firstConfirmationDTTM>2011-10-27T16:02:11.389Z</firstConfirmationDTTM>
		<secondConfirmationDTTM>2011-10-27T16:02:11.389Z</secondConfirmationDTTM> 
        <helloTunesDTO xsi:nil="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><custAssProdList
xsi:nil="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><recordCount
xsi:nil="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><subscriptionPackDTO
xsi:nil="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/></custAttributesDTO>
      </sub:handleNewSubscription>
   </soapenv:Body>
</soapenv:Envelope>


Basically i do not want to use a cxf endpoint for soap requests. I want http
endpoint itself. Also based on soap request my operation code should change
dynamically. 


Please suggest.


Thanks



--
View this message in context: http://camel.465427.n5.nabble.com/Handling-soap-request-in-http-endpoint-possible-tp5750524p5750709.html
Sent from the Camel - Users mailing list archive at Nabble.com.