<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>web-service &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/web-service/</link>
	<description>Feed of posts on WordPress.com tagged "web-service"</description>
	<pubDate>Sat, 28 Nov 2009 09:35:36 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[We Promote Your Business to Global World for Free!]]></title>
<link>http://edrictj.wordpress.com/2009/11/27/we-promote-your-business-to-global-world-for-free/</link>
<pubDate>Fri, 27 Nov 2009 11:14:49 +0000</pubDate>
<dc:creator>edrictj</dc:creator>
<guid>http://edrictj.wordpress.com/2009/11/27/we-promote-your-business-to-global-world-for-free/</guid>
<description><![CDATA[&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; I believe that many of U thinking it&#8217;s a joke. Don]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://edric-online.com/content/we-promote-your-business-global-world-free"><img class="alignleft" title="Free website from EdRic Hosting" src="http://edric-online.com/images/world%20in%20black%20and%20white%20hands.jpg" alt="" width="173" height="215" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>I believe that many of U thinking it&#8217;s a joke. Don&#8217;t U? If yes. I agree with ur own opinion because nothing free in the business because it&#8217;s related to cost. But maybe we have a different perception only about that. And the real answer is<strong> Yes, We promoting your business for free to global world. </strong><strong>Click this link to read more about </strong> <a href="http://edric-online.com/content/we-promote-your-business-global-world-free">We Promote Your Business to Global World for Free!</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Google Navigator]]></title>
<link>http://janusnetworks.wordpress.com/2009/11/18/google-navigator/</link>
<pubDate>Wed, 18 Nov 2009 18:24:05 +0000</pubDate>
<dc:creator>janusnetworks</dc:creator>
<guid>http://janusnetworks.wordpress.com/2009/11/18/google-navigator/</guid>
<description><![CDATA[By Mielle Sullivan, Janus Networks Google has released what promises to be fierce competition to old]]></description>
<content:encoded><![CDATA[By Mielle Sullivan, Janus Networks Google has released what promises to be fierce competition to old]]></content:encoded>
</item>
<item>
<title><![CDATA[Windows Communication Foundation]]></title>
<link>http://viralsarvaiya.wordpress.com/2009/11/18/windows-communication-foundation/</link>
<pubDate>Wed, 18 Nov 2009 11:54:28 +0000</pubDate>
<dc:creator>viralsarvaiya</dc:creator>
<guid>http://viralsarvaiya.wordpress.com/2009/11/18/windows-communication-foundation/</guid>
<description><![CDATA[Windows Communication Foundation (WCF) is the latest service execution environment from Microsoft th]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Windows Communication Foundation (WCF) is the latest service execution environment from Microsoft that enables you to seamlessly expose CLR types as services and consume services as CLR types. WCF is a unified programming model that combines the best of breed features from XML Web Services, .NET Remoting, MSMQ, and COM+ into an integrated platform that is completely based on a set of open industry standards. Because of that, WCF provides interoperability between services, and it promotes productivity, including the essential off-the-shelf plumbing required by almost any application. This article series will discuss the essential building blocks of WCF describing the concepts and architecture of WCF. The first installment focuses on the basics of WCF by introducing you to the WCF through simple examples and discussion. The future installments will go into more specific features of WCF such as transactions, security, instance management techniques and so on.</p>
<p><strong>Prerequisites</strong></p>
<ul>
<li>Visual Studio 2005 Professional Edition</li>
<li>Microsoft Pre-Release Software Microsoft .NET Framework 3.0 &#8211; Release Candidate</li>
<li>Microsoft Visual Studio Code Name &#8220;Orcas&#8221; Community Technology Preview &#8211; Development Tools for .NET Framework 3.0</li>
<li>Microsoft® Windows® Software Development Kit for RC 1</li>
</ul>
<p><strong>Introduction to WCF</strong></p>
<p>WCF is a set of .NET Framework-based technologies for building and running services. WCF is the next step in the evolutionary path that started with COM, COM+, and MSMQ, and continues through .NET Remoting, ASMX, System.Messaging, and .NET Enterprise Services. WCF combines these technologies and offers a unified programming model for developing services using any CLR-compliant language. The below screenshot provides a conceptual representation of the different components that make up the WCF architecture.</p>
<p><img src="http://www.15seconds.com/graphics/issue/061130_01.gif" border="0" alt="" /></p>
<p>As you can see from the above, the major subsystems of WCF are the Service model, the connector framework, hosting environments, and system and messaging services. The WCF service model makes service-oriented development explicit and simple from any CLR-targeted language. You use declarative attributes to mark up which aspects of their type should form the external contract of a service. The service model supports different types of contracts including service contracts, operation contracts and so on, which will be discussed later in this article. The service model also provides instance and context management for a service. WCF routes incoming messages to instances of user-defined service types. As a developer, you can leverage the declarative attributes to control how instances are associated with incoming messages as well as how the session management features of Indigo routes multiple messages to a common session object. Finally, the service model provides declarative behaviors that automate security and reliability. All of the above functionalities of service model are contained in the System.ServiceModel namespace.</p>
<p><strong>Key Components of a WCF Service</strong></p>
<p>A WCF service program contains four elements:</p>
<ul>
<li>Contract definitions &#8211; A service must have at least one service contract, and it might contain multiple service contracts, data contracts, or message contracts</li>
<li>Endpoint definitions &#8211; One or more address-binding-contract endpoints must be declared</li>
<li>Hosting code &#8211; Some code is needed to create and start the service</li>
<li>Implementation code &#8211; The service contracts in a service need code to implement their service operations</li>
</ul>
<p>Let us look at each of these components in detail.</p>
<p><strong>Understanding Contracts</strong></p>
<p>Contracts are one of the fundamental concepts in WCF. They allow clients and services to have a common understanding of available operations, data structures, and message structures while remaining loosely coupled and platform independent. WCF includes four kinds of contracts:</p>
<ul>
<li>Service contract &#8211; Describes the operations a service can perform. A service contract is defined with the [ServiceContract] and [OperationContract] attributes. Binding requirements can be specified for the contract with a [BindingRequirements] attribute.</li>
<li>Data contract &#8211; Describes a data structure. A data contract is defined primarily with the [DataContract] and [DataMember] attributes.</li>
<li>Message contract &#8211; Defines what goes where in a message. A message contract is defined primarily with the [MessageContract], [MessageBodyMember], and [MessageHeader] attributes.</li>
<li>Fault contract &#8211; Allows you to document the errors that WCF code is likely to produce. A fault contract is specified along with the operation contract at the time of declaring the method. A fault contract is defined using the [FaultContract] attribute.</li>
</ul>
<p>All four types of contracts translate between Microsoft .NET types used internally and the XML representations shared externally:</p>
<ul>
<li>A service contract converts between the CLR and Web Services Description Language (WSDL)</li>
<li>A data contract converts between the CLR and XML Schema Definition (XSD)</li>
<li>A message contract converts between the CLR and Simple Object Access Protocol (SOAP)</li>
<li>A fault contract converts the CLR exceptions and to SOAP faults</li>
</ul>
<p>You define contracts by using familiar object-oriented constructs: interfaces and classes. By decorating interfaces and classes with attributes, you create contracts.</p>
<p><strong>Understanding Service Contracts</strong></p>
<p>A service contract describes the operations a service can perform. A service must have at least one service contract, and it can have more than one. You can think of a service contract as follows:</p>
<ul>
<li>It describes the client-callable operations (functions) exposed by the service</li>
<li>It maps the interface and methods of your service to a platform-independent description</li>
<li>It describes message exchange patterns that the service can have with another party. Some service operations might be one-way; others might require a request-reply pattern</li>
<li>It is analogous to the &#60;portType&#62; element in WSDL</li>
</ul>
<p>You define a service contract by annotating an interface (or class) with the [ServiceContract] attribute. You identify service operations by placing [OperationContract] attributes on the methods of the interface. The following service contract defines only one service operation.</p>
<p><code> [ServiceContract]<br />
public interface IHelloWorldService<br />
{<br />
[OperationContract]<br />
string HelloWorld (string input);<br />
} </code></p>
<p>Once you define a service contract using an interface, you can write a class to implement the interface. For example:</p>
<p><code> public class HelloWorldService : IHelloWorldService<br />
{<br />
public string HelloWorld(string input)<br />
{<br />
return "Hello " + input;<br />
}<br />
} </code></p>
<p>It is also possible for you to define the service contract directly against the implementation class and skip the interface altogether. The following class both defines and implements a service contract.</p>
<p><code> [ServiceContract]<br />
public class HelloWorldService<br />
{<br />
[OperationContract]<br />
public string HelloWorld(string input)<br />
{<br />
return "Hello " + input;<br />
}<br />
} </code></p>
<p>Although this approach works, it is not a recommended way to create services as interfaces allow you to separate the implementation from the definition of a service.</p>
<p><strong>Understanding Endpoints</strong></p>
<p>Services expose one or more endpoints where messages can be sent. Each endpoint consists of an address, a binding, and a contract. The address specifies where to send messages. The binding describes how to send messages. And the contract describes what the messages contain. Clients need to know this information before they can access a service. The below picture demonstrates how the components of end point play a key role in communication between a client and a service.</p>
<p><img src="http://www.15seconds.com/graphics/issue/061130_02.gif" border="0" alt="" /></p>
<p>Services can package up endpoint descriptions to share with clients, typically by using Web Services Description Language (WSDL). Then clients can use the provided service description to generate code within their environment capable of sending and receiving the proper messages .</p>
<p>One of the key components of an end point is bindings, which will be the topic of focus in the next section.</p>
<p><strong>Understanding Bindings</strong></p>
<p>The bindings of a WCF service define how an endpoint will communicate with an external client. A binding has several characteristics, including the following:</p>
<ul>
<li>Transport protocols &#8211; Some of the choices include HTTP, Named Pipes, TCP, and MSMQ.</li>
<li>Encoding &#8211; Three types of encoding are available-Text, Binary, or Message Transmission Optimization Mechanism (MTOM). MTOM is an interoperable message format that allows the effective transmission of attachments or large messages (greater than 64K).</li>
<li>Security &#8211; Includes wire security (SSL) or schema-defined security (WS-Security).</li>
</ul>
<p>Bindings can also determine if you are using sessions or a transacted communications channel. You have the choice of creating custom channels or using prebuilt bindings. WCF comes shipped with nine built-in bindings. The following table lists the WCF build-in bindings and their associated features.</p>
<table border="1" cellspacing="0">
<tbody>
<tr>
<th align="left">Binding</th>
<th align="left">Description</th>
</tr>
<tr>
<td valign="top">BasicHttpBinding</td>
<td>Basic Web service communication. No security by default</td>
</tr>
<tr>
<td valign="top">WSHttpBinding</td>
<td>Web services with WS-* support. Supports transactions</td>
</tr>
<tr>
<td valign="top">WSDualHttpBinding</td>
<td>Web services with duplex contract and transaction support</td>
</tr>
<tr>
<td valign="top">WSFederationHttpBinding</td>
<td>Web services with federated security. Supports transactions</td>
</tr>
<tr>
<td valign="top">MsmqIntegrationBinding</td>
<td>Communication directly with MSMQ applications. Supports transactions</td>
</tr>
<tr>
<td valign="top">NetMsmqBinding</td>
<td>Communication between WCF applications by using queuing. Supports transactions</td>
</tr>
<tr>
<td valign="top">NetNamedPipeBinding</td>
<td>Communication between WCF applications on same computer. Supports duplex contracts and transactions</td>
</tr>
<tr>
<td valign="top">NetPeerTcpBinding</td>
<td>Communication between computers across peer-to-peer services. Supports duplex contracts</td>
</tr>
<tr>
<td valign="top">NetTcpBinding</td>
<td>Communication between WCF applications across computers. Supports duplex contracts and transactions</td>
</tr>
</tbody>
</table>
<p>You can choose the right binding to use by mapping the features they support to your requirements.</p>
<p><strong>Hosting WCF Services</strong></p>
<p>As for where to put your code and what it compiles to, you have some choices. You can host your service in Internet Information Services (IIS), or you can write a small amount of extra code to host a service yourself. You can self-host a service from just about any environment that supports managed code, including a WinForms application, console application, library assembly (DLL), or Windows Service controlled through SCM (Service Control Manager). The following lists show the common hosting mechanisms for WCF services.</p>
<ul>
<li>IIS (Internet Information Services) &#8211; IIS provides a number of advantages if the service uses HTTP as its transport. The nice thing about using IIS is that you don&#8217;t have to write any hosting code as part of the application since IIS automatically activates service code as required. Services also benefit from IIS features such as process lifetime management and automatic restart after configuration changes. To run services using IIS, you create the service code along with its configuration file and simply save them in an IIS virtual directory.</li>
<li>WAS (Windows Activation Service) &#8211; (WAS) is the new process activation mechanism that ships with IIS 7.0. WAS builds on the existing IIS 6.0 process and hosting models, but is no longer dependent on HTTP. In addition to HTTP based communication, WCF can also use WAS to provide message-based activation over other protocols, such as TCP and named pipes. This helps WCF applications to take advantage of WAS features, such as process recycling, rapid fail protection, and the common configuration system, which were previously available only to HTTP-based applications.</li>
<li>Self-hosting &#8211; WCF services can be hosted inside any managed application, such as console applications and Windows Forms or Windows Presentation Foundation (WPF) graphical applications. To accomplish this, you need to create a class that implements a WCF service contract interface, and specify binding information in the application configuration file. The application code can then use an instance of System.ServiceModel.ServiceHost to make the service available at a particular location. To start the service, you call the ServiceHost.Open() method.</li>
<li>Managed Windows Service &#8211; A WCF service can be registered as a Windows Service, so that it is under control of the Service Control Manager (SCM). This is suitable for long-running WCF services that are hosted outside of IIS in a secure environment and are not message-activated. By hosting a WCF service with Windows Services, you take advantage of Windows service features such as automatic start at start time and control by the SCM. To host a WCF service in this way, the application must be written as a Managed Windows Service by inheriting from System.ServiceProcess.ServiceBase. It must also implement a WCF service contract interface and then create and open a ServiceHost to manage the WCF service.</li>
</ul>
<p>Throughout this article series, I will demonstrate each of these hosting mechanisms as we explore the different features of WCF.</p>
<p><strong>Advantages</strong></p>
<p>Windows Communication Foundation has some important enhancements in comparison with preceding technologies.</p>
<p>· It merges all older separate technologies in one place and allows you to do things easier.</p>
<p>· It has rich communication capabilities.</p>
<p>· It comes with many powerful and ready to use enterprise features.</p>
<p>· It can be integrated with other technologies and has great interoperability.</p>
<p><strong>Implementation of a Simple WCF Service</strong></p>
<p>In this section, you will see the steps involved in creating a simple WCF service. Since the focus of this section is to get you familiar with the service development steps, I will keep the service implementation simple. The service is a simple MathService that implements a service contract named IMathService. This exercise has six development steps:</p>
<ol>
<li>Create the service</li>
<li>Choose the service hosting mechanism</li>
<li>Create the service configuration file</li>
<li>Create the client</li>
<li>Create the proxy and configuration file for the client</li>
<li>Implement and run the client</li>
</ol>
<p><strong> 1.  Create the Service </strong></p>
<p>To start with, create a new project named WCFBasics using Visual Studio 2005 as shown in the below screenshot.</p>
<p><img src="http://www.15seconds.com/graphics/issue/061130_03.gif" border="0" alt="" /></p>
<p>Once the project is created, add a new WCF Service using the Website-<code>&#62;</code>Add New Item menu option and name the service MathService as shown below:</p>
<p><img src="http://www.15seconds.com/graphics/issue/061130_04.gif" border="0" alt="" /></p>
<p>After the service is created, you should see a MathService.svc file in your project with the below line of code.</p>
<p><code> &#60;%@ ServiceHost Language="C#" Debug="true" Service="MathService" CodeBehind="~/App_Code/MathService.cs" %&#62; </code></p>
<p>Note that the MathService.svc has a code-behind file (named MathService.cs) that is placed in the App_Code directory. Open up the MathService.cs and modify its code to look as follows:</p>
<p><code> using System;<br />
using System.ServiceModel;</p>
<p>[ServiceContract]<br />
public interface IMathService<br />
{<br />
[OperationContract]<br />
int Add(int x, int y);</p>
<p>[OperationContract]<br />
int Subtract(int x, int y);</p>
<p>[OperationContract]<br />
int Divide(int x, int y);<br />
}</p>
<p>public class MathService : IMathService<br />
{<br />
public int Add(int x, int y)<br />
{<br />
return x + y;<br />
}</p>
<p>public int Subtract(int x, int y)<br />
{<br />
return x - y;<br />
}</p>
<p>public int Divide(int x, int y)<br />
{<br />
return x / y;<br />
}<br />
} </code></p>
<p><strong> 2.  Choose the Service Hosting Mechanism </strong></p>
<p>As mentioned before, WCF is flexible because its services can be hosted in different types of applications. For the purposes of this installment, let us use IIS for hosting the WCF services because of its simplified configuration.</p>
<p><strong> 3.  Create the Service Configuration File </strong></p>
<p>Configuration-based development permits part of an application&#8217;s behavior to be specified in configuration files. You can make such things as addresses, bindings, security details, service behavior, and tracing changeable without having to modify and recompile the program code. By specifying addresses, bindings, and behaviors in a configuration file, you can make deploy-time decisions about services that don&#8217;t require any modification to the service programs themselves.</p>
<p>As mentioned before, by using IIS you can take advantage of IIS features such as service activation, process recycling and so on. To host the MathService in IIS, modify the Web.config in the Web service project to look as follows:</p>
<p><code> &#60;?xml version="1.0"?&#62;<br />
&#60;configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"&#62;<br />
&#60;system.serviceModel&#62;<br />
&#60;services&#62;<br />
&#60;service name="MathService"<br />
behaviorConfiguration="MathServiceBehavior"&#62;<br />
&#60;endpoint address="" contract="IMathService"<br />
binding="wsHttpBinding"/&#62;<br />
&#60;/service&#62;<br />
&#60;/services&#62;<br />
&#60;behaviors&#62;<br />
&#60;serviceBehaviors&#62;<br />
&#60;behavior name="MathServiceBehavior"&#62;<br />
&#60;serviceMetadata httpGetEnabled="True"/&#62;<br />
&#60;serviceDebug includeExceptionDetailInFaults="true" /&#62;<br />
&#60;/behavior&#62;<br />
&#60;/serviceBehaviors&#62;<br />
&#60;/behaviors&#62;<br />
&#60;/system.serviceModel&#62;<br />
&#60;/configuration&#62; </code></p>
<p>Through its attributes, the &#60;service&#62; element under &#60;system.ServiceModel&#62;\&#60;services&#62; specifies the name of the service as well as the name of the behavior configuration that will be used to control the behavior of the service. The &#60;service&#62; element also contains another child element named &#60;endpoint&#62; that enables you to specify the address, contract, and binding for the service. In this case, since IIS is the hosting mechanism, the address attribute is set to &#8220;&#8221;. For an IIS-hosted application, the endpoint address should be defined by the physical *.svc file and the name of its hosting virtual directory and should have an empty value unless you would like to give it an extension and assign a different set of bindings to it. For example, in this case if the endpoint address=&#8221;", then the actual communication endpoint is http://localhost/MyProjects/15Seconds/WCFBasics/MathService.svc. Note that the contract attribute is set to the name of the interface, which is IMathService in this case. To expose the service through HTTP, the binding attribute is set to &#8220;wsHttpBinding&#8221;.</p>
<p><strong> 4.  Create the Client </strong></p>
<p>To test the service, let us create an ASP.NET Web site named WCFBasicsServiceClient with Visual C# as the language of choice. Once the Web site is created, you now need to create a proxy for the WCF service that was created earlier. In addition, you also need to create a configuration file that contains the configuration settings required to connect to the service. You can accomplish both of these through a new utility called svcutil.exe. You will see this tool in action in the next section.</p>
<p><strong> 5.  Create the Proxy and Configuration file for the Client </strong></p>
<p>The Service Model Metadata Utility (svcutil.exe) builds the proxy and the corresponding configuration file based on the published service&#8217;s metadata (WSDL + Schema + Policy). Once the service is up, running and listening, you can run svcutil.exe against the service endpoint address. For example, if it were an IIS-hosted service, it would be something like the following:</p>
<p><code> svcutil.exe http://localhost/MyProjects/15Seconds/WCFBasics/MathService.svc?WSDL </code></p>
<p>To use the svcutil utility, open up the command prompt through Start-<code>&#62;</code>Programs-<code>&#62;</code>Microsoft Visual Studio 2005-<code>&#62;</code>Visual Studio Tools-<code>&#62;</code>Visual Studio 2005 Command Prompt.</p>
<p><img src="http://www.15seconds.com/graphics/issue/061130_05.gif" border="0" alt="" /></p>
<p>As you can see from the above screenshot, the output has two files.</p>
<ol>
<li>A generated typed WCF proxy in a preferred language that translates method calls to dispatched message. By default, the proxy is generated in C#.</li>
<li>An output.config file for the client implementation that corresponds with the technical deployment details of the configuration file of the service side.</li>
</ol>
<p><strong> 6.  Implement the Client </strong></p>
<p>Now that you have created the proxy and the configuration file, you are ready to work with them from the client application. Before that, create a new ASP.NET Web site named WCFBasicsServiceClient using Visual C# as the programming language. Once the Web site is created, add the proxy file MathService.cs to the App_Code folder. Also rename the output.config file created through the svcutil to Web.config and add that to the root of the Web site. If you open up the output.config file, you will notice it contains a number of configuration entries for controlling the invocation behavior of the client. However it is also possible for you to manually generate the Web.config file using the below lines of code:</p>
<p><code> &#60;?xml version="1.0" encoding="utf-8"?&#62;<br />
&#60;configuration&#62;<br />
&#60;system.serviceModel&#62;<br />
&#60;client&#62;<br />
&#60;endpoint<br />
address="http://localhost/MyProjects/15Seconds/WCFBasics/MathService.svc"<br />
binding="wsHttpBinding" contract="IMathService"&#62;<br />
&#60;/endpoint&#62;<br />
&#60;/client&#62;<br />
&#60;/system.serviceModel&#62;<br />
&#60;/configuration&#62; </code></p>
<p>Note the use of &#60;system.ServiceModel&#62; as the root of the service client configuration section. Inside that you have an element named &#60;client&#62; that specifies that you are dealing with client configuration sections here. Underneath the &#60;client&#62; element, you have an element named &#60;endpoint&#62; that captures the address, binding, and the contract information about the service.</p>
<p>At this point, you are ready to consume the service by writing code against the proxy. To this end, add a new ASP.NET Web page named MathServiceClient.aspx and modify its code to look as follows:</p>
<p><code> &#60;%@ Page Language="C#" %&#62;<br />
&#60;script runat="server"&#62;<br />
void Page_Load(object sender, EventArgs e)<br />
{<br />
MathServiceClient obj = new MathServiceClient();<br />
int result = obj.Add(1, 5);<br />
lblResult.Text = "Add (1, 5) =" + result.ToString();<br />
result = obj.Subtract(5,1);<br />
lblResult.Text += "Subtract(5,1)=" + result.ToString();<br />
result = obj.Divide(10,2);<br />
lblResult.Text += "Divide(10,2)=" + result.ToString();<br />
obj.Close();<br />
}<br />
&#60;/script&#62;<br />
&#60;html xmlns="http://www.w3.org/1999/xhtml" &#62;<br />
&#60;head runat="server"&#62;<br />
&#60;title&#62;Invoking the Math Service&#60;/title&#62;<br />
&#60;/head&#62;<br />
&#60;body&#62;<br />
&#60;form id="form1" runat="server"&#62;<br />
&#60;div&#62;<br />
&#60;asp:Label ID="lblResult" runat="Server"<br />
Font-Bold="true" Height="128px" Width="405px" /&#62;<br />
&#60;/div&#62;<br />
&#60;/form&#62;<br />
&#60;/body&#62;<br />
&#60;/html&#62; </code></p>
<p>The above implementation is very simple. It invokes the various methods of the MathService using the proxy class (generated through the svcutil utility) from the previous section and displays the results of the invocation through a label control. If you navigate to the page using the browser, you should see an output that is somewhat similar to the following:</p>
<p><img src="http://www.15seconds.com/graphics/issue/061130_06.gif" border="0" alt="" /></p>
<p>So far, you have seen a simple WCF service that only dealt with simple types. With that foundation, let us switch gears and discuss a service implementation that works with complex types. As mentioned before, you need to create data contracts to be able to work with complex types, which is the topic of focus in the next section.</p>
<p>&#160;</p>
<p><strong>Understanding Data Contracts</strong></p>
<p>Data contracts can be explicit or implicit. Simple types such as int, string have an implicit data contract. For example, you can use an int or a string in a service operation without having to define a data contract. If you are passing more than simple types to or from a service operation, you must define an explicit service contract by using the [DataContract] and [DataMember] attributes. A data contract can be defined as follows:</p>
<ul>
<li>It describes the external format of data passed to and from service operations</li>
<li>It defines the structure and types of data exchanged in service messages</li>
<li>It maps a CLR type to an XML Schema</li>
<li>It defines how data types are serialized and deserialized. Through serialization, you convert an object into a sequence of bytes that can be transmitted over a network. Through deserialization, you reassemble an object from a sequence of bytes that you receive from a calling application.</li>
<li>It is a versioning system that allows you to manage changes to structured data</li>
</ul>
<p>You define a data contract by decorating a class, structure, or enumeration with the [DataContract] attribute. You identify members of a data contract by placing [DataMember] attributes on the fields or properties of the class. The following code defines a data contract for a Category class.</p>
<p><code> using System;<br />
using System.ServiceModel;<br />
using System.Runtime.Serialization;</p>
<p>[DataContract]<br />
public class Category<br />
{<br />
[DataMember]<br />
public int CategoryID;</p>
<p>[DataMember]<br />
public string Name;</p>
<p>[DataMember]<br />
public Guid Rowguid;</p>
<p>[DataMember]<br />
public DateTime ModifiedDate;<br />
} </code></p>
<p>In a data contract, you must explicitly identify each member of the contract by using a [DataMember] attribute. This requirement ensures that developers make a conscious choice to expose data externally. The DataMember attribute is the sole determinant of whether data is shared externally; access modifiers such as public and private do not play a role.</p>
<p><strong>Implementing the CategoryService that uses the DataContract</strong></p>
<p>Once a data contract is defined, you can use the defined type in service operations. The following code shows the CategoryService that exposes a method named GetCategory that returns the details of the Category object based on the supplied category id.</p>
<p>First, add a new service named CategoryService.svc to the WCFBasics project, which will create a CategoryService.svc with the following lines of code.</p>
<p><code> &#60;%@ ServiceHost Language="C#" Debug="true" Service="CategoryService" CodeBehind="~/App_Code/CategoryService.cs" %&#62; </code></p>
<p>Modify the code-behind for the CategoryService to look as follows:</p>
<p><code> using System;<br />
using System.ServiceModel;<br />
using System.Data;<br />
using System.Data.SqlClient;</p>
<p>[ServiceContract()]<br />
public interface ICategoryService<br />
{<br />
[OperationContract]<br />
Category GetCategory(int categoryID);<br />
}</p>
<p>public class CategoryService : ICategoryService<br />
{<br />
public Category GetCategory(int categoryID)<br />
{<br />
string connectionString = System.Web.Configuration.<br />
WebConfigurationManager.ConnectionStrings["AdventureWorks"].<br />
ConnectionString;<br />
Category categoryObj = new Category();<br />
using (SqlConnection connection = new SqlConnection(connectionString))<br />
{<br />
connection.Open();<br />
string sql = "Select ProductCategoryID, Name, rowguid, " +<br />
" ModifiedDate from Production.ProductCategory " +<br />
" Where ProductCategoryID = " + categoryID.ToString();<br />
SqlCommand command = new SqlCommand(sql, connection);<br />
SqlDataReader reader =<br />
command.ExecuteReader(CommandBehavior.CloseConnection);<br />
while(reader.Read())<br />
{<br />
categoryObj.CategoryID = (int)reader["ProductCategoryID"];<br />
categoryObj.Name = (string)reader["Name"];<br />
categoryObj.Rowguid = (System.Guid)reader["rowguid"];<br />
categoryObj.ModifiedDate = (DateTime)reader["ModifiedDate"];<br />
}<br />
}<br />
return categoryObj;<br />
}<br />
} </code></p>
<p>Let us examine the GetCategory() method implementation. You start by retrieving the connection string from the Web.config file that is defined as follows:</p>
<p><code> &#60;connectionStrings&#62;<br />
&#60;add name="AdventureWorks" connectionString="server=localhost;Initial<br />
Catalog=AdventureWorks;uid=sa;pwd=thiru;"<br />
providerName="System.Data.SqlClient" /&#62;<br />
&#60;/connectionStrings&#62; </code></p>
<p>After that, you open the connection to the database through a SqlConnection object, create a SqlCommand object with the appropriate sql to be executed. Then you execute the query against the database using the SqlCommand.ExecuteReader() method.</p>
<p><code> SqlDataReader reader =<br />
command.ExecuteReader(CommandBehavior.CloseConnection); </code></p>
<p>Now you loop through the resultant SqlDataReader object and set the Category object with the values retrieved from the SqlDataReader object.</p>
<p><code> while(reader.Read())<br />
{<br />
categoryObj.CategoryID = (int)reader["ProductCategoryID"];<br />
categoryObj.Name = (string)reader["Name"];<br />
categoryObj.Rowguid = (System.Guid)reader["rowguid"];<br />
categoryObj.ModifiedDate = (DateTime)reader["ModifiedDate"];<br />
}<br />
}<br />
</code></p>
<p>Finally you return the Category object back to the client. Now that you have created the service, you can now consume the service from a client application.</p>
<p><strong>Creating the Client Application for the CategoryService</strong></p>
<p>Prior to creating an ASP.NET page that consumes the service, you need to first create the proxy file using the same steps outlined in the previous example. Once you have the CategoryService proxy class created, add that to the App_Code folder of the WCFBasicsServiceClient project. After that, add a new ASP.NET page named CategoryServiceClient and add the following lines of code to it.</p>
<p><code> &#60;%@ Page Language="C#" %&#62;<br />
&#60;script runat="server"&#62;</p>
<p>protected void btnGetCategory_Click(object sender, EventArgs e)<br />
{<br />
CategoryServiceClient obj = new CategoryServiceClient();<br />
int categoryID = Convert.ToInt32(txtCategoryID.Text);<br />
Category cate = obj.GetCategory(categoryID);<br />
lblResult.Text = "Category ID=" + cate.CategoryID.ToString() + "&#60;br&#62;";<br />
lblResult.Text += "Name=" + cate.Name + "&#60;br&#62;";<br />
lblResult.Text += "RowGuid=" + cate.Rowguid + "&#60;br&#62;";<br />
lblResult.Text += "Modified Date=" + cate.ModifiedDate;<br />
obj.Close();<br />
}<br />
&#60;/script&#62;<br />
&#60;html xmlns="http://www.w3.org/1999/xhtml" &#62;<br />
&#60;head runat="server"&#62;<br />
&#60;title&#62;Invoking the Category Service&#60;/title&#62;<br />
&#60;/head&#62;<br />
&#60;body&#62;<br />
&#60;form id="form1" runat="server"&#62;<br />
&#60;div&#62;<br />
&#60;asp:Label ID="lblCategoryID" runat="server" Height="20px"<br />
Text="Category ID:" Width="135px"&#62;&#60;/asp:Label&#62;<br />
&#60;asp:TextBox ID="txtCategoryID" runat="server"&#62;&#60;/asp:TextBox&#62;<br />
&#60;asp:Button ID="btnGetCategory" runat="server"<br />
OnClick="btnGetCategory_Click" Text="Get Category"/&#62;<br />
&#60;br/&#62;&#60;br/&#62;<br />
&#60;/div&#62;<br />
&#60;asp:Label ID="lblResult" Font-Bold="true" runat="Server" Height="128px"<br />
Width="405px"/&#62;<br />
&#60;/form&#62;<br />
&#60;/body&#62;<br />
&#60;/html&#62; </code></p>
<p>Before navigating to the page, add the following section to the Web.config file directly under the &#60;system.serviceModel&#62;/&#60;client&#62; section.</p>
<p><code>&#60;endpoint address="http://localhost/MyProjects/15Seconds/WCFBasics/CategoryService.svc" binding="wsHttpBinding" contract="ICategoryService"&#62;<br />
&#60;/endpoint&#62; </code></p>
<p>Open up the browser and navigate to the CategoryServiceClient.aspx page. In the Category ID textbox, enter a valid category id and hit the &#8220;Get Category&#8221; button and you should see an output like the below one.</p>
<p><img src="http://www.15seconds.com/graphics/issue/061130_07.gif" border="0" alt="" /></p>
<p><strong>Conclusion</strong></p>
<p>In this article, you have understood the WCF&#8217;s architecture and its key design characteristics. You have also seen the different types of contracts including ServiceContract, OperationContract, DataContract, and MessageContract. In addition, you have also seen the end points and the different components that make up an end point such as address, binding, and contract. After a thorough discussion of these concepts, you have also seen examples demonstrating the steps involved in creating and consuming a WCF service. Specifically,</p>
<ul>
<li>How to create a simple WCF service and host it in IIS</li>
<li>How to create client proxy and configuration files using the Service Model Metadata Utility (svcutil.exe)</li>
<li>How to consume the WCF service from a client application</li>
<li>How to leverage the DataContract to return complex types from a WCF service</li>
</ul>
<p><strong>For more Details : </strong></p>
<p><a href="http://www.15seconds.com/Issue/061130.htm" target="_blank">http://www.15seconds.com/Issue/061130.htm</a></p>
<p><a href="http://aspalliance.com/1103_introduction_to_windows_communication_foundation" target="_blank">http://aspalliance.com/1103_introduction_to_windows_communication_foundation</a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms731082.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/ms731082.aspx</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Manipulating WS-Addressing Headers in Oracle BPEL]]></title>
<link>http://dlimiter.wordpress.com/2009/11/16/manipulating-ws-addressing-headers-in-oracle-bpel/</link>
<pubDate>Sun, 15 Nov 2009 23:32:24 +0000</pubDate>
<dc:creator>Dave</dc:creator>
<guid>http://dlimiter.wordpress.com/2009/11/16/manipulating-ws-addressing-headers-in-oracle-bpel/</guid>
<description><![CDATA[Web Service Addressing is the standard method used in Oracle BPEL processes to support asynchronous ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://www.w3.org/Submission/ws-addressing/">Web Service Addressing</a> is the standard method used in Oracle BPEL processes to support asynchronous two-way routing between processes. This is done by injecting routing data into the message SOAP headers so that the process being called has sufficient context to call back to the invoking service (and where necessary the correct <em>instance</em> of the invoking service) on completion. </p>
<p>In some circumstances it may be desirable to redirect the callback from and an asynchronous call to a completely different process or some other compliant service (such as an EJB or ESB). This can be achieved by directly manipulating the WS-Adressing information in the SOAP header of message invoking the asynchronous call:</p>
<h2>1. Create an instance of the WS-Addressing Header</h2>
<p>If your service is sing WS-Addressing for callback, it will have imported the associated schema, which will allow you to create a variable of the type <code>WSAReplyToHeader</code>, ie.</p>
<blockquote><p><code> &#60;variable name="wsaReplyToHeader" messageType="ns7:WSAReplyToHeader"/&#62;</code></p></blockquote>
<h2>2. Set ReplyTo</h2>
<p>Change the reply to so that the URL points to the endpoint of the desired recipient, ie.</p>
<blockquote><p><code>&#60;assign name="ChangeReplyURL"&#62;<br />
&#160;&#160;&#60;copy&#62;<br />
&#160;&#160;&#160;&#160;&#60;from expression="http://some.other/webservice/endpoint/"/&#62;<br />
&#160;&#160;&#160;&#160;&#60;to variable="wsaReplyToHeader" part="ReplyTo" &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;query="/ns25:ReplyTo/ns25:Address"/&#62;<br />
&#160;&#160;&#60;/copy&#62;<br />
&#60;/assign&#62;</code></p></blockquote>
<h2>3. Include the Custom Header In The Message</h2>
<p>To get the header we&#8217;ve created into the SOAP message edit the relevant <code>invoke</code> to include the<code>bpelx:inputHeaderVariable</code> element, and list the custom header by name, ie</p>
<blockquote><p><code>&#60;invoke name="ClearUsageTransaction"<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;partnerLink="Foo"<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;portType="Foo_pt"<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;operation="doFoo"<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;inputVariable="Foo_doFoo_InputVariable"<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;bpelx:inputHeaderVariable="wsaReplyToHeader"/&#62;</code></p></blockquote>
<h2>4. Trick For New Players &#8211; Update the Associated Partnerlink To Force SOAP</h2>
<p>When sending messages within a single container, the BPEL engine will usually optimize away the SOAP call for performance, which has the undesirable side effect of ignoring the header changes. To avoid this and force use of SOAP in this particular call edit he process <code>bpel.xml</code> file and add the <code>optSoapShortcut</code> property to the invoking partnerlink, set to <code>false</code>, ie.</p>
<blockquote><p><code>&#60;?xml version = '1.0' encoding = 'UTF-8'?&#62;<br />
&#60;BPELSuitcase&#62;<br />
&#160;&#160;&#60;BPELProcess id="FooBarProcess" src="FooBarProcess.bpel"&#62;<br />
&#160;&#160;&#160;&#160;&#60;partnerLinkBindings&#62;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#60;partnerLinkBinding name="client"&#62;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#60;property name="wsdlLocation"&#62;FooBarProcess.wsdl&#60;/property&#62;<br />
&#160;&#160;&#160;&#160;&#160;&#160;lt;/partnerLinkBinding&#62;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#60;partnerLinkBinding name="Foo"&#62;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#60;property name="wsdlLocation"&#62;Foo.wsdl&#60;/property&#62;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#60;property name="optSoapShortcut"&#62;false&#60;/property&#62;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#60;/partnerLinkBinding&#62;<br />
&#160;&#160;&#160;&#160;&#60;/partnerLinkBindings&#62;<br />
&#160;&#160;&#60;/BPELProcess&#62;<br />
&#60;/BPELSuitcase&#62;</code></p></blockquote>
<h2>5. Build and Deploy</h2>
<p>And that&#8217;s it &#8211; your callback should now redirect to the custom endpoint. I say <em>should</em>, because redirecting in this way can be fiddly, and as the Oracle BPEL Process Manager does not support viewing of the full SOAP headers in it&#8217;s process flow views it can be fiendishly difficult to debug. In such cases third party TCP monitoring tool such as <em>tcpmon</em> (there is usually a version bundled somewhere in the SOA suite install) or <a href="http://www.wireshark.org/"><em>Wireshark</em></a> can be used to view the raw SOAP. </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[My very first webcast!]]></title>
<link>http://devisfun.wordpress.com/2009/11/14/my-very-first-webcast/</link>
<pubDate>Sat, 14 Nov 2009 04:10:08 +0000</pubDate>
<dc:creator>Esteban</dc:creator>
<guid>http://devisfun.wordpress.com/2009/11/14/my-very-first-webcast/</guid>
<description><![CDATA[I&#8217;ve done recording, editing and &#8220;producing&#8221; my very first webcast video. Yay! In ]]></description>
<content:encoded><![CDATA[I&#8217;ve done recording, editing and &#8220;producing&#8221; my very first webcast video. Yay! In ]]></content:encoded>
</item>
<item>
<title><![CDATA[Add Web service reference- Components required to enumerate web references not installed]]></title>
<link>http://thetechjungle.wordpress.com/2009/11/10/add-web-service-reference-components-required-to-enumerate-web-references-not-installed/</link>
<pubDate>Tue, 10 Nov 2009 18:25:20 +0000</pubDate>
<dc:creator>Abhi</dc:creator>
<guid>http://thetechjungle.wordpress.com/2009/11/10/add-web-service-reference-components-required-to-enumerate-web-references-not-installed/</guid>
<description><![CDATA[After playing with Web services for so many years this was a tricky error which kept me thinking for]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>After playing with Web services for so many years this was a tricky error which kept me thinking for few minutes.<br />
Today when i tried to add WCF reference to my application it gave the following error,<br />
<strong>Error</strong></p>
<blockquote><p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Microsoft Visual Studio<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Failed to update Service Reference &#8216;XXXBusiness.Reference&#8217;.<br />
Error:The components required to enumerate Web references are not installed on this computer. Please re-install Visual Studio.(0&#215;80004002)</p></blockquote>
<blockquote></blockquote>
<blockquote><p><a href="http://thetechjungle.blogspot.com/2009/11/add-web-service-reference-components.html">http://thetechjungle.blogspot.com/2009/11/add-web-service-reference-components.html</a></p></blockquote>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[zembly is deadpooled - 2.5 yrs of effort went in vain :(]]></title>
<link>http://hasin.wordpress.com/2009/11/10/zembly-is-deadpooled-2-5-yrs-of-effort-went-in-vain/</link>
<pubDate>Tue, 10 Nov 2009 11:25:45 +0000</pubDate>
<dc:creator>hasin</dc:creator>
<guid>http://hasin.wordpress.com/2009/11/10/zembly-is-deadpooled-2-5-yrs-of-effort-went-in-vain/</guid>
<description><![CDATA[I got a bad news this morning that zembly is shutting down their service from 30th next. that&#8217;]]></description>
<content:encoded><![CDATA[I got a bad news this morning that zembly is shutting down their service from 30th next. that&#8217;]]></content:encoded>
</item>
<item>
<title><![CDATA[Publishing a Matlab Application as A Web Service: The CAIMAN web service]]></title>
<link>http://iomes.wordpress.com/2009/11/09/publishing-a-matlab-application-as-a-web-service-the-caiman-web-service/</link>
<pubDate>Mon, 09 Nov 2009 16:35:16 +0000</pubDate>
<dc:creator>iomes</dc:creator>
<guid>http://iomes.wordpress.com/2009/11/09/publishing-a-matlab-application-as-a-web-service-the-caiman-web-service/</guid>
<description><![CDATA[In the previous article we reviewed the process for publishing a matlab application as a web service]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In the previous article we reviewed the process for publishing a matlab application as a web service</p>
<p><a href="http://iomes.wordpress.com/2009/11/09/publishing-a-matlab-application-as-a-web-service-the-caiman-php-service/">http://iomes.wordpress.com/2009/11/09/publishing-a-matlab-application-as-a-web-service-the-caiman-php-service/</a></p>
<p>In this article we describe the configuration and start up of the service which will accept client requests for running matlab tasks.</p>
<p>In this case the example service for the CAIMAN project is considered. For the CAIMAN project results are emailed to the user but the web client it self may request results files from the job server, this aspect is considered in another example.</p>
<p>Files for setting up the IOME job service for the CAIMAN matlab service are contained in the folder src/examples/matlab/caiman-ws. The folder caimanDir contains the main function files used by the matlab routines. Once the caiman-ws folder has been copied into a suitable working area, the CAIMAN job service can be started almost immediately with relatively minor modification. We describe some of the required modifications here. The main files for enabling the CAIMAN service are as follows</p>
<ul>
<li>iogenericsim.sh  , this routine is called when a submit (or request ) simulation is received from a client a unique job working directory is created an this script is copied into that directory. The example provided here submits a further script to a job scheduler (sun grid engine). It could easily be modified to submit to a generic process scheduler available on windows/linx (this line has been commented out.</li>
<li>iogenericsim_sge.sh the actual script that runs invokes the matlab application will be described below</li>
<li>simfile.xml an example of the simulation input file this is received from web client and is located in the job working directory</li>
<li>caimansaasexample.m, the matlab script that styarts the actual processing job</li>
<li>cpanellogin.sh</li>
</ul>
<p>The main modifications to be made are</p>
<ul>
<li>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">qsub -sync y iogenericsim_sge.shFor the file iogenericsim.sh, If you are using sungrid engine or PBS as a batch scheduler then remove the comment from the line reading #    &#8217;qsub -sync y iogenericsim_sge.sh . Place a comment at the start of the  line   ../iogenericsim_sge.shFor iogenericsim_sge.sh, check and modify (if necessary) the line    ftp -i staff.shef.ac.uk &#60; cpanellogin.sh , this should refer to the corrrect ftp serverThe cpanellogin.sh file should be modified at the first line as follows, cd public_html/iometest/uploads, the directory should refer to the uploads directry for the IOME client</div>
</li>
<li>Using batchmode to access the ftp server store ftp server information in a file in $HOME called .netrc the .netrc filehas the following line (or lines) &#8220;machine iomewebclient.organisation.ac.uk login username passwd thepassword&#8221;. It is important to set the permissions for .netrc to  600(rw&#8212;-). Further details may be obtained at ( http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/internet/node52.html )</li>
</ul>
<p>The IOME service is then started with the following invocation</p>
<p>iogs initiome null caiman null 60000 &#62;&#38; iogs.log</p>
<p>Putting this command in script file e.g. called startserver.sh</p>
<p>#!/bin/bash</p>
<p>iogs initiome null caiman null 60000 &#62;&#38; iogs.log</p>
<p>The server is started using the command</p>
<p>./startserver.sh &#38;</p>
<p>At this point the IOME example CAIMAN service will be operational. We now provide some additional comments enabling the developer to undesrstand how to deploy their application as a web service.</p>
<p>The IOME web service works in the following way.</p>
<ul>
<li>Receives a submitsimulation request and creates a working area</li>
<li>Receives a copy of the simfile.xml that contains the job description</li>
<li>Executes the iogenericsim.sh script</li>
</ul>
<p>The iogenericsim.sh script is provided by the author of the service and this will invoke the following.</p>
<ul>
<li>Starts a local server</li>
<li>Reads the simfile.xml into the local server</li>
<li>Starts the actual job on the server the actual job will then read any data from the server (alternatively we could use string replacements to edit an input file. There is a large number of possibilities here. It is also possible to parse the simfile.xml file directly with out invoking a local IOME server</li>
</ul>
<p>Reviewing the iogenericsim_sge.sh script it should be noted that the actual job starts its own IOME server which runs as a localhost server and is invoked using the command &#8220;iogs initiome null $IOME_SIMNAME null  &#38;&#8221;.  Data is loaded onto the server using the command &#8220;iogs readsimulation simfile.xml 0 $IOME_WSPORT localhost&#8221;. We then obtain the name of the imagefile to be processed using command &#8221; IMFILE=`iogs getparam string imagefile 0 $IOME_WSPORT localhost` &#8220;, this is used in the stream editor command for editing the ftp input file. The final line of iogenericsim_sge.sh invokes the matlab job.</p>
<p>The main features of the matlab driver script are as follows</p>
<ul>
<li>Reads the port for the local IOME server</li>
<li>Sets up contact details for the local IOME server ( e.g. &#8220;elist=iome(&#8216;localhost&#8217;,res{1},0);&#8221;  )</li>
<li>Requests the parameters for the job from the local IOME server e.g. &#8220;userEmail=getparamstring(&#8216;useremail&#8217;,elist);&#8221;, &#8220; imageFile=getparamstring(&#8216;imagefile&#8217;,elist);&#8221; and &#8220;jobtype=getparamstring(&#8216;jobtype&#8217;,elist);&#8221;</li>
<li>At the end of the routine terminate the local IOME server using &#8220;exitiome(elist);&#8221;</li>
</ul>
<p>An earlier entry on generating web service applications</p>
<p><a href="http://iomes.wordpress.com/2009/09/25/publishing-an-application-as-an-iome-web-service/">http://iomes.wordpress.com/2009/09/25/publishing-an-application-as-an-iome-web-service/</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[CMS Website]]></title>
<link>http://websitedesigningcompanyindiadelhi.wordpress.com/2009/11/09/cms-website/</link>
<pubDate>Mon, 09 Nov 2009 11:36:53 +0000</pubDate>
<dc:creator>websitedesigningcompany</dc:creator>
<guid>http://websitedesigningcompanyindiadelhi.wordpress.com/2009/11/09/cms-website/</guid>
<description><![CDATA[In a CMS website, the content can be managed easily by an individual without involving any IT profes]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In a <a title="CMS website" href="http://www.hansindia.com/cms-website-designing-service-india/">CMS website</a>, the content can be managed easily by an individual without involving any IT professional. It gives ample scope to the user operating the website and its content single handedly.</p>
<p>Basically CMS stands for <a title="CMS website" href="http://www.hansindia.com/cms-website-designing-service-india/">Content Management System</a>. CMS website designing is done by the professionals of IT.</p>
<p>At Hans we have professionals of Content management system website.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[WPF Windows Persentaion Foundation  with me  PART- II]]></title>
<link>http://indiandotnet.wordpress.com/2009/11/08/wpf-windows-persentaion-foundation-with-me-part-ii/</link>
<pubDate>Sun, 08 Nov 2009 12:35:05 +0000</pubDate>
<dc:creator>indiandotnet</dc:creator>
<guid>http://indiandotnet.wordpress.com/2009/11/08/wpf-windows-persentaion-foundation-with-me-part-ii/</guid>
<description><![CDATA[Hello friends, In this session we are going to take a look how do we connect a silver light applicat]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Hello friends,<br />
In this session we are going to take a look how do we connect a silver light application with database.<br />
So here I would like to say that there are basically 4 options by which you can handle database in silver light application.<br />
1) WCF for Silver light<br />
2) Ado.net Data Services<br />
3) Web services<br />
4) RIA Services (need to explore more)</p>
<p>Here I will explain how to connect your WPF Silver light application with database using well know Web service.<br />
It’s easy and I think we all already work on some part of Web services.</p>
<p>So let’s start with it.<br />
We have added a silver light navigation project. In navigation silver light project part we have added 2 new pages employee, register page.<br />
Employee page is for show employee list,And register page is for register employee.</p>
<p><a href="http://indiandotnet.wordpress.com/files/2009/11/employeelist.png"></a></p>
<p><a href="http://indiandotnet.wordpress.com/files/2009/11/register.png"></a><br />
Just see project structure as below.</p>
<p><a href="http://indiandotnet.wordpress.com/files/2009/11/projectphoto.png"><img class="alignnone size-full wp-image-247" title="projectPhoto" src="http://indiandotnet.wordpress.com/files/2009/11/projectphoto.png" alt="projectPhoto" width="325" height="501" /></a></p>
<p>And In web part we have added a new web service with name my services.<br />
Whose functionality to save, updates, Delete, and read all employee record.<br />
As shown in below fig.</p>
<p><a href="http://indiandotnet.wordpress.com/files/2009/11/mywebservice.png"><img class="alignnone size-full wp-image-248" title="MyWebService" src="http://indiandotnet.wordpress.com/files/2009/11/mywebservice.png" alt="MyWebService" width="709" height="365" /></a></p>
<p>Now our next step is how to integrate this web service with silver light.<br />
For this we add a services reference in our navigation project with the help of Add services reference menu as shown below.</p>
<p><a href="http://indiandotnet.wordpress.com/files/2009/11/addservices.png"><img class="alignnone size-full wp-image-249" title="AddServices" src="http://indiandotnet.wordpress.com/files/2009/11/addservices.png" alt="AddServices" width="557" height="443" /></a></p>
<p>Now you can rename name space according to your choice.</p>
<p>If you do not get any error in referencing then till now you are ok with your work.<br />
Now our next step is calling web method in our pages.<br />
Here I am taking first page which is employee list<br />
We are calling web method which returns all employee lists so here we go.</p>
<p>Private Sub EmployeePage_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded<br />
Try<br />
<strong>Dim myBinding As New ServiceModel.BasicHttpBinding()<br />
Dim myEndPoint As New ServiceModel.EndpointAddress(New Uri(&#8220;http://localhost/MyTest/MyWebService.asmx&#8221;, UriKind.Absolute))<br />
Dim proxy As New MyWebServiceSoapClient(myBinding, myEndPoint)<br />
proxy.pub_ReadAllDataAsync()<br />
AddHandler proxy.pub_ReadAllDataCompleted, AddressOf proxy_ReadAllEmployeeCompleted</strong></p>
<p>Catch ex As Exception</p>
<p>End Try<br />
End Sub</p>
<p><strong>Private Sub proxy_ReadAllEmployeeCompleted(ByVal sender As Object, ByVal e As myService.pub_ReadAllDataCompletedEventArgs)<br />
Try<br />
Me.myGrid.ItemsSource = e.Result<br />
Catch ex As Exception<br />
Me.HeaderText.Text = ex.InnerException.Message.ToString<br />
End Try<br />
End Sub</strong></p>
<p>Now things to remember here<br />
1) Dim myBinding As New ServiceModel.BasicHttpBinding()<br />
Its shows the binding is http binding<br />
2) Dim myEndPoint As New ServiceModel.EndpointAddress(New Uri(&#8220;http://localhost/MyTest/MyWebService.asmx&#8221;, UriKind.Absolute))<br />
Here the path can be absolute or relative.</p>
<p>3) Next you have to call web method like we have call here proxy.pub_ReadAllDataAsync()<br />
4) once we have call the method asyncronously then we have to make a event handler like we have create here</p>
<p>AddHandler proxy.pub_ReadAllDataCompleted, AddressOf proxy_ReadAllEmployeeCompleted</p>
<p>5) when the asyncronous method is complete we have to take result complete argument and covert according to our requirement.<br />
I have just bind the result to datagrid and get below screen.<br />
Just see below.</p>
<p><a href="http://indiandotnet.wordpress.com/files/2009/11/employeelist.png"><img title="employeeList" src="http://indiandotnet.wordpress.com/files/2009/11/employeelist.png?w=300" alt="employeeList" width="300" height="130" /></a></p>
<p>So friends in this way we can call web service in a Silverlight application.</p>
<p>Still we can use DataServices, RIA services, and WCF services for data manipulation application.</p>
<p>Hope in next few chapter we will take this example and work on it.</p>
<p>That’s all friends, thanks for reading the article.</p>
<p>Happy programming!</p>
<p>Thanks<br />
Rajat</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Java Technology for Web Services]]></title>
<link>http://technicalrecyclebin.wordpress.com/2009/11/08/java-technology-for-web-services/</link>
<pubDate>Sun, 08 Nov 2009 09:38:24 +0000</pubDate>
<dc:creator>SARAVANAN SIVAJI</dc:creator>
<guid>http://technicalrecyclebin.wordpress.com/2009/11/08/java-technology-for-web-services/</guid>
<description><![CDATA[&#8211;&gt; Web Services rely on the ability of remote components to communicate with each other, ir]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>&#8211;&#62; Web Services rely on the ability of remote components to communicate with each other, irrespective of how they are implemented or what systems they are running on.</p>
<p>&#160;</p>
<p>That is why XML is the cornerstone of web services, as it is a neutral data description language that makes data portable across difference systems.</p>
<p>Java is compatible with XML since it allows us to create applications that can be used on any operating system.</p>
<p>&#160;</p>
<p>&#8211;&#62; Java has dedicated APIs for creating, validating and processing XML and for implementing XML based communications.</p>
<p>&#160;</p>
<p>Mature enterprise platform, J2EE has many capabilities to web services.  Inbuilt support for multiple transactions, data connection pooling, security and enterprise messaging.</p>
<p>Existing J2EE components such as Servlets, JSPs and EJBs can also be exposed as web services, allowing you to add web service functionality to existing systems.</p>
<p>&#160;</p>
<p>&#160;</p>
<div id="_mcePaste">Although Java and the J2EE platform provide all the tools you need to create and run web services, J2EE does not have inbuilt support for web services yet. To provide this, you need to obtain the Java Web Services Developer Pack (WSDP).</div>
<div></div>
<div></div>
<div id="_mcePaste">The Java WSDP includes all the Java APIs for working with XML, which are built to conform to well-defined web service standards, including Simple Object Access Protocol (SOAP), Web Services Description Language (WSDL), and Universal  Description, Discovery, and Integration (UDDI).</div>
<p>&#160;</p>
<p>The Java WSDP also comes with a range of tools designed to help create, test, and deploy web services.</p>
<p>NOTE: The Java WSDP can be integrated into the current J2EE 1.3 release by use of a simple script.  Instructions for running this automated script are included in the Java WSDP documentation.</p>
<p>&#160;</p>
<p>The next release of the J2EE platform is Version 1.4. It will include many of the Java APIs for XML and will come with much greater built-in web service support, including</p>
<p>1. support for exposing J2EE components as web service clients and endpoints.</p>
<p>2.  interoperability with other web services that use SOAP and WSDL.</p>
<p>3.  a dedicated specification – Web Services for J2EE 1.0 – that details how web services should work on the J2EE platform.</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Accessing a Web Service using Apache CXF and Spring Framework Take 2]]></title>
<link>http://numberformat.wordpress.com/2009/11/06/accessing-a-web-service-using-apache-cxf-and-spring-framework-take-2/</link>
<pubDate>Sat, 07 Nov 2009 00:48:54 +0000</pubDate>
<dc:creator>numberformat</dc:creator>
<guid>http://numberformat.wordpress.com/2009/11/06/accessing-a-web-service-using-apache-cxf-and-spring-framework-take-2/</guid>
<description><![CDATA[This page describes how to generate a client to call a few popular web services that are available o]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This page describes how to generate a client to call a few popular web services that are available on the web.</p>
<h3>Requirements:</h3>
<ul>
<li> Desktop Computer</li>
<li><a href="http://wp.me/pvUBW-ev" target="_blank"> Maven 2</a></li>
</ul>
<h4>We will be generating clients for the following web services</h4>
<ul>
<li>IP2Geo (http://ws.cdyne.com/ip2geo/ip2geo.asmx?wsdl)</li>
<li>Currency Converter (http://webservice.webserviceshare.com/currencyconverter/rates.asmx?WSDL)</li>
<li>Bible Web Service (http://www.webservicex.net/BibleWebservice.asmx?wsdl)</li>
</ul>
<p>Before we can start to use any of the above web services we need to create a new Java project in Eclipse. Name the project</p>
<p>Go ahead and create a new java project in eclipse and save the following pom.xml file to the main folder.</p>
<pre class="brush: xml;">
&#60;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&#62;
&#60;project xmlns=&#34;http://maven.apache.org/POM/4.0.0&#34; xmlns:xsi=&#34;http://www.w3.org/2001/XMLSchema-instance&#34;
	xsi:schemaLocation=&#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&#34;&#62;
	&#60;modelVersion&#62;4.0.0&#60;/modelVersion&#62;

	&#60;groupId&#62;com.vermatech&#60;/groupId&#62;
	&#60;artifactId&#62;TestApacheCXFClient&#60;/artifactId&#62;
	&#60;packaging&#62;war&#60;/packaging&#62;
	&#60;version&#62;1.0.1-SNAPSHOT&#60;/version&#62;
	&#60;name&#62;TestApacheCXFClient&#60;/name&#62;
	&#60;url&#62;http://maven.apache.org&#60;/url&#62;

	&#60;build&#62;
		&#60;sourceDirectory&#62;src&#60;/sourceDirectory&#62;
&#60;resources&#62;&#60;resource&#62;&#60;directory&#62;src&#60;/directory&#62;&#60;/resource&#62;&#60;/resources&#62;
		&#60;plugins&#62;
			&#60;plugin&#62;
				&#60;groupId&#62;org.apache.maven.plugins&#60;/groupId&#62;
				&#60;artifactId&#62;maven-compiler-plugin&#60;/artifactId&#62;
				&#60;version&#62;2.0.2&#60;/version&#62;
				&#60;configuration&#62;
					&#60;source&#62;1.6&#60;/source&#62;
					&#60;target&#62;1.6&#60;/target&#62;
				&#60;/configuration&#62;
			&#60;/plugin&#62;
		&#60;/plugins&#62;
	&#60;/build&#62;
	&#60;dependencies&#62;
		&#60;dependency&#62;
		  &#60;groupId&#62;log4j&#60;/groupId&#62;
		  &#60;artifactId&#62;log4j&#60;/artifactId&#62;
		  &#60;version&#62;1.2.15&#60;/version&#62;
			&#60;exclusions&#62;
				&#60;exclusion&#62;
					&#60;groupId&#62;javax.mail&#60;/groupId&#62;
					&#60;artifactId&#62;mail&#60;/artifactId&#62;
				&#60;/exclusion&#62;
				&#60;exclusion&#62;
					&#60;groupId&#62;javax.jms&#60;/groupId&#62;
					&#60;artifactId&#62;jms&#60;/artifactId&#62;
				&#60;/exclusion&#62;
				&#60;exclusion&#62;
					&#60;groupId&#62;com.sun.jdmk&#60;/groupId&#62;
					&#60;artifactId&#62;jmxtools&#60;/artifactId&#62;
				&#60;/exclusion&#62;
				&#60;exclusion&#62;
					&#60;groupId&#62;com.sun.jmx&#60;/groupId&#62;
					&#60;artifactId&#62;jmxri&#60;/artifactId&#62;
				&#60;/exclusion&#62;
				&#60;exclusion&#62;
					&#60;groupId&#62;javax.activation&#60;/groupId&#62;
					&#60;artifactId&#62;activation&#60;/artifactId&#62;
				&#60;/exclusion&#62;
			&#60;/exclusions&#62;
		&#60;/dependency&#62;

		&#60;dependency&#62;
			&#60;groupId&#62;org.apache.cxf&#60;/groupId&#62;
			&#60;artifactId&#62;cxf&#60;/artifactId&#62;
			&#60;version&#62;2.1&#60;/version&#62;
			&#60;type&#62;pom&#60;/type&#62;
			&#60;scope&#62;compile&#60;/scope&#62;
		&#60;/dependency&#62;
		&#60;dependency&#62;
			&#60;groupId&#62;org.apache.cxf&#60;/groupId&#62;
			&#60;artifactId&#62;cxf-rt-frontend-jaxws&#60;/artifactId&#62;
			&#60;version&#62;2.2.4&#60;/version&#62;
			&#60;type&#62;jar&#60;/type&#62;
			&#60;scope&#62;compile&#60;/scope&#62;
		&#60;/dependency&#62;
		&#60;dependency&#62;
			&#60;groupId&#62;org.apache.cxf&#60;/groupId&#62;
			&#60;artifactId&#62;cxf-rt-transports-http-jetty&#60;/artifactId&#62;
			&#60;version&#62;2.2.4&#60;/version&#62;
			&#60;type&#62;jar&#60;/type&#62;
			&#60;scope&#62;compile&#60;/scope&#62;
		&#60;/dependency&#62;

	&#60;/dependencies&#62;
&#60;/project&#62;
</pre>
<p>regenerate the project by dropping to the command line and typing:</p>
<p>mvn eclipse:clean eclipse:eclipse</p>
<h2>IP2Geo</h2>
<p>This web service accepts an ip address and returns some information about it.</p>
<p>We start by getting the wsdl and saving it to our project as</p>
<p>document.wsdl</p>
<p>We insert the following into the pom.xml file in the plugins section.</p>
<pre class="brush: xml;">
&#60;plugin&#62;
	&#60;groupId&#62;org.apache.cxf&#60;/groupId&#62;
	&#60;artifactId&#62;cxf-codegen-plugin&#60;/artifactId&#62;
	&#60;version&#62;2.2.4&#60;/version&#62;
	&#60;executions&#62;
		&#60;execution&#62;
			&#60;id&#62;generate-sources&#60;/id&#62;
			&#60;phase&#62;generate-sources&#60;/phase&#62;
			&#60;configuration&#62;
				&#60;sourceRoot&#62;generated/cxf&#60;/sourceRoot&#62;
				&#60;wsdlOptions&#62;
					&#60;wsdlOption&#62;
						&#60;wsdl&#62;document.wsdl&#60;/wsdl&#62;
					&#60;/wsdlOption&#62;
				&#60;/wsdlOptions&#62;
			&#60;/configuration&#62;
			&#60;goals&#62;
				&#60;goal&#62;wsdl2java&#60;/goal&#62;
			&#60;/goals&#62;
		&#60;/execution&#62;
	&#60;/executions&#62;
&#60;/plugin&#62;
</pre>
<p>To generate the code type the following at the command prompt inside your eclipse project:</p>
<p>mvn generate-sources</p>
<ul>
<li>Return to eclipse and refresh the project.</li>
<li>You will see additional files added to the /generated/cxf folder within the project.</li>
<li>Copy these files to the folder where your javasource files are located.</li>
</ul>
<p>Create a simple client that calls these web services.</p>
<p>SimpleClientApp.java</p>
<pre class="brush: java;">
package test;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.cdyne.ws.IP2GeoSoap;
import com.cdyne.ws.IPInformation;

public class HelloWorldClientApp {
public static void main(String args[]) throws Exception {
ApplicationContext context = new ClassPathXmlApplicationContext(new String[] {&#34;app-context.xml&#34;});

IP2GeoSoap ip2Geo = (IP2GeoSoap) context.getBean(&#34;ip2Geo&#34;);
IPInformation ipInformation = ip2Geo.resolveIP(&#34;12.12.12.12&#34;, &#34;0&#34;);

System.out.println(&#34;City: &#34; + ipInformation.getCity());
System.out.println(&#34;State: &#34; + ipInformation.getStateProvince());
System.out.println(&#34;Country: &#34; + ipInformation.getCountry());
}
}
</pre>
<p>The above program initialized the spring application context and gets a bean that represents the web service. It invokes a method called &#8220;resolveIp()&#8221; to get a ipInformation object. Next it simply displays the values on the console.</p>
<p>One thing to note here is that the client code does not need all the files the wsdl2java has generated for us. We can trim down the generated code by deleting some classes we dont need.</p>
<p>We first start with the ObjectFactory. At this point it does not look like the object factory provides any benefit.</p>
<p>Delete the following</p>
<ul>
<li>ObjectFactory.java</li>
<li>IP2GeoHttpGet.java</li>
<li>IP2GeoHttpPost.java</li>
</ul>
<p>Modify</p>
<ul>
<li>IP2GeoSoap.java and comment out the following line&#8230;</li>
<li>@XmlSeeAlso({ObjectFactory.class})</li>
<li>Delete the IP2GeoHttpGet.java and IP2GeoHttpPost.java as these methods will not be used to access the service</li>
<li>Delete the IP2Geo.java class because we will use spring to generate the proxy that will access the service.</li>
<li>Delete the ObjectFactory.java, ResolveIP.java, and ResolveIPResponse.java files as well</li>
<li>Fix any compile issues that may arise from doing the deletes</li>
</ul>
<p>You should only be left with 3 class files in your package</p>
<ul>
<li>IP2GeoSoap.jvaa</li>
<li>IPInformation.java</li>
<li>package-info.java</li>
</ul>
<p>Next you need to make your app-context.xml should look like this&#8230; this file is located at the top package.</p>
<pre class="brush: xml;">
&#60;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&#62;
&#60;beans xmlns=&#34;http://www.springframework.org/schema/beans&#34;
       xmlns:jaxws=&#34;http://cxf.apache.org/jaxws&#34;
       xmlns:xsi=&#34;http://www.w3.org/2001/XMLSchema-instance&#34;
       xsi:schemaLocation=&#34;
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd&#34;&#62;

    &#60;jaxws:client id=&#34;ip2Geo&#34;
                  serviceClass=&#34;com.cdyne.ws.IP2GeoSoap&#34;
                  address=&#34;http://ws.cdyne.com/ip2geo/ip2geo.asmx&#34; /&#62;
&#60;/beans&#62;
</pre>
<h3>Testing the program</h3>
<p>Create a class in the test package.<br />
HelloWorldClientApp.java</p>
<pre class="brush: java;">
package test;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.cdyne.ws.IP2GeoSoap;
import com.cdyne.ws.IPInformation;

public class HelloWorldClientApp {
	public static void main(String args[]) throws Exception {
		ApplicationContext context = new ClassPathXmlApplicationContext(new String[] {&#34;app-context.xml&#34;});

		IP2GeoSoap ip2Geo = (IP2GeoSoap) context.getBean(&#34;ip2Geo&#34;);
		IPInformation ipInformation = ip2Geo.resolveIP(&#34;12.12.12.12&#34;, &#34;0&#34;);

		System.out.println(&#34;City: &#34; + ipInformation.getCity());
		System.out.println(&#34;State: &#34; + ipInformation.getStateProvince());
		System.out.println(&#34;Country: &#34; + ipInformation.getCountry());
	}
}
</pre>
<p>Run the program</p>
<p>you should get output similar to the following</p>
<pre class="brush: bash;">
log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
log4j:WARN Please initialize the log4j system properly.
Nov 6, 2009 6:07:51 PM org.apache.cxf.bus.spring.BusApplicationContext getConfigResources
INFO: No cxf.xml configuration file detected, relying on defaults.
Nov 6, 2009 6:07:52 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service {http://ws.cdyne.com/}IP2GeoSoapService from class com.cdyne.ws.IP2GeoSoap
City: Anchorage
State: AK
Country: United States
</pre>
<h2>Currency Converter</h2>
<p>We will now investigate how to convert over the currency conversion web service that can be accessed using the following wsdl.</p>
<p><a href="http://webservice.webserviceshare.com/currencyconverter/rates.asmx?WSDL">http://webservice.webserviceshare.com/currencyconverter/rates.asmx?WSDL</a></p>
<p>We start by saving the file to<br />
document.wsdl</p>
<p>To generate the code type the following:</p>
<p>Open a command prompt and cd to the project&#8217;s folder</p>
<p>mvn generate-sources</p>
<p>you should see the following output</p>
<pre class="brush: bash;">
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building TestApacheCXFClient
[INFO]    task-segment: [generate-sources]
[INFO] ------------------------------------------------------------------------
[INFO] [cxf-codegen:wsdl2java {execution: generate-sources}]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Fri Nov 06 18:23:44 EST 2009
[INFO] Final Memory: 25M/534M
[INFO] ------------------------------------------------------------------------
</pre>
<p>Return to the eclipse project and click refresh.<br />
At this point you should see new files under the project /generated/cxf/com/websevriceshare folder.</p>
<p>We quickly identify that CurrencyConverterSoap.java is the main interface class for the web service. This class has the following methods</p>
<ul>
<li> getRates</li>
<li> getSupportedCurrencies</li>
<li> getRatesInAllCurrencies</li>
<li> getConvertedAmount</li>
<li> getConvertedAmountInAllCurrencies</li>
</ul>
<p>Create a package com.websvriceshare (spelled incorrectly I know but do it anyway) and paste in all the generated code. We will run the project as-is.</p>
<p>We test he web service by defining the following in your spring configuration file&#8230;</p>
<pre class="brush: xml;">
&#60;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&#62;
&#60;beans xmlns=&#34;http://www.springframework.org/schema/beans&#34;
       xmlns:jaxws=&#34;http://cxf.apache.org/jaxws&#34;
       xmlns:xsi=&#34;http://www.w3.org/2001/XMLSchema-instance&#34;
       xsi:schemaLocation=&#34;
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd&#34;&#62;

    &#60;jaxws:client id=&#34;currencyConverter&#34;
                  serviceClass=&#34;com.websevriceshare.CurrencyConverterSoap&#34;
                  address=&#34;http://webservice.webserviceshare.com/currencyconverter/rates.asmx&#34; /&#62;

&#60;/beans&#62;
</pre>
<p>Define the following test code</p>
<p>HelloWorldClientApp.java</p>
<pre class="brush: java;">
package test;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.websevriceshare.CurrencyConverterSoap;
import com.websevriceshare.CurrencyListRow;

public class HelloWorldClientApp {
	public static void main(String args[]) throws Exception {
		ApplicationContext context = new ClassPathXmlApplicationContext(new String[] {&#34;app-context.xml&#34;});

		CurrencyConverterSoap currencyConverter = (CurrencyConverterSoap) context
				.getBean(&#34;currencyConverter&#34;);

		System.out.println(&#34;These currencies are supported: &#34;);
		for (CurrencyListRow row : currencyConverter.getSupportedCurrencies().getCurrencyListRow()) {
			System.out.println(row.getCurrencyName());
		}

	}
}
</pre>
<p>Run the class and you should get output to the console that looks like this&#8230;</p>
<pre>log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
log4j:WARN Please initialize the log4j system properly.
Nov 6, 2009 6:44:04 PM org.apache.cxf.bus.spring.BusApplicationContext getConfigResources
INFO: No cxf.xml configuration file detected, relying on defaults.
Nov 6, 2009 6:44:04 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service {http://websevriceshare.com/}CurrencyConverterSoapService from class com.websevriceshare.CurrencyConverterSoap
These currencies are supported:
Albanian Lek
Algerian Dinar
Argentine Peso
Aruba Florin
Australian Dollar
Bahamian Dollar
...
Yemen Riyal
Zambian Kwacha
Zimbabwe Dollar
Croatian Kuna
Russian Rouble</pre>
<p>Once we are comfortable that its running we will start deleting un-necessary code that was generated.</p>
<h2>Bible Web Service</h2>
<p>This web service list all versus by Book Title ,Chapter and Verse from the Kings James version Bible</p>
<p>Download the source of the wsdl and again put it into document.wsdl</p>
<p>re-run the command to generate the sources and copy the generated sources to its package under the src folder. This time the source code got generated into the net.webservicex package. We create a similar package in our src folder within our project.</p>
<p>We quickly look at the generated classes once they have been moved over to our source folder and find out that BibleWebserviceSoap.java is the main web service class. It contains the following methods. All of them return a String. This is unfortunate since whomever is implementing the web service will need to parse the xml. It would have been better for the web service author to create a complex Type object and save the client programmers some time.</p>
<ul>
<li> getBibleWordsbyKeyWord</li>
<li> getBookTitles</li>
<li> getBibleWordsByChapterAndVerse</li>
<li> getBibleWordsByBookTitleAndChapter</li>
</ul>
<p>&#160;</p>
<p>Modify the spring configuration file to generate the proxy for this service.</p>
<pre class="brush: xml;">
    &#60;jaxws:client id=&#34;bibleWebService&#34;
                  serviceClass=&#34;net.webservicex.BibleWebserviceSoap&#34;
                  address=&#34;http://www.webservicex.net/BibleWebservice.asmx&#34; /&#62;
</pre>
<p>Create a client program to test the service</p>
<pre class="brush: java;">
package test;

import net.webservicex.BibleWebserviceSoap;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class HelloWorldClientApp {
	public static void main(String args[]) throws Exception {
		ApplicationContext context = new ClassPathXmlApplicationContext(new String[] {&#34;app-context.xml&#34;});

		BibleWebserviceSoap bibleWebService = (BibleWebserviceSoap) context
				.getBean(&#34;bibleWebService&#34;);

		System.out.println(bibleWebService.getBookTitles());
	}
}
</pre>
<p>This is the output we get.</p>
<pre class="brush: xml;">
&#60;NewDataSet&#62;
  &#60;Table&#62;
    &#60;Book&#62;1&#60;/Book&#62;
    &#60;BookTitle&#62;Genesis&#60;/BookTitle&#62;
  &#60;/Table&#62;
  &#60;Table&#62;
    &#60;Book&#62;2&#60;/Book&#62;
    &#60;BookTitle&#62;Exodus&#60;/BookTitle&#62;
  &#60;/Table&#62;
  &#60;Table&#62;
    &#60;Book&#62;3&#60;/Book&#62;
    &#60;BookTitle&#62;Leviticus&#60;/BookTitle&#62;
  &#60;/Table&#62;
  &#60;Table&#62;
    &#60;Book&#62;4&#60;/Book&#62;
    &#60;BookTitle&#62;Numbers&#60;/BookTitle&#62;
  &#60;/Table&#62;
</pre>
<p>Once we are comfortable with this we delete any un-necessary code.</p>
<p>We have successfully generated code that calls 3 web services using the Apache CXF framework.</p>
<p>Thats All for now!!!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[WCF Glossary]]></title>
<link>http://parwej.wordpress.com/2009/11/07/wcf-glossary/</link>
<pubDate>Fri, 06 Nov 2009 19:22:29 +0000</pubDate>
<dc:creator>pahamad</dc:creator>
<guid>http://parwej.wordpress.com/2009/11/07/wcf-glossary/</guid>
<description><![CDATA[I have speak with most of the person and they always saying they would not be able to understand the]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I have speak with most of the person and they always saying they would not be able to understand the basic terms which is used in WCF. I am trying to give here terms with meaningfull description:</p>
<p><strong>1. Address</strong></p>
<p>Specifies the location where messages are received. It is specified as a Uniform Resource Identifier (URI). The URI schema part names the transport mechanism to use to reach the address, such as HTTP and TCP.</p>
<p><strong>2. Application endpoint</strong></p>
<p>An endpoint exposed by the application and that corresponds to a service contract implemented by the application.</p>
<p><strong>3. Behavior</strong></p>
<p style="text-align:justify;">A behavior is a component that controls various run-time aspects of a service, an endpoint, a particular operation, or a client. Behaviors are grouped according to scope: common behaviors affect all endpoints globally, service behaviors affect only service-related aspects, endpoint behaviors affect only endpoint-related properties, and operation-level behaviors affect particular operations.</p>
<p><strong>4. Binding</strong></p>
<p>Defines which communication protocols are used to communicate with WCF services.</p>
<p><strong>5. Binding element</strong></p>
<p style="text-align:justify;">A binding element represents a particular piece of the binding, such as a transport, an encoding, an implementation of an infrastructure-level protocol (such as WS-ReliableMessaging), or any other component of the communication stack.</p>
<p><strong>6. Channel</strong></p>
<p style="text-align:justify;">A concrete implementation of a binding element. The binding represents the configuration, and the channel is the implementation associated with that configuration. Therefore, there is a channel associated with each binding element. Channels stack on top of each other to create the concrete implementation of the binding: the channel stack.</p>
<p><strong>7. Client application</strong></p>
<p>A client application is a program that exchanges messages with one or more endpoints.</p>
<p><strong>8. Contract</strong></p>
<p style="text-align:justify;">A contract is a specification of support for the particular type of contract that it is. A service contract, for example, is a specification for a group of operations. In WCF, contracts have a hierarchy that is mirrored in the description objects located in the System.ServiceModel.Description namespace. A service contract is the largest contract scope in WCF. Each service operation in a service contract has an operation contract, which specifies the messages &#8212; including fault messages &#8212; the operation can exchange, and in which direction. Each message in an operation has a message contract, a specification for the structure of the SOAP message envelope, and each message contract has a data contract, which specifies the data structures contained in the messages.</p>
<p><strong>9. Data contract</strong></p>
<p style="text-align:justify;">The data types a service uses must be described in metadata to enable others to interoperate with the service. The descriptions of the data types are known as the data contract, and the types can be used in any part of a message, for example, as parameters or return types. If the service is using only simple types, there is no need to explicitly use data contracts.</p>
<p><strong>10. Endpoint</strong></p>
<p>Consists of an address, a binding, and a contract used for communicating with a WCF service.</p>
<p><strong>11. Fault contract</strong></p>
<p style="text-align:justify;">A fault contract can be associated with a service operation to denote errors that can be returned to the caller. An operation can have zero or more faults associated with it. These errors are SOAP faults that are modeled as exceptions in the programming model. The exception is converted into a SOAP fault that can then be sent to the client.</p>
<p><strong>12. Hosting</strong></p>
<p>A service must be hosted in some process. A host is an application that controls the lifetime of the service. Services can be self-hosted or managed by an existing hosting process.</p>
<p><strong>13. Hosting process</strong></p>
<p style="text-align:justify;">A hosting process is an application that is designed to host services. These include Internet Information Services (IIS), Windows Activation Services (WAS), and Windows Services. In these hosted scenarios, the host controls the lifetime of the service. For example, using IIS you can set up a virtual directory that contains the service assembly and configuration file. When a message is received, IIS starts the service and controls its lifetime.</p>
<p><strong>14. Message</strong></p>
<p>A message is a self-contained unit of data that may consist of several parts, including a body and headers.</p>
<p><strong>15. Message contract</strong></p>
<p style="text-align:justify;">A message contact describes the format of a message. For example, it declares whether message elements should go in headers versus the body, what level of security should be applied to what elements of the message, and so on.</p>
<p><strong>16. Message security mode</strong></p>
<p style="text-align:justify;">Message security mode specifies that security is provided by implementing one or more of the security specifications. Each message contains the necessary mechanisms to provide security during its transit, and to enable the receivers to detect tampering and to decrypt the messages. In this sense, the security is encapsulated within every message, providing end-to-end security across multiple hops. Because security information becomes part of the message, it is also possible to include multiple kinds of credentials with the message (these are referred to as claims). This approach also has the advantage of enabling the message to travel securely over any transport, including multiple transports between its origin and destination. The disadvantage of this approach is the complexity of the cryptographic mechanisms employed, resulting in performance implications.</p>
<p><strong>17. Metadata</strong></p>
<p style="text-align:justify;">The metadata of a service describes the characteristics of the service that an external entity needs to understand to communicate with the service. Metadata can be consumed by the ServiceModel Metadata Utility Tool (Svcutil.exe) to generate a WCF client and accompanying configuration that a client application can use to interact with the service. The metadata exposed by the service includes XML schema documents, which define the data contract of the service, and WSDL documents, which describe the methods of the service. When enabled, metadata for the service is automatically generated by WCF by inspecting the service and its endpoints. To publish metadata from a service, you must explicitly enable the metadata behavior.</p>
<p><strong>18. Operation contract</strong></p>
<p style="text-align:justify;">An operation contract defines the parameters and return type of an operation. When creating an interface that defines the service contract, you signify an operation contract by applying the T:System.ServiceModel.OperationContractAttribute attribute to each method definition that is part of the contract. The operations can be modeled as taking a single message and returning a single message, or as taking a set of types and returning a type. In the latter case, the system determines the format for the messages that are exchanged for that operation.</p>
<p><strong>19. Self-hosted service</strong></p>
<p style="text-align:justify;">A self-hosted service is one that runs within a process application that the developer created. The developer controls its lifetime, sets the properties of the service, opens the service (which sets it into a listening mode), and closes the service.</p>
<p><strong>20. Service</strong></p>
<p>A program or process that exposes one or more endpoints, with each endpoint exposing one or more operations.</p>
<p><strong>21. Service contract</strong></p>
<p style="text-align:justify;">The service contract ties together multiple related operations into a single functional unit. The contract can define service-level settings, such as the namespace of the service, a corresponding callback contract, and other such settings. In most cases, the contract is defined by creating an interface in the programming language of your choice and applying the T:System.ServiceModel.ServiceContractAttribute attribute to the interface. The actual service code results by implementing the interface.</p>
<p><strong>22. Service operation</strong></p>
<p style="text-align:justify;">A service operation is a procedure defined in a service&#8217;s code that implements the functionality for an operation. This operation is exposed to clients as methods on a WCF client. The method may return a value, and may take an optional number of arguments, or take no arguments, and return no response. For example, an operation that functions as a &#38;quot;Hello&#38;quot; can be used as a notification of a client&#8217;s presence and to begin a series of operations.</p>
<p><strong>23. System-provided bindings</strong></p>
<p style="text-align:justify;">WCF includes a number of system-provided bindings. These are collections of binding elements that are optimized for specific scenarios. For example, the T:System.ServiceModel.WSHttpBinding is designed for interoperability with services that implement various WS-* specifications. These bindings save time by presenting only those options that can be correctly applied to the specific scenario. If one of these bindings does not meet your requirements, you can create your own custom binding.</p>
<p><strong>24. Transport security mode</strong></p>
<p style="text-align:justify;">Security can be provided by one of three modes: transport mode, message security mode, and transport with message credential mode. The transport security mode specifies that confidentiality, integrity, and authentication are provided by the transport layer mechanisms (such as HTTPS). When using a transport like HTTPS, this mode has the advantage of being efficient in its performance, and well understood because of its prevalence on the Internet. The disadvantage is that this kind of security is applied separately on each hop in the communication path, making the communication susceptible to a &#38;quot;man in the middle&#38;quot; attack.</p>
<p><strong>25. Transport with message credential security mode</strong></p>
<p style="text-align:justify;">This mode uses the transport layer to provide confidentiality, authentication, and integrity of the messages, while each of the messages can contain multiple credentials (claims) required by the receivers of the message.</p>
<p><strong>26. WCF client</strong></p>
<p style="text-align:justify;">A WCF client is a client-application construct that exposes the service operations as methods (in the .NET Framework programming language of your choice, such as Visual Basic or Visual C#). Any application can host a WCF client, including an application that hosts a service. Therefore, it is possible to create a service that includes WCF clients of other services. A WCF client can be automatically generated by using the ServiceModel Metadata Utility Tool (Svcutil.exe) and pointing it at a running service that publishes metadata.</p>
<p><strong>27. WS-*</strong></p>
<p style="text-align:justify;">Shorthand for the growing set of Web Service (WS) specifications, such as WS-Security, WS-ReliableMessaging, and so on, that are implemented in WCF.</p>
<p>Thanks,</p>
<p>Parwej Ahamad</p>
<p><a href="mailto:e-ahamad.parwej@gmail.com">e-ahamad.parwej@gmail.com</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ideas for Wave Robots]]></title>
<link>http://developer42.wordpress.com/2009/11/04/ideas-for-wave-robots/</link>
<pubDate>Wed, 04 Nov 2009 21:32:59 +0000</pubDate>
<dc:creator>Developer42</dc:creator>
<guid>http://developer42.wordpress.com/2009/11/04/ideas-for-wave-robots/</guid>
<description><![CDATA[One of the hardest things about developing a wave robot is coming up with an original idea. My smile]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>One of the hardest things about developing a wave robot is coming up with an original idea.  My smiley bot [smiley_wave@appspot.com] was just for me to play with wave &#38; get used to uploading apps to App Engine / get back into java coding and using eclipse.  Now that that&#8217;s done, it&#8217;s time to think of something useful; an application that people will actually want to use.  The point of this post is partly a brainstorming session for myself, and partly to put these ideas out there to anyone stuck for ideas, who think they can code one of these, and finally, to encourage others to submit ideas.</p>
<p><strong>Webby &#8211; The Web Service Robot</strong><br />
A robot which when added, detects any URLs pointing to web services, generates a form based on the parameters, then submits this data via SOAP, and puts the return value into a new blip.</p>
<p><strong>Squely &#8211; A Database Query Bot</strong><br />
A robot which can run SQL statements against given connection strings.  At present, this will only be possible if the database is publicly accessible, or if you have a wave server installed on the same network as your database.</p>
<p><strong>QIFry &#8211; Interesting</strong><br />
This robot would monitor waves for key words, then on detection, pop in an interesting fact about that word (e.g. if it spots the word Banana, it says &#8220;did you know that bananas are herbs, and these shrubs can walk?&#8221;).  It also monitors for boring words, and replaces them with more eloquent ones.</p>
<p><strong>Pretty &#8211; Pretty Print</strong><br />
Detects common languages / markup &#38; changes the layout to make it more readable.</p>
<p><strong>Recipe</strong><br />
Finds recipes based on ingredients or dish names in the wave.</p>
<p><strong>FindMe</strong><br />
Uses the GEO features of HTML 5 to locate where each wave user is and lets wavers know where their nearest wavers are.  This could also take info about their interests to help match people up to folks whose hobbies they share.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Figuring out why SAS BI Web Services for .Net doesn’t work – Part 3]]></title>
<link>http://christopherpope.wordpress.com/2009/11/03/figuring-out-why-sas-bi-web-services-for-net-doesn%e2%80%99t-work-%e2%80%93-part-3/</link>
<pubDate>Tue, 03 Nov 2009 11:48:12 +0000</pubDate>
<dc:creator>Christopher</dc:creator>
<guid>http://christopherpope.wordpress.com/2009/11/03/figuring-out-why-sas-bi-web-services-for-net-doesn%e2%80%99t-work-%e2%80%93-part-3/</guid>
<description><![CDATA[It’s been well over a week since I wrote about battling the SAS BI Web Services for .Net beast and a]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>It’s been well over a week since I wrote about battling the SAS BI Web Services for .Net beast and a lot has changed. A week or so ago I was pretty sure that I had gotten it installed and was dealing with problems created by configuration issues. I have since found out that I did not have it installed correctly and through the course of the last 10 days SAS sent me 3 additional plan files, the last of which still didn&#8217;t work correctly.</p>
<p>I’ll recap what I’m doing. I’m trying to get SAS BI Web Services for .Net installed and working so that I can work on the bigger picture of my project which is to document how to call these web services from a .Net web application. Installing SAS is like building the bay bridge from a bucket (a really big one) of nuts and bolts and cables and other stuff. The full installation for all of the SAS components encompasses dozens and dozens of CDs. So you install SAS in almost any permutation of components but the specific permutation which I need is the one which enables me to use SAS BI Web Services for .Net. The ‘plan’ file which I spoke of above is basically the blueprint to the bridge. It is an XML file which is fed into the SAS installer to tell it which components to install in what order and how to configure them.</p>
<p><strong>Dissecting a SAS installation plan file</strong></p>
<p>I&#8217;m still trying to get a working plan file from SAS. I have a ticket open with them to get a plan file with which I can install SAS BI Web Services for .Net plus all the other needed components. But to date, I haven’t received a working plan file. I am now in receipt of the 5<sup>th</sup> plan file but it doesn’t work and so I’m currently awaiting the 6<sup>th</sup> one. SAS does not support user modifications of a plan file, they only support plan files from SAS Support or a dedicated account rep. Well, I don’t have a dedicated account rep and I’m still waiting on a good plan file from SAS so last week I set about creating my own. And I succeeded. But I’m not telling SAS because with all of the complexity of SAS, I may have missed something so I’m going to wait on a blessed and ordained plan file from SAS rather than my own creation.</p>
<p>I took a look at the XML plan file to see what it looked like and I found that the plan file’s contents really don’t look that complicated; there are 3 basic types of information in it:</p>
<ol>
<li>Component section. These are sections which identify a component (e.g. SAS Web Infrastructure Client) and give it a unique ID within the plan file.</li>
<li>The properties section of a component section. Properties are sequentially numbered within the whole plan file so if a new component section is inserted; all properties in the entire file need to be renumbered. These properties for the most part have identical names and values between sections. There are a couple of components which have different props but overall, they’re the same for each component section.</li>
<li>References to other components. This seems to be the way dependencies between components are defined. Here is an example of the first 3 types of information:
<ol>
<li><img class="aligncenter size-full wp-image-58" title="Plan1" src="http://christopherpope.wordpress.com/files/2009/11/plan11.jpg" alt="Plan1" width="544" height="268" /></li>
</ol>
</li>
<li>Some components are hierarchically children of other components. I *think* that is because the parent component is dependent on the child but then again, number 3 above seemed to indicate.  Here is an example:
<ol>
<li><img class="aligncenter size-full wp-image-59" title="Plan2" src="http://christopherpope.wordpress.com/files/2009/11/plan21.jpg" alt="Plan2" width="549" height="480" /></li>
</ol>
</li>
</ol>
<p>I now have a working installation of SAS BI Web Services for .Net but, like I said, I’m keeping my ticket open with SAS until I get an official one from SAS because I probably missed something.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Accessing a Web Service using Apache CXF and Spring Framework]]></title>
<link>http://numberformat.wordpress.com/2009/11/03/accessing-a-web-service-using-apache-cxf-and-spring-framework/</link>
<pubDate>Tue, 03 Nov 2009 06:42:36 +0000</pubDate>
<dc:creator>numberformat</dc:creator>
<guid>http://numberformat.wordpress.com/2009/11/03/accessing-a-web-service-using-apache-cxf-and-spring-framework/</guid>
<description><![CDATA[This page describes the steps necessary to generate and run a standalone java application that calls]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This page describes the steps necessary to generate and run a standalone java application that calls a web service. This application will be generated from an existing WSDL using the Apache CXF, Maven and The Spring Framework.</p>
<p>Please note that this page describes the generation of the client side application only. If you want to generate the server side please click on the following <a href="http://wp.me/pvUBW-fw" target="_blank">link</a>.</p>
<p>After you return from reading the above link we will need to add a few more lines of code to the web service&#8230;</p>
<p>At this time open up the HelloWorldImpl.java and add the following few lines of code to that class.</p>
<pre class="brush: java;">
	@Override
	public Employee getEmployee(Integer id) {
		Employee employee = new Employee();
		employee.setFirstName(&#34;John&#34;);
		employee.setLastName(&#34;Doe&#34;);
		employee.setHireDate(new Date());

		return employee;
	}
</pre>
<p>Now add the following class to the demo.spring package<br />
Employee.java</p>
<pre class="brush: java;">
package demo.spring;

import java.util.Date;

public class Employee {
	private String firstName;
	private String lastName;
	private Date hireDate;

	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	public Date getHireDate() {
		return hireDate;
	}
	public void setHireDate(Date hireDate) {
		this.hireDate = hireDate;
	}

}
</pre>
<p>Add the following line to the HelloWorld.java Interface</p>
<pre class="brush: java;">
    public Employee getEmployee(Integer id);
</pre>
<p>Return to the web service URL and you should see another web service method appear.<br />
<img class="alignnone size-full wp-image-980" title="Screenshot-CXF - Service list - Mozilla Firefox-1" src="http://numberformat.wordpress.com/files/2009/11/screenshot-cxf-service-list-mozilla-firefox-1.png" alt="Screenshot-CXF - Service list - Mozilla Firefox-1" width="655" height="301" /></p>
<p>Please verify that it is appearing before proceeding further on this page.</p>
<p>We start with a new simple Java project.</p>
<pre class="brush: xml;">
&#60;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&#62;
&#60;project xmlns=&#34;http://maven.apache.org/POM/4.0.0&#34; xmlns:xsi=&#34;http://www.w3.org/2001/XMLSchema-instance&#34;
	xsi:schemaLocation=&#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&#34;&#62;
	&#60;modelVersion&#62;4.0.0&#60;/modelVersion&#62;

	&#60;groupId&#62;com.vermatech&#60;/groupId&#62;
	&#60;artifactId&#62;TestApacheCXFClient&#60;/artifactId&#62;
	&#60;packaging&#62;war&#60;/packaging&#62;
	&#60;version&#62;1.0.1-SNAPSHOT&#60;/version&#62;
	&#60;name&#62;TestApacheCXFClient&#60;/name&#62;
	&#60;url&#62;http://maven.apache.org&#60;/url&#62;

	&#60;build&#62;
		&#60;sourceDirectory&#62;src&#60;/sourceDirectory&#62;
&#60;resources&#62;&#60;resource&#62;&#60;directory&#62;src&#60;/directory&#62;&#60;/resource&#62;&#60;/resources&#62;
		&#60;plugins&#62;
			&#60;plugin&#62;
				&#60;groupId&#62;org.apache.maven.plugins&#60;/groupId&#62;
				&#60;artifactId&#62;maven-compiler-plugin&#60;/artifactId&#62;
				&#60;version&#62;2.0.2&#60;/version&#62;
				&#60;configuration&#62;
					&#60;source&#62;1.6&#60;/source&#62;
					&#60;target&#62;1.6&#60;/target&#62;
				&#60;/configuration&#62;
			&#60;/plugin&#62;
		&#60;/plugins&#62;
	&#60;/build&#62;
	&#60;dependencies&#62;
		&#60;dependency&#62;
		  &#60;groupId&#62;log4j&#60;/groupId&#62;
		  &#60;artifactId&#62;log4j&#60;/artifactId&#62;
		  &#60;version&#62;1.2.15&#60;/version&#62;
			&#60;exclusions&#62;
				&#60;exclusion&#62;
					&#60;groupId&#62;javax.mail&#60;/groupId&#62;
					&#60;artifactId&#62;mail&#60;/artifactId&#62;
				&#60;/exclusion&#62;
				&#60;exclusion&#62;
					&#60;groupId&#62;javax.jms&#60;/groupId&#62;
					&#60;artifactId&#62;jms&#60;/artifactId&#62;
				&#60;/exclusion&#62;
				&#60;exclusion&#62;
					&#60;groupId&#62;com.sun.jdmk&#60;/groupId&#62;
					&#60;artifactId&#62;jmxtools&#60;/artifactId&#62;
				&#60;/exclusion&#62;
				&#60;exclusion&#62;
					&#60;groupId&#62;com.sun.jmx&#60;/groupId&#62;
					&#60;artifactId&#62;jmxri&#60;/artifactId&#62;
				&#60;/exclusion&#62;
				&#60;exclusion&#62;
					&#60;groupId&#62;javax.activation&#60;/groupId&#62;
					&#60;artifactId&#62;activation&#60;/artifactId&#62;
				&#60;/exclusion&#62;
			&#60;/exclusions&#62;
		&#60;/dependency&#62;

		&#60;dependency&#62;
			&#60;groupId&#62;org.apache.cxf&#60;/groupId&#62;
			&#60;artifactId&#62;cxf&#60;/artifactId&#62;
			&#60;version&#62;2.1&#60;/version&#62;
			&#60;type&#62;pom&#60;/type&#62;
			&#60;scope&#62;compile&#60;/scope&#62;
		&#60;/dependency&#62;
		&#60;dependency&#62;
			&#60;groupId&#62;org.apache.cxf&#60;/groupId&#62;
			&#60;artifactId&#62;cxf-rt-frontend-jaxws&#60;/artifactId&#62;
			&#60;version&#62;2.2.4&#60;/version&#62;
			&#60;type&#62;jar&#60;/type&#62;
			&#60;scope&#62;compile&#60;/scope&#62;
		&#60;/dependency&#62;
		&#60;dependency&#62;
			&#60;groupId&#62;org.apache.cxf&#60;/groupId&#62;
			&#60;artifactId&#62;cxf-rt-transports-http-jetty&#60;/artifactId&#62;
			&#60;version&#62;2.2.4&#60;/version&#62;
			&#60;type&#62;jar&#60;/type&#62;
			&#60;scope&#62;compile&#60;/scope&#62;
		&#60;/dependency&#62;

	&#60;/dependencies&#62;
&#60;/project&#62;
</pre>
<p>regenerate the eclipse project by typing: mvn eclipse:clean eclipse:eclipse</p>
<h3>WSDL</h3>
<p>We will call a web service described by the following WSDL.</p>
<p>save this wsdl to the eclipse project&#8217;s top level folder.</p>
<p>myService.wsdl</p>
<pre class="brush: xml;">
&#60;?xml version='1.0' encoding='UTF-8'?&#62;&#60;wsdl:definitions name=&#34;HelloWorldImplService&#34; targetNamespace=&#34;http://spring.demo/&#34; xmlns:ns1=&#34;http://cxf.apache.org/bindings/xformat&#34; xmlns:soap=&#34;http://schemas.xmlsoap.org/wsdl/soap/&#34; xmlns:tns=&#34;http://spring.demo/&#34; xmlns:wsdl=&#34;http://schemas.xmlsoap.org/wsdl/&#34; xmlns:xsd=&#34;http://www.w3.org/2001/XMLSchema&#34;&#62;
  &#60;wsdl:types&#62;
&#60;xs:schema elementFormDefault=&#34;unqualified&#34; targetNamespace=&#34;http://spring.demo/&#34; version=&#34;1.0&#34; xmlns:tns=&#34;http://spring.demo/&#34; xmlns:xs=&#34;http://www.w3.org/2001/XMLSchema&#34;&#62;
&#60;xs:element name=&#34;getEmployee&#34; type=&#34;tns:getEmployee&#34; /&#62;
&#60;xs:element name=&#34;getEmployeeResponse&#34; type=&#34;tns:getEmployeeResponse&#34; /&#62;
&#60;xs:element name=&#34;sayHi&#34; type=&#34;tns:sayHi&#34; /&#62;
&#60;xs:element name=&#34;sayHiResponse&#34; type=&#34;tns:sayHiResponse&#34; /&#62;
&#60;xs:complexType name=&#34;sayHi&#34;&#62;
&#60;xs:sequence&#62;
&#60;xs:element minOccurs=&#34;0&#34; name=&#34;arg0&#34; type=&#34;xs:string&#34; /&#62;
&#60;/xs:sequence&#62;
&#60;/xs:complexType&#62;
&#60;xs:complexType name=&#34;sayHiResponse&#34;&#62;
&#60;xs:sequence&#62;
&#60;xs:element minOccurs=&#34;0&#34; name=&#34;return&#34; type=&#34;xs:string&#34; /&#62;
&#60;/xs:sequence&#62;

&#60;/xs:complexType&#62;
&#60;xs:complexType name=&#34;getEmployee&#34;&#62;
&#60;xs:sequence&#62;
&#60;xs:element minOccurs=&#34;0&#34; name=&#34;arg0&#34; type=&#34;xs:int&#34; /&#62;
&#60;/xs:sequence&#62;
&#60;/xs:complexType&#62;
&#60;xs:complexType name=&#34;getEmployeeResponse&#34;&#62;
&#60;xs:sequence&#62;
&#60;xs:element minOccurs=&#34;0&#34; name=&#34;return&#34; type=&#34;tns:employee&#34; /&#62;
&#60;/xs:sequence&#62;
&#60;/xs:complexType&#62;
&#60;xs:complexType name=&#34;employee&#34;&#62;
&#60;xs:sequence&#62;
&#60;xs:element minOccurs=&#34;0&#34; name=&#34;firstName&#34; type=&#34;xs:string&#34; /&#62;
&#60;xs:element minOccurs=&#34;0&#34; name=&#34;hireDate&#34; type=&#34;xs:dateTime&#34; /&#62;
&#60;xs:element minOccurs=&#34;0&#34; name=&#34;lastName&#34; type=&#34;xs:string&#34; /&#62;
&#60;/xs:sequence&#62;

&#60;/xs:complexType&#62;
&#60;/xs:schema&#62;
  &#60;/wsdl:types&#62;
  &#60;wsdl:message name=&#34;getEmployeeResponse&#34;&#62;
    &#60;wsdl:part element=&#34;tns:getEmployeeResponse&#34; name=&#34;parameters&#34;&#62;
    &#60;/wsdl:part&#62;
  &#60;/wsdl:message&#62;
  &#60;wsdl:message name=&#34;sayHiResponse&#34;&#62;
    &#60;wsdl:part element=&#34;tns:sayHiResponse&#34; name=&#34;parameters&#34;&#62;
    &#60;/wsdl:part&#62;

  &#60;/wsdl:message&#62;
  &#60;wsdl:message name=&#34;getEmployee&#34;&#62;
    &#60;wsdl:part element=&#34;tns:getEmployee&#34; name=&#34;parameters&#34;&#62;
    &#60;/wsdl:part&#62;
  &#60;/wsdl:message&#62;
  &#60;wsdl:message name=&#34;sayHi&#34;&#62;
    &#60;wsdl:part element=&#34;tns:sayHi&#34; name=&#34;parameters&#34;&#62;
    &#60;/wsdl:part&#62;
  &#60;/wsdl:message&#62;

  &#60;wsdl:portType name=&#34;HelloWorld&#34;&#62;
    &#60;wsdl:operation name=&#34;sayHi&#34;&#62;
      &#60;wsdl:input message=&#34;tns:sayHi&#34; name=&#34;sayHi&#34;&#62;
    &#60;/wsdl:input&#62;
      &#60;wsdl:output message=&#34;tns:sayHiResponse&#34; name=&#34;sayHiResponse&#34;&#62;
    &#60;/wsdl:output&#62;
    &#60;/wsdl:operation&#62;
    &#60;wsdl:operation name=&#34;getEmployee&#34;&#62;
      &#60;wsdl:input message=&#34;tns:getEmployee&#34; name=&#34;getEmployee&#34;&#62;

    &#60;/wsdl:input&#62;
      &#60;wsdl:output message=&#34;tns:getEmployeeResponse&#34; name=&#34;getEmployeeResponse&#34;&#62;
    &#60;/wsdl:output&#62;
    &#60;/wsdl:operation&#62;
  &#60;/wsdl:portType&#62;
  &#60;wsdl:binding name=&#34;HelloWorldImplServiceSoapBinding&#34; type=&#34;tns:HelloWorld&#34;&#62;
    &#60;soap:binding style=&#34;document&#34; transport=&#34;http://schemas.xmlsoap.org/soap/http&#34; /&#62;
    &#60;wsdl:operation name=&#34;sayHi&#34;&#62;
      &#60;soap:operation soapAction=&#34;&#34; style=&#34;document&#34; /&#62;

      &#60;wsdl:input name=&#34;sayHi&#34;&#62;
        &#60;soap:body use=&#34;literal&#34; /&#62;
      &#60;/wsdl:input&#62;
      &#60;wsdl:output name=&#34;sayHiResponse&#34;&#62;
        &#60;soap:body use=&#34;literal&#34; /&#62;
      &#60;/wsdl:output&#62;
    &#60;/wsdl:operation&#62;
    &#60;wsdl:operation name=&#34;getEmployee&#34;&#62;
      &#60;soap:operation soapAction=&#34;&#34; style=&#34;document&#34; /&#62;

      &#60;wsdl:input name=&#34;getEmployee&#34;&#62;
        &#60;soap:body use=&#34;literal&#34; /&#62;
      &#60;/wsdl:input&#62;
      &#60;wsdl:output name=&#34;getEmployeeResponse&#34;&#62;
        &#60;soap:body use=&#34;literal&#34; /&#62;
      &#60;/wsdl:output&#62;
    &#60;/wsdl:operation&#62;
  &#60;/wsdl:binding&#62;
  &#60;wsdl:service name=&#34;HelloWorldImplService&#34;&#62;

    &#60;wsdl:port binding=&#34;tns:HelloWorldImplServiceSoapBinding&#34; name=&#34;HelloWorldImplPort&#34;&#62;
      &#60;soap:address location=&#34;http://localhost:8080/TestApacheCXF/HelloWorld&#34; /&#62;
    &#60;/wsdl:port&#62;
  &#60;/wsdl:service&#62;
&#60;/wsdl:definitions&#62;
</pre>
<h3>Generate The Source</h3>
<p>Next we generate the Java Source from the WSDL using Maven. The source is generated by the section of code seen in the pom.xml file. It is shown here for clarity.</p>
<pre class="brush: xml;">
&#60;plugin&#62;
	&#60;groupId&#62;org.apache.cxf&#60;/groupId&#62;
	&#60;artifactId&#62;cxf-codegen-plugin&#60;/artifactId&#62;
	&#60;version&#62;2.2.4&#60;/version&#62;
	&#60;executions&#62;
		&#60;execution&#62;
			&#60;id&#62;generate-sources&#60;/id&#62;
			&#60;phase&#62;generate-sources&#60;/phase&#62;
			&#60;configuration&#62;
				&#60;sourceRoot&#62;generated/cxf&#60;/sourceRoot&#62;
				&#60;wsdlOptions&#62;
					&#60;wsdlOption&#62;
						&#60;wsdl&#62;myService.wsdl&#60;/wsdl&#62;
					&#60;/wsdlOption&#62;
				&#60;/wsdlOptions&#62;
			&#60;/configuration&#62;
			&#60;goals&#62;
				&#60;goal&#62;wsdl2java&#60;/goal&#62;
			&#60;/goals&#62;
		&#60;/execution&#62;
	&#60;/executions&#62;
&#60;/plugin&#62;
</pre>
<p>To generate the code type the following at the command prompt inside your eclipse project:</p>
<p>mvn generate-sources</p>
<p>Navigate to the /generated/cxf folder inside the eclipse project. Grab the HelloWorld.java interface and the Employee Bean. Move them to the src folder&#8217;s test package. As you can see the 2 files are heavily annotated. There are many other classes that are generated that are not absolutely necessary for the web service to operate. At this point you only need the main interface class that represents the web service and any POJO beans that are used to pass information into or get information out of the web service. In our case this is the Employee and HelloWorld class and interface.</p>
<p>Make sure to get rid of all the compile issues. We can place the generated files in any package of our choosing. It does not need to be in the package that was indicated by the wsdl.</p>
<p>Next we will modify the spring configuration and add the following bean.</p>
<pre class="brush: xml;">
&#60;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&#62;
&#60;beans xmlns=&#34;http://www.springframework.org/schema/beans&#34;
       xmlns:jaxws=&#34;http://cxf.apache.org/jaxws&#34;
       xmlns:xsi=&#34;http://www.w3.org/2001/XMLSchema-instance&#34;
       xsi:schemaLocation=&#34;
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd&#34;&#62;

    &#60;jaxws:client id=&#34;helloClient&#34;
                  serviceClass=&#34;test.HelloWorld&#34;
                  address=&#34;http://localhost:8080/TestApacheCXF/HelloWorld2&#34; /&#62;
&#60;/beans&#62;
</pre>
<p>Finally we will write the following to run the actual code to call the service.</p>
<p>HelloWorldClientApp.java</p>
<pre class="brush: java;">
package test;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class HelloWorldClientApp {
	public static void main(String args[]) throws Exception {
		ApplicationContext context = new ClassPathXmlApplicationContext(new String[] {&#34;app-context.xml&#34;});

		HelloWorld helloWorld = (HelloWorld) context.getBean(&#34;helloClient&#34;);
		// with spring 3.0 cast will no longer be needed <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> 

		System.out.println(helloWorld.sayHi(&#34;World&#34;));

		Employee emp = helloWorld.getEmployee(1);
		System.out.println(emp.getFirstName());

	}
}
</pre>
<p>It should print to the screen something like this&#8230;</p>
<pre class="brush: bash;">
Hello World
John
</pre>
<h3>Thats all for now!</h3>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Soonr:Collaboration in the Cloud]]></title>
<link>http://janusnetworks.wordpress.com/2009/10/30/soonrcollaboration-in-the-cloud/</link>
<pubDate>Fri, 30 Oct 2009 22:27:42 +0000</pubDate>
<dc:creator>janusnetworks</dc:creator>
<guid>http://janusnetworks.wordpress.com/2009/10/30/soonrcollaboration-in-the-cloud/</guid>
<description><![CDATA[by Mielle Sullivan, Janus Networks Google Docs is a great, simple office suite in the cloud. It work]]></description>
<content:encoded><![CDATA[by Mielle Sullivan, Janus Networks Google Docs is a great, simple office suite in the cloud. It work]]></content:encoded>
</item>
<item>
<title><![CDATA[Akismet]]></title>
<link>http://wptopsites.wordpress.com/2009/10/30/akismet/</link>
<pubDate>Fri, 30 Oct 2009 12:54:03 +0000</pubDate>
<dc:creator>medika</dc:creator>
<guid>http://wptopsites.wordpress.com/2009/10/30/akismet/</guid>
<description><![CDATA[Akismet checks your comments against the Akismet web service to see if they look like spam or not an]]></description>
<content:encoded><![CDATA[Akismet checks your comments against the Akismet web service to see if they look like spam or not an]]></content:encoded>
</item>
<item>
<title><![CDATA[Spotify makes resources official]]></title>
<link>http://fredrikkjell.se/2009/10/28/spotify-makes-resources-official/</link>
<pubDate>Wed, 28 Oct 2009 11:02:03 +0000</pubDate>
<dc:creator>frekje</dc:creator>
<guid>http://fredrikkjell.se/2009/10/28/spotify-makes-resources-official/</guid>
<description><![CDATA[Spotify just announced the launch of a &#8220;Resource&#8221; section on their official website. The]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Spotify just announced the launch of a &#8220;<a href="http://www.spotify.com/en/about/resources/" target="_blank">Resource</a>&#8221; section on their official website.</p>
<p>The Resource section contains A LOT of resources in the categories:</p>
<ul>
<li>News Sites &#38; Blogs</li>
<li>Music Finder Sites &#38; Blogs</li>
<li>Apps and Tools: Remotes</li>
<li>Apps and Tools: Search Tools</li>
<li>Apps and Tools: Others</li>
<li>Developer Resources</li>
<li>Other Sites</li>
<li>Personal Playlist Sites</li>
<li>Automated Playlist Sites</li>
</ul>
<p>Go check it out, you will definately find a lot of cool links to applications, sites and communities. <a href="http://www.spotify.com/en/about/resources/" target="_self">http://www.spotify.com/en/about/resources/</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[JAXB: döngüsel bağları XML'de anahtarlma (cyclic reference problem)]]></title>
<link>http://egurbuz.wordpress.com/2009/10/27/jaxb-dongusel-baglari-xmlde-anahtarlma-cyclic-reference-problem/</link>
<pubDate>Tue, 27 Oct 2009 10:31:36 +0000</pubDate>
<dc:creator>Emre</dc:creator>
<guid>http://egurbuz.wordpress.com/2009/10/27/jaxb-dongusel-baglari-xmlde-anahtarlma-cyclic-reference-problem/</guid>
<description><![CDATA[Döngüsel Bağ (Cyclic Reference) nedir? Baba-Cocuk iliskisine sahip siniflarda, bir baba sahip oldugu]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h3>Döngüsel Bağ (Cyclic Reference) nedir?</h3>
<p><img src="http://www.perl.com/2002/08/07/graphics/circular_ref.png" alt="http://www.perl.com/2002/08/07/graphics/circular_ref.png" /></p>
<p>Baba-Cocuk iliskisine sahip siniflarda, bir baba sahip oldugu cocuklarina referans tutarken, cocuk da babasina referans tuttugu durumda döngüsel bağ problemi ortaya cikar. Derleyiciler bu durumu anlayip döngüyü bir sekilde kirabilmektedirler. Asil sorun bu iliskideki nesnelerin XML&#8217;e bind edilmesi sirasinda ortaya cikabiliyor.  JAXB standardinda bu sorunu ele alma yontemleri bu baglantida gosteriliyor : <a href="https://jaxb.dev.java.net/guide/Mapping_cyclic_references_to_XML.html" target="_blank">https://jaxb.dev.java.net/guide/Mapping_cyclic_references_to_XML.html</a></p>
<p><!--more--></p>
<p><strong>1.Yontem: @XMLTransient kullanmak:</strong></p>
<p>Bu yontemde, Cocuk sinif icerisindeki baba referansinin yok sayilmasi saglanir. Boylece marshall edilirken Cocuk sinifi icerisinde Baba nesnesi olmaz.<strong> </strong>Sakincasi istemci Cocuk sinifindan Babasina erisememesi. Örnek olarak:</p>
<blockquote><p>package data;</p>
<p>import javax.xml.bind.annotation.XmlAttribute;<br />
import javax.xml.bind.annotation.XmlRootElement;<br />
import javax.xml.bind.annotation.XmlTransient;</p>
<p>/**<br />
*<br />
* @author emre<br />
*/<br />
<strong>@XmlRootElement</strong><br />
public class Child {</p>
<p>private String name;<br />
private String okulAdi;<br />
private Parent parent;</p>
<p>public Child(){</p>
<p>}<br />
<strong><br />
@XmlAttribute</strong><br />
public String getName() {<br />
return name;<br />
}</p>
<p>public void setName(String name) {<br />
this.name = name;<br />
}</p>
<p><strong>@XmlAttribute</strong><br />
public String getOkulAdi() {<br />
return okulAdi;<br />
}</p>
<p>public void setOkulAdi(String okulAdi) {<br />
this.okulAdi = okulAdi;<br />
}</p>
<p><strong>@XmlTransient</strong><br />
public Parent getParent() {<br />
return parent;<br />
}</p>
<p>public void setParent(Parent parent) {<br />
this.parent = parent;<br />
}</p>
<p>}</p></blockquote>
<p><strong>2.Yontem: </strong><strong>CycleRecoverable arayuzunu kullanmak</strong></p>
<p>JAXB, cycle reference sorunuyla karsilastiginda, bu arayuzu gerceklestirdigimiz takdirde onCycleDetected metodunda durumu ele almamiza olanak verir. Bu metod bir Object nesnesi doner. Donen nesne, XML&#8217;e eklenecek olan nesneyi temsil eder. Burada return null dememiz, Baba icinde cocuk olsun ama cocuk icinde baba olmasin sekline donusur.</p>
<blockquote><p>package data2;</p>
<p>import com.sun.xml.bind.CycleRecoverable;<br />
import data.Parent;<br />
import java.util.ArrayList;<br />
import java.util.List;<br />
import javax.xml.bind.annotation.XmlAttribute;<br />
import javax.xml.bind.annotation.XmlElement;<br />
import javax.xml.bind.annotation.XmlRootElement;</p>
<p>/**<br />
*<br />
* @author emre<br />
*/<br />
public class Parent2 implements CycleRecoverable{<br />
private String name;<br />
private String isYeri;<br />
private List&#60;Child2&#62; cocuklar = new ArrayList&#60;Child2&#62;();</p>
<p>public Parent2(){</p>
<p>}</p>
<p>public List&#60;Child2&#62; getCocuklar() {<br />
return cocuklar;<br />
}</p>
<p>public void setCocuklar(List&#60;Child2&#62; cocuklar) {<br />
this.cocuklar = cocuklar;<br />
}</p>
<p>public String getIsYeri() {<br />
return isYeri;<br />
}</p>
<p>public void setIsYeri(String isYeri) {<br />
this.isYeri = isYeri;<br />
}</p>
<p>public String getName() {<br />
return name;<br />
}</p>
<p>public void setName(String name) {<br />
this.name = name;<br />
}</p>
<p><strong><span style="color:#000000;">public Object <span style="color:#ff0000;">onCycleDetected</span>(Context arg0) {<br />
Parent2 p = new Parent2();<br />
p.setIsYeri(this.getIsYeri());<br />
p.setName(this.getName());<br />
p.setCocuklar(null);<br />
return p;<br />
//throw new UnsupportedOperationException(&#8220;Not supported yet.&#8221;);<br />
}</span></strong><br />
}</p></blockquote>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Flickr + jQuery + Force.com = Awesome^5 [Part 1]]]></title>
<link>http://developinthecloud.wordpress.com/2009/10/25/flickr-jquery-force-com-awesome5-part-1/</link>
<pubDate>Sun, 25 Oct 2009 16:40:20 +0000</pubDate>
<dc:creator>Wes</dc:creator>
<guid>http://developinthecloud.wordpress.com/2009/10/25/flickr-jquery-force-com-awesome5-part-1/</guid>
<description><![CDATA[Being a mathematician, equations like those in the title usually make me wanna poke someone in the e]]></description>
<content:encoded><![CDATA[Being a mathematician, equations like those in the title usually make me wanna poke someone in the e]]></content:encoded>
</item>
<item>
<title><![CDATA[Web Designing Company]]></title>
<link>http://websitedesigningcompanyindiadelhi.wordpress.com/2009/10/24/web-designing-company/</link>
<pubDate>Sat, 24 Oct 2009 07:52:44 +0000</pubDate>
<dc:creator>websitedesigningcompany</dc:creator>
<guid>http://websitedesigningcompanyindiadelhi.wordpress.com/2009/10/24/web-designing-company/</guid>
<description><![CDATA[A web designing company really does a lot to promote your business in terms of a global approach. Yo]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>A <a title="web desgning company" href="http://www.hansindia.com/">web designing company </a>really does a lot to promote your business in terms of a global approach. Your products or services are very much important to be sold. And it can be done by a web designing company.</p>
<p>Website gives you each and every chance to promote your business at a larger scale. In order to make your website able to globally accessible web designing company with its professionals does its best.</p>
<p>Hans Cyber Technology gives an ample scope of promoting website by its great <a title="web desgning company" href="http://www.hansindia.com/">web designing work</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[BCaching API]]></title>
<link>http://bcaching.wordpress.com/2009/10/23/bcaching-api/</link>
<pubDate>Fri, 23 Oct 2009 18:12:10 +0000</pubDate>
<dc:creator>mark</dc:creator>
<guid>http://bcaching.wordpress.com/2009/10/23/bcaching-api/</guid>
<description><![CDATA[The bcaching API is intended for use by mobile geocaching apps to retrieve geocache data and have ac]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>The bcaching API is intended for use by mobile geocaching apps to retrieve geocache data and have access to a large repository of geocache data without needing to store it all on the device itself. Response data for all requests except for &#8220;login&#8221; is in the standard GPX format. All query results are restricted to those that are accessible by the authenticated user.</p>
<p>Request format is<br />
http://(www&#124;test).bcaching.com/api/q.ashx?u=&#60;username&#62;&#38;{{REQUEST}}&#38;time=&#60;current-time&#62;&#38;sig=&#60;signature&#62;<br />
where:</p>
<ul>
<li><strong>username </strong>is a valid <a href="http://bcaching.com/" target="_blank">bcaching.com</a> username</li>
<li><strong>current-time</strong> is the current mobile device time in &#8220;java&#8221; milliseconds (i.e. java.util.Date.getTime) or equivalent</li>
<li><strong>signature</strong> is an md5 hash of the querystring plus an md5 hash of the bcaching user&#8217;s password.</li>
</ul>
<p><strong>{{REQUEST}}</strong> can be one of the following:</p>
<ul>
<li><em>Verify login only: </em><strong>a=login</strong><br />
Does nothing more than return success or failure based on the validation of the username password/hashword.</li>
</ul>
<ul>
<li><em>Find nearest caches (Summary):</em> <strong>a=find</strong>&#38;lat=&#60;latitude&#62;&#38;lon=&#60;longitude&#62;&#38;find=&#60;find&#62;&#38;maxdistance=&#60;max-distance&#62;&#38;maxcount=&#60;max-count&#62;<br />
Returns summary-only gpx data &#8212; with no short or long descriptions, extra waypoints, logs, etc.
<p>&#160;</p>
<ul>
<li><strong>latitude </strong>is the latitude in signed degree decimal form i.e. 40.123456</li>
<li><strong>longitude </strong>is the longitude in signed degree decimal form i.e. -74.987654</li>
<li><strong>find</strong> is a URL-encoded string to search for caches by waypoint# (with or without the GC prefix) or partial name match.</li>
<li><strong>max-distance</strong> is optional and specifies the maximum distance in degrees. Default is 0.3 &#8211; about 30 miles</li>
<li><strong>max-count </strong>is optional and specifies the maximum number of nearest caches to return in the gpx data. Default is 50.</li>
</ul>
</li>
</ul>
<ul>
<li><em>Get cache detail</em>: <strong>a=detail</strong>&#38;ids=&#60;cache-id-list&#62;&#38;desc=&#60;description-mode&#62;&#38;wpts=&#60;wpts&#62;&#38;logs=&#60;logs&#62;&#38;tbs=&#60;tbs&#62;<br />
Returns detailed gpx data for one or more caches
<p>&#160;</p>
<ul>
<li><strong>cache-id-list </strong>is a comma-separated list of cache ids (not waypoint numbers). Cache ids are included in the summary gpx request.</li>
<li><strong>description-mode </strong>indicates what form to send the description and can be one of the following:
<ul>
<li><strong>none</strong>: neither short nor long description is included</li>
<li><strong>short</strong>: short description is included, converted to text if was html</li>
<li><strong>long</strong>: short and long description are included, converted to text they were html</li>
<li><strong>html</strong>: full original short and long descriptions are included</li>
</ul>
</li>
<li><strong>wpts</strong> is a flag indicating whether or not additional waypoints should be included: 0 = no waypoints (default), 1 = include waypoints</li>
<li><strong>logs</strong> is the maximum number of logs to include: 0 = none (default), 1 or more indicates the maximum number</li>
<li><strong>tbs</strong> is a flag indicating whether or not cache inventory should be included: 0 = no waypoints (default), 1 = include TBs</li>
</ul>
</li>
</ul>
<ul>
<li><em>Get nearest caches (Detail):</em> a=nearest&#38;maxcount=&#60;max-count&#62;&#38;desc=&#60;description-mode&#62;&#38;wpts=&#60;wpts&#62;&#38;logs=&#60;logs&#62;&#38;tbs=&#60;tbs&#62;
<ul>
<li><strong>max-count </strong>is optional and specifies the maximum number of nearest caches to return in the gpx data. Default is 30.</li>
<li>all other parameters (desc, wpts, logs, tbs) are identical to <em>Get cache detail</em> section.</li>
</ul>
</li>
</ul>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Figuring out why SAS BI Web Services for .Net doesn't work Part 2]]></title>
<link>http://christopherpope.wordpress.com/2009/10/23/figuring-out-why-sas-bi-web-services-for-net-doesnt-work-part-2/</link>
<pubDate>Fri, 23 Oct 2009 13:45:25 +0000</pubDate>
<dc:creator>Christopher</dc:creator>
<guid>http://christopherpope.wordpress.com/2009/10/23/figuring-out-why-sas-bi-web-services-for-net-doesnt-work-part-2/</guid>
<description><![CDATA[Well, in my last post, I basically couldn&#8217;t get the WebServiceMaker.asmx service to work. I no]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><div>Well, <a href="http://christopherpope.wordpress.com/2009/10/17/figuring-out-why-sas-bi-web-services-for-net-doesnt-work/">in my last post</a>, I basically couldn&#8217;t get the WebServiceMaker.asmx service to work. I now have it working and the problem was because it was not installed properly. You see, SAS is like a bucket of Lego bricks. It contains dozens and dozens of modules and services which can be installed in what seems like endless permutations of arrangements. These arrangements are defined by an XML &#8217;plan file&#8217; used by the SAS deployment wizard and  SAS support had sent me a couple of plan files which &#8216;appeared&#8217; to work but did not. There are also some pre-defined plan files provided by the installation download which didn&#8217;t build the exact Lego castle I needed but got close. So, I created my own plan file from the plan files provided by SAS and these pre-defined ones. I got everything installed fine and I am able to call the services within WebServiceMaker.asmx without trouble but, given that there is precedence in the world of SAS for gettting an installation with no errors but not necessarily working, I worry.</div>
<div> </div>
<div>I still can&#8217;t call ListWebServices in the WebServiceMaker.asmx file from my .Net console app but the Enterprise Manager on the SAS server can call it without trouble. I verified this using netmon on the server. Right now I&#8217;m at the point where I can deploy a SAS Stored Process as a web service using the Enterprise Manager and then attempt to call it from my .Net console app. When I called my test SAS web service, I got this error:</div>
<div>System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: There was an error due to configuration of the middle tier.</div>
<div> </div>
<div>Oh great. Now what? I thought for sure there was some issue with security (which seems to be plaguing me with the ListWebServices call). I poked around online a bit but didn&#8217;t really find anything so I decided to fire up Fiddler (such a wonderful tool) and see what my SOAP request and response looked like. Now I have some more information because in the SOAP response I see this information in the SOAP fault:</div>
<div> </div>
<div>&#60;Fault code=&#8221;4000&#8243; xmlns=&#8221;<a href="http://support.sas.com/xml/namespace/biwebservices/webservicemaker-9.2">http://support.sas.com/xml/namespace/biwebservices/webservicemaker-9.2</a>&#8220;&#62;<br />
 &#60;Exception message=&#8221;Folder path &#8216;/Users/sasadm/My Folder&#8217; was not found or you may lack permission to view some part of the path.&#8221; /&#62;<br />
&#60;/Fault&#62;</div>
<div>
<p>&#160;</p>
</div>
<div> Well, that *kind of* makes sense. I created my stored process in the above SAS folder and the name of the folder leads me to believe there is one for every user of SAS. I was signed on as SASADM when I created the stored process and I sent the user sasadm in the Username token but maybe the identity attempting to run the service is other than sasadm.</div>
<div> </div>
<div>What to do, what to do&#8230;.</div>
<div> </div>
<div>I tried calling the service without providing a WSE UsernameToken and got this response:</div>
<div><span style="color:#0000ff;font-size:x-small;"><span style="background-color:#eeece1;color:#0000ff;font-size:x-small;">Could not establish a connection to the SAS server on the requested machine. Verify that the SAS server has been started with the -objectserver option or that the SAS spawner has been started. Verify that the port Combridge is attempting to connect to is the same as the port SAS (or the spawner) is listening on.</span></span></div>
<div> </div>
</div>]]></content:encoded>
</item>

</channel>
</rss>
