Jax-rpc and https and multiple keystores - a limitation?

hi,
When using the JAX-RPC libraries for a web services client application in my app server I want to make use of a different keystore then the one set by using the default system properties.
reason being I have multiple ssl enabled apps runing in the app server and I want to use different client keys in the apps (I use client certificate authentication)
from what I see now I expect this to be not possible - since creating the http(s) connection is completely hidden from a development point of view.
any ideas on the possibilities/impossibilities?
regards Joost ([email protected])

Can you not use command line switches to specify the truststore, e.g.
-Djavax.net.ssl.trustStorePassword=changeit -Djavax.net.ssl.trustStore=truststore_1-4

Similar Messages

  • JAX-RPC client problems and proxy

    I have deployed a JAX-RPC service in JBoss, but on the client side, I am getting NullPointerException when I attempt to access the service. I believe I'm not creating the proxy in the client properly. Where I need help is:
    1. What should the proper ENDPOINT URI be for the service (my variable "destination" shown below).
    2. What should the code in createProxy() look like?
    WEB Services Shows:
    ===================
    VehicleInfoService ACTIVE
    Address: http://myhost:8080/VehicleInfoService/vehicle
    WSDL: http://myhost:8080/VehicleInfoService/vehicle?WSDL
    Port QName: {http://myhost:8080/wsdl/VehicleInfoService}VehicleInfoServiceIFPort
    Remote interface: testsoap.VehicleInfoServiceIF
    Implementation class: testsoap.VehicleInfoServiceImpl
    Model: http://myhost:8080/VehicleInfoService/vehicle?model
    CLIENT CODE
    ============
    import javax.xml.rpc.*;
    import javax.xml.rpc.Stub;
    import testsoap.*;
    public class TestSOAP
    VehicleInfoServiceIF vehicleInfoServiceInf;
    private String statusMessage = null;
    private static String destination = "http://myhost:8080/VehicleInfoService/v
    ehicle";
    public TestSOAP()
    try
    Stub stub = createProxy();
    // Address of the service
    stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,
    destination);
    vehicleInfoServiceInf = (VehicleInfoServiceIF)stub;
    catch (Exception ex)
    statusMessage = "Error creating Proxy stub: " + ex.getMessage();
    private static Stub createProxy()
    return(Stub)(new VehicleInfoService_Impl());

    To reply to own posting, I finally discovered that I had a problem with my config.xml file. Once I corrected that, I was able to modify the createProxy entry to:
    private static Stub createProxy()
    return(Stub)(new testacp.VehicleInfoService_Impl().getVehicleInfoServiceIFPo
    rt());
    Corrected config.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration
    xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
    <wsdl location="http://mybox:8080/VehicleInfoService/vehicle?WSDL"
    packageName="testsoap"/>
    </configuration>
    These changes fixed my problem. With the correct entries in config.xml, I no longer got compile errors with "getVehicleInfoServiceIFPort Not Found".

  • JWSDP 1.4, JAX-RPC, wscompile, http proxies

    I have a JAX-RPC client that works properly. However, I'm trying to modify the client so that RPC calls can go through an http proxy prior to reaching the web service.
    Here are some of the problems I'm experiencing:
    There are posts on this site, and elsewhere on the net, stating that the wscompile -httpproxy:host:port option can be used to provide this solution. However, wscompile generates the same exact code - whether the httpproxy option is used or not. Is this a problem in JWSDP 1.4?
    There are also posts that state to use properties, such as http.proxyHost or proxyHost. I've used several versions of this solution (while using a sniffer to verify network activity), but all that happens is that the code continues to call directly to the web service - not the http proxy. Makes me think these properties are only useful when using http directly. Many of the posts I've seen regarding this are two years old, and I've seen at least three different opinions on how the property strings should be named. Anybody know the real solution?

    For me these system properties do work:
    proxyHost, proxyPort (maybe also http.proxyHost, http.proxyPort) for Http
    https.proxyHost, https.proxyPort for Https
    The nice thing is that from a WebStart application or the plug-in these properties are set automatically from the browser configuration if not reconfigured manually.

  • Does passthrough work for both HTTP and HTTPS and back?

    I have pass through configured correctly for HTTP on S1WS6.5 to S1AS7, and it works correctly.
    When a secure page is hit, an redirection loop starts between the Web Server and Application Server.

    Thanks Mike, I assume it is so, then.
    Best,
    fabio

  • JAX-RPC and JSP

    Hi all,
    I have created a jax-rpc console app which works fine. (its a fairly simple online shop application). I would like to try and implement it via jsp but have never used jsp before.
    I've tried to follow the coffee-bean example, but the jsp has confused the hell out of me. (getting the cb app to run is fine, but separating out the jax-rpc element is a nightmare, what with the taglibs, build files and all). Despite my best efforts, I have failed to get a simple jsp/jax-rpc page to work.
    In so far as I can tell, it requires two builds to install the jax-rpc service, and another build to install the jsp service on the tomcat server. Is this correct?
    It would be much appreciated if anyone could post a simple example of how to get a basic jsp/jax-rpc service to work. A simple hello world would be just fine! :)
    I know I could figure out jsp alone. Thats not really the problem. Its incorporating the jax-rpc service that is killing me! All comments and suggestions are very welcome.
    //Daniel.

    Hi all,
    I have created a jax-rpc console app which works fine.
    (its a fairly simple online shop application). I would
    like to try and implement it via jsp but have never
    used jsp before.I suggest you invest some time in learning how to work with JSP technology. Usually JSP pages call JavaBeans or EJB components to do the work.
    >
    I've tried to follow the coffee-bean example, but the
    jsp has confused the hell out of me. (getting the cb
    app to run is fine, but separating out the jax-rpc
    element is a nightmare, what with the taglibs, build
    files and all). Despite my best efforts, I have failed
    to get a simple jsp/jax-rpc page to work.The Coffee Break application has two JavaBeans components that do the work of calling the JAX-RPC service: RetailPriceList and CheckoutFormBean.
    >
    In so far as I can tell, it requires two builds to
    install the jax-rpc service, and another build to
    install the jsp service on the tomcat server. Is this
    correct?What do you mean by build? To create a JAX-RPC service you have to generate files with tools, compile those files, package into a WAR, and then deploy.
    The web application containing the JSP pages and compiled JavaBeans components is packaged into another WAR and deployed separately.
    >
    It would be much appreciated if anyone could post a
    simple example of how to get a basic jsp/jax-rpc
    service to work. A simple hello world would be just
    fine! :)
    I know I could figure out jsp alone. Thats not really
    the problem. Its incorporating the jax-rpc service
    that is killing me! All comments and suggestions are
    very welcome.We'll take your comments into account for the next version of the Java Web Services Tutorial.

  • IWeb protocol support for anything OTHER than http and https

    I am extremely disappointed in iWeb. It doesn't even seem to be able to do very simple things.
    All I want to do is to create HTML links to external pages with protocols other than "http" and "https" and it always prepends "http" to the beginning of the URL. This is really really really annoying.
    Apple I hope you are paying attention. iWeb is poorly designed. You are trying to anticipate what end users want...this is a development practice right from the Microsoft Windows Developer book. I sure how the next update to iWeb works properly. I'm so upset about all this...I can't publish podcasts to the web because of all the foolishness with how you handle that, and the confusing directory name issues.
    My podcast URL looks like this:
    http://itpc://www.mysite.com/podcast/News/rss.xml
    I tried (unsuccesfully) to manually create the podcast since the automated version created this:
    itpc://www.bradyconsult.com/podcast/podcast/News/rss.xml
    I'm sure I could fiddle with iWEb and get this to work, but why should I? I've already fiddled with it and simple changes to my site structure totally screw this up. Not to mention, that when it did work, it didn' t even post all my podcasts!!! It skipped the first one and the last one.
    And, for those wondering, i'm not technically clueless. I have a podcast working just fine on two other sites. The appeal to iLife with iWeb and the new podcast feature of GarageBand was to bring all this together in one easy to use, nice package. But it's not nice. Garageband's update is awesome! But iWeb and it's attempts to work with the other iApps is gruesome.
    I expect this garbage from Microsoft...not Apple.
    Can anyone recommend a workaround (and yes, I understand I can manually edit HTML...but I was hoping for a workaround within iWeb) to create html links with support for protocols (aside from http and https) ??
    It's bad enough I have to publish to a folder and then FTP to my site since apple makes that exceedingly difficult to do (I'm sure to increase .mac sales) but all this other foolishness is just bunk. I feel ripped off on my iLife '06 purchase.
    Grrrrrrr......
    G5 Dual 2.3 GHz   Mac OS X (10.4.5)  

    I don't know if this helps you any, but in my humble
    opinion Drake is absolutely correct. iWeb really
    wasn't designed for the pro site builder; it's just
    an entry level site builder. Moreover, it isn't
    really geared for the professional world of internet
    marketing; I think it is really more for the home
    and family group who have at least one thing in
    common: Macs.
    I don't think it was even designed for them. I mean, you can't create an ftp: link, you can't manage multiple site files, there's no way to add "aim:" or "yahoo:" links, etc. It's not mac's they're supporting. It's .mac in particular, maybe, if that.
    The art is kinda nice, but really, the grief in trying to do simple things like a basic href is just absurd. I can do these things easily in Pages. iWeb should certainly be no more difficult.
    Btw, I'm here because I have the same problem - overly restrictive URL's on hyperlinks. I'll probably solve my with a trivial sed script. But even that's tough because they mangle the url. It's not easy to find an encoding suitable for automatic post processing.
    Automator anyone?

  • HTTP and OC4J on different server

    Hi
    We have HTTP server running on machine1 and HTTP and OC4J running on machine2.
    Because of security issues, We want to shutdown HTTP on machine2 and use HTTP server on machine1 and redirect requests to machine2.
    Can any one pls let us know how to do it.
    Thanks in Advance.

    hi user11159690
    Maybe this can help:
    "Oracle® HTTP Server Administrator's Guide 10g Release 3 (10.1.3) B25211-02"
    "7.32 mod_oc4j"
    http://download.oracle.com/docs/cd/B25221_04/web.1013/b25211/confmods.htm#i1025739
    Maybe more specifically "Oc4jMount":
    http://download.oracle.com/docs/cd/B25221_04/web.1013/b25211/confmods.htm#CIHJBGFB
    (tip : You can use "Your Control Panel" to make your name visible in forum posts.)
    success
    Jan Vervecken

  • Observations/questions on JAX-RPC

    I started developing Web Services on Oracle 9iAS (9.0.2.x). What impressed me is how easy it is to turn any old class into a Web Service; you can focus on and develop the API you want, in relative ignorance that the class is being exposed through SOAP. The whole SOAP layer, including [de]serializing parameters and return values, making the HTTP connection, etc. is provided by the container and the auto-generated client stubs.
    Oracle 9iAS, and earlier versions of WebLogic (6.x) seem to pre-date JAX-RPC and don't have a standard API for client stubs. WebLogic 7 seems to have adopted JAX-RPC, though, and hopefully other vendors will follow suit; it will nice for all client stubs to have the same methods for setting the URL or a username/password.
    I did notice some important differences between Oracle Web Services and JAX-RPC, though:
    - Oracle and WebLogic both provide for the direct exposure of stateless session EJBs as SOAP services. The JAX-RPC reference impl (JWSDK) seems to only provide for the exposure of regular Java classes, and exposing an EJB requires an intermediary Java class to find and call the EJB in question. Is it the intent of the JAX-RPC standard to allow for vendors to directly expose EJBs, while just omitting this as a feature for the reference implementation?
    - Oracle also does not require an explicit step to generate client stubs and WSDL. It can generate these dynamically at runtime inside the servlet engine, and makes these available for download from the service itself. Can this style of auto-generation play nicely with JAX-RPC?
    I also have some questions about JAX-RPC:
    - if java.util.Calendar objects are serialized and deserialized by JWSDK, does that imply that java.util.TimeZone objects are as well?
    - can someone point me at where the standard for exception handling and transport is documented (what exception do services throw, and how are they translated to client-side exceptions)?
    - when the client stub is generated, does that also create client-side skeletons for each user-defined datatype (bean) used as an argument/return type for the service? Can these skeletons be made to implement a particular interface? One of the annoying things about Oracle 9iAS Web Services is that you can't use a client skeleton and the actual (server) bean object interchangeably even if the same get/set method exists on both objects, because the skeleton objects don't implement any interfaces.
    Thanks!
    -- Bill

    Hi,
    I will share with you... what I understand and know ...
    - Oracle and WebLogic both provide for the direct exposure of stateless session EJBs as SOAP services. The JAX-RPC reference impl (JWSDK) seems to only provide for the exposure of regular Java classes, and exposing an EJB requires an intermediary Java class to find and call the EJB in question. Is it the intent of the JAX-RPC standard to allow for vendors to directly expose EJBs, while just omitting this as a feature for the reference implementation?
    Well jsr 109 opens up the possibility of having stateless
    session beans as end points. Naturally to stay aligned with
    this jsr 109, lot of application server vendors have started
    to support this.
    The JAX-RPC ri that you are looking at was releazed befor JSR
    109 spec was solidified and the ri gets released.
    - Oracle also does not require an explicit step to generate client stubs and WSDL. It can generate these dynamically at runtime inside
    the servlet engine, and makes these available for download from the service itself. Can this style of auto-generation play nicely with
    JAX-RPC?
    You should check out the next version of j2ee ri.
    Some of your questions might get address there,
    - if java.util.Calendar objects are serialized and deserialized by JWSDK, does that imply that java.util.TimeZone objects are as well?
    Have check out the jsr 101 Chapter 19 ? That should answer
    your question. You can get it from www.jcp.org
    - can someone point me at where the standard for exception handling and transport is documented (what exception do services throw, and how are they translated to client-side exceptions)?
    http://java.sun.com/webservices/docs/1.0/api/index.html
    Check out the javadocs at the above location of service specific exceptions.
    Also check out 8.2.6 from the spec it might help a little.
    asengup

  • How to run a JAX-RPC web service

    I wrote the essential interface and classes to build a JAX-RPC web service, and I installed the J2SE 1.4.2 and Java Web Services Developer Pack 1.2 in Windows XP.
    I have read the Java Web Services Tutorial, but is so confusing for me.
    Anyone can provide the steps about the environment config, compile, package, and run the web service in Tomcat? thx

    I wrote these interface and class to create a simple web service:
    package test;
    import java.rmi.*;
    public interface HelloIF extends Remote {
    String sayHello(String s) throws RemoteException;
    package test;
    public class HelloImpl implements HelloIF {
    public String sayHello(String s) {
    return message + " " + s;
    I compiled these 2 and the *.class files exist in D:\backup\JAVA\fyp\test
    and then I wrote the config.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
    <service name="MyHelloService" targetNamespace="urn:Foo" typeNamespace="urn:Foo" packageName="test">
    <interface name="test.HelloIF" />
    </service>
    </configuration>
    I placed the config.xml in D:\backup\JAVA\fyp, then I type the following command:
    D:\backup\JAVA\fyp>wscompile -define config.xml -model model.gz
    the system response is:
    error: RmiModeler error: java.lang.ClassNotFoundException: test$HelloIF
    what's wrong?

  • JAX-RPC whitepaper available on dev2dev

    The Java API for XML-based remote procedure calls (JAX-RPC) simplifies
    the process of building Web services that incorporate XML-based RPC.
    Rajesh Sumra looks at how developers can use JAX-RPC to implement and
    call SOAP-based Web services described by the Web Services Description
    Language (WSDL) on the BEA WebLogic Platform.
    http://dev2dev.bea.com/articles/Sumra.jsp

    et al
    http://dev2dev.bea.com/technologies/webservices/index.jsp
    Bruce Stephens wrote:
    >
    The Java API for XML-based remote procedure calls (JAX-RPC) simplifies
    the process of building Web services that incorporate XML-based RPC.
    Rajesh Sumra looks at how developers can use JAX-RPC to implement and
    call SOAP-based Web services described by the Web Services Description
    Language (WSDL) on the BEA WebLogic Platform.
    http://dev2dev.bea.com/articles/Sumra.jsp

  • 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,

  • 500 Internal server error on RPC over HTTP using TS Gateway

    I've been happily using TS Gateway on Windows Server 2008 x64 for 18 months and everything was working perfectly. Suddenly this week it started giving "access denied" errors to any user who tried to connect, evidenced in event viewer as a failed login attempt.
    After restarting the server, it got worse in that if I browse to the /rpc folder it gives me 500 Internal server error and I don't even get as far as authenticating credentials. I've tried removing IIS, RPC over HTTP and TS Gateway, and re-adding all of them,
    but I still get the same error 500. The RPC and TS Gateway services are both running. What could be causing this and how can I fix it?

    Hi,
    Thanks for your post.
    Firstly, check the following KB article to troubleshoot this issue.
    This computer can't connect to the remote computer because the Terminal Services Gateway server is temporarily unavailable
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;969743
    If the issue still persists, you may perform the below steps:
    Uninstalled TSGateway, IIS role, all IIS related components.
    Delete all files in the folder %windir%\system32\inetsrv\config
    Delete all files in the folder %windir%\system32\inetsrv\metaback
    Restart the server and try to re-install TSGateway again
    Best Regards,
    Aiden
    Aiden Cao
    TechNet Community Support
    Thank you very much for this. I confirm it fixed the problem, although there was an error in reinstalling IIS and TS Gateway until I also removed Windows Process Activation Service.

  • Type casting in JAX-RPC

    Hello
    I was trying to do a JAX-RPC application, and I had some problems with type casting. My application worked fine with primitive types, vectors of primitive types, and beans with primitive type properties. But it didn't work with vectors of beans, or ArrayList's of beans... It couldn't deserialize the result on client side... Can anyone help?
    The Java Web Services Tutorial says that JAX-RPC supports beans and vectors, but I had the impression that this is not a "recursive" support, like "beans with vectors" or "vectors of beans"... Does it make sense?
    By the way, I was using a DII client...
    Thanks,
    Alexandre Murakami

    Hello!
    Thanks for the reply! I can't put the code of my application here (because it's quite big and it's from work)... But I followed the dii client example from the Web Services Tutorial...
    I'm trying to do a kind of a general client... The parameters are the URL of the service, the name of the operation, a list of parameters and the return type class.. And it takes the rest of the service information from the WSDL file... About the return type, I take the QName of the return type from the WSDL:
    <message>
    <part name="result" type="...">...
    then I call the call.setReturnType(QName, Class) method. The return type was an array of a very simple bean, something like:
    class Person {
    String name;
    int age;
    public String getName() {...}
    public void setName(...) {...}
    public int getAge() {...}
    public void setAge(...) {...}
    I don't know if the information I put here is enough... but anyway, thanks for the reply!
    Alexandre Murakami

  • Asynchronous JAX-RPC Web services

    In our application we would like to make a non-blocking call
    to a single web service ( so we don't need to use BPEL).
    Do you have a pointer to the document about creating Asynchronous JAX-RPC Web services and writing client code?
    Thanks!
    -- Qun

    Yes interoperability is the biggest advantage you get with JAX-RPC services.
    JAX-RPC spec (JSR 101) defines a standard way in which a web service should be written so that it interoperates between different application servers. It does away with the vendor specific api's and implementation of web services.
    Chandar

  • Batch operations with JAX-RPC

    I have read a number of different tutorials about Web services and JAX-RPC, and have to come the conclusion that JAX-RPC is the correct approach to use for my project. Most of the examples I have seen involve invoking services which perform a 'one-shot' action e.g. get a Stock Quote.
    My first question is that I am not sure for such 'one-shot' services, how much support there is in the API for sending/receiving arrays of data items. e.g. sending a user's data to a web service which includes an associated list of phone numbers.
    Further if I wanted to send user's data which included an array of nested objects, would I have to implement a serializer/deserialiser plugin?
    My main concern really is how best to handle a batch of requests to the service. My current thought is to use JAX-RPC with an xml document attachment - listing of a number of user's data and their parameters. A 'batch service' would return a response immediately then work through the document and invoke the existing 'single shot' service - which will be hosted on the same web server.
    Is this approach which brings together a number of different ideas from the various JAX-RPC tutorials viable? Are they any better alternatives?
    For example would it be better to implement a JAX-RPC for the single shot service requests and use JAXM for batch service requests? (On the server-side I would still be expecting the batch service to re-use the single-shot service). Can JAXM and JAX-RPC services co-exist on the same web server? I realise that there would be WSDL generated for the JAX-RPC service alone and so for a client developer there will be an inconsistency in terms of how the Web service is accessed.
    Thanks in anticipation

    Hello, I'll try and go through your questions one at a time:
    My first question is that I am not sure for such 'one-shot' services, how much support there is in the API for
    sending/receiving arrays of data items. e.g. sending a user's data to a web service which includes an
    associated list of phone numbers.JAX-RPC has built in support for List type operations. There is no problem sending Arrays of information over the wire. If you were sending an Object of type User, for instance, there would be no problem with User having a List of PhoneNumber types objects as part of it's structure.
    Further if I wanted to send user's data which included an array of nested objects, would I have to implement
    a serializer/deserialiser plugin?Condintional No. If the nested objects contained only data structures that JAX-RPC knows how to deal with, your fine (things like java.lang.String or java.lang.Integer). However, if your nested objects contain types that JAX-RPC does not know how to deal with (i.e. java.sql.TimeStamp), you will have to write a custom serializer/deserializer just like you would if you were passing those objects without them being nested.
    My main concern really is how best to handle a batch of requests to the service. My current thought is to
    use JAX-RPC with an xml document attachment - listing of a number of user's data and their parameters.
    A 'batch service' would return a response immediately then work through the document and invoke the
    existing 'single shot' service - which will be hosted on the same web server.
    Is this approach which brings together a number of different ideas from the various JAX-RPC tutorials
    viable? Are they any better alternatives?As per above you shouldn't have to send an xml document attachment, but I guess you could. Also, for batch processing type tasks you probably want to look at the asychronous mode mentioned in the JAX-RPC part of the JWSDP tutorial.
    For example would it be better to implement a JAX-RPC for the single shot service requests and use
    JAXM for batch service requests? (On the server-side I would still be expecting the batch service to re-use
    the single-shot service). Can JAXM and JAX-RPC services co-exist on the same web server? I realise
    that there would be WSDL generated for the JAX-RPC service alone and so for a client developer there
    will be an inconsistency in terms of how the Web service is accessed.Well, it really is up to you at this point. I assume that you want/need to use web services for access (as opposed to EJBs or any other method). So, I would look at an asychronous web service implementation.

Maybe you are looking for