SOAP Mashup with Bing search

In this post I’ll create a Mashup with the DataListPanel. Data will be retreived from the Bing search web service. Then I’ll format the result in the list with a datatemplate, a clickable uri and use the the Open event to launch a web page and I show you how to show a clickable Uri. The Open Event is available in Lawson Smart Office 10.0.1.

Prereq: In order to use the Bing search API (for testing) you need to register and get your own application ID as identifier. In my Mashup this ID is replaced with “BingApplicationID”. Register to get your ApplicationID

The final mashup will look like this:

Start by adding the DataListPanel to your mashup. Select Data Service “WS” and press the configure button.

Select the operation you would like to run and save.

Now the configuration looks like this:

Add a search field and hook up the events.

The final result is a list with columns that bind to the data returned from the Web Service.

Use the tool://wstest or the configuration tool in the Designer to investigate what kind of data is returned. I took some time to ficure out what parameters had to be sent to do a simple we search with this web service. There are lots of different ways that you can search.

The Uri is displayed with the following template:

 <DataTemplate x:Key="templateLink">
         <ui:TaskHyperlink Foreground="Black" NavigateUri="{Binding Path=Url}">
             <TextBlock Text="{Binding Path=Url}" />

The ui namespace is defined as: xmlns:ui=”clr-namespace:Mango.UI.Controls;assembly=Mango.UI”. TaskHyperlink is useful when you whant to have links that launch other applications, such as mforms, mashups or web content.

Here is the complete XAML, just remeber to put in your ApplicationID.

<Grid xmlns="" xmlns:x="" xmlns:ui="clr-namespace:Mango.UI.Controls;assembly=Mango.UI" xmlns:mashup="clr-namespace:Mango.UI.Services.Mashup;assembly=Mango.UI">
 <DataTemplate x:Key="templateLink">
            <ui:TaskHyperlink Foreground="Black" NavigateUri="{Binding Path=Url}">
               <TextBlock Text="{Binding Path=Url}" />

    <ColumnDefinition Width="*" />
     <RowDefinition Height="Auto" />
    <RowDefinition Height="*" />
    <RowDefinition Height="Auto" />
    <RowDefinition Height="Auto" />
  <StackPanel Orientation="Horizontal"><TextBlock Text="Bing for:" VerticalAlignment="center" /><TextBox Name="searchText" Width="200" />
  <Button Content="Search" IsDefault="True" Style="{DynamicResource styleButtonPrimaryMashup}">
          <mashup:Event TargetName="searchControl" SourceEventName="Click" TargetEventName="Get">
            <mashup:Parameter TargetKey="parameters.Query" Value="{Binding ElementName=searchText, Path=Text}" />
  <mashup:DataListPanel Grid.Row="1" Name="searchControl">
        <mashup:Event SourceEventName="Open" LinkUri="{Binding SelectedItem.Url, ElementName=ListView}">
      <mashup:DataService Type="WS">
          <mashup:DataOperation Name="Get">
            <mashup:DataParameter Key="WS.Wsdl" Value="" />
            <mashup:DataParameter Key="WS.Address" Value="" />
            <mashup:DataParameter Key="WS.Operation" Value="Search" />
            <mashup:DataParameter Key="WS.Contract" Value="BingPortType" />
            <mashup:DataParameter Key="parameters.Query" Value="Kista" />
<!--You need to register and get your own id on order to run the web service-->
            <mashup:DataParameter Key="parameters.AppId" Value="BingApplicationID" />
            <mashup:DataParameter Key="parameters.Sources." Value="Web" />
    <ListView Name="ListView" Margin="8" ItemsSource="{Binding Web.Results}" Style="{DynamicResource styleListView}" ItemContainerStyle="{DynamicResource styleListViewItem}">
        <GridView ColumnHeaderContainerStyle="{DynamicResource styleGridViewColumnHeader}">
            <GridViewColumn Header="Title" DisplayMemberBinding="{Binding Title}" />
            <GridViewColumn Header="Description" DisplayMemberBinding="{Binding Description}" />
            <GridViewColumn Header="Url" CellTemplate="{StaticResource templateLink}" />

  <ui:StatusBar Name="StatusBar" Grid.Row="2" Grid.Column="0" />


Now, I would probably not have this result in a columned view like this but in a nice list.

3 thoughts on “SOAP Mashup with Bing search

  1. erez

    What I have to do with the mashup is activate two screens:

    1.Source screen
    Source screen Display list of customers by LISTPANEL

    2. Target screen
    Target screen to display data by SQL query with DataListPanel.

    My problem is that I can not make the data display for example:

    I will select a customer from the Source screen and I expect the data to be presented on Target screen in a direct continuation from Source screen.



    I can run both screens but no option of direct contact

    1. erez

      Further to my question

      From Mashup Designer I want to know how to set up parameters so that a specific operation can be performed when we use Web Service in a Mashup.

      I succeed to run the Web Service in a Mashup but fails to define specific parameters on Mashup Designer.

      1. karinpb Post author

        Are you using a template as SOAP input or passing parameters to the DataListPanel?
        Is the event for current item changed configured on the source panel? Do you see the expected source value when turning on the debug window?
        Have you viewed the post here:

        Generally it is impossible to give development support via the blog when it comes to calling web services as they could look very different.

        Use the toos://wstest and check the input parameter names and configure those in the event that will trigger the target call to list the data? If there is no call at all (eg not error) the event from source to target is not triggered and you need to check that.

Comments are closed.