Errro Running WS-Client Samples

bipikm's picture
I followed the 4 steps in readme.txt file for testing out the samples for automating adding collections and resources as follows This file explains how to use the Web service API of the registry to upload a file. =================================================================================== This is useful when uploading large files, since atom based remote registry API is not that efficient in uploading large files. Before getting the sample to work you have to run ant from registry-home/bin and start the registry server. Steps to get this sample to work: 1. Edit the build.xml at following points. - replace the registry-home with the location you have deployed the registry. - replace the axis-home by the location you have extracted an axis2 distribution (we need axis2-ant-plugin-1.4 to generate code from WSDLs). 2. Replace the registry-home in RegistryServiceClient.java and SimpleRegistryServiceClient.java. 3. Replace the "filePath" in RegistryServiceClient.java with the file you need to upload. 4. Run the ant build file, i.e. ant upload When I run ant upload or ant add(for testing SimpleRegistryServiceClient) I always get a build error as follows. Why is this and what could be going wrong? C:\Carbon\Registry\tomcat\wso2registry-2.0.1\samples\WS-client>ant add Buildfile: build.xml init: [axis2-wsdl2java] Retrieving document at 'resources/AuthenticationAdminService.wsdl'. BUILD FAILED file:C:/Carbon/Registry/tomcat/wso2registry-2.0.1/samples/WS-client/build.xml:51: java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredDocumentImpl.getXmlEncoding()Ljava/lang/String; Total time: 1 second C:\Carbon\Registry\tomcat\wso2registry-2.0.1\samples\WS-client>
lahiru_wso2's picture

ws-client sample

This works in latest build. There were couple of issues to fixed and it's done. Please take an svn up from trunk and build governance and see. Sorry for the inconvenience. Lahiru
bipikm's picture

How does this work with

How does this work with 2.0.1? I am not using version 3 yet. I looked at the build file and it refers to /GREG-HOME/repository/components/plugins/ when in the 2.0.1 distribution there is no 'components/plugins' directory under repository. Thanks
bipikm's picture

I looked at the 2 wsdl's

I looked at the 2 wsdl's (AuthenticationAdminService and ResourceAdminService) in the samples distribution and the soap:address location points to http://localhost:8080/axis2/services/AuthenticationAdminService for AuthenticationAdminService and to https://10.100.1.193:9443/services/ResourceAdminService.ResourceAdminServiceHttpsSoap11Endpoint (also ResourceAdminServiceHttpsSoap12Endpoint and ResourceAdminServiceHttpsEndpoint) for ResourceAdminService. How will this work since my running registry is located at https://localhost:9443/carbon so both wsdl's do not point to the registry location. Thanks
senakafdo's picture

The locations doesn't matter

Hi, The endpoint location does not actually matter, as we use the wsdl only to generate code, the runtime will figure out the correct location and use it in place of the one in the WSDL file. Thanks, Senaka.
bipikm's picture

I still get the same error

I still get the same error as before. I am attaching the modified wsdl's, java files and the build file for reference. C:\Carbon\Registry\samples>ant add Buildfile: build.xml init: [axis2-wsdl2java] Retrieving document at 'AuthenticationAdminService.wsdl'. BUILD FAILED file:C:/Carbon/Registry/samples/build.xml:58: java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredDocumentImpl. getXmlEncoding()Ljava/lang/String; Total time: 1 second C:\Carbon\Registry\samples>
senakafdo's picture

Re: I still get the same error

I suggest you switch to 3.0.0. Thanks, Senaka.
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)