Using a web service in j2se client, how?

Hi all,
I have written a simple wsdl file, used eclipse (with wsdl2java) to generate the necessary files. I then used Eclipse to deploy it to axis. this all works fine, and I can call the stubs using the pages set up on the server.
My question is: How do I now use this service in a j2me program I have written. I can't find any examples / code or tutorials on this. I would have thought it would be simple.
Many thanks.

you can use ksoap lib available at http://ksoap.objectweb.org/
es.
import org.ksoap.SoapObject;
import org.ksoap.transport.HttpTransport;
String endPointURL="http://127.0.0.1:8080/rcost/services/House";
org.ksoap.transport.HttpTransport rpc=new HttpTransport(endPointURL, "\"\"");
String method="getDevices";
SoapObject _method = new SoapObject("", method);
Vector ret=rpc.call(_method);

Similar Messages

  • MDM Web Service authentication issue. How to use ?

    Hi,
    I' am a Microsoft technology person I' am working on integrating SAP MDM 7.1 to SharePoint 2010 using MDM Web Services interface and consuming the same in .NET custom component.
    I tried the WS with "None" authentication and it worked great.
    I' am having issues understanding how HTTPAuthentication with SAP Logon ticket authentication works in MDM.
    Created the authentication enabled web service and while testing in NetWeaver WS Navigator, it throws me exception, not able to establish session with repository for user XYZ.
    Please help me with the following queries I have:
    1) How to test a authentication enabled web service in NetWeaver WS Navigator ? Do the user id/password needs to be set in the "Invocation Parameters" ? Link to any article etc will be appreciated.
    2) How to pass the MDM user credentials (or just the username) in the MDM web service in .NET code. I didn't see any parameter in the Client class constructor to pass the same, nothing related to that found in the code that gets generated on adding the service reference.
    As per the documentation on the MDM security, looks like a trust relationship also needs to be configured on MDM - allow.ip file entries.
    However first I want to understand how to pass this information in Web Services through code.
    SharePoint   -
    (1)--> SAP PI  -(2)--
    > SAP MDM                                             
    (integrated with Active Directory                        (Where Web services are deployed     (have its own user accounts)
    so logged in user is already authenticated)          and have its own user accounts)
    The trust relationship configuration could solve the problem of authentication marked in second hop (2) by registering the IP address of PI server.
    Please help me understand how would it work to solve the first hop (1) problem and what needs to be done.
    Thanks,
    Parvinder

    Thanks Gaurav.
    The link talks about setting up the Trust with MDM server.
    The code sample provided there has the following step where user name is being set and passed to MDM:
    Use  command to authenticate user session on trusted connection
           TrustedUserSessionCommand  tuscTrustedUser =
           new TrustedUserSessionCommand(mySimpleConnection);
           //  Set the user name to use
           tuscTrustedUser.setUserName(UsernameAsString);
           tuscTrustedUser.setSession(session);
           tuscTrustedUser.execute();
           session =  tuscTrustedUser.getSession();
    I want to understand how to do that for MDM Web Services.
    I didn't see any method accepting this user name while calling the web service method / creating client object.
    So that link is still missing.
    Appreciate if anyone can help me with that.
    This is for MDM 7.1
    Thanks,
    Parvinder

  • How to create a crystal report using secured web service as a datasource?

    Hi All Expert,
    I having some challenges on how to create a report using secured web service as a datasource in crystal report designer (CR11 R3).
    Secured Web Service including the certificate trusting, token authentication, header and/or body encryption. All web services running on https protocal.
    Could you please suggest me on the solution?
    Thank you and Best Regards,
    Cherr

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • How can i use the web services

    i have a web service ,but what is need that can i use the web services?
    is only then oc4j,or anything?

    You need to write a client that will access the Web service and invoke it.
    You can write the client in Java for example - and JDeveloper provides wizards for this.
    There is a sample in the JDeveloper Reviewer guide here:
    http://www.oracle.com/technology/products/jdev/collateral/papers/10g/reviewer/reviewerguide.html

  • How to supervise (and fix) using BPEL web services in AIA?

    We have unbelievably many problems with using AIA & web services concerned. Is there any way of online monitoring using the web services, checking data/parameters provided and fixing what needed - before a disasters comes? The supervising layer should work WITHOUT the same environment (rather on the system level) in order to be on a qualitative much higher reliability level. I would gratefully appreciate any experience to help us from heavy problems...

    Hello,
    With one button you want to perform 3(Create, Update and Delete) operation
    To create:
    First check whether the data exist with full combination of Name,Desc and City.
    If not exist you can execute the create function.
    If exist, get confirmation to delete the item by pop up. Using item ID you can perform Delete operation
    To Update:
    How you want to update the item, by keeping unique value or combination of columns?
    based on that you can perform the update operation.
    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

  • How to assign Tasks to other users using Exchange Web Service.

    How to assign Tasks to other users using Exchange Web Service.
    Any workaround also would help

    Hi Glen,
    I am trying to use ExtendedPropertyType and put in UpdaterItemType as in this code as below. Although it is not updating the Owner
    field.
    I have tried it both by Propertyname and PropertyID. Although new custom property's canbe
    added but to change an existing one like 'Owner' ? Would this be the right method.
    2. And Is ProprertyID a fixed value as 0x811f or does it need to be calculated.
    3. Is 'Owner' the right propertname for assigning a task ?
    Thanks a lot.
    Please see code below for reference.
     PathToExtendedFieldType pathExtended = new PathToExtendedFieldType();
                //pathExtended.DistinguishedPropertySetId = DistinguishedPropertySetType.PublicStrings;
                pathExtended.DistinguishedPropertySetId = DistinguishedPropertySetType.Task;
                pathExtended.DistinguishedPropertySetIdSpecified = true;
                pathExtended.PropertyId = 0x811f;
                pathExtended.PropertyIdSpecified = true;
                //pathExtended.PropertyName = "Owner";
                pathExtended.PropertyType = MapiPropertyTypeType.String;
                ciSetAT.ExtendedProperty = new ExtendedPropertyType[1];
                ciSetAT.ExtendedProperty[0] = new ExtendedPropertyType();
                ciSetAT.ExtendedProperty[0].ExtendedFieldURI = pathExtended;
                ciSetAT.ExtendedProperty[0].Item = "[email protected]";
                SetItemFieldType set1 = new SetItemFieldType();
                set1.Item = pathExtended;
                set1.Item1 = ciSetAT;
                UpdateItemType request = new UpdateItemType();
                request.ItemChanges = new ItemChangeType[1] { new ItemChangeType() };
                request.ItemChanges[0].Item = itemId;
                request.ItemChanges[0].Updates = new ItemChangeDescriptionType[2];
                request.ItemChanges[0].Updates[0] = setstart;
                request.ItemChanges[0].Updates[1] = set1;

  • How to use RESTful Web Services provided from BO Enterprise

    Hi Experts,
    i am trying to use the Web Service "BIPLATFORM" provided by BusinessObjects Enterprise. As I have trouble reading the WSDL i tried to use the REST interface.
    Unfortunatally I cannot find any Docu about that in the internet.
    Does anybody have experience in using the BIPLATFORM web service?
    Thank you in advance

    Thank you very much for your instant answer and help!
    I got it now: "no rest in biplatform service"
    What made me think REST is possible was only the following entry in ...\webapps\dswsbobje\WEB-INF\conf\axis2.xml
    "<!-- Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints
      -->
    - <!-- In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this
      -->
    - <!-- context path to proper Axis2 servlets
      -->
    - <!-- <parameter name="servicePath">services</parameter>
      -->
    - <!-- <parameter name="restPath">rest</parameter>
      -->
    - <!--  Following parameter will completely disable REST handling in Axis2
      -->
      <parameter name="disableREST" locked="true">false</parameter>
    - <!-- POJO deployer , this will alow users to drop .class file and make that into a service
      -->
    Anyway I was only hoping to get REST work as the WSDL provided by BusinessObjects Enterprise is not valid to be parsed by SAP Netweaver ABAP SOAP Runtime...
    I regret but i have to add: The fact that the web service is only meant to work with certain consumers shows that the people responsible have little to no understanding what the idea of SOAP, SOA and WSDL really is. On the one hand SAP was always pushing their ESOA idea but on the other hand we got this strange limitations like "only for these clients..."
    This is exactly the opposite of the SOAP-idea:
    "The framework has been designed to be independent of any particular programming model and other implementation specific semantics." - http://www.w3.org/TR/2007/REC-soap12-part1-20070427/

  • How to call Jive Search methods using REST Web Services from ADF

    Hi
    Can someone provide me an example to call JIVE Search using REST web services from Webcenter ADF.
    As we have the similar facility to call UCM Search from WebServices DataControl.
    Do we have anything similar like this for JIVE Search?
    JIVE 5.1 is deprecating SOAP style web services and so I am planning to use REST.
    Any suggestions on this is much appreciated.
    Many Thanks
    Khad

    so what exactly is the problem here?
    what is not working?

  • Getting .ServiceException while invoking a web service from a client

    I created a web service and then created a web service client from wsdl in eclipse. I am getting the following error when trying to call the web service from client.
    javax.xml.rpc.ServiceException: There is no stub implementation for the interface: examples.ejb.ejb20.basic.statelessSession.TraderBeanService
    Please find the files here -
    wsdl - http://www.sourcepod.com/uneksu63-9627
    Trade.java - http://www.sourcepod.com/mltizr21-9628
    TradeResult.java - http://www.sourcepod.com/npledh19-9629
    TradeResultService - http://www.sourcepod.com/hbjevm45-9630
    TradeResultServiceLocator.java - http://www.sourcepod.com/mrpagh85-9631
    TradeResultSoapBindingStub.java - http://www.sourcepod.com/zjrkjv91-9632
    package examples.ejb.ejb20.basic.statelessSession;
    import javax.xml.ws.WebServiceRef;
    import javax.xml.namespace.QName;
    public class HelloClient {
        @WebServiceRef(wsdlLocation="http://localhost:7001/webservice/services/TraderBean?wsdl")
        String url = "http://localhost:7001/webservice/services/TraderBean?wsdl";
             QName qname = new QName("http://statelessSession.basic.ejb20.ejb.examples", "TraderBeanService");
        public static void main(String[] args) {
            try {
                HelloClient client = new HelloClient();
                client.doTest(args);
            } catch(Exception e) {
                e.printStackTrace();
        public void doTest(String[] args) {
            try {
                 TraderBeanServiceLocator service = new TraderBeanServiceLocator(url,qname);
                TraderBean port = (TraderBean) service.getPort(TraderBeanService.class);
                System.out.println("Invoking the sayHello operation on the port.");
                TradeResult response = port.buy("INR", 100);
                System.out.println(response.getNumberTraded());
            } catch(Exception e) {
                e.printStackTrace();
    }How to solve the stub implementation error?
    Edited by: 901007 on 12 Aug, 2012 10:57 AM

    That did not work either. There was getPorts() and not getPort() and I used getPorts(). And I am getting the below error,
    java.lang.ClassCastException: java.util.HashMap$KeyIterator
    But when I try like the below,
        @WebServiceRef(wsdlLocation="http://localhost:7001/webservice/services/TraderBean?wsdl")
        String url = "http://localhost:7001/webservice/services/TraderBean?wsdl";
        QName qname = new QName("http://statelessSession.basic.ejb20.ejb.examples", "TraderBeanService");
                TraderBeanServiceLocator service = new TraderBeanServiceLocator();
                TraderBean port = (TraderBean) service.getPort(TraderBean.class);
                System.out.println("Invoking the sayHello operation on the port.");
                TradeResult response = port.buy("INR", 200);
                System.out.println(response.getNumberTraded());I am getting the below error,
    Invoking the sayHello operation on the port.
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.lang.InstantiationException: examples.ejb.ejb20.basic.statelessSession.TraderBean
    faultActor:
    faultNode:
    faultDetail:
         {http://xml.apache.org/axis/}hostname:Gopi_Desktop
    java.lang.InstantiationException: examples.ejb.ejb20.basic.statelessSession.TraderBean
    As you can see the statement"Invoking the sayHello operation on the port." is getting printed but after that error is thrown.
    I tried changing it to, TraderBean port = (TraderBean) service.getPort(qname, TraderBeanServiceLocator.class);
    But even this is throwing the same error, java.lang.InstantiationException: examples.ejb.ejb20.basic.statelessSession.TraderBean
    I changed my webservice using Axis2 web service runtime and this time when I try to invoke using client, I am getting the following,
    [WARN] Weblogic's StAX implementation is unsupported and some Axiom features will not work as expected! Please use Woodstox instead.
    Exception in thread "Main Thread" org.apache.axis2.AxisFault: javax.xml.stream.XMLStreamException: Error at line:1 col:217 ':' Already got a ':' in name
         at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
         at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
         at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
         at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
         at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
         at examples.ejb.ejb20.basic.statelessSession.TraderBeanStub.addTwoNumbers(TraderBeanStub.java:185)
         at examples.ejb.ejb20.basic.statelessSession.TestClient.main(TestClient.java:15)
    If you need more details, I can post the steps I did to build it...
    Any help is greately appreciated.
    Edited by: 901007 on 15 Aug, 2012 10:27 PM
    Edited by: 901007 on 15 Aug, 2012 10:49 PM

  • Using a web service in a JSP

    Hello,
    I am having difficulty understanding how to use a web service I have written in a JSP page. The service works fine and simply adds to numbers together. How can I call it from a JSP page?
    Could someone please point me in the right direction?
    Many thanks
    H

    Hi,
    What did you use to write your web service? I have been using Axis2. Typically, you write a client to access your webservice using the same framework that you used to generate the service. I would recommend writing a standalone client. Once you have that code written, you can move into a servlet and then use a JSP as a front end.

  • Web services with LV client

    A typical approach to web services is to access the host (an embedded cRIO, for example) using a client running in a browser with some JavaScript.  Has anyone implemented a LabVIEW client that calls the web services on the host?  How might this be done?
    Solved!
    Go to Solution.

    Hello kc64,
    I am sorry about the confusion. I am going to parse your response in the post to hopefully be more clear and answer the questions you are asking.
    My current project status is this:  I have a cRIO with a working RESTful web service and I can access it using my browser.  It works great.  Now, I want to access the same service using a LabVIEW client. It has been established that LV can act as a client to a web service by the fact that it will actually generate the interface code to access the server using Tools | Import... | Web Service.  I have generated a client for an Internet accessible web service and it works.  That process, however, required a WSDL file from the server.  I don't have a WSDL file for my cRIO web service. I can make one if absolutely necessary in order to use the web services import wizard.
    I have done more research on this and right now we can say that using RESTful web service by itself will not provide you the functionality to create a LabVIEW client. What we think might be possible is to create a WSDL file to access this web service but we need to talk with R&D to see about this. We know that LabVIEW doesn't have the ability to generate the WSDL file for you so you will have to create this. When I find out more information about this, I will send it your way.
    Or I can write my own client in LV if I new how to register the service with .NET, which I do not.  So, it is a fact that LV can be used to build a web service client.  I seek to better understand how that may be done.
    Yes you can and we have seen several customers do that with .NET. I also asked R&D about this and they said that you could use TCP/IP in order to get the information into LabVIEW as well. I did some research how to do this online and I found a presentation explaining how to do this as well as some code at LAVA by John Lokanis. In the notes of this example of this code, it states that there is "a VI that demonstrates how to call a LabVIEW web service from a LabVIEW VI or Application." which is exactly what you want to do.
    I hope this information helps you and when I have more information about this, I will send it your way. Again I am sorry for the confusion.
    Jim St
    National Instruments
    RF Product Support Engineer

  • Crystal Report using a Web Service as a data source?

    I am trying to figure out how to use a Web Service as a data source in Crystal Reports. When I use the report wizard, I do not see an option to select Web Service as a new connection. We are currently using Crystal Reports 2008 v12.1.0.892. Could it be that my version does not support this? Is there an update that contains this feature? Please help.

    Thanks for your response. Unfortunately I do not see a radio button for Web Services. I've read that it should be there too. Could it be a missing plug-in or patch?
    Here are screen shots of what I see when trying to connect to an XML. Any thoughts?
    [http://s26.photobucket.com/albums/c120/hpolit/?action=view&current=wizard1.jpg]
    [http://s26.photobucket.com/albums/c120/hpolit/?action=view&current=wizard2.jpg]

  • Web Service, SSL and Client Authentication

    I tried to enable SSL with client authentication over a web service. I am using App Server 10.1.3.4.
    The test page requires my certificate (firefox asks me to choose the certificate) the response page of the web service returns this error:
    java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 405 Method Not Allowed
    Has anyone used web services with SSL client authentication?
    Any clue why?
    Regards

    Any comment?
    Thank you.

  • Invoking a web service not created using oracle web service lib

    Hi All,
    I have a need to invoke my web service from oracle sql command. My web service not created using oracle web service library, but it is created using axis c++ libraries. Is it possible to do so,
    Thanks in advance,
    Regards,
    Monica

    In order to call out from the database process, is SQL (or PL/SQL) you need to generate some client code, that understand the details about the specific of the service you want to invoke and can produce the correct SOAP request. Once this proxy is uploaded in the Database, you can use it.
    There is a set of Database Web services samples that should help you get started. You can also take a look at the developer's guide - see Developing a Web Service Client in the Database.
    Hope it answers your question.
    --eric                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Error while trying to publish a web service in UDDI client

    hi
      i m getting this error when trying to publish my web service in UDDI client.I have
    configured my uddi client using Visual Administrator.I created a  local test registry.The name of my  registry is QuickCarRentalRegistry_Local.I created this at admin level.I also tried at level 1 Tier.But it was giving the same error.
    The error is "<b> Internet Explorer Script Error</b>".my ie version is 7.0
    In my alert window it displays error: 'ur_txt' is undefined.
    Regards
    mythri.

    Hi mythri.
    Did you find a way out of this error? Could you share the solution with me? Because I am facing a problem that looks just like the one you had.
    Thanks in advance.
    Renan

Maybe you are looking for

  • How do you change to single click to open files and folders?

    How do you change from double clicking a file/folder, to single clicking (web style)?

  • 160 Gb Classic - Audio dropouts, gaps on gapless albums with apple lossless

    Dear All, Since getting my new iPod Classic 160 Gb iPod Classic, I am experiencing audio dropouts that last between one and two seconds. They aren't frequent, occurring maybe one every hour or two of audio playback. They appear to be very random. If

  • Process Mapping Help Needed

    Dear Gurus,     Hope to find you well, we have to redefine our processes of sales. Now stock from a remote site will be transferred to inventory in transit warehouse recorded using Truck Number and Document Number of Inventory. And Crystal Reports wi

  • Editing low-res proxy, then applying changes to high-res

    Hello   I'm developing one continuous image for a large wall that will be seen from about 1-2 feet viewing distance. It has to be about 100 dpi.   My image is currently 21,600 x 8100 pixels at 8 bits CMYK. It may get bigger. I don't have to do much m

  • No error but...

    i have this form that i created following this book. everything was going fine until now. this is the page : Text As everyone can see, when clicking "View Urls" it suppose to show the list of categories in the drop down menu saved in my url table. bu