Wednesday, January 23, 2008

Invoking Java - The WSDL way

WSIF defines additional binding extensions so that EJBs, local java classes, software accessible over message queues using the JMS API and software that can be invoked using the Java Connector architecture can also be described in WSDL.  

The Java binding is a WSDL binding that allows abstract functionality in the abstract service description (messages, operations and port types) to be mapped to functionality offered by a Java class directly. This means that a Java class can be described using WSDL, and can be accessed as a WSDL-described service through WSIF.

How to create a WSIF WSDL?

Add these two schema to your definitions tag
xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
xmlns:java=”http://schemas.xmlsoap.org/wsdl/java/”


The format namespace adds support for mapping Java types to XML schema.
The java namespace allows mapping WSDL operation to Java methods.

Specify binding Information



Binding name specifies the name which would be reffered from service tag.
Binding type specifies the portType, specified in WSDL
The java:binding tag identifies that this is bound to Java code rather than a SOAP service.

This binding would encompass, formatting information, i.e. which XML tag is to be mapped to what Java DataType



The format:typeMapping tag tells us that we will be mapping XML Schema types onto Java types.


The format:typeMap tag explains what Java type is to be used for each XML schema type in the interface.

The Service Tag refers to binding tag for mapping information.
The Java:address tag specifies fully qualified classname which contains implementations of operations specified inside binding tag.






2 comments:

mahakk01 said...

I find your post informational. The WSDL way is easier to understand. The syntax is easy and can be implemented with a little effort. I am going to try this on my application. Let's see how it works. I surely share my experience with you. Thanks for the post.
sap technical upgrade

Microsoft Dynamics said...

Awesome post
This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It?s the old what goes around comes around routine. Did you acquired lots of links and I see lots of trackbacks??
Microsoft dynamics training