I have been working on a BlackBerry application that consumes web services from ColdFusion 7. The Java ME SDK and the Java Wireless Toolkit both require that the generated WSDL be of the document/literal type.
Fortunately, I have input on the web service development so I tried setting 'style="document"' in the cfcomponent tag. This generated a document/literal style WSDL but now wscompile generates the following errors in several places:
Found unknown simple type: javax.xml.soap.SOAPElement
Found unknown simple type: java.util.Calendar
Any ideas why this is happening?
The WSDL does get parsed correctly by the JWSDP tool but the stubs use namespaces that are not available in the J2ME platform. I would have thought ColdFusion WSDL would work more easily with other products in the Java family.
If the service doesn't change much (so the WSDL won't change much) you can save the WSDL as a text file and modify it however you like. My suggestion -- again, assuming the service is more or less finalized -- would be to take the style declaration out of the cfcomponent tag and generate the WSDL, then save it as a plain text file and modify it as necessary to be consumed by the BlackBerry application.
It turns out that the issue was related to the data types of method parameters and return types that was causing the issue. The WSDL was valid and the version of wscompile for J2SE was able to parse it correctly. But due to the reduced API capabilities on the mobile platform, certain data types cannot be parsed with the J2ME version of wscompile.
I did need to keep the 'style="document"' declaration in the cfcomponent tag on the ColdFusion web service since the stub generator for J2ME will only parse document/literal type WSDL files.
http://developers.sun.com/mobility/midp/articles/webservices/ provides a reference for the data types supported in JAX-RPC for Java ME.
Related
I've been playing with Saxon-CE_1.1 over the last few days and have managed to create a little application that allows users to classify pictures according to a data dictionary using a select dialog. All was going really well until I tried to use the result-document() function in it's "classic" way, to create a new file in the file system containing the choices the user has made.
XML Quire is returing with a severe error stating:
XpathException in mode: '{http:saxonica.com/ns/interactiveXSLT}onclick' event: [object MouseEvent]: Expected '?select=' ir '#' at start of result document href found "filename.xml
This error seems, to me, to be stating that I must pipe the results back into the HTML using # or ?select/
Is it still possible to create "external" output using SaxonCE? If so how can I accomplish the task.
Until recently it has not been possible to read or write files in the local client machine from Javascript code running in the browser, and if Javascript can't do it, then Saxon-CE can't do it either.
This may change soon with the HTML5 FileSystem API, but as far as I'm aware support for this is still very patchy. When it appears to be more stable and widespread, we can certainly look at implementing both doc() and xsl:result-document to access local filestore (or indeed, implementing the EXPath file module).
I have on the one hand a wsdl url/file and on the other hand a number of xsd schema files (are the latte called binding files?).
All of these describe a webservice that I would like to consume using jax-ws.
I understand I need to generate client stubs using the wsimport utility.
I have a requirement for one distinct package per xsd schema/binding file for the generated stubs files. The generated stubs for the wsdl would be located in another package.
Does that make sense?
Is this possible? If so how?
I am missing something?
edit: I don't fully understand the difference of intent between files generated against the wsdl and files generated against the xsd binding files as when using wsimport. Can someone please explain?
baleto
first thing the xjb files are used to resolve conflicts and customizing schemas.
You can create a distinct package for a XSD if it has a specfic namespace defined for it.
For example you need a package name like com.foo.healthcare.claims then you need to have a name space for the schema as http://www.foo.com/healthcare/claims.
I'm developing an iOS reader App and I want to support the .mobi file by Amazon.I search but find few things about parse .mobi file on iOS.Any help will be appreciated.
The Mobipocket e-book format is based on the Open eBook standard using XHTML and can include JavaScript and frames. It also supports native SQL queries to be used with embedded databases.
I am not aware of easily adaptable source code (especially for iOS), but here is the format spec, you could try to parse it, though I don't think it will be easy: http://wiki.mobileread.com/wiki/MOBI
It might not be elegant but maybe you can use a converter (there are a few links on the page) and try a more public/better supported format instead.
I want to convert my struts2 web application into an exe format so that exe file will load my project into server and database into MySQL.
Are there any such tools available for loading files into a folder?
Are there any forms other than .exe to which I could convert my project to do this action?
Is it possible to decrypt the code from class file to java file?
Which is the most secure form for a struts2 project for loading into a server?
You want to convert it to executable one?? generally installer came to assist auto installation like if you have created a product using all these technology and you want save your customer from all the setting and installation processes like database configuration,other configurations etc.
Is it possible to decrypt the code from class format to java format
there are many java d-compilers available which help you to convert .class files to java files though they sometime fails to convert it 100% but in most cases they tend to show some one what they actually want to see.
You can't load an exe file into a web server.
I suppose you could create an executable that includes a server and your war file, but I would strongly discourage the practice.
You could obfuscate (e.g., with ProGuard) and/or encrypt your .class files, but if they're determined to get to your unobfuscated byte code, they almost certainly will.
If they're not that determined, then it's probably not important enough to go through all the effort, debugging, and so on.
Till now i was using SDK 5.0 and was able to dispaly local html text using net.rim.device.api.browser.field2.BrowserField but now my requirement has changed and have to use SDK 4.6. The problem is that now i'm getting compiler error for the BrowserField. Can anyone help me in displaying HTML text in SDK 4.6
As there is no BrowserField class supported in earlier versions of RIM SDK, you can launch local browser session for a html file, embedded in your cod-application.
Let say your application cod name is mymodule.cod
And you have attached a document.html file to your project, and this file is located in your source code folder, not outside.
You can launch browser session via this code:
BrowserSession session = Browser.getDefaultSession();
session.displayPage("cod://mymodule/document.html" );
Note, that module name is case sensitive.
And note that it is not documented way to access local html files.
If you are going to test this in simulator, make sure that MDS simulator is launched and is working.
It is still possible to display local HTML content with the APIs available for earlier BlackBerry OS versions. It is just a bit more complicated to make it work. Doing this involves the older BrowserField API (as opposed to the newer BrowserField2 API you've already discovered). I think the SDK includes a "BrowserField" example app that partially demonstrates this. It involves using the RenderingSession class to retrieve a BrowserContent object, which has a method to return a UI Field that you can actually show within your screen.
The trick is that RenderingSession expects you to supply it with an HttpConnection (or InputConnection) that it can read the data from. Since these are interfaces, you just have to implement them in such a way they they return your own HTML data instead of wrapping an actual HTTP connection.
It may be a little specific to the context of my own application, but here is an example of a class I wrote that wraps this API for local HTML content display: BrowserFieldRenderer