Blackberry SOAP Webservice - web-services

What is way to connect to SOAP based web service from Blackberry Application. Every one is using KSoap Library. Is there no native support in Blackeberry SDK to connect to webservice.?

User JSR 172 webservices. See NetBeans / Java ME IDE/SDK docs for more information.

I am using Ksoap2 for blackberry application development when i am trying to send request through Soap then requestDump contains the value as
<v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/2001/12/soap-encoding" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"><v:Header /><v:Body><DownloadRetailerMobileApp xmlns="http://www.tibco.com/schemas/WSDL/Request.xsd" id="o0" c:root="1"><RetailerMSISDN>09886069494</RetailerMSISDN><RequestType>retailerowner</RequestType></DownloadRetailerMobileApp></v:Body></v:Envelope>
and the responseDump what i am getting is as
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xmlns="">SOAP-ENV:Server</faultcode><faultstring xmlns="">RuntimeError: Internal Server Error</faultstring><faultactor xmlns=""/></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
and then it through an exception is
org.xmlpull.v1.xmlpullParserException: expected:END_TAG{http://schemeas.xmlsoap.org/soap/envelop/}

I use the Java Sun Wireless Toolkit 2.5.2 to generate method stubs from your webservice using your webservices' wsdl file.
You can then call your webservice using the generated files, the syntax will be something like:
WebServiceSoap_Stub stub = new WebServiceSoap_Stub();
String result = stub.webMethod(param1, param2);

I used HttpConnecttion to solve the problem I had.

Related

How to call web service or rest api from jaspersoft Studio Proffessional?

I want call web service or rest API from jaspersoft Studio Proffessional proffesional, I tired to create JSON file/XML file adapter and putted http://api.population.io:80/1.0/countries in File or url section but it's not working.
Is there any other way to call web services or rest API from jasperstudio proffessional or I can add some web service adapter to jaspersoft studio proffesional?
In my jasper studio there is not adapter which connect to web service or rest api and use them as data source.
Note: my jasperstudio version is : 6.2
Thanks.
Use a local JSON file to check if it works. If not, the problem is in your JSON (or better in the expression you are using to get records out of it, or even the way you are mapping your fields).

How can Ready API / SOAP UI Pro creates Webservice Client for WCF webservice with SOAP 1.2?

I was trying to create Java Web service Client through CXF 3.1.6 , for a CXF Webservice implemented with SOAP 1.2. I always see Cerficate or generated binary token Exception, Where as the service client works through SOAP UI pro.
When i search for the SOAP 1.2 supported CXF webservice client, I see so many places that CXF doesn't support SOAP 1.2. How does SOAP UI pro generates client for this kind of services but we cant achieve it through CXF?
EDIT :
Asking this Question,since i am assuming that SOAP UI Pro / Ready API developed their tool based on Java frameworks.

Generating a WCF client for MODIS Web Service

I want to create a WCF client for MODIS Web Service available on this website: http://daac.ornl.gov/MODIS/MODIS-menu/modis_webservice.html There is a link to WSDL file, which can I use to generate proxy class. The problem is, that this file is somehow malformed, I cannot create clients with .NET tools like Add Service Reference, wsdl.exe or svcutil.exe. When I try to generate proxy class through website, I get following response:
I've tried to download the WSDL file and create proxy class from local copy, but then I've got this error:
These errors are the same for Add Service Reference and for console output of wsdl.exe and svcutil.exe utils. Is there any other way to create a WCF client to this service or is it impossible in .NET?
EDIT-----
I've managed that the problem occurs, becouse the WSDL is in RPC/Endoded standard and .NET tools cannot handle it properly. I've tried to convert it to Document/literal standard but it's still not working. Can somebody look at my WSDL file and check what I have wrong? It's available under this link: https://wklej.to/67rR7
removing wsdl:documentation blocks inside the element
tags helps to generating codes via svcutil.exe or wsdl.exe.
Baseline for this solution
Hopes this helps.

Create java client from WSDL

I was given a WSDL file as well as the URL of corresponding web service. I know that I must convert the WSDL file to Java classes, using a tool like wsimport. But after that, I am quite lost. How do I write the client code to use these generated classes? I have been googling and still quite not sure about it.
Thanks.
You can use Apache CXF wsdl2java command to convert wsdl file to java file. After that usage is quite simple as follows(and there are may tutorials available):
HelloService service = new HelloService();
Hello client = service.getHelloHttpPort();
String result = client.sayHi("Joe");
WSDL2Java link: http://cxf.apache.org/docs/wsdl-to-java.html
CXF Client Tutorial: http://cxf.apache.org/docs/how-do-i-develop-a-client.html
Thanks.

Is there a way to connect to a soap webservice without using a web reference in C#?

is there some library out there that will accept the url of the soap wsdl file, and then generate me the proxy classes and what not at runtime? Web references are getting to be somewhat inconvenient for my particular situation.
Thanks.
Web Services Description Language Tool (Wsdl.exe) is what you want.
The following command creates a client proxy class in the C# language for an XML Web service located at the specified URL. The tool saves the client proxy class in the file myProxyClass.cs.
wsdl /out:myProxyClass.cs http://hostServer/WebserviceRoot/WebServiceName.asmx?WSDL