Calling a Web Service from a IS

Hi,
I have a question regarding calling a outside web service from IS. In detail I will say. If my J2EE application has some Java Web Service which is hosted on some Web/Application server. I want to call that service from my IS. Is it possible that I will create a trigger on my IS and invoke a Java Web Service hosted on a J2EE application’s web/application server.

Regards,
Vijay

Hi Vijav

This is very easily done in webMethods. All you needs is the WSDL file for your J2EE service exposed as a web service. In webMethods developer create a new WebService connector, select the WSDL file and that’s it! From that point onwards, you’re dealing with it as with any other webMethods service.

Regards,

Hido Hasimbegovic
CustomWare Asia-Pacific Pty Ltd
WmUnit - Trust Your Services

Thanks Hido,
But my question is little different if we have an EJB on say web logic server or a Servlet on Web Logic server and I have to call it from any service on the integration server is that possible? Here EJB or Servelet is not exposed as a web service. But want to use the business logic written in it.

Regards,
Vijay

Hi Vijay

The whole point of WebServices is that it doesn’t matter what is the actual business logic implemented in. Whether it’s an EJB service, a .NET assembly or even a COBOL programme, it should not matter.
As long as your EJB service is exposed as a valid WebService, you should not have any issues. However, there are situations when people roll their own quasi-webservices (in fact, some sort of remote procedure call in XML), in which case you may need to write a HTTP handler in webMethods. Again, not too hard.

Regards,

Hido Hasimbegovic
CustomWare Asia-Pacific Pty Ltd
WmUnit - Trust Your Services

Hello,
If you want to call a program on an http protocol server you will try to use soap if it works as a standard webservice or you might just do an http POST to the computer like a webform does.
Good day.

Yemi Bedu

Hi,
I am a webMethods newbie. Can anybody tell me the process of writing a webservice.

Thanks in advance…

To Vijay,

There is an EJB Adapter for Integration Server that supports bi-directional invocation of EJBs that are not surfaced any other way. There is also the WmJBoss package that supports running EJBs inside of Integration Server. To call a servlet from an IS service you can use the WmPublic pub.client:http service to POST to it.

To Ghanasyam,
All services on Integration Server are Web services. The only limitations are:

  1. the service can’t have an input or output that is not an ‘Integration Server type object’ (say an InputStream).
  2. you have to have the appropriate privileges. Some services have an ACL that restricts them from ever being called from output the Integration Server.
  3. If you want to publish the service as a SOAP Document/literal encoding there are some specific restrictions on the service signature that should be described in the SOAPDevGuide.pdf that comes with Developer.

HTH,
Fred

I found that for every Web Service Connector contains two input parameter, “auth” and “_post”, anyone know what they are for?

The “auth” document is used to pass login credentials to the soap server hosting the service you are attempting to invoke.

For basic authentication, set “type” to “Basic” and fill in your username and password in the “user” and “pass” parameters.

“_port” is used to direct your request to a particular soap port type as specified in the WSDL describing the service you are invoking. Some WSDL’s use different endpoint addresses (URLs) for different port types.

I generally delete the branch for “_port” and retrieve the endpoint address from a properties file rather than take it from the WSDL at design time. That makes finding and changing the endpoint URL easier.

Better yet, register multiple instances of the service you need to invoke in ServiceNet (aka Fabric) and let it redirect you seemlessly to another valid provider when one goes offline.

Mark

hello all,

     while generating WSDL ,i took HTTP-POST protocol in the parameters menu the 'Output format' is not enabled .Could any one help me  

Thank you