Hi Patrick,

I think what you're asking is can your client using WSIF use multiple
ports?

The answer is yes thats exactly the type of thing WSIF is for. If you look
at say the WSIFstockquote testcase WSDL:
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-axis-wsif/java/test/stockquote/wsifservice/Stockquote.wsdl

At the bottom in the service section you'll see a port defined called
SOAPPort:

<port name="SOAPPort" binding="tns:SOAPHttpBinding">
   <soap:address location="http://localhost:8080/soap/servlet/rpcrouter"/>
</port>

The soap:address location attribute defines the service server url. You can
add more port definitions with different location attributes, for example:

<port name="SOAPPort2" binding="tns:SOAPHttpBinding">
   <soap:address location="http://xyz.com:8080/soap/servlet/rpcrouter"/>
</port>

Now, if you look in the testcase that uses this WSDL at;
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-axis-wsif/java/test/stockquote/StockquoteTest.java

in the doit method the line:

StockquotePT stub =
   (StockquotePT) service.getStub(portName, StockquotePT.class);

the portName variable is what tells WSIF which port to use. In your client
you could use portName = "SOAPPort" or "SOAPPort2" depending on which
server you want to access.

Hope that helps and let me know if that wasn't what you question was.

       ...ant

Anthony Elder
[EMAIL PROTECTED]
Web Services Development
IBM UK Laboratories,  Hursley Park
(+44) 01962 818320, x248320, MP208.


"BLIS Webmaster (Patrick Houbaux)" <[EMAIL PROTECTED]> on
12/02/2003 16:24:25

Please respond to [EMAIL PROTECTED]

To:    [EMAIL PROTECTED]
cc:
Subject:    WSIF vs WSDL2Java question



Hi all,

I'm still quite a newbie to everything concerning web services and I
would like somebody's opinion on something I'm wondering.

I want to write a client that should access to a web service defined
through WSDL that is hosted physically on several servers.

I have made some experimentation with AXIS and specially with WSDL2Java
that works fine to access to one server and actually writting a client
with that solution is very simple ... I like that ;)
As fas as I understand, the stub generated with WSDL2Java is specific to
only one server URL (or port if you call it like this).

My question is,  is WSIF what I need for the objective I have? Is it as
simple as WSDL2Java to write a client?
Any other solution?

I hope my explaination was clear enough.

Regards,
Patrick.




Reply via email to