Quick Tip: Change OSB 12c Domain Value Maps (DVM) in Service Bus Console

Other people have written and explained the usage of Domain Value Maps (DVMs) in Oracle Service Bus already: They can be generated easily within JDeveloper and shared with SCA components of SOA Suite. Previously SOA Composer could be used to modify them.

Here is quick tip: You can now change (or even create!) them within service bus console easily at runtime. So open your service bus console, e.g. from http://localhost:7101/servicebus. Note that the previous /sbconsole is now /servicebus and comes with a fresh look. The old URL is still working but deprecated and should not be used anymore.

dvm

Btw there were other XQuery based approaches that also allowed DVM to be used and changed at runtime, but the built-in DVMs are easiest and most convenient.

Bug: Wrong Message Type and XQuery Expressions in OSB 12.2.1 /servicebus Console for Message Based Pipelines

Environment

I am using the latest download of JDeveloper 12.2.1 with the builtin test domain for SOA Suite 12.2.1 and OSB 12.2.1, all running on Java 1.8.0_65_b17 on a RedHat derivative.

Business Service

I created a message based business service based on a simple XML element definition for an Order via an XSD.

2016-01-21_12-16-15

Testing the business service shows the correct test data. Good. Note, that there is an embracing <ord:order> element containing other element such as version or ID.

2016-01-21_12-07-41

Pipeline

A pipeline is defined based on the same element.

2016-01-21_12-16-36

Interestingly the pipeline shows a different variable structure, missing out the embracing <ord:order> element.

2016-01-21_12-15-21

So any created XQuery expressions, e.g. for a Log action as seen on the screenshot above will be wrong as well and missing the embracing <ord:order> element. So put it more clear, non of the expression will return anything meaningful.

Conclusion / Impact

IMHO this is a severe issue if confirmed. Let’s face it. OSB was never easy but a rock solid product. For almost a decade I solved problems by telling people to stay calm and carefully looking and the test data, the elements, and the namespaces provided by OSB testing console. Now this seems to be broken.

Workaround

You can manually fix your XQuery expression. Possibly this also relates to another OSB 12.2.1 bug I blogged about earlier.

Tiny Improvement, Big Difference: Revert Production / Development Mode in WebLogic 12.2.1 Admin Console

A lot of people felt it was never right that you could not go back from production mode to development mode in WebLogic admin console. You alway could change it using WLST or overwriting it with a startup parameter or modifying config.xml.

With WebLogic 12.2.1 this has changed. You can change it using the admin console now.

2016-01-19_09-50-55

 

 

 

 

Bug: Typed One Way Pipeline in Oracle Service Bus / OSB 12.2.1

When creating a Service Bus pipeline in JDeveloper 12.2.1 for Oracle Service Bus 12.2.1, based on a typed, one-way business service (either one way WSDL based, or Messaging Service with XML request and XSD type with reply NONE business service) the pipeline won’t correctly use the request message type. It’s annoying because you cannot easily create expressions based on the request type, such as drilling open the $body variable, e.g. for an Order containing a shipping ID. All that is displayed within the pipeline is $body.

This happens although the pipeline configuration displays the correct XSD, eg. OrderType.xsd and the correct Type, eg. OrderType.

2016-01-18_18-13-41

I am quite surprised because this is not a very unusual use case. Anyway I couldn’t find a work around for JDeveloper 12.2.1 (let me know if you know one!). Interestingly, testing a proxy service based on the business service works all right (so maybe the bug slipped in when the pipeline construct was separated from the proxy service? just guessing.)

It is possible to work with the good old Service Bus web console /sbconsole. There everything is fine, i.e. the correct structure of the request message is displayed. The working Service Bus console is another indication that the way JDeveloper does it is broken.

2016-01-18_18-13-56

Don’t get me wrong. IMHO using the web console is not an acceptable solution.

WebLogic 12.2.1 RESTful Management

WebLogic 12.2.1 is out since Oracle Open World 2015 and comes with a new RESTful management interface.

  • RESTful management for 12.2.1 is a rewritten and different implementation.
    The previous two implementations supported only a small subset of JMX attributes, you could only read them, URLs and versioning were different.
  • The new URL format is:
     http://server:port/management/weblogic/latest/...

    if you scripts still contain /wls/ you are using the previous format.

  • Access to all WebLogic JMX MBeans and attributes is supported now.
  • Unlike in the previous version, RESTful management is turned on per default.
  • Unlike in the previous version, RESTful management is available on admin and managed servers.
  • The URL syntax is modelled after the WLST syntax (WLST tutorial  in this screencast).
  • A simple HTTP GET example (just type it into your browser), e.g. to retrieve name and state runtime values for a managed server named surf1:
    http://localhost:7001/management/weblogic/latest/domainRuntime/serverLifeCycleRuntimes/surf1?links=none&fields=name,state
    Response:
    { "name": "surf1", "state": "RUNNING" }
  • Another example to create a new server surf7 using curl:
    curl –v --user weblogic:welcome1 \
     -H X-Requested-By:MyClient \
     -H Accept:application/json \
     -H Content-Type:application/json \
     -d "{ name: 'surf7' } "
     -X POST \http://localhost:7001/management/weblogic/latest/edit/servers
  • Within the /edit subtree, edit sessions are implicit.
  • To manually start/cancel/activate edit sessions:
    /edit/changeManager/startEdit|cancelEdit|activate
  • Unlike the previous version of the RESTful management where HTTP OPTIONS was used to get a JSON form of possible values e.g. when creating a ressource, now /ressourceCreateForm is used, e.g. you can retrieve the values to create a server with the following HTTP GET:
    http://localhost:7001/management/weblogic/latest/edit/serverCreateForm
  • You can issue bulk requests, which runs a search of a set of specific JSON nodes and returns the results at once. As shown in the following example, an HTTP POST operation to the following URL
    http://localhost:7001/management/weblogic/latest/domainRuntime/search

    and using the following JSON as payload:
    json query

 

More?

More interesting facts about the RESTful management interface:

  • The RESTful management interface comes with very good error messages if something goes wrong.
    However, if  you try to update a property that cannot be overwritten, e.g. the server name of a managed server, it will be silently ignored. This is intended behaviour.
  • In the curl example above all(?)  -H options could be omitted (if you were a sloppy person, but I guess you aren’t). This is true for all HTTP verbs except HTTP POST, then X-Requested-By header is required to prevent cross-site request  forgery (CSRF).
  • You could also get access to all WebLogic MBeans and attributes using the highly popular open source Jolokia, as I explained already in 2012. Jolokia works for every major application server and also supports bulk requests. Ever wondered where the chili on my WebLogic book comes from?
    Jolokia also involves using real MBean names and is therefore more complicated for the typical WebLogic user. Also it involves adding Jolokia as a JVM agent, proxy, or WebLogic deployment. So most typical WebLogic users will be better off using the built-in RESTful management interface.
    I was planting some real spicy Jolokia this year. Two tiny crumbs of dried Jolokia is enough for a Chili con Carne with 500g of meat serving at least 3 people. Give it a try!

More about WebLogic 12.2.1?

Some more examples of the RESTful management, and also 11 additional “things” about WebLogic 12.2.1 are shown in a presentation I’ve done at Oracle Open World 2015: