Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

.h1 Writing the marshaler class

Wiki Markup
{scrollbar}

We now have to

Excerpt

write the marshaler class

to handle incoming and outgoing data.

...

Create the marshaler class file

Note
titleImportant note

Until now we have just used our service unit to configure the behaviour of the JBI http-bc. Now we are going to extend the functionlity of this http binding component. To do this we will implement our own marshaler, which will handle incoming and outgoing messages.

Next thing to do is creation the marshaler class. For this select the src/main folder in your project. Now create a new folder under main called java. Add this new folder to your source folders.
If you did it correctly the new folder should show up as src/main/java right below the src/main/resources folder.

Now select the new folder and select File > New > Class. In the dialog enter the following:

*

Code Block

Package:    org.apache.servicemix.jbi

...


Name:

...

       HTTPMarshaler
Superclass: org.apache.servicemix.http.endpoints.DefaultHttpConsumerMarshaler

*
Then hit Finish to create the class.

About the DefaultHttpConsumerMarshaler

...