Doorgaan naar hoofdcontent

Posts

Er worden posts getoond met het label osb

OSB 10gR3 and SWA and MTOM

This blog is about using soap with attachments and the use of MTOM within the OSB (10gR3). A service is created that accepts a soap with attachment (DocumentService) and translates it to a service that accepts a binary element. MTOM is used for performance reasons for the second. Some notes: * For the use of attachments you need RPC-style document instead of the usual document-style. This due to the fact that the document-style limits a message to a single . * A service can not have both SWA and MTOM within OSB. First a WSDL is setup for the DocumentService: The $attachments variable holds the attachments and the body holds the attachment data. Also other data is stored within the attachment element (see h...

Connect .NET application with Microsoft SQL database through OSB

I received a mail today from a Blogspot.com reader with the following question: "Is it possible, to connect a .net application (running on Microsoft SQL 2010), with an Oracle OSB and import data from a SQL-database" The reason I post this is that other people can also react and so we get more views on it. My view on it: Make a WebLogic webservice (using for instance OpenJPA) to get the data from the SQL database. Expose this webservice through the OSB Call this service from the .NET application This has the following advantages: * No tight coupling between application and SQL database * Reuse possibility of the data(base) service    

Automatic XQuery unit tests for OSB projects

Within the OSB 10.3 you use XQuery code to perform data transformations. These transformations can be very complex. I am in favor of TDD and i want to use automatic tests for XQueries. You can use the OSB Console to test XQueries but this is not very practical with complex Queries and takes a lot of time.You can also use XQuery and JDeveloper to run XQueries and this inspired me to write a simple XQUnit module to test xqueries. This blog shows you how to set up automatic tests with the use of JUnit , XMLUnit and Oracle XQuery engine. The contraints for me were: 1) The XQuery code should be as-is, so no changes with scripts or whatever. The XQueries are used within the test framework as used within the OSB. 2) The XQuery engine of the WLS must be used. I could use some other XQuery engine, but this would not test the real WLS engine and still errors could occur runtime. 3) The test framework can be used within Java unit tests. This way it can also be used within Maven for instanc...

"Not valid in an Oracle Service Bus Configuration project"

This is the error I got when importing an existing project into Workspace (version 10.3). I found nothing to circumvent the error and the only way was to create a new Configuration and copy the projects into it.

Reuse XQuery within OSB 10gR3

XQuery is a great language that can be used within the OSB for translations and other expressions. Unfortunately the OSB does not support the module construction of XQuery. A module construction can be perfectly reused for code reuse. This post shows how this omission in the OSB can be solved. This example shows how a message with a header and a body can be created of which the header code is reused. 1) First the header function is created (without parameters, but these can also be added). 2) Add another XQuery that creates the message with the header and body content as parameters. 3) Within a Stage or where you want to use the construction add an Assign. 4) The expression must be the Header XQuery. 5) Add another Assign for the message XQuery and add the $body and $header as binding variables. And that's it, so the trick is to use parameters. This may be not always possible but it is a construction you could use.

OSB 10gR3 Service versioning

There has been a lot written and discussed about how to do Service versioning. On LinkedIn there is a nice discussion about the WSDL versioning (read here ). Also on InfoQ there is a nice article. I like the strategy in which a minor and major version is used. A minor change is backwards compatible and only updates the documentation element within the WSDL. A major change, also changes the namespace (http://.../v2). The following structure within the OSB can help to implement this strategy. The advantages of this structure are: * The different versions are nicely seperated and can be governed and maintained seperatly. Instead of having only one proxy for all versions and doing some content based routing. * The two versionings can live together and in case the old version is deprecated the proxy can be deleted. This way "old" consumers do not have to migrate in case a major update is published, so they have the time to plan it.

OSB 10gR3 project structure

This blog describes a way you can structure your OSB project structure in a SOA project. Within you OSB domain you have one configuration file that contains several projects. each project represents a Service. The shared resources directories contain common resources that are used within the other projects. This can be a good place to store the CDM XSDs of the domain.

Use of Oracle Adapters (OSB 11g)

In this Oracle post it is stated that new Adapters are available for the Oracle Service Bus. But do we really want these Adapters on the OSB within a SOA? I propose not to implement Services this way, because: Adapters do not belong on the OSB but on the system the Service is actually implemented, because this goed against a known service-oriented design principle of "Service Autonomy". This belongs and should be governed by the Service and not by the OSB (as the Service provider).

OSB 10.3.1 Database Adapter

Edwin Biemond wrote a great post on using the DB Adapter within OSB 10.3.1. You can find his article here and I followed the steps nicely. However I did not get it working. I made a mistake by giving the connection factory the same JNDI name as the JDBC Data Source! So please be aware of the JNDI traps.

Dynamic transformations in OSB 10gR3

Here is an interesting post from Chris about dynamic transformations within the OSB. It looks great, but think about this: You loose the strong typing of the messages the proxy can receive (as described in the blog itself). This may lead to faults that are difficult to trace because the service contract is in fact far more coarse grained. How about maintenance? I like the approach that for a different major version of a service with different XML data, use a different proxy. This way services of different versions can live together and services can become obsolete when clients are no longer using the old service. If you try to put all versions of the service in one proxy service it can soonly become unmanageable. But it can still be useful to have dynamic transformations.

XQuery use within OSB, watch out!

I came accross an issue when using an XQuery resource within an assign. I could not see the binding variable, it turned out that the external variable within the .xq code was not used within the XQuery code. In this case the OSB does not show the variable! I entered the next code: Then I wanted to use this .xq within an Assign and opened the XQuery Expression Editor. However the Variable Binding (which is used to assign a value to the externally defined XQuery variable) is not shown: When I now actually use the external variable: The OSB now shows the variable: So watch out when tou are setting up the code, that you actually use the external variable otherwise the OSB does not show you the variable!