0

I have a web service in remote server and I need to access the same from my machine. I also have the wsdl of the web service in my local machine. I can generate the stubs from the wsdl to execute the web service. But in remote server my web service is exposed but not it's wsdls(Wsdl in my local to generate the stubs). In this scenario, what should be my approach to execute the web service. I have already generated stubs from my local machine.

Stub:

@WebServiceClient(name = "CohProvisioningService", targetNamespace = "http://provision.soap.coh.ericsson.com/", wsdlLocation = "file:/home/esouvbh/NetBeansProjects/BCS/SSP/trunk/ssp-service-coh/target/wsdl/coh/CohProvisioningService.wsdl")
public class CohProvisioningService
    extends Service
{

    private final static URL COHPROVISIONINGSERVICE_WSDL_LOCATION;
    private final static Logger logger = Logger.getLogger(com.ericsson.coh.soap.provision.CohProvisioningService.class.getName());

    public CohProvisioningService(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }
}

Object creation code:

private CohProvisioningConnector() {
        super(new QName("http://provision.soap.coh.ericsson.com/", "CohProvisioningService"));
        service = new CohProvisioningService("<Ip Address>/CohProvisioningService/ProvisionWebService", qname);
    }
Buhake Sindi
  • 87,898
  • 29
  • 167
  • 228
  • If I understood your question correctly, then it is related to this one http://stackoverflow.com/questions/7970331/how-do-i-remotely-call-a-web-service-programmatically – NightWhisper Jun 05 '13 at 10:08
  • The link provided is about executing web services but my problem is bit different. I can execute the web service in remote machine if the wsdlr are exposed. But in my case, the web service will be exposed but not the wsdls. When we call a web service if we append ?wsdl at the end of the url then it will display the WSDL. But in my case ?wsdl will not work because they are not exposed. – Souvik Bhattacharya Jun 05 '13 at 10:22
  • Then how about this link? http://stackoverflow.com/questions/2404178/given-a-wsdl-file-what-are-the-steps-to-consume-a-web-service-over-the-internet – NightWhisper Jun 05 '13 at 10:36
  • Through the WSDL(IN Local machine) I have already created the stubs files in my local system. But in the remote server, the wsdls file are not exposed. So I need to call that web service – Souvik Bhattacharya Jun 05 '13 at 11:00
  • I have updated the question with the code. – Souvik Bhattacharya Jun 05 '13 at 11:40

0 Answers0