Hi All,

I have deployed a data service in cloud and I am trying to push data to a
database in cloud through the data service. I am having a hard time
figuring out the end point where I have to push data to. I tested the data
service using soap ui and it successfully pushes data.

The wsdl for the data service can be seen in [1].

The code to push data is as follows(I have created the client stub using
the wsdl mentioned above).

*String epr =
"https://appserver.dev.cloud.wso2.com/services/t/sabra8339/Dataservice1DefaultSNAPSHOT
<https://appserver.dev.cloud.wso2.com/services/t/sabra8339/Dataservice1DefaultSNAPSHOT>";*

System.setProperty("javax.net.ssl.trustStore", (new
File(TRUST_STORE_PATH)).getAbsolutePath());
System.setProperty("javax.net.ssl.trustStorePassword",
TRUST_STORE_PASSWORD);

ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem("/home/sabra/repository",
null);

Dataservice1DefaultSNAPSHOTStub stub = new
Dataservice1DefaultSNAPSHOTStub(ctx,epr);
ServiceClient client = stub._getServiceClient();
Options options = client.getOptions();
client.engageModule("rampart");
options.setUserName("admin");
options.setPassword("admin");

options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,
loadPolicy(POLICY_FILE_PATH));

Dataservice1DefaultSNAPSHOTStub.InsertRawLeadsPerWeek request = new
Dataservice1DefaultSNAPSHOTStub.InsertRawLeadsPerWeek();

request.setStart_date("2092-04-09");
request.setEnd_date("2092-04-8");
request.setTotal_users(6666);
request.setEu_users(6666);
request.setNa_users(6666);
request.setRow_users(6666);
request.setUnclassified_users(6666);

stub.insertRawLeadsPerWeek(request);

I have no clue as to what is missing. Any help on this issue is highly
appreciated. If any further clarification is needed please let me know.

[1]
https://appserver.dev.cloud.wso2.com/services/t/sabra8339/dataservice1-default-SNAPSHOT?wsdl

Regards.
-- 
Sabra Ossen <http://lk.linkedin.com/in/sabraossen>
Undergraduate | Department of Computer Science and Engineering
University of Moratuwa
Sri Lanka
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to