I am using web services to read a xml report from oracle xmlserver.
The service then returns encoded value of the report and then I have to decode it via web link. Problem is i can not use web link every time to decode it
Is there any way that it doesn't return me encoded value and returns actual xml.
Also, is there any way to decode the encoded file via developer studio?
Any ideas and thoughts will be appreciated.
Related
I have created an application in Mule 3.9 which coverts Json to Excel. I need to deploy it on server,so that it can be used by a larger audience.
The code uses HTTP Connector-->Transformer-->File Connector.
I need the application to work in such a way that when the application is deployed on Pivotal Cloud Foundry (PCF), anyone who sends request to this application via postman, will have the excel file downloaded to their local machine.
How can I achieve this?
PS: Since everyone will not be having access to login to the server and access the file, somehow getting the Excel sheet on the requesters local machine is the only way I can think of. Any other suggestions are welcome.
Request: JSON Request sent on Postman
Response: Converted Excel Sheet
Probably there is no way the File connector can reach out the client local machine, so I would rule that out. The File connector will have access to the file system of the server in which it is deployed.
The usual way to do this is to set the file, in this case the Excel payload resulting of the Transformer, at the end of the flow so it is returned to Postman as the body of the HTTP response. You might need to set the right content type. Postman should be able to handle a binary response. No file handling involved.
I'm use progress 4Gl and i have to call a webservice that uses ISO-8859-1 but i receive the error when a execute the run statment:
Error receiving Web Service Response: Cannot get 'ISO-8859-1' transcoder from the TranscoderRepository. (11773)
And the developer of webservice can not change the encoding.
Someone can help me?
Progress only supports the UTF-8 and UTF-16 encoding with the OpenEdge Web Services as required by the WS-I
According to this knowledgebase entry
If you're sure the data is standard ascii (character values with ascii value < 128) there is a work-around.
You download the wsdl of the webservice locally.
Replace iso8859-1 but utf-8 in the locally saved file.
Use that wsdl instead of the one from the webservice.
This is a work-around, not an ideal solution.
I am working on an application allowing user to upload XML file to server through a web service. Files are sent as attachment. I am using MTOM. I was able to send and receive file.
The problem is that my XML file contains Cyrillic letter. When I print XML on server side all Cyrillic letters changed into something like "=D0=9A=D0=95=D0=9D=D0=96=D0=90=D0==9B=D0=98=D0=9D=D0=9E=D0=92=D0=90". At first I thought that java code was wrong and I used wrong encoding when reading XML file attachment on server side. To test the web service I use SOAPUI. I started looking at the request and found that even before request containing the file was sent, SOAPUI already "messed up" the characters in the attachment.
How should I set the SOAPUI setting to send proper request?
Set the Encoding property in you test request to UTF-8.
mmm anyways I was using old version of soapui. After I got the latest one, the problem disappeared.
How to send a image or a file using the web service to the server ?
Here is a good example of how to send a file using NuSOAP:
http://web.imkrisna.com/june/news/simple-file-transfer-using-nusoap/
The web service's documentation should specify the necessary format, which will probably involve base64 encoding the image data. You would do whatever encoding the web service requires and then pass it to nuSoap in the same way you already do for text.
i am relative new in java development..
I want to create a web service (jax-ws)/web application that will receive some input and generate pdf, and then open the pdf in the browser. I manage to create the pdf (using itext) and open it in the broswer using servlet (with FileInputStream etc).
However i do not know, how to return the servlet from the web service.
What should I do, so when I call the web service to receive a pdf via the servlet ?
If you've returned PDF from servlet, it means your servlet sent PDF stream as output and probably set content type as "application/pdf". This works fine in the browser and this is the right way to do it.
However, you cannot easily invoke web service (no matter whether it is JAX-WS or any other stack) from the browser. Web service call requires POST and strictly defined SOAP content. You can, however, use AJAX to call web service, but that is a different story (also look at REST).
If you want to return binary data from web service (please keep in mind that web-services are for machines, not for humans using web browsers), you have two options: either serialize the binary data using base64 or use multipart HTTP response (MTOM standard, see for instance: http://www.mkyong.com/webservices/jax-ws/jax-ws-attachment-with-mtom).