Hi,
I added these configurations [1] as Kavinda had said in his reply and the
client runs fine. Thanks for the heads up Kavinda.
[1]
<operation name="checkFileExists">
<call-query href="checkFileExistsQuery">
<with-param name="fileName" query-param="fileName"/>
</call-query>
</operation>
<operation name="createNewFile">
<call-query href="createNewFileQuery">
<with-param name="fileName" query-param="fileName"/>
<with-param name="fileType" query-param="fileType"/>
</call-query>
</operation>
<operation name="getFileType">
<call-query href="getFileTypeQuery">
<with-param name="fileName" query-param="fileName"/>
</call-query>
</operation>
<operation name="getFileSize">
<call-query href="getFileSizeQuery">
<with-param name="fileName" query-param="fileName"/>
</call-query>
</operation>
<operation name="getFileRecords">
<call-query href="getFileRecordsQuery">
<with-param name="fileName" query-param="fileName"/>
</call-query>
</operation>
<operation name="appendDataToFile">
<call-query href="appendDataToFileQuery">
<with-param name="fileName" query-param="fileName"/>
<with-param name="data" query-param="data"/>
</call-query>
</operation>
<operation name="deleteFile">
<call-query href="deleteFileQuery">
<with-param name="fileName" query-param="fileName"/>
</call-query>
</operation>
Thanks,
On Tue, Feb 17, 2015 at 12:20 PM, Kavinda <[email protected]> wrote:
> Hi,
> I also got the same issue.
> I could resolve it by adding the operations for the required queries via
> dashboard,
> 1.Using XML edit,
> Go to
> Home > Manage > Services > List > Data Service XML Editor of
> File service and add following operation.
> <operation name="checkFileExists">
> <call-query href="checkFileExistsQuery">
> <with-param name="fileName" query-param="fileName"/>
> </call-query>
> </operation>
> 2. Using wizard,
> Go to
> Home > Manage > Services > List > Service Dashboard > Queries
> > Operations
> and add new operation for the 'checkFileExistsQuery' query using name '
> checkFileExists'.
>
> May be this is the expected behaviour of the sample, if so, it is better
> if these info can be added to the DSS documentation.
>
> Regards,
> Kavinda
>
> On Tue, Feb 10, 2015 at 12:19 AM, Chathura Priyankara <[email protected]>
> wrote:
>
>> Hi,
>>
>> Here the client is trying to access HTTPEndpoint (See
>> <DSSHome>samples/clients/src/org/wso2/carbon/dataservices/samples/FileServiceApp.java
>> in line 288), but it seems like HttpEndpoint for this, is not working.
>>
>> If you try to access HttpEndpoint from Tryit you will get following
>> message :
>>
>> <soapenv:Reason xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
>> <soapenv:Text xml:lang="en-US">The endpoint reference (EPR) for the
>> Operation not found is
>> /services/samples/FileService.HTTPEndpoint/checkFileExists?fileName=myfile
>> and the WSA Action = null. If this EPR was previously reachable, please
>> contact the server administrator.</soapenv:Text>
>> </soapenv:Reason>
>>
>> The service is working for both SOAPEndpoints.
>> So I think that is the issue here and this can be fixed in
>> FileServiceApp.java (may be to access SOAP12Endpoint) and need to recompile
>> it.
>>
>> Thanks!
>> Best Regards,
>>
>>
>> On Mon, Feb 9, 2015 at 2:43 PM, Thusitha Thilina Dayaratne <
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>> I'm trying to run the FileService[1] sample in the WSO2 DSS. When I try
>>> to upload an image through the provided client I'm getting following an
>>> IOException [2]
>>>
>>>
>>>
>>> [1] - https://docs.wso2.com/display/DSS322/File+App+Service+Sample
>>>
>>> [2] - Stack trace
>>>
>>>> [java] java.io.IOException: Server returned HTTP response code: 500
>>>> for URL:
>>>> http://localhost:9763/services/samples/FileService.HTTPEndpoint/checkFileExists?fileName=abc.jpg
>>>> [java] at
>>>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1615)
>>>> [java] at
>>>> org.wso2.carbon.dataservices.samples.FileServiceApp.contactURL(FileServiceApp.java:251)
>>>> [java] at
>>>> org.wso2.carbon.dataservices.samples.FileServiceApp.checkFileExists(FileServiceApp.java:320)
>>>> [java] at
>>>> org.wso2.carbon.dataservices.samples.FileServiceApp.actionPerformed(FileServiceApp.java:399)
>>>> [java] at
>>>> javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
>>>> [java] at
>>>> javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
>>>> [java] at
>>>> javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
>>>> [java] at
>>>> javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
>>>> [java] at
>>>> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
>>>> [java] at
>>>> java.awt.Component.processMouseEvent(Component.java:6505)
>>>> [java] at
>>>> javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
>>>> [java] at java.awt.Component.processEvent(Component.java:6270)
>>>> [java] at java.awt.Container.processEvent(Container.java:2229)
>>>> [java] at
>>>> java.awt.Component.dispatchEventImpl(Component.java:4861)
>>>> [java] at
>>>> java.awt.Container.dispatchEventImpl(Container.java:2287)
>>>> [java] at java.awt.Component.dispatchEvent(Component.java:4687)
>>>> [java] at
>>>> java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
>>>> [java] at
>>>> java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
>>>> [java] at
>>>> java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
>>>> [java] at
>>>> java.awt.Container.dispatchEventImpl(Container.java:2273)
>>>> [java] at java.awt.Component.dispatchEvent(Component.java:4687)
>>>> [java] at
>>>> java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
>>>> [java] at java.awt.EventQueue.access$200(EventQueue.java:103)
>>>> [java] at java.awt.EventQueue$3.run(EventQueue.java:682)
>>>> [java] at java.awt.EventQueue$3.run(EventQueue.java:680)
>>>> [java] at java.security.AccessController.doPrivileged(Native
>>>> Method)
>>>> [java] at
>>>> java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
>>>> [java] at
>>>> java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
>>>> [java] at java.awt.EventQueue$4.run(EventQueue.java:696)
>>>> [java] at java.awt.EventQueue$4.run(EventQueue.java:694)
>>>> [java] at java.security.AccessController.doPrivileged(Native
>>>> Method)
>>>> [java] at
>>>> java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
>>>> [java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
>>>> [java] at
>>>> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
>>>> [java] at
>>>> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
>>>> [java] at
>>>> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
>>>> [java] at
>>>> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
>>>> [java] at
>>>> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
>>>> [java] at
>>>> java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
>>>
>>>
>>> Any help to solve this would be nice.
>>>
>>> Thanks and Best Regards
>>> --
>>> Thusitha Dayaratne
>>> Software Engineer | WSO2 Inc
>>>
>>> Email [email protected]
>>> Mobile +94712756809
>>> Blog alokayasoya.blogspot.com
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Chathura Priyankara
>> Software Engineer | WSO2 Inc.
>> Mobile : +94718795340
>> Blog : www.codeoncloud.blogspot.com
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Vinod Kavinda
> *Software Engineer*
> *WSO2, Inc <http://www.wso2.com>.*
> Mobile : +94 (0) 712 415544
> [email protected]
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
--
Malith Munasinghe | Software Engineer
M: +94 (071) 9401122
E: [email protected]
W: http://wso2.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev