cancel
Showing results for 
Search instead for 
Did you mean: 

how to find the URL of deployed Web services?

Former Member
0 Kudos

Hi,guys. I have created a Web service, and deployed to WAS.But where is the accessing URL? WAS has created several WSDLs for the serviece, but I can not find the URL in the files.

I think that the URL looks like "http://localhost:50000/XISOAPAdapter/MessageServlet?channel=:WAS2:CC_GIS_Equipment_Create_SOAPOUT&version=3.0&Sender.Service=WAS2&Interface=urn%3Azpepc%3Agis%3Aequipment%3Amaintenance%5EMI_GIS_Equipment_Create"

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

yeah, I can see all available web services in web service navigator. But how can I access them in my client code?

Thank you

Former Member
0 Kudos

Hi,

Use the WebService Navigator (http://<hostname>:50000/wsnavigator).

There you can see all available Web services.

Regards,

daniel

Former Member
0 Kudos

my accessing code is:

public class VacationClient {

public static void main(String[] args) throws Exception {

System.out.println("SOAP call start");

VacationClient helloSOAPClient = new VacationClient();

String resultValue = helloSOAPClient.doSOAPRequest(

"VacationCheckerService", "getVacationDays",

"employed_years", 20);

}

public String doSOAPRequest(String _strURI, String _strMethodName,

String _strName, int _strValue) throws Exception {

Call call = new Call();

call.setTargetObjectURI("urn:" + _strURI);

call.setMethodName(_strMethodName);

call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);

Vector params = new Vector();

params.addElement(new Parameter(_strName, Integer.class, new Integer(

_strValue), null));

call.setParams(params);

System.out.println("&#24320;&#22987;");

Response resp = call

.invoke(

new URL(

"http://10.136.31.121:50000/TestWeb_Config1_SoapServlet"),

"");

if (resp.generatedFault()) {

Fault fault = resp.getFault();

System.out.println("failed&#65281;");

return "failed&#65281;";

} else {

Parameter result = resp.getReturnValue();

System.out.println("sucessful&#65281;"+result.getValue().toString());

return result.getValue().toString();

}

}

}

But the URL is not correct ,and an exception is throwed:

Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client; msg=Software caused connection abort: recv failed; targetException=java.net.SocketException: Software caused connection abort: recv failed]

at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:358)

at org.apache.soap.rpc.Call.invoke(Call.java:248)

at test.VacationClient.doSOAPRequest(VacationClient.java:44)

at test.VacationClient.main(VacationClient.java:18)