Hi Flavio,

You'd be calling an ESB configuration using your Java client. The
configuration is what would be calling the actual connector.

e.g. in your ESB proxy, you'd have something like this:

<inSequence>
<property name="myParameter" expression="//myParameter/text()" />
<connector.method>
<myParameter>{$ctx:myParameter}</myParameter>
</connector.method>
<respond />
</inSequence>

The above is an example of calling the ESB configuration with an XML
payload (note the XPath expression to extract the value from the message
context, and then pass it to the connector method).

You can write your Java Client in whichever way you prefer based on how you
write your ESB Configuration to call the particular connector. You could
accomplish this through a JSON, XML, or SOAP-based payload.

Thanks.



On Wed, Jul 30, 2014 at 11:00 AM, Flavio Pompermaier [via WSO2 Oxygen Tank]
<ml-node+s10903n100582...@n7.nabble.com> wrote:

>
> I still don't understand how to call the connector and specify the
> parameters from my webapp.
> Do I have to use axis? can you show me a snippet of Java code please?
>
> Thanks for the support Malaga!
>
> On Wed, Jul 30, 2014 at 7:18 AM, Malaka Silva <[hidden email]
> <http://user/SendEmail.jtp?type=node&node=100582&i=0>> wrote:
>
>> You can dynamically extract message context and pass as parameters to
>> the connectors.
>>
>> XML you mentioned is more likely the esb configuration. But the
>> parameters can he hard-coded or dynamic.
>>
>> Following article gives some more details of how to use it.
>>
>>
>> http://wso2.com/library/articles/2013/12/esb-connectors-in-action-enterprise-integration/
>>
>>
>> On Wed, Jul 30, 2014 at 10:20 AM, Flavio Pompermaier <[hidden email]
>> <http://user/SendEmail.jtp?type=node&node=100582&i=1>> wrote:
>>
>>> What is not clear is how to pass those parameters: from documentation it
>>> seems that I have to put an xml in the esb server but it does not make
>>> sense, it's something I want to create at runtime.
>>> Or is it a parameter I pass with the ws message context?
>>>
>>>
>>> On Wed, Jul 30, 2014 at 6:05 AM, Malaka Silva <[hidden email]
>>> <http://user/SendEmail.jtp?type=node&node=100582&i=2>> wrote:
>>>
>>>> Hi Flavio,
>>>>
>>>> You can create your api (application API) whatever the way you prefer.
>>>>
>>>> Inside these apis you can use connectors. The advantage of using
>>>> connectors is you can simple call methods in these connectors with given
>>>> parameters.
>>>>
>>>> All the complexities and domain specific requirements when calling
>>>> third-party APIs are encapsulated inside connectors.
>>>>
>>>> eg:
>>>>
>>>> User can simple use the following config to search.
>>>>
>>>> <twitter.search>
>>>>         <search>xxx</search>
>>>>         <geocode>40.71435,-74.00597</geocode>
>>>>         <radius>10</radius>
>>>>         <unit>mi</unit>
>>>>  </twitter.search>
>>>>
>>>> More connectors are in the pipeline and will be released in parallel
>>>> with esb 4.9.0 release.
>>>>
>>>> More information can be found with following links.
>>>>
>>>> [1] https://docs.wso2.com/display/ESB481/Working+with+Connectors
>>>> [2] https://docs.wso2.com/display/ESB481/ESB+Connectors
>>>>
>>>> Best Regards,
>>>> Malaka
>>>>
>>>>
>>>> On Wed, Jul 30, 2014 at 5:26 AM, Flavio Pompermaier <[hidden email]
>>>> <http://user/SendEmail.jtp?type=node&node=100582&i=3>> wrote:
>>>>
>>>>> Hi to all,
>>>>> I'm new to wso2. I found ESB connectors for social media like twitter
>>>>> and Facebook.
>>>>> What is the right way to connect Facebook API with my application API?
>>>>> For example, if I have to retrieve the user details, should my app
>>>>> wrap the call to the esb or not?
>>>>> If I use the API manager, should I publish only my webapp APIs or the
>>>>> Facebook APIs or the esb APIs or whatever...? do I need to register a
>>>>> identity provider? This is not really clear to me..
>>>>>
>>>>> Thanks in advance,
>>>>> FP
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> [hidden email] <http://user/SendEmail.jtp?type=node&node=100582&i=4>
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Best Regards,
>>>>
>>>> Malaka Silva
>>>> Senior Tech Lead
>>>> M: <a href="tel:%2B94%20777%20219%20791" target="_blank" value="
>>>> +94777219791">+94 777 219 791
>>>> Tel : 94 11 214 5345
>>>> Fax :<a href="tel:94%2011%C2%A02145300" target="_blank" value="
>>>> +94112145300">94 11 2145300
>>>> Skype : malaka.sampath.silva
>>>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>>>> Blog : http://mrmalakasilva.blogspot.com/
>>>>
>>>> WSO2, Inc.
>>>> lean . enterprise . middleware
>>>> http://www.wso2.com/
>>>> http://www.wso2.com/about/team/malaka-silva/
>>>> <http://wso2.com/about/team/malaka-silva/>
>>>>
>>>> Save a tree -Conserve nature & Save the world for your future. Print
>>>> this email only if it is absolutely necessary.
>>>>
>>>
>>
>>
>> --
>>
>> Best Regards,
>>
>> Malaka Silva
>> Senior Tech Lead
>> M: <a href="tel:%2B94%20777%20219%20791" target="_blank" value="
>> +94777219791">+94 777 219 791
>> Tel : 94 11 214 5345
>> Fax :94 11 2145300
>> Skype : malaka.sampath.silva
>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>> Blog : http://mrmalakasilva.blogspot.com/
>>
>> WSO2, Inc.
>> lean . enterprise . middleware
>> http://www.wso2.com/
>> http://www.wso2.com/about/team/malaka-silva/
>> <http://wso2.com/about/team/malaka-silva/>
>>
>> Save a tree -Conserve nature & Save the world for your future. Print this
>> email only if it is absolutely necessary.
>>
>
> _______________________________________________
> Dev mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=100582&i=5>
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://wso2-oxygen-tank.10903.n7.nabble.com/Dev-Esb-connector-and-authentication-tp100558p100582.html
>  To start a new topic under WSO2 Development, email
> ml-node+s10903n3...@n7.nabble.com
> To unsubscribe from WSO2 Development, click here
> <http://wso2-oxygen-tank.10903.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3&code=cmFzYWRlODhAZ21haWwuY29tfDN8LTEwNDAzODU2MTk=>
> .
> NAML
> <http://wso2-oxygen-tank.10903.n7.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>
>



-- 
Au revoir!
Ramindu Deshapriya.

Member - Sahana Software Foundation http://sahanafoundation.org
http://rdeshapriya.com

<http://www.facebook.com/rdeshapriya>   <http://twitter.com/#%21/rami_desh>
<https://plus.google.com/113801459480978566130>
<http://www.linkedin.com/profile/view?id=84017607&trk=tab_pro>
<http://rdeshapriya.com>   <http://lmakuthan.blogspot.com>




--
View this message in context: 
http://wso2-oxygen-tank.10903.n7.nabble.com/Dev-Esb-connector-and-authentication-tp100558p100583.html
Sent from the WSO2 Development mailing list archive at Nabble.com.
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to