WebSphere Application Server - How to make an existing deploued webservice be invoked from a

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > December 2006 > How to make an existing deploued webservice be invoked from a





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to make an existing deploued webservice be invoked from a

2006-12-10, 1:19 pm

I have already deployed a webserivce and i want the client to invoke it through the SIB http.
I have read multiple articles about that and i made an endpoint listners and inbound services but still do not work

is anyone has a complete doc/steps/guidence for that ?
Mark Lewis

2006-12-19, 1:24 pm

kgamal@eg.ibm.com wrote:
> I have already deployed a webserivce and i want the client to invoke it through the SIB http.
> I have read multiple articles about that and i made an endpoint listners and inbound services but still do not work
>
> is anyone has a complete doc/steps/guidence for that ?


I'm pretty sure there are developerWorks articles, Infocenter and
Redbooks that describe how to get this going but in short, here are the
steps you need:

1. Install any pre-reqs such as the SDO repository (this should be it in
WAS 6.1; in WAS 6.0.x then there is more to install using the
sibwsInstall.jacl script - see the Infocenter).

2. Create a bus.

3. Add your server as a bus member.

4. Create an endpoint listener on the server.

5. Connect the endpoint listener to the bus

6. Create an outbound service and port in your bus that points to your
Web Service.

7. Create an inbound service and port associated with your endpoint
listener and pointing at your outbound service destination.

8. Build your client using information from the inbound port WSDL
definition.

Now your client should be sending requests to your inbound service and
from there the requests should be routed via your outbound service to
your target Web Service.

Here's a very simple template wsadmin Jython script for WAS 6.1 that
does the configuration steps 2 to 7 above, which may help to understand
what's going on. You will need to change the endpoint listener name and
URL root to specific values listed in the Infocenter if you want to use
this on WAS 6.0.x. Watch out for line-wrapping added when posting that
shouldn't be there:

busName = "yourBusName"
eplName = "soaphttp"
urlRoot = "http://machinename:9080/soaphttp"
wsdlUrlRoot = "http://machinename:9080/sibws"

outServiceName = "yourServiceName"
outServiceWsdl = "http://url.to.your/targetService.wsdl"
outServiceDest = "yourDestinationName"
outPortName = "thePortNameInYourTargetServiceWsdl"

inServiceName = "yourServiceName"
inServiceWsdl = outServiceWsdl
inPortName = outPortName

# Assumes a single, standalone server
server = AdminConfig.list("Server")
serverName = AdminConfig.showAttribute(server, "name")
node = AdminConfig.list("Node")
nodeName = AdminConfig.showAttribute(node, "name")

# Create a bus
bus = AdminTask.createSIBus(["-bus", busName])

# Add the server as a bus member
AdminTask.addSIBusMember(["-bus", busName, "-node", nodeName, "-server",
serverName, "-createDefaultDatasource", "true"])

# Create an Endpoint Listener
epl = AdminTask.createSIBWSEndpointListener(server, ["-name", eplName,
"-urlRoot", urlRoot, "-wsdlUrlRoot", wsdlUrlRoot])

# Connect the Endpoint Listener to the Bus
busConn = AdminTask.connectSIBWSEndpointListener(epl, ["-bus", busName])

# Create an outbound service
outService = AdminTask.createSIBWSOutboundService(bus, ["-name",
outServiceName, "-wsdlLocation", outServiceWsdl, "-destination",
outServiceDest])
# Add an outbound port to outbound service
outPort = AdminTask.addSIBWSOutboundPort(outService, ["-name",
outPortName, "-node", nodeName, "-server", serverName])

# Create an inbound service
inService = AdminTask.createSIBWSInboundService(bus, ["-name",
inServiceName, "-destination", outServiceDest, "-wsdlLocation",
inServiceWsdl])
# Add an inbound port to inbound service. This associates the inbound
service with an endpoint listener
inPort = AdminTask.addSIBWSInboundPort(inService, ["-name", inPortName,
"-endpointListener", eplName, "-node", nodeName, "-server", serverName])

# Save changes
AdminConfig.save()
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com