| By Jesus Rodriguez, Clemens Utschig, Heidi Buelow | Article Rating: |
|
| April 3, 2007 04:45 AM EDT | Reads: |
28,464 |
After receiving the request, the BPEL process sends the response message to the WCF service specified within the ReplyTo header. The request and response messages are correlated using the RelatesTo header. On the client side, the WCF service operation includes the following code in order to receive the WS-Addressing v1.0 headers:
UniqueId relatesTo = OperationContext.Current.IncomingMessageHeaders.RelatesTo;
Using these steps, messaging solutions can interoperate even with different versions of WS-Addressing.
BPEL and WS-Security Interoperability Challenges
In the second part of this article, we focus on WS-Security
interoperability, because it is another key specification in any WS-*
implementation. The main goal behind WS-Security is to enhance SOAP
messaging by providing message integrity, confidentiality, and
authentication. WS-Security also serves as the base standard to other
WS-* protocols, such as WS-SecureConversation, WS-Trust, and
WS-Federation. The key function of WS-Security is to provide a general
purpose mechanism to associate security tokens with SOAP messages. In
this scenario, security-related information is carried in the message
itself, instead of in external artifacts. This is known as
message-based security and can be used in conjunction with a transport
layer security such as SSL.
Message Security vs. Transport Security
SSL has
proven its effectiveness in securing resources through the internet.
When dealing with Web services, however, SSL is a very coarse-grained
tool and has several specific limitations:
- SSL is strictly tied to TCP-based transports such as HTTP. For Web services that use non-TCP transports such as MSMQ or SMTP SSL, it is not a viable option.
- SSL was designed for point-to-point communications. This makes it difficult to implement a routing scenario between Web services. In a routing scenario, the final receiver must be able to validate the original credentials. Extensibility using SSL becomes difficult to provide when those credentials are not stored in the message.
- SSL protects the messages on the wire (between the endpoints) but does not provide protection for the message at the endpoints. This allows access to the whole message upon gaining access to one of the endpoints.
WS-Security Interoperability Example
WCF provides
an up-to-date implementation of the WS-* security stack including
WS-Security, WS-SecureConversation, WS-Trust, and WS-Federation,
allowing developers to implement transport and message security
scenarios. Specifically for WS-Security, WCF supports a number of token
types, including UserName and Password.
The WS-Security UserNameToken profile provides a standards-based way to send user credentials, which enables applications and platforms to unify their approach. A message-based security approach moves credentials outside the actual operation and into SOAP headers, which makes it possible to alter authentication without touching the operation.
The example used in this article consists of a WCF service that is being invoked from a BPEL process. Before the first call is made, the BPEL process must authenticate to the WCF service using WS-Security and UserName and Password.
The code in Listing 4 shows the target WCF service.
The bindings and behaviors shown in Listing 5 enforce the use of UserName and Password for the authentication. Consider the sample code below, which shows a custom class that provides the UserName and Password validation:
public class MyUserNameValidator :UserNamePasswordValidator
{
public override void Validate(string userName, string password)
{
if (null == userName || null == password)
{
throw new ArgumentNullException();
}
if (!(userName == "user1" && password == "password1"))
{
throw new SecurityTokenException ("Unknown Username or Incorrect Password");
}
}
}
Next we implement the BPEL process that invokes the WCF service. The first step is to create a BPEL partnerLink that represents the WCF service. Here is the partnerLink declaration.
<plnk:partnerLinkType name="ServiceSoap_PL">
<plnk:role name="ServiceSoap_Role">
<plnk:portType name="tns:MathService_ASPNetSoap"/>
</plnk:role>
</plnk:partnerLinkType>
In the next step, we provide the required WS-Security headers as part of the <invoke> activity. Using bpelx:inputHeaderVariable (an extension to WS-BPEL standard) we can pass SOAP headers as part of the outgoing message. This is the primary way to send the SOAP-specific headers. The bpelx:inputHeaderVariable extension is specific to Oracle BPEL Process Manager, which also provides deployment descriptor properties (wsseHeaders, wsseUsername, wssePassword) to handle WS-Security headers implicitly.
Listing 6 highlights the code fragments dealing with WS-Security headers. Note especially the inputHeaderVariable that is passed along the invoke activity, as well as wsse:Security.
Running the BPEL process produces the SOAP message shown in Listing 7 when the WCF service is invoked. Pay close attention to the marked section.
This technique allows the creation of BPEL processes that can truly interoperate with WCF services by using WS-Security. The flexibility introduced by manipulating header variables in BPEL allows developers to create interoperability explicitly, when implicit means are not sufficient.
Conclusion
In this article we demonstrated how
interoperability between Microsoft .NET WCF and WS-BPEL can be achieved
by using explicit means.
SOA applications that require long-running business processes with security and messaging can be built quickly and easily with Web services as the underlying specifications. Web services promise heterogeneous interoperability, and while we anticipate implicit interoperability approaches to be sufficient in the near future, explicit capabilities are still needed in the short term. Such interoperability is real today, as shown by the examples in this article that use Microsoft WCF and Oracle BPEL Process Manager.
Published April 3, 2007 Reads 28,464
Copyright © 2007 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Jesus Rodriguez
Jesus Rodriguez is the Chief Software Architect at TwoConnect, Inc. (www.twoconnect.com), a Microsoft Gold Partner based in Miami, Florida. He is also a Microsoft BizTalk Server MVP and one of a few Architects worldwide to be a member of the .NET 3.0 Digerati team. As a member, Jesus has been selected to participate in a variety of Software Design Reviews with Microsoft’s Product Teams. Jesus is the Lead Architect for several BizTalk Server adapters including Web Services Enhancements 3.0, SalesForce.com, SonicMQ and the award winning Service Broker Enhancements. Jesus derived his extensive experience with business process integration and messaging through numerous implementations of loosely coupled systems founded on the principles of SOA. He is an active contributor to the .NET and J2EE communities, focusing on the interoperability aspects between those two platforms. His contributions include several articles for various publications including MSDN, Architecture Journal and Web Services Journal. Jesus is frequently seen leading sessions at TechEd, MVO Summit and the Microsoft Business Process and SOA Conference, as well as conducting Web Casts on varying Microsoft technologies. He is a prolific blogger on all subjects related to integration and has a true passion for technology. Contact Jesus at jrodriguez@twoconnect.com or through his blog at http://weblogs.asp.net/gsusx.
More Stories By Clemens Utschig
Clemens Utschig works within the Oracle SOA Product Management Team responsible for security aspects and cross product integration. Aside from technology, Clemens' focus is on project management and consulting aspects coming along with SOA implementations. As a native Austrian, Clemens' Oracle career started in Europe at the local consulting services branch—working with customers on J2EE and SOA projects, and founded the local Java community. He is a frequent speaker at conferences evangelizing either on technology or the human factor—two key aspects when introducing new concepts and shifts in corporate IT strategy.
More Stories By Heidi Buelow
Heidi Buelow is a product manager for the Oracle SOA Suite. She spent the last 10 years building business process management systems with a focus on service integration and interoperability of diverse systems. Heidi’s career developing service-oriented architecture started with the early services- and object-oriented transport and messaging stacks of Xerox PARC’s XNS networking protocols. Her recent experience includes the development of the BPMS platform and tools for very large SOA-based solutions, an example of which is the managed care system of one the largest managed healthcare companies in the United States.
- The Top 150 Players in Cloud Computing
- Commercial vs Federal Cloud Computing
- Why IBM’s Server Chief Got Busted
- Industry Experts Discuss the State of Cloud Computing
- Cloud Expo New York Call for Papers Now Open
- Cloud Computing on Gartner's Top 10 List and SYS-CON Events' 2010 Calendar
- US Federal Government is Major Cloud Computing Innovator
- Google Wave
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Adaptivity & Cloud Computing: Exclusive Q&A with CEO Tony Bishop
- 4th International Cloud Expo: Photo Album
- The Top 150 Players in Cloud Computing
- SYS-CON.TV: Cloud Computing Expo Power Panel
- Commercial vs Federal Cloud Computing
- Why IBM’s Server Chief Got Busted
- 1st Annual GovIT Expo: Letter from the Technical Chair
- Industry Experts Discuss the State of Cloud Computing
- Deputy CIO of the CIA to Keynote 1st Annual GovIT Expo
- SOA World Power Panel on SYS-CON.TV
- CIA was Headed to an Enterprise Cloud All Along: Jill Tummler Singer
- Cloud Expo New York Call for Papers Now Open
- 1st Annual Government IT Conference & Expo: Themes & Topics
- Stock in Focus: Dragon Capital
- The i-Technology Right Stuff
- Who Are The All-Time Heroes of i-Technology?
- Get the Message
- Where Are RIA Technologies Headed in 2008?
- i-Technology Viewpoint: Is Web 2.0 the Global SOA?
- i-Technology Viewpoint: Thinking Outside the VC Box
- ESB Myth Busters: 10 Enterprise Service Bus Myths Debunked
- i-Technology Viewpoint: When to Leave Your First IT Job
- SOA Web Services Edge Conference Coverage on SYS-CON.TV
- Five Reasons Why Web 2.0 Matters
- SYS-CON.TV's "SOA Web Services" and "Enterprise Open Source" Programs To Air in December
- SOA World Conference & Expo SYS-CON.TV Power Panel Live From Times Square









Cloud computing is a game changer. The cloud ...




















