J2ME JAX-WS Client

Hi,
I am new to J2ME . I am trying to create a Web service client for my JAX-WS based web service. Is it possible to use JAX-WS to create webservice client or I need to stick to JAX-RPC.
Edited by: Khanuja on Aug 2, 2010 11:14 PM

Don't double post. I've removed the duplicate thread you started in the Java ME SDK forum.
db

Similar Messages

  • JAX-WS Client throws NULL Pointer Exception in NW 7.1 SP3 and higher

    All,
    My JAX-WS client is throwing an exception when attempting to create a client to connect to the calculation service. The exception is coming out of the core JAX-WS classes that are part of NetWeaver. (see exception below)
    Caused by: java.lang.NullPointerException
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContextExistingPort(SAPServiceDelegate.java:440)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContext(SAPServiceDelegate.java:475)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:492)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:484)
         at javax.xml.ws.Service.createDispatch(Service.java:166)
    I have done some research and it appears that as of NetWeaver 7.1 SP3 SAP stopped using the SUN JAX-WS runtime and implemented their own SAP JAX-WS runtime. I also took the time to decompile the jar file that contained the SAPServiceDelegate class which is throwing the null pointer exception. (see method from SAPServiceDelegate below)
        private ClientConfigurationContext createDispatchContextExistingPort(QName portName, JAXBContext jaxbContext)
            BindingData bindingData;
            InterfaceMapping interfaceMap;
            InterfaceData interfaceData;
            bindingData = clientServiceCtx.getServiceData().getBindingData(portName);
            if(bindingData == null)
                throw new WebServiceException((new StringBuilder()).append("Binding data '").append(portName.toString()).append("' is missing!").toString());
            QName bindingQName = new QName(bindingData.getBindingNamespace(), bindingData.getBindingName());
            interfaceMap = getInterfaceMapping(bindingQName, clientServiceCtx);
            interfaceData = getInterfaceData(interfaceMap.getPortType());
            ClientConfigurationContext result = DynamicServiceImpl.createClientConfiguration(bindingData, interfaceData, interfaceMap, null, jaxbContext, getClass().getClassLoader(), clientServiceCtx, new SOAPTransportBinding(), false, 1);
            return result;
            WebserviceClientException x;
            x;
            throw new WebServiceException(x);
    The exception is being throw on the line where the interfaceMap.getPortType() is being passed into the getInterfaceData method. I checked the getInterfaceMapping method which returns the interfaceMap (line above the line throwing the exception). This method returns NULL if an interface cannot be found. (see getInterfaceMapping method  below)
       public static InterfaceMapping getInterfaceMapping(QName bindingQName, ClientServiceContext context)
            InterfaceMapping interfaces[] = context.getMappingRules().getInterface();
            for(int i = 0; i < interfaces.length; i++)
                if(bindingQName.equals(interfaces<i>.getBindingQName()))
                    return interfaces<i>;
            return null;
    What appears to be happening is that the getInterfaceMapping method returns NULL then the next line in the createDispatchContextExistingPort method attempts to call the getPortType() method on a NULL and throws the Null Pointer Exception.
    I have included the code we use to create a client below. It works fine on all the platforms we support with the exception of NetWeaver 7.1 SP3 and higher (I already checked SP5 as well)
          //Create URL for service WSDL
          URL serviceURL = new URL(null, wsEndpointWSDL);
          //create service qname
          QName serviceQName = new QName(targetNamespace, "WSService");
          //create port qname
          QName portQName = new QName(targetNamespace, "WSPortName");
          //create service
          Service service = Service.create(serviceURL, serviceQName);
          //create dispatch on port
          serviceDispatch = service.createDispatch(portQName, Source.class, Service.Mode.PAYLOAD);
    What do I need to change in order to create a JAX-WS dispatch client on top of the SAP JAX-WS runtime?

    Hi Guys,
    I am getting the same error. Any resolution or updates on this.
    Were you able to fix this error.
    Thanks,
    Yomesh

  • JAX-RPC client access a JAX-WS services

    Hello all,
    There is a little problem I had with webservices and googling for a solution has not help so far.
    I am accessing a JAX-WS webservice from a J2SE 1.4.2 JAX-RPC client application and getting a NoSuchMethodError error from one of the stubs at runtime. The method call is rather a HelloWorld concept but it has not been possible.
    This are the step I took (I am using netbeans 6.0).
    1. I downloaded the JAX-RPC plugin on netbeans
    2. Download the stubs using the wsdl url. I am using the netbeans wizard for this process.
    3. Write my code for get a handle to the endpoint. Using the ServiceFactory.loadClass().
    4. Call the method on the
    Can anyone please help me.

    To make things a little more clearer, this is a post of the error gotten at runtime...
            java.lang.NoSuchMethodError: java.util.Collections.emptyList()Ljava/util/List;
            at com.sun.xml.messaging.saaj.soap.MessageImpl.<clinit>(MessageImpl.java:755)
            at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:47)
            at com.sun.xml.rpc.soap.message.SOAPMessageContext.createMessage(SOAPMessageContext.java:137)
            at com.sun.xml.rpc.client.StreamingSenderState.<init>(StreamingSenderState.java:30)
            at com.sun.xml.rpc.client.StubBase._start(StubBase.java:92)
            at mck.practise.oracle.plsql.PlsqlService_Stub.sayHello(PlsqlService_Stub.java:54)
            at mck.practise.oracle.plsql.HelloWorld.sayRPCHello(HelloWorld.java:34)
            at mck.practise.oracle.plsql.HelloWorld.main(HelloWorld.java:22)The suprising thing is that if I change the application's java platform from JDK 1.4 to Java 5 using the netbeans projects property window, everything works fine.
    Can anyone still suggest on this.
    Regards,

  • JAX-WS Client hangs thread

    Hello
    I have a web application which consumes a remote web service, it has been in live use for more than a year.
    The web service consumed is part of an off the shelf application which fails approx 6 times a year. When it fails, the GlassFish server hosting my web application is also liable to fail. Thus a failure of the purchased application results in the failure of a whole set of other applications.
    The Web Service client was written using JAX-WS. When the web service fails, calls to the client are liable to hang and never return. There is no timeout and no error, just a hung thread in GlassFish. In GlassFish the default maximum for request processing threads is 5, if all of them hang Glassfish is dead.
    jstack output shows JAX-WS gets stuck, it does a read without a timeout and never regains control. I have seen threads stuck for in excess of 1 hour 45 minutes, they remain stuck until the application server is re-started.
    To work around this issue I have written a class to predict if a connection is likely to be healthy or not, if not it attempts to replace the connection with a new one. I am reasonably confident this will reduce the likelihood of failures but I believe there must be a better way to avoid the overhead of getting a new connection every time.
    1) Has anybody else suffered this same issue, if so how did you get round it ?
    2) Does anybody agree with me that the reads done by JAX-WS should timeout if necessary and failure to do so is a weakness/bug in the JAX-WS client ?
    What follows is an example of jstack output showing a hung thread.
    ----------------- t@162 -----------------
    0xff2cc360     _read + 0x8
    0xfead8e18     JVM_Read + 0xe4
    0xfadbc154     Java_java_net_SocketInputStream_socketRead0 + 0x1fc
    0xf8c0c280     * java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) bci:-1830175952 (Interpreted frame)
    0xf8c0c224     * java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) bci:0 (Interpreted frame)
    0xf8c058b8     * java.net.SocketInputStream.read(byte[], int, int) bci:84 line:129 (Interpreted frame)
    0xf8c50588     <C2IAdapter>
    0xf949c8fc     0xf949c8fc     * java.io.BufferedInputStream.fill() bci:175 line:218 (Compiled frame)
    0xf8fbac24     0xf8fbac24     * java.io.BufferedInputStream.read1(byte[], int, int) bci:44 line:256 (Compiled frame)
    0xfa889c6c     0xfa889c6c     * sun.net.www.http.HttpClient.parseHTTPHeader(sun.net.www.MessageHeader, sun.net.ProgressSource, sun.net.www.protocol.http.HttpURLConnection) bci:51 line:681 (Compiled frame)
    0xf8cbfc44     <I2CAdapter>
    0xf8c057a8     * sun.net.www.http.HttpClient.parseHTTP(sun.net.www.MessageHeader, sun.net.ProgressSource, sun.net.www.protocol.http.HttpURLConnection) bci:30 line:626 (Interpreted frame)
    0xf8c057a8     * sun.net.www.protocol.http.HttpURLConnection.getInputStream() bci:246 line:983 (Interpreted frame)
    0xf8c05874     * java.net.HttpURLConnection.getResponseCode() bci:16 line:367 (Interpreted frame)
    0xf8c058b8     * com.sun.xml.ws.transport.http.client.HttpClientTransport.checkResponseCode() bci:5 line:201 (Interpreted frame)
    0xf8c05764     * com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(com.sun.xml.ws.api.message.Packet) bci:345 line:149 (Interpreted frame)
    0xf8c05d3c     * com.sun.xml.xwss.XWSSClientPipe.process(com.sun.xml.ws.api.message.Packet) bci:76 line:118 (Interpreted frame)
    0xf8c05d3c     * com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(com.sun.xml.ws.api.message.Packet) bci:6 line:115 (Interpreted frame)
    0xf8c52980     <C2IAdapter>
    0xfab36e58     0xfab36e58     * com.sun.xml.ws.api.pipe.Fiber.__doRun(com.sun.xml.ws.api.pipe.Tube) bci:206 line:595 (Compiled frame)
    0xf8c547bc     <I2CAdapter>
    0xf8c05874     * com.sun.xml.ws.api.pipe.Fiber._doRun(com.sun.xml.ws.api.pipe.Tube) bci:31 line:554 (Interpreted frame)
    0xf8c05874     * com.sun.xml.ws.api.pipe.Fiber.doRun(com.sun.xml.ws.api.pipe.Tube) bci:84 line:539 (Interpreted frame)
    0xf8c05874     * com.sun.xml.ws.api.pipe.Fiber.runSync(com.sun.xml.ws.api.pipe.Tube, com.sun.xml.ws.api.message.Packet) bci:48 line:436 (Interpreted frame)
    0xf8c05874     * com.sun.xml.ws.client.Stub.process(com.sun.xml.ws.api.message.Packet, com.sun.xml.ws.client.RequestContext, com.sun.xml.ws.client.ResponseContextReceiver) bci:155 line:248 (Interpreted frame)
    0xf8c05874     * com.sun.xml.ws.client.sei.SEIStub.doProcess(com.sun.xml.ws.api.message.Packet, com.sun.xml.ws.client.RequestContext, com.sun.xml.ws.client.ResponseContextReceiver) bci:4 line:135 (Interpreted frame)
    0xf8c05874     * com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(java.lang.Object, java.lang.Object[], com.sun.xml.ws.client.RequestContext, com.sun.xml.ws.client.ResponseContextReceiver) bci:64 line:109 (Interpreted frame)
    0xf8c05874     * com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(java.lang.Object, java.lang.Object[]) bci:14 line:89 (Interpreted frame)
    0xf8c05874     * com.sun.xml.ws.client.sei.SEIStub.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) bci:24 line:118 (Interpreted frame)
    0xf8c05d3c     * $Proxy64.updateProblem(com.peregrine.servicecenter.pws.pm.UpdateProblemRequest) bci:16 (Interpreted frame)
    0xf8c05d3c     * com.reuters.gsm.sf.consumePeregWs.PeregPm.addUpdate(java.lang.String, int, int, java.lang.String, java.lang.String, java.util.Date) bci:341 line:129 (Interpreted frame)
    Regards, Vince

    [http://stackoverflow.com/questions/2592303/how-do-i-set-the-jax-ws-client-request-timeout-programatically-on-jboss]

  • Jax-WS Client - Change Endpoint Address "https" to "http" - Cause HTTP 302

    Hi,
    I don't know it is a bug or not, but i couldn't find any answer for this.
    I try to write a client for an SSL Secured and Basic Authenticated web service. To access the WSDL url, i have a VPN connection to that network. Also i registered their certificate to the JVM that i used to run the Client.
    To create Jax-WS Client codes, i used "......\jaxws-ri\bin\wsimport.bat -s src -d bin -p model https://xxxx.com/xxxxxx.asmx?WSDL" as explained.
    After successfully generated sources, i added my "SecurityEnvironmentHandler.java" to catch Username and Password callbacks, and also added "SecurityHandler.java" to register my handler and surrund with necessary SOAP Header Security tags. I register them as explained too.
    Everything looks fine, but when i try to run Client test which basically call one of the services, i get
    com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code 302: Found
         at com.sun.xml.ws.transport.http.client.HttpTransportPipe.checkStatusCode(HttpTransportPipe.java:203)
         at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:177)
         at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:93)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
         at com.sun.xml.ws.client.Stub.process(Stub.java:222)
         at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
         at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
         at $Proxy36.xxxxxxxxxxx(Unknown Source)
         at xxxxxxxxServisImpl.xxxxxxxxxxxxx(xxxxServisImpl.java:69)
         at xxxxxxxxxServisTest.testxxxxxxx(xxxxxxServisTest.java:57)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at junit.framework.TestCase.runTest(TestCase.java:154)
         at junit.framework.TestCase.runBare(TestCase.java:127)
         at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
         at junit.framework.TestResult$1.protect(TestResult.java:106)
         at junit.framework.TestResult.runProtected(TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:118)
         at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
         at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)( i have changed some unnecessary parts with "xxxxxx" )
    The basic of it i get an "*HTTP 302*" which means it tries to redirect the request.
    Also i had an working copy of a sample Client which was written with Jax-RPC. I looked the generated SOAP Messages for both of clients, they was almostly the same.
    After lots of tries, i found the problem, somehow after the client application starts, it changes the Endpoint Address "https://xxxxxxxx.com/xxxx.asmx" to "http://xxxxxxxxx.com/xxx.asmx", ( it drops the "s" wich means it changes the protocol HTTPS to HTTP ).
    If i set the Endpoint Address to "https://xxxxxxxx.com/xxxx.asmx" before calling any service on port, it works as it should be.
    On the "generated" main WebServiceClient class the WSDL address and also Endpoint Address were set correctly ( with https ).
    Also do i missing any logical part of it? Because i didnt changed it, it generated from WSDL by using "wsimport", it couldnt be a mistake, of if it would be, somebody could see that.
    Thanks for any advice.
    Umut KUNDUKAN

    Welcome to the forum. Please don't post in threads that are long dead. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.
    I'm locking this thread now.

  • JAX-WS client error when calling web method

    My JAX-WS client is getting the following error when calling a web method:
    Exception in thread "main" javax.xml.ws.WebServiceException:
    No Content-type in the header!
    I'm using Eclipse as my development environment. I use the CXF facet to generate a WSDL from Java code. I then use the New -> Web Service Client to generate client side code from the WSDL.
    The following fully describes my environment:
    Windows XP
    JDK 1.6.0_22
    Java EE 6
    Eclipse Helios
    Apache CXF 2.3.0 (runtime)
    Tomcat 6.0
    I have found several post on the net that describe this problem and a solution for JBoss, but I have been unable to find anything that addresses this error on Tomcat.
    I can provide source code if needed. The app is a simple Hello World web service. I'm using it to try and get familiar with developing web services with all the components listed above.
    Thanks

    Hi Anders,
    The resolution of the crossdomain problem is not to store an cross-domain-policy file at the [SAP] webservice side; but instead it needs to be done at the (every...) webservice client. In case the client is an IIS based webapplication (and thus the ultimate end-users are accessing it via their browser), this is not such an issue. It there is sufficient to put an crossdomain.xml policy file in the IIS main virtual root of your 'client' .net webapplication (c:\inetpub\wwwroot). It also can be required or at least helpful to put a clientaccesspolicy.xml file; both at the main virtual root and in the virtual root of the specific webapplication
    In case of SharePoint application, the crossdomain.xml file must be stored in the WSS virtual root of that site; c:\inetpub\wwwroot\wss\virtualdirectories\<your SharePoint webapp>
    Best regards, William.

  • Problem creating J2ME web service client

    Hi,
    I am using netbeans (5 and 5.5 beta 2). I have created a web service which works fine. I also created a regular web service client as a standalone application which also works fine and connects to my web service with no problem.
    BUT, when I want to create a J2ME web service client (under a J2ME application) I have to locate my WSDL file. but the wizard shows me the error "WSDL file does not contain port information".
    By looking at the WSDL file I can see that port is created - or maybe I'm wrong.
    piece from WSDL file:
    <service name="myServiceName">
    <port name="myServiceSPort" binding="tns:TranslatorWSPortBinding">
    <soap:address location="myURLLocation"/>
    </port>
    </service>
    Please note that I have replaced the actual values in above piece
    I tried to use wsgen manually but it didn't help.
    Can anyone help me in generating the correct WSDL format as J2ME web service client expects?
    Thanks a lot,
    S.

    well stubs are generated separately using WTK 2.5 stub generator but the problem is with the WSDL at this point.
    S.

  • NetBeans 5.5 j2me web service client...how to?

    Hi,
    I am new to web services and j2me, so this question might be very simple.
    I have created a project (simple web service) and tested it and all work ok...
    I try to create a midlet to consume this web service so I do the following:
    (1) Create a mobile->Mobile Application project
    (2) Add a new file-> j2me web service client
    (3) On running web service I insert the url of the wsdl of the previous web service
    (4) Press retrieve WSDL (everything seem to work ok up to this point)
    (5) I keep the check box Create Simple midlet checked
    A packet with two files is created: blablah.wsclient, blablablah.wsdl
    No midlet is created and when I try to create my own nothing I dont know how to access the web services methods...
    Is it a bug of netbeans 5.5?
    Can someone provide a link for a simple tutorial or at least make clear how to access the method of the web service?
    Thanx in advance!

    I'm facing the same problem with NetBeans 5.5.1 while I had no trouble with NetBeans 5.5 (I wonder why I updated :-( )
    I hope someone can help us.
    Best regards
    edit:
    It should be due JDK 1.6; I will try and I'll let you have my results.
    Rread this:
    http://www.netbeans.org/issues/show_bug.cgi?id=90112
    Edited by: NikJ2ME on Oct 13, 2007 5:05 AM

  • BigInteger in J2ME web service client

    I have a problem about sending parameter of BigInteger in J2ME web service client.
    To send a BigInteger as parameter web service, i change into array of byte then i change again into HexString.
    After that, the String value send to web service.
    The String value change into array of byte again then i build new object BigInteger.
    I think the way i try is correct, but in J2ME as web service client the value of BigInteger that i send has change.
    I tried in J2SE as web service client with the same way, then the value of BigInteger didn't changed.
    Is it the class BigInteger in library lcrypto-j2me (BouncyCastle) cannot apply into BigInteger in java?
    Or i've missing something???
    Thanks a lot for the answer...
    Best regards,
    Meis

    I have a problem about sending parameter of BigInteger in J2ME web service client.
    To send a BigInteger as parameter web service, i change into array of byte then i change again into HexString.
    After that, the String value send to web service.
    The String value change into array of byte again then i build new object BigInteger.
    I think the way i try is correct, but in J2ME as web service client the value of BigInteger that i send has change.
    I tried in J2SE as web service client with the same way, then the value of BigInteger didn't changed.
    Is it the class BigInteger in library lcrypto-j2me (BouncyCastle) cannot apply into BigInteger in java?
    Or i've missing something???
    Thanks a lot for the answer...
    Best regards,
    Meis

  • JAX-RPC client with JDeveloper 12c

    Hello,
    It's the first time I use jax-rpc (I'm used to jax-ws) and looking for help.
    I need to create a client for a JAX-RPC web service using JDeveloper 12c.
    The customer provided to me a WSDL file (I don't have access to the webservice yet). In JDeveloper I created as usual a "Web Service Client and Proxy" providing that wsdl file, but I think the generated code is for a JAX-WS (since there are @WebMethod, @WebServiceClient and @WebService notations that I understood should not be present in JAX-RPC clients.
    Can anyone point me to some documentation about JAX-RPC client developing in JDeveloper 12?
    Thank you,
    Marco

    To make things a little more clearer, this is a post of the error gotten at runtime...
            java.lang.NoSuchMethodError: java.util.Collections.emptyList()Ljava/util/List;
            at com.sun.xml.messaging.saaj.soap.MessageImpl.<clinit>(MessageImpl.java:755)
            at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:47)
            at com.sun.xml.rpc.soap.message.SOAPMessageContext.createMessage(SOAPMessageContext.java:137)
            at com.sun.xml.rpc.client.StreamingSenderState.<init>(StreamingSenderState.java:30)
            at com.sun.xml.rpc.client.StubBase._start(StubBase.java:92)
            at mck.practise.oracle.plsql.PlsqlService_Stub.sayHello(PlsqlService_Stub.java:54)
            at mck.practise.oracle.plsql.HelloWorld.sayRPCHello(HelloWorld.java:34)
            at mck.practise.oracle.plsql.HelloWorld.main(HelloWorld.java:22)The suprising thing is that if I change the application's java platform from JDK 1.4 to Java 5 using the netbeans projects property window, everything works fine.
    Can anyone still suggest on this.
    Regards,

  • Deploying JAX-RPC Client for client-side application

    I have a java Swing client side application that I am attempting to integrate web services capabilities into. The web services were already written (new to web services myself), I am just calling them. Using Oracle's JDeveloper I managed to create proxies for the web services and to call them just fine, once I added the JAX-RPC Client library to my project.
    My only issue is how to deploy. Again within the development environment all works perfectly. I tried references to all the jar files identified by the Oracle JAX-RPC Client library to know luck. I've referenced other jar files I use for deployment with no issues.
    Anyone created standalone applciations before that call web services? How did you deploy the web service related libraries.
    I'm using JDeveloper 10.1.3.3.0 with Java 1.5.0_06.
    I appreciate any guidance provided.

    I found a solution, but it shouldn't have been that difficult. JDeveloper provides a view of what JARs are part of a library. I used that as a starting point of what JARs might be required for my instance. I switched to linking to the individual JARs within their JDeveloper installed locations directly instead of the single library. I then systematically starting removing them one-by-one from my list to determine which were actually being used in my implementation. I did this because there were way too many to deploy. Once that was done I created a separate directory for holding the required JARs files local to my application.
    Lastly, I had to take care of any internal references within the JARs that may link to other JAR files. So I opened each JAR and looked at its manifest and copied those files over. Then I repeated the steps of deternmining if they were really necessary and copying over other internal references until I had the complete list.
    In the end I ended up with a considerable smaller list of JARs then if I had just assumed all JARs within the library and their references. However, it was much more difficult then it needed to be.

  • JAX-RPC Client for VB-SoapToolkit3.0 WebService

    I need to develop a JAX-RPC client for a VB6.0 WebService (the WebService being generated through MS SoapToolkit3.0).
    I'm using JWSDP 1.0_01. The WSDL that the JWSDP is using to generate the stubs is the one generated by the MS SoapToolkit. My WebService
    has only one method (Public Test(xpto As String)As String) that receives and returns a string.
    So what's the problem:
    - JAX-RPC client sends a SOAP packet different than what the WebService expects, especially in the namespaces. JAX-RPC generates some strange namespaces, like xmlns:ns0="xpto" (xpto is the name of the argument of the WebService) or xmlns:ns1="Result xpto"
    - Looking at the JAX-RPC generated WebService interface, I see that instead of String, the method test receives a StringHolder (???). What's a string holder, and why isn't a String?
    The resumed message returned by the WebService:
    <mserror:description>WSDLReader:None of the matching operations for soapAction http://tempuri.org/Test/action/WS.Test could successfully load the incoming request. Potential typemapper problem HRESULT=0x80070057: The parameter is incorrect.
    - Server:One of the parameters supplied is invalid. HRESULT=0x80070057: The parameter is incorrect.
    </mserror:description>
    Any help would be apreciated.
    Thanks

    Can you send the WSDL that you used to generate the JAXRPC client?
    Thanks

  • Exception when running a JAX-WS client against a JAX-RPC service

    I have a JAX-WS client invoking a JAX-RPC web service on Weblogic 10.3. The service was originally built for Weblogic 9.2, it's been rebuilt and runs fine on 10.3.
    Some operations work fine, but invoking one operation results in the following exception:
    at secsvc.client.GetRolesForUserInApplicationResponse$JaxbAccessorF_role.get(Unknown Source)
         at com.sun.xml.internal.bind.v2.runtime.reflect.NullSafeAccessor.get(Unknown Source)
         at com.sun.xml.internal.bind.v2.runtime.reflect.Accessor.getUnadapted(Unknown Source)
         at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$7.get(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.ResponseBuilder$DocLit$PartBuilder.readResponse(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.ResponseBuilder$DocLit.readResponse(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown Source)
         at $Proxy29.getRolesForUserInApplication(Unknown Source)
    This operation works fine if invoked by an RPC client.
    Any idea what's going on?
    Mikey

    Hi Jitu,
    I changed the wsdl. And so I don�t get the warning anymore. My Webservice also runs well, now. Thanks anyway for the reply.
    There is a nice tech article on the sun network, which solved my problem. The basic idea is to split the wsdl into 2 wsdl documents. one containing all the porttypes messages and so on. And the other wsdl contains the binding and service elements.
    If you are interested check out this link:
    http://java.sun.com/developer/technicalArticles/xml/jaxrpcpatterns/index2.html
    thanks,
    footman

  • How can I change namespace prefix for JAX-RPC client request?

    I'm creating a JAX-RPC client to invoke a RPC/encoded web service. The service was generated from a ColdFusion program and for some reason when the SOAP namespace prefix is anything but "soapenv" it returns text/html instead of text/xml. Currently the client is sending requests with the prefix "env" and I'd like to change it to "soapenv".
    I created a type of javax.xml.rpc.handler.GenericHandler and attempted to do the follow:
    @Override public boolean handleRequest(MessageContext p1) {
         SOAPMessage msg = ((SOAPMessageContext) p1).getMessage(); 
         try {
              SOAPPart part = msg.getSOAPPart();
              SOAPEnvelope envelope = part.getEnvelope(); 
              envelope.setPrefix("soapenv"); 
              msg.saveChanges(); 
         } catch(SOAPException ex) {
              // TODO
              return false;
         return true;
    However I get the following exception:
    java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}Server] FaultString [UNIMPLEMENTED ] FaultActor [null] Detail [<detail><bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">java.lang.AssertionError: UNIMPLEMENTED
    at weblogic.xml.domimpl.NodeImpl.setPrefix(NodeImpl.java:173)
    at test.MyHandler.handleRequest(MyHandler.java:33)
    at weblogic.wsee.handler.JaxrpcHandlerChain.handleRequest(JaxrpcHandlerChain.java:58)
    at weblogic.wsee.ws.dispatch.server.JaxrpcChainHandler.handleRequest(JaxrpcChainHandler.java:102)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:107)
    at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:132)
    at weblogic.wsee.ws.WsStub.invoke(WsStub.java:87)
    at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:341)
    at test.Approvedsuppliers_Wrap_Stub.echo(Approvedsuppliers_Wrap_Stub.java:31)
    at test.Approvedsuppliers_WrapPortClient.echo(Approvedsuppliers_WrapPortClient.java:130)
    at test.Approvedsuppliers_WrapPortClient.main(Approvedsuppliers_WrapPortClient.java:43)
    Is there any workaround? I appreciate any feedback.
    Thanks, Bill

    What I ended up doing is converting the SOAP message to a string, replacing the namespace prefix and converting it back to a SOAP message.
    @Override
       public boolean handleRequest(MessageContext messageContext) {
          SOAPMessageContext soapMessageContext = (SOAPMessageContext) messageContext;
          SOAPMessage soapMessage = soapMessageContext.getMessage();
          String soapString = convertSOAPToString(soapMessage);
          soapString = soapString.replaceAll("env:", "soapenv:");
          soapString = soapString.replaceAll("xmlns:env", "xmlns:soapenv");
          SOAPMessage newSoapMessage = convertStringToSOAP(soapString);
          MimeHeaders mimeHeader = newSoapMessage.getMimeHeaders();
          mimeHeader.setHeader("SOAPAction", "");
          soapMessageContext.setMessage(newSoapMessage);
          return true;
       private String convertSOAPToString(SOAPMessage soapMessage) {
          StringWriter stringWriter = null;
          try {
             stringWriter = new StringWriter();
             StreamResult streamResult = new StreamResult(stringWriter);
             TransformerFactory transformFactory = TransformerFactory.newInstance();
             Transformer transformer = transformFactory.newTransformer();
             transformer.transform(new DOMSource(soapMessage.getSOAPPart()), streamResult);
          } catch (TransformerException e) {
             throw new RuntimeException(e);
          } finally {
             close(stringWriter);
          return stringWriter.toString();   
       private SOAPMessage convertStringToSOAP(String soapString) {
          SOAPMessage soapMessage = null;
          ByteArrayInputStream byteInputStream = null;
          try {
             MessageFactory msgFactory = MessageFactory.newInstance();
             soapMessage = msgFactory.createMessage();
             SOAPPart soapPart = soapMessage.getSOAPPart();
             // Load the SOAP text into a stream source
             byte[] buffer = soapString.getBytes();
             byteInputStream = new ByteArrayInputStream(buffer);
             StreamSource source = new StreamSource(byteInputStream);
             // Set contents of message
             soapPart.setContent(source);       
          } catch (SOAPException e) {
             throw new RuntimeException(e);
          } finally {
             close(byteInputStream);
          return soapMessage;
       private void close(Closeable closeable) {
          if(closeable != null) {
             try {
                closeable.close();
             } catch (IOException e) {
                // TODO

  • Building JAX-WS Clients for Oracle Cloud Applications

    Hello,
    We are looking for a tutorial on how to build JAX-WS clients for Oracle Cloud Applications using Eclipse and OEPE.
    Do you know if there is any document about this, or any document that can help us on this task.
    Thanks and regards,
    Gustavo.

    A JAX-WS web service client with OEPE would be the same for a cloud service.
    https://docs.oracle.com/cd/E15315_09/help/oracle.eclipse.tools.weblogic.doc/html/webservices/start.html
    For developing for Oracle Cloud refer
    https://apex.oracle.com/pls/apex/f?p=44785:24:100395514147349::NO::P24_CONTENT_ID%2CP24_PREV_PAGE:7026%2C2

Maybe you are looking for

  • What use of having double precision in java.awt.geom?

    Hi, I am trying to draw a line using Line2D with this param: g2d.draw( new Line2D.Double( 1.1d, 1.5d, 1.9d, 1.5d ) ); in my own JPanel paint method. However, the result is that the panel does not display a line nor a dot at all. Only when i change it

  • Urgent: getting error while pressing SAVE button on final grid screen

    Hi ABAPers,       please help me to sort this problem, i want to save the records selected by the user to database table. but when i m pressing save on o/p grid screen its giving error as GETWA_NOT_ASSIGNED. This is my code TABLES: plaf,         mara

  • New Time Capsule: just use as external hard drive without other setup

    I have a brand new 2 Tb Time Capsule, and I need to move data to it manually (not as a backup) as soon as I can  to solve another problem.  Can I do this without doing the full blown Time Capsule setup (which I've never done) ?  Just plug it in and w

  • Not able to connect with pws prime cable provisioning

    Hi I have installed cisco prime cable provisioning in my Linux system. pws is also insatlled. I tried to connect the pws through program. but we are gerring Unable to connect to the remote server. I generated the code from the wsdl file and used that

  • Help with DSL Transition EMail

    Sir / Madam, I am a one man operation that suggests tech to small businesses.  I am also one of your customers. One of our common customers {edited for privacy} needs FIOS.  We asked and asked over the years and were put off.  The owners need to put