User login

Registry Protocol using HTTP

Forums :

 

new URL(http://localhost:8080/wso2registry/atom/CalculatorWSService.wsdl;versions);new BufferedReader(new InputStreamReader(connection.getInputStream()));while (response !=null)out.println(response);

URLConnection connection = url.openConnection();

BufferedReader reader =

 

String response = (String)reader.readLine();

 

{

System.

response = reader.readLine();

}

I tried this way but am getting HTTP 500 Error.

Any attempt to clarify my understanding would be really appreciated.

Thanks

Just getting into this. Being a RESTful registry, does it mean that each every registry protocol can be applied through direct HTTP commands like GET, POST, DELETE, PUT etc. Is my understanding correct?

If that is the case, can I write a program instead of Registry API to access the resources like the snippet provided below - 

For instance, if i want to get all the versions of CalculatorWSSevice.wsdl resource, can the following code be used?

URL url =

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Registry Protocol using HTTP

There seems to be something missing in your code. I tried with below code snippet and got the result.

 

     public static void main(String[] args) throws Exception {
        
        URL mywsdl = new URL("http://localhost:8080/wso2registry/atom/GoogleSearch.wsdl;version");
        URLConnection yc = mywsdl.openConnection();
        BufferedReader in = new BufferedReader(
                                new InputStreamReader(
                                yc.getInputStream()));
        String inputLine;

        while ((inputLine = in.readLine()) != null)
            System.out.println(inputLine);
        in.close();
    }

Yes,above code can be used to get all the versions of given resource.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.