Download image pieces bmp to xml from the web service
You try to download a bmp, in blocks of 10,000 bytes, using a .net web service.
I get an error because of the bmp bytes.
How the octets must be encoded?
XML uses utf8 text, you'll have to urlencode (base64) bytes, similar to an email.
Tags: BlackBerry Developers
Similar Questions
-
How to display a PNG image according to the response from the Web Service?
Hello
I use the web service XML from Weather.com to get the current temperature, temperature 'feels' and the current condition icon number. Their service provides many (> 20 I think) which represents the current status of PNG files. How do I install my script AS3 do basically if... then Else instructions based on the returned value icon? For example, if the value of icon = 20, then view 20. png on stage? I need match the value of correct PNG icon and then put that PNG (as a clip?) on stage for a predefined timeline section.
Thank you
SID
Hello
I also used this API, and I only use cases or conditions in order to retrieve the values and turn them into a file name.
If you do not use all the available conditions and turning them into an icon, then Yes, you need to do a switch condition.
But if you want to use them all, them you can simply get the condition number and add the '.png' and call the corresponding file directly. Here you can do a test, just in case the condition / icon does not exist (e.g. system failure any)
uicondition.source = String (resultXML.cc.icon) + ".png";
The UILoader is an excellent component for this sort of thing. You can accomplish the same thing with a MovieClip and load an image. It is lighter.
But then again if you want to resize you would code all methods for that.
I hope this helps.
-
Bind the drop down list to XML response from the web service
In Designer ES2, I'm trying to populate a drop-down list with the data returned by a web service, but can't seem to get the link right.
I created a web service using Workbench, which returns the following XML data (shown here in a text field for test purposes):
However, when I bind this to the DataDropdownList control, LiveCycle seems to be putting the entire XML document in the drop-down list.
Liaison:
(Full text of the link is connectionData.groupLeaderWebService.Body.invokeResponse.xmlData.document.)
Result:
Therefore, a connection is made and the web service returns data, but it is not bound correctly as items in the list.
I need the drop-down list to display the individual names returned by the web service. Finally, it probably will be expanded to include the name and identification number (text and value, respectively).
Can you see where I am going wrong with this? Any help would be appreciated.
Thank you!
Toby
Oops. Good fishing. This should be pls.loadXML (form1.page1.footer.lots.rawValue, 0, 1);
-
I created the Web service VI ("Mt-insolacije.vi"), which has two terminals of the input string (FROM / TO) for the dates of arrival and exit of two data terminals (table 1 d) from database (MS SQL server). This VI communicates with the database with functions of the database with a DSN and SQL query appropriate palette. There are two tables with two data (time and Insolation) columns in the database.
This VI works when you run in Labview 2010, but when I used it as VI in UI Builder it returns no data.
Could you please help me find a solution. Is it possible to communicate with the SQL server database in this way or there is another way?
There are two files attachmet: Image of .vix file in Interface builder and .vi file ("Mt-insolacije.vi")
Please help me ASAP!
Thank you
Ivan
I found the solution problem is in the DSN. I've been using the user instead of DSN system DSN.
It's important to create the system DSN if you want your VI of web service to communicate with the database.
PS Please put feature bundle format timestamp and XY graph in the web user interface designer. It's complicated to trace data with datetime on X axis without them.
-
XPath with XML from a Web Service
Hello
I've been tweaking data traction of a webservice and have managed to get the results that I need so I'm now at the stage where I want to do something useful with the XML that is returned, so I played with Xpath.
I understand I can use Xsearch to draw the nodes of the XML object rather than having to write the XML to a file and then look in the file. The problem I have is that when I use Xsearch it does not extract data I'll be waiting.
Here is the XML that is returned by the web service, which I attribute to the variable xmlReturned:
<? XML version = "1.0" encoding = "utf-8"? >
" < envelope soap: xmlns:soap = ' http://schemas.xmlsoap.org/SOAP/envelope/ "" xmlns: xsi = " " http://www.w3.org/2001/XMLSchema-instance "container =" " http://www.w3.org/2001/XMLSchema ">
< soap: Body >
" < GetChildLocationsResponse xmlns =" http://tempuri.org/VillarentersWebService/villa_search ">
< GetChildLocationsResult >
< RequestedParentID > 3924 < / RequestedParentID >
< VRF / >
< ChildLocations >
< location >
< LocationRef > 10 < / LocationRef >
the Argentina < LocationDescription > < / LocationDescription >
< ParentID > 3924 < / ParentID >
< / location >
< location >
< LocationRef > 30 < / LocationRef >
Brazil < LocationDescription > < / LocationDescription >
< ParentID > 3924 < / ParentID >
< / location >
< / ChildLocations >
< / GetChildLocationsResult >
< / GetChildLocationsResponse >
< / soap: Body >
< / envelope soap: >
So, when I use:
< cfset locDescription = XmlSearch (xmlReturned, "//LocationDescription") / >
< cfdump var = "#locDescription #" >
I expect to see an array of 2 elements, the Argentina and the Brazil. What I actually get is an empty array. I tried using a Xpath Checker convenient online at http://www.zrinity.com/xml/xpath/index.cfm and I get the same result. I tried a little research different but every time the table is empty.
Does anyone know why it is not pulling the knots required in the table? Am I missing something simple here?
Or you could represent the namespaces in your xpath xmlsearch properties.
Here is the first link that I got from a Google search for"namespace xmlsearch.
http://www.aftergeek.com/2006/08/xmlSearch-XPath-and-XML-namespaces-in.html
-
How to get the response from the web service
Hello
My requirement is necessary send the UI ADF input parameter and get web service respone. I created proxy WSDL-based methods. Now in my action button earpiece that I wrote the logic below.
{} public void submitAction (ActionEvent actionEvent)
Add the code in the event here...
BigDecimal merNam = null;
String number = this.it1.getValue (m:System.NET.SocketAddress.ToString ()); my entry value
merNam = new BigDecimal (number);
MV MerchantValidate = new MerchantValidate(); / / created by jdeveloper when proxy generation.
mv.setMerchantNumber (merNam); / / the value input to the web service
System.out.println ("merchant number is:" + mv.getMerchantNumber ());
Mr. MerchantValidateResponse = new MerchantValidateResponse(); / / create object of response class
String result = mr.getResult (); / / try to get the answer
System.out.println ("result:" + result); / / I'm getting null as a result
/ * this.setResult (mr.getResult ());
System.out.println ("the answer is:" + this.getResult ()); * /
Can someone help how to pass values to the web service and get the response. And how can we get the Web service data control.
It's very urgent pls help. I'm not for this technology.
}Hello
You can view the tutorial for a good understanding on creation and use of a Web Service data control:
http://www.Oracle.com/technology/OBE/obe11jdev/11/wsdc/wsdc.htm#T1
Thank you
Vishal -
Extract the data from the web service response
Hello
I called a web service and in response to XML data, now I have to extract the values and store them in the array
My steps,
1 call WebService
2 answer stored in the CLOB column
3, then used after the request
SELECT loc.*
OF my_xml PO,.
XMLTable (XMLNAMESPACES)
"urn: schemas-microsoft-com: XML-diffgram-v1" as "diffgr".
,'http://api. .com / "as"ns0"
)
,'/ ns0:DataSet / diffgr:diffgram/NewDataSet/OptOutAll '
PASS xmltype.createxml (PO.xml_data)
COLUMNS
"E-mail" TANK (100) path "Email."
'Reason' TANK (150) PATH 'reason '.
) As loc
WHERE ROWNUM < = 10;
I wrote using this example
But it does not work, do not know why
/ ZabIf I use the XML (stored in the table XMLType TMP_XML) below:
2012-05-09T22:40:00+02:00 information 111111 Subscriber confirmed 2012-06-07T22:30:00+02:00 information 111111 Subscriber confirmed 2012-06-14T00:20:00+02:00 information 111111 Subscriber confirmed 2012-06-19T20:50:00+02:00 information 111111 Subscriber confirmed Then I can do:
SQL> SELECT x.* 2 FROM tmp_xml t 3 , XMLTable( 4 XMLNamespaces( 5 'http://www.w3.org/2003/05/soap-envelope' as "soap" 6 , 'urn:schemas-microsoft-com:xml-diffgram-v1' as "diffgr" 7 , 'http://api.***.com/' as "ns0" 8 ) 9 , '/soap:Envelope/soap:Body/ns0:GetOptOutAllResponse/ns0:GetOptOutAllResult/diffgr:diffgram/NewDataSet/OptOutAll' 10 PASSING t.object_value 11 COLUMNS OptOutTime TIMESTAMP WITH TIME ZONE PATH 'OptOutTime' 12 , MailingList VARCHAR2(100) PATH 'MailingList' 13 , Reason VARCHAR2(150) PATH 'Reason' 14 ) x 15 ; OPTOUTTIME MAILINGLIST REASON ----------------------------------- ------------------------------ -------------------------------------------------------------------------------- 09/05/12 22:40:00,000000 +02:00 information Subscriber confirmed 07/06/12 22:30:00,000000 +02:00 information Subscriber confirmed 14/06/12 00:20:00,000000 +02:00 information Subscriber confirmed 19/06/12 20:50:00,000000 +02:00 information Subscriber confirmed
Are you getting something different?
-
How do I load the response from the Web service data into flashbuilder
Hi all,
I got a response from webservice sent by server, now I need to load and parse as xml, how to move forward on the issue after getting the answer please try to solve my problem.
Thanks & rRegards
Flashbuilder has 4.6 of this feature of the very good user interface you want to use (not sure another old version).
and it's almost not requre no programming steps for you to get a XML as an object of value from a webservice.
Click the menu data, you can learn it by yourself quickly.
-
Exception during consumption of huge data from a web service.
Hello
I m developing an application to receive data from a Web Service and retain the data received on the device.
App is developed for OS 4.3.0
The Web Service call is made using Ksoap. The Code receives the data from the web service, analyzes the data and stores it in an object. This object is then persisted on the device. The data are essentially the coordinates. It takes the number of contacts required as input and passes it to the Web Service. The Web Service then returns the requested number of records
The code works if I ask data of up to ~ 600 cases. If I specify more than 600 cases, it throws the following exception
Chain rg.xmlpull.v1.XmlPullParserException:unexpected type (position: TEXT entity request in T...@1:24 in java.io.InputStreamReader@1f87d1b4)
When I debugged using Eclipse, this exception is thrown on this statement ht.call (soapAction, envelope);
Would it be because of a time-out? OT is because the Analyzer is not able to analyze huge data?
Given that this exception occurs on the declaration of ht.call, I guess the problem is with the web service call and not with the code for persistent storage.
I have included the code here... Is could someone please show me what the problem is?
C ode to call Web Services
public Vector getWebData(String count) { Vector personsVectorto = new Vector(); try { StringBuffer receivedContent = new StringBuffer(); String serviceUrl = "........"; String serviceNamespace = "....."; String soapAction = "........."; SoapObject rpc = new SoapObject(serviceNamespace, "GetContactsList"); //rpc.addProperty("listSize", "5"); rpc.addProperty("listSize", count); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.bodyOut = rpc; envelope.dotNet = true; envelope.encodingStyle = SoapSerializationEnvelope.XSD; HttpTransport ht = new HttpTransport(serviceUrl); ht.debug = true; ht.call(soapAction, envelope); // This is where thexmlpullparser exception occurs Object obj = envelope.getResponse(); SoapObject soapResult = (SoapObject)obj; for(int i=0; i < soapResult.getPropertyCount(); i++) { PersonDTO personto = new PersonDTO(); SoapObject choice = (SoapObject)soapResult.getProperty(i); if( choice!=null) { for(int j = 0; j < choice.getPropertyCount(); j++) { receivedContent.append(" Reading Property Number" + String.valueOf(j) + " Value = " + choice.getProperty(j).toString()); if (j==0) personto.setElement(1,choice.getProperty(j).toString()); if (j==1) personto.setElement(2,choice.getProperty(j).toString()); if (j==2) personto.setElement(3,choice.getProperty(j).toString()); if (j==3) personto.setElement(4,choice.getProperty(j).toString()); if (j==4) personto.setElement(5,choice.getProperty(j).toString()); if (j==5) personto.setElement(6,choice.getProperty(j).toString()); if (j==6) personto.setElement(7,choice.getProperty(j).toString()); if (j==7) personto.setElement(8,choice.getProperty(j).toString()); if (j==8) personto.setElement(9,choice.getProperty(j).toString()); if (j==9) personto.setElement(10,choice.getProperty(j).toString()); } } personsVectorto.addElement(personto); //storepersistentobject(personsVectorto); } }catch(org.xmlpull.v1.XmlPullParserException ex2) { String bah1 = ex2.toString(); Dialog.alert("String: " + bah1); String bah2 = ex2.getMessage(); Dialog.alert("Message: " + bah2); } catch(Exception ex){ String bah = ex.toString(); Dialog.alert("Response: " + bah); } return personsVectorto; }
Thank you
Hi Philippe,.
First Question: Print server response
Yes - I think for you too in fact just print the answer you'll have to do a regular HTTP call to the server and print it like this:
StringBuffer sb = new StringBuffer();
int thumb;
HttpConnection httpConn = (HttpConnection) Connector.open (url);
httpConn.setRequestMethod (HttpConnection.GET); or by POST depending on your needs
in = httpConn.openInputStream ();
While ((thumb = in.read ())! = - 1).
{
SB. Append ((Char) inCh);
}
System.out.println ("server response:" + sb.toString ());
Try and see if you get a request too large entity. Note: you should probably put your SOAP request in GET or POST http request.
Second Question: Is zipping required?
This is how I chose to do for my particular needs that transfer me a large amount of data and the compression algorithm seems to keep all my data well below 40 k. However, it is not the only way, you could actually make several requests and get data piece by piece, but I don't know if it works well with SOAP responses. Depending on the type of Network Setup Blackberry you have, you can also set this limit to be higher (I think a maximum of 1 024 Ko for BES).
Third Question: Timeout Logging
For wait times, usually the exception you get should indicate that there was a timeout, but if you are suspicious that it's a timeout check your web service and see.
Hope that helps!
R
-
APEX 4.2.3 consume the web service returning a PDF problem
Using APEX 4.2.3 on a database of Oracle 11 g R2, Firefox 31.7, we ask a service web restful one before the process of page header, to download a PDF Code file used:
declare
CLOB l_clob;
l_blob blob.
l_sql_delimiter varchar2 (30);
l_lang_context integer: = DBMS_LOB. DEFAULT_LANG_CTX;
l_warning integer: = DBMS_LOB. WARN_INCONVERTIBLE_CHAR;
l_dest_offset integer: = 1;
l_source_offset integer: = 1;
l_Json VARCHAR2 (4000);
Start
l_clob: = null;
DBMS_LOB.CREATETEMPORARY (l_blob, true);
-Generate here the content of your file in l_clob.
hr_Pkg.Security_Termination_Form(:P4200_PERSON_HR_ID,l_Json);
hr_Pkg.call_rest_webservice (l_Json, 'TestME.Pdf', l_Clob);
Logger.log ('CLOB SIZE IN PAGE: ' | sys.) DBMS_LOB. GetLength (l_clob));
sys. HTP.init;
sys.owa_util.mime_header (' application/pdf', FALSE, 'UTF-8');
sys. HTP.p ("Content-length: ' |") sys.DBMS_LOB.GetLength (l_clob));
sys. HTP.p ('Content-Disposition: attachment; filename = "TestME.Pdf" ');
sys.owa_util.http_header_close;
() DBMS_LOB.converttoblob
dest_lob = > l_blob,
src_clob = > l_clob,
amount = > DBMS_LOB. LOBMAXSIZE,
dest_offset = > l_dest_offset,
offset = > l_source_offset,
blob_csid = > DBMS_LOB. DEFAULT_CSID,
lang_context = > l_lang_context,
WARNING = > l_warning
);
Logger.log ("SIZE of BLOB: ' |") sys. DBMS_LOB. GetLength (l_blob));
sys.wpg_docload.download_file (l_blob);
apex_application.stop_apex_engine;
exception when others then
sys. HTP. PRN (' error: ' |) SQLERRM);
apex_application.stop_apex_engine;
end;
We run in the question, that the PDF file is empty with the exception of a few fill-able fields that must be completed in advance by the call to the web service.
When you run the web service directly from the browser, the PDF that is generated is very well and seems to be complete. And the size of the file that is created as the clob from the web service call is exactly the same size it as the pdf file received directly from the web service.
When we compare the size of the clob to the size of the blob, we see that the blob is slightly larger in size than the clob.
Any suggestions? (Sample code for posting to the hosted site for Oracle will not work because you can not call the hosted instance web services and web service is hosted BEHIND our firewall).
Thank you
Tony Miller
Software LuvMuffin
Ruckersville, WILLProblem is resolved... As opposed to the use of the APEX apex_web_service.make_rest_request must use the utl_http.begin_request and then treats the query returned through utl_http. READ_RAW and who then saving it in a temporary BLOB.
Maybe when we update to the APEX 5, I'll see if I can deal with it using standard APEX packages...
Thank you
Tony Miller
Software LuvMuffin
Salt Lake City, UT -
How to consume the web service using PLSQL in 11g
Hello
I created a site using jDeveloper, web services which when I put in the web browser and press enter, it will display the settings screen and when I pass the value for the parameter, and then it displays the output of the XML returned by the PL/SQL (called in the Web Service) package. Now, I want to call this webservice in PL/SQL and read XML data and fill in the staging table. Can anyone suggest me how to achieve this functionality by using Oracle PL/SQL
I use the database 11g and jDeveloper Version :-Studio Edition version 10.1.3.0
Thank you very much in advance.
Vijay
The WSDL file describes the web service.
To obtain the WSDL, you enter the URL of the web service and add some ? WSDL to the URL. This indicates the web service to return to its definition.
For example
URL of the Web Service: http://wsf.cdyne.com/WeatherWS/Weather.asmx
WSDL URL: http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL
When you read (using 'web browser' UTL_HTTPpackage) the XML response from the web service, read as strings (PL/SQL varchar2, size 32 K max).
You should read the answer as the strings, then writing/writeappend these channels in a CLOB (using the DBMS_LOB package). If you are VERY sure that the web service call ALWAYS returns an XML of less than 32 k, you can skip using a CLOB.
Whatever it is, read you the response from the web service in the form of text (such as plain text, it is what is sent). The next step on your part is to parse text into an XML DOM (document object model) - and storing the DOM in an Oracle XmlType variable.
When in a DOM, you can use Oracle XML functions to extract the attributes and values of the key element of the response from the web service.
-
How to stop the success recorded by the web service to display two times answer
I use the HTTP communication to send the entire PDF document to a web service. I'm not having problems with the actual presentation.However, the status message "registered success' that is returned by the web service displayed twice. Why?
This is the response from the web service code.
Context.Response.Clear)
Context.Response.Buffer = True
Context.Response.ContentType = "application/vnd. FDF.
Context.Response.Write ("%FDF-1.2" & CRLF)
Context.Response.Write ("1 0 obj < <" & CRLF)
Context.Response.Write ("/ FDF < <" & CRLF)
Context.Response.Write ("/ status (form successfully registered)" & CRLF ")
Context.Response.Write ("> >" & CRLF)
Context.Response.Write ("> >" & CRLF)
Context.Response.Write ("endobj" & CRLF)
Context.Response.Write ("trailer" & CRLF)
Context.Response.Write ("< < / Root 1 0 R > >" & CRLF)
Context.Response.Write("%%EOF")
Context.Response.End)
Thank you
Diane Asberry
I've upgraded to Adobe Reader XI and the problem disappeared.
Thanks for your help.
Diane Asberry
-
Cannot find the data control to the Web Service in the Menu
Hello
I try to call a web service in the ADF. To do this, I want to create a web service data command
If I understand correctly, if I right click on the template project, I see the data control from the Web Service under layer Business > Web Services. (as indicated in 2.1 Sec-http://www.oracle.com/technology/products/jdev/howtos/1013/wsadf/adfcomplexwstypes.html#WsProxyPojoControl)
However, I am not able to find this entry in there.
I tried the following things:
I tried with Jdev 10.1.3.5, 10.1.3.4 and 10.1.3.1
I tried to select all available models of technology to create applications
-Any model
-Web Application [JSF, EJB, Toplink]
-Web Application [JSF, ADF]
-Web Application [JSF, EJB
-Web Application [JSF, Struts, ADF]... .and everthing else...
I still don't see the web service proxy.
Then I opened the ADFToystore sample application, and I could see the service data Web controls here!... .that mean my jdev is not defective... something else is missing.
So, I tried to see what libraries are selected... I saw that a library named 'Web Service Data Control' are there in the project, which is not there in the model applications project that I created. So I added this library to the project, but it still does not work...
Next, I added all THE libraries I have seen in the libraries in the project properties section... still no luck
I don't know I'm missing something basic. Can someone please help.
Rgds,
AmitHi Amit,
try to set the filter above in New Gallery to filter by: all Technologies
Kind regards
Branislav
-
I have a Nikon D600 and downloading photographs to Lightroom 6.1 all images have their settings far from the truth and is no where near what is shown to the camera, i.e. temp is 3800 and tinted 80 magenta, other parameters are also in. other Nikon cameras do not. Everyone knows about this problem?
Looks like you are applying (accidentally) a "Preset" for these photos. Make sure that there is no preselection specified in the import dialog box, and the first (bottom) in the history of develop does not list a preset.
-
I downloaded Windows XP from the Windows Service Center. It's a .exe. When I click on it, it is extracted to a folder I called "xp". How can I obtain these data on a disk to install XP from a CD? Should what steps I take? I am running Windows 7.
original title: Burning a disk XPPutting aside if the 64-bit version of XP is what you need, when you ran the exe, the file that was extracted (i.e., in the folder named "xp") should have been an ISO file.
Files ISO are CD images and are intended to be burned (NOT copied) to a writable CD.
Assuming that you have the correct hardware (CD burner), you can burn your ISO as described here: http://windows.microsoft.com/en-US/windows7/Burn-a-CD-or-DVD-from-an-ISO-file
Note that what you downloaded is NOT "Windows XP Mode" which is available for use with Windows 7 Professional, enterprise or ultimate edition. The image you uploaded is for installation on a separate computer (or in a dual-boot configuration) - assuming you have the required license keys.
Maybe you are looking for
-
Space for to type me a URL has disappeared. How can I get that back?
I have no more info
-
Satellite A660-18 - possible overheating
Hello! I've had some problems with my laptop for a while now.My laptop stops frequently without closing properly and generally slow. Today when I turned to Hibernate and then tried to turn it on and then power button turns off again and now my laptop
-
I have an Acer Aspire M5100 who had DDR2 PC2 5300U installed at 667 mhz. My motherboard number is: RS690M03-8EKRHFS2H. I want to know what my maximum memory. I found conflicting information on this. I now have 4 GB of RAM, because I upgraded to 4 x 1
-
We had to reformat our computer and we had reinstalled everything everything went well past that we got on the interent fine, but when it came to the updates, we have just let it go, after the update retarted the computer, we've got a stop code 0x000