Jax-rpc 2 D arrays

i need a web service to return a 2-d array of string objects,
i tried to implement it.. but it gave me the following error:
deserialization error: unexpected array element type: expected={http://www.w3.org/2001/XMLSchema}string;, actual={http://www.w3.org/2001/XMLSchema}string
---clipped--
i read somewhere that we need to register a serializer in type mappping registry..
can someone tell me how?
pls.... its urgent

See:
http://forum.java.sun.com/thread.jspa?threadID=578954&tstart=0and
http://forum.java.sun.com/thread.jspa?threadID=578646&tstart=0It seems tha Jax-rpc is not capable of processing 'complex' data types like records and classes... :-( This should realy be a bad thing!!!

Similar Messages

  • Weblogic 10.3 - Arrays and JAX-RPC Web Services

    We are currently looking at migrating from WL 8.1 to WL 10.3, and have an issue with some of our web services (JAX-RPC) with regards to returning String arrays.
    We have a web service method that returns a response object. This response object has many properties that includes a property that is a String array. So the code looks something like this (this is a simplified version):
    <em>public class OurService
    @RemoteMethod
    @WebMethod
    @WebResult(name = "result")
    public ResponseObject lookup(String someParam)
    // build the object and its properties here...
    return responseObject;
    }</em>
    This is what the response object looks like:
    <em>public class ResponseObject
    private String[] someProperty;
    public String[] getSomeProperty()
    return this.</em><em>someProperty</em><em>;
    public void setSomeProperty(String[] </em><em>someProperty</em><em>)
    this.</em><em>someProperty</em><em>= </em><em>someProperty</em><em>;
    }</em>
    So the issue is this. In WL 8.1, the web service generator would recognise the fact that the response object had a property that was a String array and would declare as such in the WSDL file, for example:
    <em><strong> &lt;xsd:element xmlns:tp="java:language_builtins.lang" type="<font color="#ff0000">tp:ArrayOfString</font>" name="someProperty" minOccurs="1" nillable="true" maxOccurs="1"&gt;
    &lt;/xsd:element&gt;
    </strong></em>
    As a result, when the service is called, the property is returned in the SOAP response like this:
    <strong>.
    </strong>
    <div class="e">
    <div class="c" style="margin-left: 1em; text-indent: -2em">
    <em><strong> <span class="m">&lt;</span><span class="t">someProperty</span><span class="t"> soapenc:arrayType</span><span class="m">="</span></strong><strong>xsd:string[2]<span class="m">"</span><span class="m">&gt;</span></strong></em>
    </div>
    <div>
    <div class="e">
    <div>
    <em><strong><span class="b"> </span><span class="m">&lt;</span><span class="t">string</span><span class="t">
    xsi:type</span><span class="m">="</span></strong><strong>xsd:string<span class="m">"</span><span class="m">&gt;</span><span class="tx">string1</span><span class="m">&lt;/</span><span class="t">string</span><span class="b">&gt;
    &lt;string xsi:type="xsd:string"&gt;string2&lt;/string&gt;
    </span><span class="m">&lt;/</span><span class="t">someProperty</span><span class="m">&gt;</span></strong></em>
    </div>
    </div>
    </div>
    </div>
    <strong>.
    </strong>
    But, in WL 10.3, the WSDL entry is:
    <em><strong> &lt;xs:element maxOccurs="unbounded" minOccurs="0" name="InstepCodes" nillable="true" type="xs:string"&gt;
    </strong></em>
    As a result the property is returned in the SOAP response like this:
    <strong> .
    </strong><strong><span class="m"> &lt;</span><span class="t">java:InstepCodes</span><span class="ns">
    xmlns:java</span><span class="m">="</span></strong><strong class="ns">java:com.myservice</strong><strong><span class="m">"</span><span class="m">&gt;</span><span class="tx">string1</span><span class="m">&lt;/</span><span class="t">java:InstepCodes</span><span class="m">&gt;</span>
    </strong><strong><span class="m"> &lt;</span><span class="t">java:InstepCodes</span><span class="ns">
    xmlns:java</span><span class="m">="</span></strong><strong class="ns">java:com.myservice</strong><strong><span class="m">"</span><span class="m">&gt;</span><span class="tx">string2</span><span class="m">&lt;/</span><span class="t">java:InstepCodes</span><span class="m">&gt;</span>
    </strong>The difference here is that WL 10.3 does not return the array of strings as a complex array type, just as a set of repeated elements.
    We need to return the array as we do for WL 8 in WL 10.3, because we have external clients that are parsing the response and looking for the XML in this format. We are not currently in a position to ask them to change.
    Is this a limitation of the JAX-RPC spec, or WL's implementation of it?
    If the service was to return a String array directly from a service method, then it is declared in the WSDL file.
    However, if a service returns an object that within itself has a property that is an array, it does not recognise it like it did with WL 8.1.
    <strong>
    </strong>
    <div class="e">
    </div>

    Thank you for the reply.
    We are using WL Server 8.1 (not Workshop), and moving to WL Server 10g R3.
    We are using the JWSC task to generate the service, which is:
    bq. weblogic.wsee.tools.anttasks.JwscTask+
    Here is an extract from the Ant build file the calls the task.
    &lt;jwsc
    srcdir="src/com/ourservice"
    sourcepath="src"
    destdir="${ear.dir}"
    verbose="false"
    debug="true"
    keepGenerated="true"
    classpathref="ws.class.path"&gt;
    +&lt;module name="${service.name}" explode="true"&gt;+
    +&lt;jws file="OurService.java" type="JAXRPC"/&gt;+
    +&lt;/module&gt;+
    +&lt;/jwsc&gt;+
    As stated in my first post, the service method returns an reponse object and its this that contains the array property. The service method itself does not return an array type. This seems to be the root of the problem, i.e. the declaration of array types is not being propagated down through the object graph the service method returns. Below is the code for the service and the response object.
    @FileGeneration(remoteClass = Constants.Bool.TRUE, remoteClassName = "OurService", localHome = Constants.Bool.TRUE, localHomeName = "OurServiceLocalHome", remoteHome = Constants.Bool.TRUE, remoteHomeName = "++OurService++Home", localClass = Constants.Bool.TRUE, localClassName = "++OurService++Local")+
    @JndiName(remote = "com.ourservice.++OurService++", local = "com.ourservice.++OurService++Local")+
    @Session(ejbName = "++OurService++", type = Session.SessionType.STATELESS, transactionType = Session.SessionTransactionType.CONTAINER, maxBeansInFreePool = "100", initialBeansInFreePool = "20", enableCallByReference = Constants.Bool.TRUE, homeIsClusterable = Constants.Bool.TRUE, homeLoadAlgorithm = Constants.HomeLoadAlgorithm.ROUND_ROBIN, isClusterable = Constants.Bool.TRUE, beanLoadAlgorithm = "RoundRobin", defaultTransaction = Constants.TransactionAttribute.SUPPORTS)+
    +@RoleMappings( { @RoleMapping(roleName = "Admin", externallyDefined = Constants.Bool.TRUE),+
    +@RoleMapping(roleName = "Monitor", externallyDefined = Constants.Bool.TRUE),+
    +@RoleMapping(roleName = "JMS", externallyDefined = Constants.Bool.TRUE) })+
    @WebService(name = "OurServicePort", serviceName = "OurService", targetNamespace = "http://www.ourservice.com/SOA/OurService+_service")+
    +@SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.LITERAL)+
    @WLHttpTransport(contextPath = "OurService", serviceUri = "OurService", portName = "
    *OurService+Port")+
    public class OurService
    +{+
    @RemoteMethod
    @WebMethod
    @WebResult(name = "result")
    {color:#ff0000}public ResponseObject lookup(String someParam){color}
    // build the response object...
    return {color:#ff0000}responseObject{color};
    +}+
    This is what the response object looks like:
    public class ResponseObject
    +{+
    private String[] someProperty;
    +public {color:#ff0000}String[] getSomeProperty(){color}+
    +{+
    return this.someProperty;
    +}+
    public void setSomeProperty(String[] someProperty)
    +{+
    this.someProperty = someProperty;
    +}+
    +}+
    From all of this I cant tell how we get the WSDL file to delcare it as an array type, as shown in the JAX-RPC 1.1 spec you mentioned, based on the code we have and the JWSC build task we are using.
    (I appologise for the formatting of this message. It seems to want to insert + everywhere in the code examples, despite me removing them!)
    Edited by: user8013492 on 11-Dec-2008 02:09
    Edited by: user8013492 on 11-Dec-2008 02:11

  • Use Array in JAX-RPC

    I want to send an array as parameter in the client of the JAX-RPC,how can I write the code?
    Here is my code,but it has some errors.
    int[] temp=new int[2];
    temp[0]=1;
    temp[1]=2;
    QName QNAME_TYPE_OBJECT = new QName("http://schemas.xmlsoap.org/soap/encoding/", "Array");
    call.addParameter("param", QNAME_TYPE_OBJECT,temp.getClass(), ParameterMode.PARAM_MODE_IN);
    Object[] params = {temp};
    String result = (String)call.invoke(params);
    How can I send the temp array correctly?
    thank you very much!

    In addition ,I find that if I change the parameter from int[] to String[],everything is ok!
    here is the code:
    String[] words = {"it", "was", "a", "dark", "and",     
    "stormy", "night"};
    QName QNAME_TYPE_OBJECT = new QName("http://schemas.xmlsoap.org/soap/encoding/", "Array");
    call.addParameter("param", QNAME_TYPE_OBJECT,words.getClass(), ParameterMode.PARAM_MODE_IN);
    Object[] params = {words};
    String result = (String)call.invoke(params);
    why?what I happenend?And I find that the error is that ClassCastError,i.e.
    String[] can be casted into Object[],but int[] can't,so the error occured.(I know this process by decompiling the class file).
    but the tutorial says JAX-rpc supports the int[],is it wrong?

  • JAX-RPC: Exception

    Hello there
    I am using currently SUN's Webservice Development Kit 1.4 and try to realise a JAX-RPC "rpc/encoded" webservice.
    My applicatio is currently running if I am using a static client (stubs geenerated by wscompile). If am going forward to use a dynamic proxy client, I am getting a strange exception during the deserialization of the xml data on the client: "trailing block elements must have an id attribute". See also stack trace at the end of the messsage.
    As far as I understand is that it must somewthing be with the "ArrayList" or arrays which I am using in my JavaBean which I sent from the server to the client. Here my extract from my JavaBean:
    public class Article
         long id;
         Date date;
         String category;
         String title="";
         String lead="";
         List texts;
    }If I am taking out the member "List texts" then it will work correctly. The list contains only Strings. I tried also to use String[] array, but this didn't help either.
    So here, my questions perhaps someone has some ideas what I did wrong.
    - Why does it work with the stastic client but not with the dynamic proxy?
    - Does anybody know an example on the net where in JavaBeans Lists or Arrays has been used?
    - Anybody an idea why this error appears? Did I something wrong?
    Thank you in advance
    Mark Egloff
    trailing block elements must have an id attribute
         at com.sun.xml.rpc.encoding.SOAPDeserializationContext.deserializeMultiRefObjects(SOAPDeserializationContext.java:81)
         at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:226)
         at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:80)
         at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:489)
         at com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHandler.java:122)
         at com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHandler.java:86)
         at $Proxy0.getArticle(Unknown Source)
         at tagesanzeiger.client.ManagerDynamicClient.main(ManagerDynamicClient.java:43)

    Thanks for your answer... regarding the support of "List" Types, you can get a list of supportet types from here http://java.sun.com/webservices/docs/1.3/tutorial/doc/JAXRPC2.html#wp79865 As you see "list" is supported. The problem for me is that I not use directly the list as parameter from the interface, rather than this it is used "internally" in my JavaBean. I found how to declare additional types here:https://jax-rpc.dev.java.net/whitepaper/1.1/index-part1.html#3.5.1 i.e. in your config-interface.xml for the wscompile server:
    <typeMappingRegistry>
         <additionalTypes>
              <class name="tagesanzeiger.data.Media"/>
         </additionalTypes>
    </typeMappingRegistry>This works for the serialization later on the serverside, but the client then claims that it has no serializer. I have read somewehere that the client also supports declarative serialization of custom types, bt I did not find any example. I tried also prorgrammatically, here a hint:
    http://users.skynet.be/pascalbotte/rcx-ws-doc/seiadvanced.htm
    But there is no full example of custom serializer, so I tried to use the sun serializer:
    com.sun.xml.rpc.encoding.ValueTypeSerializer
    com.sun.xml.rpc.encoding.ObjectArraySerializerbut this ended in a NullPointerException.....
    - so has anybody out there a working example with complex types in a JavaBean?
    - has anyone an example of customserializer.?
    Regarding books, I have one from the Sun " Java Web Services Architecture" and one from Wiley "Developing Java Web Services", but both do not show how to use the cutom serializers nor declarive options at the client side....So I hope somenone has somewhere a working example...please...
    Thanks
    Mark

  • JAX RPC extension: Problem with document/literal and MyType[]

    Hi,
    I have installed the JAX RPC extension and want to generate a stub from my WSDL file. The WSDL describes a document/literal binding.
    Problem:
    A webservice server method like:
    public wineshop.model.common.SimpleProducer[] getSimpleProducerList() throws RemoteException;
    is translated into a stub method like:
    public UnknownType getSimpleProducerList() throws Exception {..}
    Is an array of own types with the binding style "document/literal" not supported in JAX RPC 1.4 or is it just a bug?
    The WSDL file is generated by JAX RPC 1.4.
    I have installed JWSDP-1.5 and generated a stub with wscompile from the WSDL file. The generated stub has the correct method return type:
    public wineshop.ws.client.SimpleProducer[] getSimpleProducerList()
    throws java.rmi.RemoteException
    It there a workaround like replacing some JDev JARs with JWSDP-1.5 to solve the problem?
    Any hints are welcome.
    Thanks Markus

    repost.....

  • 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

  • JAX-RPC Document style WS

    Is it possible to create a JAX-RPC document style web service that
    returns an array of bytes ?
    I have problems, but with jdeveloper 10.1.3 ´s tools.
    With Axis I have NO problems.
    Does anybody know why?
    Sincerely
    Jon Kepa Gerrikagoitia

    Hello Mr. Grall,
    I´m using jDeveloper 10.1.3 preview version.
    I use bottom-up design so I rely on jDeveloper to do all the "dirty" job.
    If I create a class that returns an array I cant create a document/Literal WS because jDev shows an error.
    But If I choose document/wrapped it works !
    Do tou know the reason of this ?
    Sincerely,
    Jon Kepa Gerrikagoitia.

  • OC4J 9.0.4, JAX-RPC, AXIS Client Stub

    Hi All,
    I have hit a problem and am wondering if anybody has any pointers :
    * I have a Webservice running on OC4J 10.1.2 Standalone.
    * I have generated Java client stubs by pointing to this webservice using the wsdl2java tool from Apache Axis and can use these generated classes without any problems outside any web containers.
    * I have created a jsp that calls these classes and can run this within the embedded server of Jdeveloper 9.0.5.2
    However...
    When I deploy the ear file containing this jsp into a 9.0.4 OC4J standalone / or full install and run the same jsp I am getting the following exception :
    500 Internal Server Error
    java.lang.ClassFormatError: com/abc/mypackage/MyApplicationBindingStub (Illegal Field name "array$[B")
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].util.OC4JSecureClassLoader.defineClassEntry(OC4JSecureClassLoader.java:172)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].naming.ContextClassLoader.defineClass(ContextClassLoader.java:1154)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].naming.ContextClassLoader.findClass(ContextClassLoader.java:390)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].naming.ContextClassLoader.loadClass(ContextClassLoader.java:138)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
         at com.abc.mypackage.MyApplication_ServiceLocator.getMyApplicationPort(MyApplication_ServiceLocator.java:55)
         at com.abc.mypackage.MyApplication_ServiceLocator.getMyApplicationPort(MyApplication_ServiceLocator.java:50)
         at _Headers._jspService(_Headers.java:81)
         [SRC:/Headers.jsp:40]
         at com.orionserver[com Application Server Containers for J2EE 10g (9.0.4.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at com.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
         at com.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at com.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[com Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:536)
    Can anybody let me know what I need to do. Is there anyway that I can get this Apache client code (which uses jax-rpc) working within OC4J 9.0.4. I know the limitations of 9.0.4 and Jax-rpc - but I am wondering if anybody has a nice note to work around it.
    Any help or comments would be greatly appreciated.

    Richard, the error message you see below indicates that the JVM can not recognize your class file.
    java.lang.ClassFormatError: com/abc/mypackage/MyApplicationBindingStub (Illegal Field name "array$[B")
    Are you using different java version to run wsdljava and OC4J? Can you try using the same version of java for both of them?

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

  • What is the difference between RMI and JAX-RPC?

    Dear All
    First of all my understanding of RMI and JAX-RPC:
    RMI is JAVA only version of RPC. It can't talk to any other language.
    JAX-RPC is a part of JWSDP and if you implement your client and server with JAX-RPC, client written in any language can talk with JAX-RPC implementation.
    What else makes them different and am I right with my understanding?
    Finally, I would like to develop clients which will have a java class, say httpserver.java, which will act like a http server, listens to a http port. Now, Two such client will run in two different PC and I want to call a module from one client to another which should be accessible via my httpserver.java. For that which should be my choice RMI or JAX-RPC? Can I achive it with http get-post method, as I am expecting to read some value of variables from one client to the another.
    Say class A has variable a, aa, aaa and clas B has variable b, bb, bbb. Now I want to read the value of b, bb, bbb from class A. How do I do that when class B is listening to a http port with my httpserver.java class.
    Lastly, say B is listening to a http port and I want to send a file to B from A. How can I do that? Remember, B didn�t ask for that. How can A send a file to B when B is listening to a http port with my httpserver.java.
    With regards
    Mohammed Jubaer Arif
    Mobile: +61-0411215302
    Personal Web: http://www.geocities.com/jubairarifctg/
    Org. Web.: http://www.geocities.com/halimschamber/

    simply put, RMI allows you to (semi) transparently treat remote objects as if they were local, and your distributed application can be written (more or less) like a "normal" java app. Sockets just give you a "raw" connection to work with, and you get to build up your application from that.
    I hope that helped
    Lee

  • JAX-RPC vs OC4J J2Ee web service

    Hi,
    Currently we use Oracle10G 10.0.3 developer preview edition. we deployed same web service on both JAX-RPC platfrom and OC4J J2EE web service platfrom (RPC encoding style). We found that old platform seems to perform better than JAx-RPC platfrom with regard to serialization and de-serialzation. We also did the test on Doc/literal style in JAX-RPC platfrom and its performance is not as good as the one deployed on old platform. We understand JAX-RPC is new implementation and Oracle10.0.3 is under developer preview edition and so it may not be optimized. We have following questions
    1. Is this a known issue in JAX-RPC platform?
    2. Is there anyway to optimize JAX-RPC web service? Like using different XMl parser (instead of Oracle XML parser)
    3. When is the final release of 10.0.3 expected?
    4. Will Oracle be supporting old web service platfrom (OC4J J2EE web service platform)? If so how long?
    Thanks and regards
    __Hari

    Hi,
    Currently we use Oracle10G 10.0.3 developer preview edition. we deployed same web service on both JAX-RPC platfrom and OC4J J2EE web service platfrom (RPC encoding style). We found that old platform seems to perform better than JAx-RPC platfrom with regard to serialization and de-serialzation. We also did the test on Doc/literal style in JAX-RPC platfrom and its performance is not as good as the one deployed on old platform. We understand JAX-RPC is new implementation and Oracle10.0.3 is under developer preview edition and so it may not be optimized. We have following questions
    1. Is this a known issue in JAX-RPC platform?
    2. Is there anyway to optimize JAX-RPC web service? Like using different XMl parser (instead of Oracle XML parser)
    3. When is the final release of 10.0.3 expected?
    4. Will Oracle be supporting old web service platfrom (OC4J J2EE web service platform)? If so how long?
    Thanks and regards
    __Hari

  • Jax-RPC Client side: How to use multiple X509 client certs ?

    hi, (excuse me for my english)
    i'm looking for an answer to this question:
    I'm using the JAX-RPC libraries (JWSDP 2.0) for a web services client application in my app server (tomcat 4 under 1.4 Sun JVM) with HTTPS connection. All works fine when i'm using system.Setproperties for keystore and trustore.
    Buk now, I want to use different client SSL keys for the same app to consume the web service (one SSL client key for a group of users).
    Is it possible ?
    i've tried using custom SSLSocketFactory and custom KeyManager but it won't works: when the SSL connection is well established once, i can connect to the app with an invalide client cert ! (it seems SSL connection is in cache and i dont't know how to disable this cache).
    I have read some threads on this problem without answers ! (http://forum.java.sun.com/thread.jspa?forumID=331&threadID=333010 and http://forum.java.sun.com/thread.jspa?forumID=331&threadID=600372)
    Thanks
    Edited by: Buck007 on May 26, 2008 9:14 AM

    I have the same problem. If you find the solution please post it here :)
    thanks

  • XML Parser Error while creating Web service Client using JAX RPC

    hello evryone,
    Im facing XML Parser Error while creating web service client using JAX RPC. Im using Net Beans IDE for development purpose. I have wrote configuration file for client. Now i want to create Client stub. However i dont know how to do this in Net Beans. So i tried to do it from Command promt using command :
    wscompile -gen:client -d build -classpath build config-wsdl.xml
    here im getting Error:
    error parsing configuration file: XML parsing error: com.sun.xml.rpc.sp.ParseException:10: XML declaration may only begin entities
    Please help me out.
    Many thanks in advance,
    Kacee

    Can i use the client generated using jdeveloper 11g to import into the oracle forms 10g, i.e., form builder 10g. Currently this is the version we have in our office.

  • Using JAX-RPC handlers to proxy web service traffic

    Hi,
    I want to use JAX-RPC handlers to proxy web service traffic. In some instances the handler should modifiy / verify the message before forwarding the request to the remote web service end-point. Hence, the handler should forward the call by invoking the remote web service. In some cases the result from invoking the remove service should be post-processed by another proxy handler. To ensure that the result from invoking the remote service is available for post-processing I assume that the handler invoking the remote service must add the response message to the message context ( e g setProperty method) in the handler. Is this correctly understood?
    I would like to understand that this is a technically feasible and reasonable approach of using JAX-RPC. I'd really appreciate some feedback here.
    Many thanks,
    Tom

    Hi Eric,
    Thanks for your response. we are trying to access WSRR( manages end point urls for 7 different environments) and generate the end point dynamically at the design time. As we figured out WSRR is not compatible with OSB we are trying to implement these client side (OSB Proxy service) handlers which would get the dynamic endpoint depending on the environment used. I was able to create the handlers for this and set the jar in the classpath but the client service which should be using these handlers have to have these handlers defined in the deployment descriptor(web.xml) which am unable to see with a OSB project.
    Will there be a deployment descriptor(web.xml/webservices.xml) associated with Proxy services on OSB? Or Is there any other way to add custom JAX-RPC Handlers to a proxy service? Or is there any way to connect to WSRR directly?
    Thanks,
    Swetha

  • EJB 3.0 and JAX-RPC 1.1 Not Working Together

    I've came across a strange behavior when building a JAX-RPC 1.1 service in WebLogic 10 on top of a EJB 3.0 bean:
    Business Interface
    @Remote
    @WebService(targetNamespace="http://coronelado.sf.net")
    public interface AuthenticationBO {
      boolean login(String email, String password) throws AuthenticationBOException;
    Bean
    @Stateless(name="AuthenticationBO")
    @TransactionManagement(BEAN)
    @WLHttpTransport(contextPath="coronelado-service", serviceUri="AuthenticationBOService")
    @WebService(endpointInterface="net.sf.coronelado.business.AuthenticationBO")
    public class AuthenticationBOBean implements AuthenticationBO {
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0">
      <enterprise-beans>
        <session>
          <ejb-name>AuthenticationBO</ejb-name>
          <service-endpoint>net.sf.coronelado.business.AuthenticationBO</service-endpoint>
        </session>
      </enterprise-beans>
    </ejb-jar>After I deploy the bean, two web services, not one, are listed in the console: AuthenticationBOService and AuthenticationBOBeanService (a duplicate), and the following error message is printed:
    [JAM] Warning: failed to resolve class net.sf.coronelado.business.AuthenticationBOBeanAm I missing something here?

    http://fernandoribeiro.eti.br/2007/06/27/bug-in-weblogic-10-web-services/

Maybe you are looking for

  • How to Add a new Selection Field in COPA Report

    Hi Gurus I'm new on SAP COPA reporting and I don't know how to solve this problem. I need add a new Selection-screen field (char1), not connected with any characteristic. This is necessary becuase if the user flag this field, when teh report is runni

  • How to determine the connection time?

    Hello! We have big troubles with our ConnectionPool. We have adapted most parts from the Book "Professional Java Server Programming" (Wrox Press). However, the connections are invalid (I/O Exceptions like "End of TNS Data Channel" or "Broken Pipe") a

  • Ovi sync problem on 5800

    Ok I'm trying to synchronize with Ovi for the first time, and I'm getting this error message. I have received the settings SMS, and saved it.  Any ideas???

  • "seeing" a windows iPod on an iMac

    My 5th gen iPod is formatted for windows. My understanding is that I should also be able to connect it to my iMac as well. When I connect via USB to my iMac not only does the iPod not appear in iTunes, no icon appears on my desktop either. How can I

  • Partial page view on web page

    Using an iMac Blueberry, G3, OS 9.1. On some web pages I cannot see the full page. The left side of the page is truncated and the scroll bar is bottomed out on the left side. I was told that some web producers are catering to the flat screen display