Use JAX-RPC or SAAJ service?

As far as I know we can set up web service with JAX-PRC or SAAJ.
It seems that SAAJ is simpler than JAX-RPC for me, because it don't need to use WSDL.
Is there any difference between them? How to choose between them?
Please help!
Thanks in advance!

Hi,
You should choose SAAJ in the case where the client has absolute knowledge of the SOAP messages that the web service receives and sends, and there is no reason for it to parse a WSDL in order to discover the web service's specification.
You should choose JAX-RPC in the case where the client knows nothing about the web service at runtime, and it needs to dynamically construct the call to it.
As far as complexity is concerned, i believe that JAX-RPC is much simpler than SAAJ, because it gives the programmer a simple API that wraps everything concerning the SOAP messages and their complexity. The programmer does not have to manually construct or parse the SOAP message. Instead, he just makes a rpc with the appropriate parameter values.
I hope i helped
Regards

Similar Messages

  • 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

  • Attachments using JAX - RPC

    I am using JAX - RPC for attachemnts using jwsdp-1.2. I am using DataHandler for attachments. I have been able to deploy the web service but when I try to connect to web service using client, I get following error. ny help will be greatly appreciated
    serialization error: java.lang.NullPointerException
    at com.sun.xml.rpc.encoding.AttachmentSerializer.serializeAsAttachment(AttachmentSerializer.java:120)
    at com.sun.xml.rpc.encoding.AttachmentSerializer.serialize(AttachmentSerializer.java:74)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.serialize(ReferenceableSerializerImpl.java:71)
    at attachments.client.AttachmentExampleAPI_sendDocument_RequestStruct_SOAPSerializer.doSerializeInstance(AttachmentExampleAPI_sendDocument_RequestStruct_SOAPSerializer.java:88)
    and more lines of error.
    Below is my client and webservice code :
    CLIENT
    FileDataSource fs = new FileDataSource("abc.txt");
    DataHandler dhSource = new DataHandler(fs);
    AttachmentExampleAPI up = new TestService_Impl().getAttachmentExampleAPIPort();
    up.sendDocument("properties", dhSource));
    WEBSERVICE CODE
    public void sendDocument(String name, DataHandler dh) throws java.rmi.RemoteException {
    DataSource ds = rdh.getDataSource();
    dh.writeTo(new FileOutputStream("abc.txt" ));
    Any help regarding the error will be great.

    Not sure exactly what the problem is but i have sent attachements successfully from the server to client using:
    SERVER method:
    public javax.activation.DataHandler getAudioMIMEAttachment(java.lang.String in0, java.lang.String in1) throws java.rmi.RemoteException {
    String inputFilename = null;
    String inputFormat = null;               
    inputFilename = "C:\\wav\\" + in0 + "." + in1;
    System.out.println("You have requested the following file: " + inputFilename);
    //create a new DataHandler object for the file contents
    DataHandler dh = new DataHandler(new FileDataSource(new File(inputFilename)));
    return dh;                    
    Chunks from client code:
    StreamingMultimediaSoapBindingStub stub = null;
    try
    stub = (StreamingMultimediaSoapBindingStub)(new StreamingDemoServiceLocator().getPort(StreamingMultimediaSoapBindingStub.class));
    catch (javax.xml.rpc.ServiceException jre) {
    System.err.println("Could not get client stub.");
    jre.printStackTrace();
    //call for binary DataHandler attachment
    if(stub != null)
    try
    dh = stub.getAudioMIMEAttachment("long", "wav");                                   
    catch (java.rmi.RemoteException re) {
    System.err.println("Error whilst calling method on client stub.");
    re.printStackTrace();                                   
    Well, hope it helps
    regards
    Paul

  • Sending attachments using JAX-RPC

    Hi,
    can anyone give me an example for sending an attachment using JAX-RPC. I want to create a webservice that will expect an attachment. Also once the client snds the attachment how can i access it in the service?
    any help will be apreciated. Thanks.

    Did anyone test this?
    I am using a DataHandler in the server
    public String sendDocument(String name, DataHandler dh)
    DataHandler rdh = (DataHandler) dh;
         if (dh == null)
              return message+ "Received null attachment";
         DataSource ds = rdh.getDataSource();
         try
              dh.writeTo(new FileOutputStream("D:\\temp\\" + name));
         catch(java.io.IOException e)
         return message + " Processed attachment " + ":Stream Error: " + e.getMessage();
         return message + " Processed attachment" ;
    In the client I use Proxy which works fine:
    FileDataSource fs = new FileDataSource(fileName);
    if (fs == null)
         System.out.println("Invalid File Source");
    DataHandler dhSource = new DataHandler(fs);
         System.out.println(up.sendDocument(dhSource.getName(), dhSource));
    THIS WORKS FINE. I see the attachment is saved properly.
    When I try using DII:
    call.setOperationName(new QName(BODY_NAMESPACE_VALUE,"sendDocument"));
    QName QNAME_TYPE_DH = new QName(NS_XSD, "DataHandler");
    call.addParameter("String_1", QNAME_TYPE_STRING,ParameterMode.IN);
    call.addParameter("DataHandler_1", QNAME_TYPE_DH,ParameterMode.IN);
    FileDataSource fs = new FileDataSource(fileName);
    if (fs == null)
         System.out.println("Invalid File Source");
    else
              DataHandler dhSource = new DataHandler(fs);
              String dhName = dhSource.getName();
         Object[] params = new Object[] {dhName,dhSource};
         String result = (String)call.invoke(params);
         System.out.println(result);
    THIS DOES NOT WORK. I get an error.
    [java] serialization error: no serializer is registered for (class javax.activation.DataHandler, {http://www.w3.org/2001/XMLSchema}DataHandler)
    ANY POINTERS??????
    I even tried this:
    QName qnameAttachment = new QName(NS_XSD, "DataHandler");
    TypeMappingRegistry tr = service.getTypeMappingRegistry();
    TypeMapping tm = tr.createTypeMapping();
    tm.register(DataHandler.class,
    qnameAttachment,
    new JAFDataHandlerSerializerFactory(),
    new JAFDataHandlerDeserializerFactory());
         tr.registerDefault(tm);
    NO SUCCESS!
    Appreciate any responses....

  • How to bind soap header using jax-rpc

    To Whom It May Concern:
    I am using Rad7, Ibm Websphere 6.1, on Windows XP.
    I created an SoapHeader first using a string and bind it using jax-ws.
    It works for jax-ws but unfortunately, my work services uses jax-rpc.
    Does anybody know how to bind the soap header using jax-rpc.
    Any help or hint would be greatly appreciated it.
    Here is my code:
    import org.apache.cxf.headers.Header;
    import org.apache.cxf.headers.Header.Direction;
    import org.apache.cxf.helpers.DOMUtils;
    import org.apache.cxf.binding.soap.SoapHeader;
    import javax.xml.namespace.QName;
    import java.io.StringReader;
    import java.util.List;
    import java.util.ArrayList;
    import javax.xml.ws.BindingProvider;
                   @Test
         public void testService() throws Exception {     
                   try
                        URL wsdlURL = new URL("http://localhost:9087/abc/services/ServiceABCService");
                        ServiceRequestServiceService service = new ServiceRequestServiceServiceLocator();
                        ServiceRequestService port = service.getServiceRequestService(wsdlURL);
                   //How to Add Soap Header using jax-ws
              String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?><ABCHdrRq "
              + "xmlns=\"http://xmlns.ABCgc.net/ABC/2002/header/\" "
              + ">"
              + "<version>1.0</version><srcInfo><chType>abc</chType><chInst>0124</chInst>" +
                        "<appName>sSAR</appName><hostName>DW70210521</hostName><userId>fxue</userId>" +
                        "</srcInfo><startTimeStamp>2010-06-04T13:44:45.132</startTimeStamp><clientDt>2010-06-04T13:44:53.242</clientDt><serviceInfo><serviceName>ServiceRequestService</serviceName>" +
                        "<serviceFunc>addServiceRequest</serviceFunc></serviceInfo>" +
                   "<prevTransInfo><prevRqUID>BORS2010-06-04T13:41:10.2067f9368d1-8c5c</prevRqUID>" +     
                   "<prevRespTimestamp>2010-06-04T13:41:10.871</prevRespTimestamp>"+
                   "<prevRespEndTimestamp>2010-06-04T13:41:10.902</prevRespEndTimestamp>+</prevTransInfo>"+
                   "</ABCHdrRq>";
              SoapHeader dummyHeader1 = new SoapHeader(new QName("uri:http://xmlns.ABCgc.net/ABC/2002/header/", "ABCHdrRq"),
              DOMUtils.readXml(new StringReader(xml)).getDocumentElement());
              dummyHeader1.setDirection(Direction.DIRECTION_OUT);
              List<Header> headers = new ArrayList<Header>();
                   headers.add(dummyHeader1);
                   ((BindingProvider)port).getRequestContext().put(Header.HEADER_LIST, headers);
                   //How to Add Soap Header to the request using jax-ws
                   catch(Exception e)
                        System.out.println("Exception message:"+e.getMessage());
    Yours,
    Frustrated

    Well, how an attachment is processed depends on your application logic...if your application logic requires to processing attachments and verify it before processing the SOAP message, handlers could be better option.
    If you need to process the attachment while processing the SOAP message, you can do it in the service implementation class.
    In both the cases you need to get access to SOAPMessage object and from there get the attachments with getAttachments method.

  • JAX-RPC Java Web Services

    In the tutorial
    Access J2EE 1.4 JAX-RPC Java Web Services from Web Clients
    http://www.oracle.com/technology/products/jdev/101/howtos/jaxrpc/java14_ws_web_clients.html#creating_web_service
    A MyWebService1SEI.java interface is also required to be added to generate a JAX-RPC Web service.

    The MyWebService1SEI.java interface does not get generated as indicated in the tutorial.
    If the Web service is generated with
    File>New>Business Tier>Java Web Service with the
    Autogenerate Service Endpoint Interface checkbox selected,
    the MyWebService1SEI.java interface does not get generated.
    The Autogenerate Service Endpoint Interface feature does not autogenerate java interface.

  • ClassCastException in my WS over JMS using JAX-RPC in WLS 10.3...

    Hi,
    I am developing a WS over JMS using JAX-RPC in WLS 10.3 (I tried both WLS 10.3.0 and 10.3.1). And when WLS is trying to marshal the response, it throws "ClassCastException":
    ava.lang.ClassCastException: org.tmforum.mtop.nrf.xsd.com.v1.EquipmentHolderEnumType cannot be cast to java.lang.String
    at com.bea.staxb.runtime.internal.StringTypeConverter.print(StringTypeConverter.java:45)
    at com.bea.staxb.runtime.internal.SimpleContentBeanMarshaller.print(SimpleContentBeanMarshaller.java:52)
    at com.bea.staxb.runtime.internal.RuntimeBindingProperty.getLexical(RuntimeBindingProperty.java:154)
    at com.bea.staxb.runtime.internal.PushMarshalResult.writeCharData(PushMarshalResult.java:639)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visit(PushMarshalResult.java:413)
    at com.bea.staxb.runtime.internal.SimpleContentRuntimeBindingType.accept(SimpleContentRuntimeBindingType.java:46)
    at com.bea.staxb.runtime.internal.PushMarshalResult.writeContents(PushMarshalResult.java:195)
    at com.bea.staxb.runtime.internal.PushMarshalResult.marshalType(PushMarshalResult.java:153)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visitProp(PushMarshalResult.java:631)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visit(PushMarshalResult.java:403)
    at com.bea.staxb.runtime.internal.ByNameRuntimeBindingType.accept(ByNameRuntimeBindingType.java:89)
    at com.bea.staxb.runtime.internal.PushMarshalResult.writeContents(PushMarshalResult.java:195)
    at com.bea.staxb.runtime.internal.PushMarshalResult.marshalType(PushMarshalResult.java:153)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visitProp(PushMarshalResult.java:631)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visit(PushMarshalResult.java:403)
    at com.bea.staxb.runtime.internal.ByNameRuntimeBindingType.accept(ByNameRuntimeBindingType.java:89)
    at com.bea.staxb.runtime.internal.PushMarshalResult.writeContents(PushMarshalResult.java:195)
    at com.bea.staxb.runtime.internal.PushMarshalResult.marshalType(PushMarshalResult.java:153)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visitProp(PushMarshalResult.java:631)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visit(PushMarshalResult.java:400)
    at com.bea.staxb.runtime.internal.ByNameRuntimeBindingType.accept(ByNameRuntimeBindingType.java:89)
    at com.bea.staxb.runtime.internal.PushMarshalResult.writeContents(PushMarshalResult.java:195)
    at com.bea.staxb.runtime.internal.PushMarshalResult.marshalType(PushMarshalResult.java:153)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visitProp(PushMarshalResult.java:631)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visit(PushMarshalResult.java:403)
    at com.bea.staxb.runtime.internal.ByNameRuntimeBindingType.accept(ByNameRuntimeBindingType.java:89)
    at com.bea.staxb.runtime.internal.PushMarshalResult.writeContents(PushMarshalResult.java:195)
    at com.bea.staxb.runtime.internal.PushMarshalResult.marshalType(PushMarshalResult.java:153)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visitProp(PushMarshalResult.java:631)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visit(PushMarshalResult.java:400)
    at com.bea.staxb.runtime.internal.ByNameRuntimeBindingType.accept(ByNameRuntimeBindingType.java:89)
    at com.bea.staxb.runtime.internal.PushMarshalResult.writeContents(PushMarshalResult.java:195)
    at com.bea.staxb.runtime.internal.PushMarshalResult.marshalType(PushMarshalResult.java:153)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visitProp(PushMarshalResult.java:631)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visit(PushMarshalResult.java:403)
    at com.bea.staxb.runtime.internal.ByNameRuntimeBindingType.accept(ByNameRuntimeBindingType.java:89)
    at com.bea.staxb.runtime.internal.PushMarshalResult.writeContents(PushMarshalResult.java:195)
    at com.bea.staxb.runtime.internal.PushMarshalResult.marshalType(PushMarshalResult.java:153)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visitProp(PushMarshalResult.java:631)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visit(PushMarshalResult.java:400)
    at com.bea.staxb.runtime.internal.ByNameRuntimeBindingType.accept(ByNameRuntimeBindingType.java:89)
    at com.bea.staxb.runtime.internal.PushMarshalResult.writeContents(PushMarshalResult.java:195)
    at com.bea.staxb.runtime.internal.PushMarshalResult.marshalType(PushMarshalResult.java:153)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visitProp(PushMarshalResult.java:631)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visit(PushMarshalResult.java:403)
    at com.bea.staxb.runtime.internal.ByNameRuntimeBindingType.accept(ByNameRuntimeBindingType.java:89)
    at com.bea.staxb.runtime.internal.PushMarshalResult.writeContents(PushMarshalResult.java:195)
    at com.bea.staxb.runtime.internal.PushMarshalResult.marshalType(PushMarshalResult.java:153)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visitProp(PushMarshalResult.java:631)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visit(PushMarshalResult.java:403)
    at com.bea.staxb.runtime.internal.ByNameRuntimeBindingType.accept(ByNameRuntimeBindingType.java:89)
    at com.bea.staxb.runtime.internal.PushMarshalResult.writeContents(PushMarshalResult.java:195)
    at com.bea.staxb.runtime.internal.PushMarshalResult.marshalTopType(PushMarshalResult.java:96)
    at com.bea.staxb.runtime.internal.MarshallerImpl.marshalBindingType(MarshallerImpl.java:302)
    at com.bea.staxb.runtime.internal.MarshallerImpl.marshalElement(MarshallerImpl.java:383)
    at weblogic.wsee.bind.runtime.internal.LiteralSerializerContext.marshalElement(LiteralSerializerContext.java:82)
    at weblogic.wsee.bind.runtime.internal.BaseSerializerContext.internalSerializeElement(BaseSerializerContext.java:197)
    at weblogic.wsee.bind.runtime.internal.BaseSerializerContext.serializeElement(BaseSerializerContext.java:128)
    at weblogic.wsee.codec.soap11.SoapEncoder.encodePart(SoapEncoder.java:322)
    at weblogic.wsee.codec.soap11.SoapEncoder.encodeReturn(SoapEncoder.java:228)
    at weblogic.wsee.codec.soap11.SoapEncoder.encodeParts(SoapEncoder.java:215)
    at weblogic.wsee.codec.soap11.SoapEncoder.encode(SoapEncoder.java:134)
    at weblogic.wsee.codec.soap11.SoapCodec.encode(SoapCodec.java:134)
    at weblogic.wsee.ws.dispatch.server.CodecHandler.encode(CodecHandler.java:104)
    at weblogic.wsee.ws.dispatch.server.CodecHandler.handleResponse(CodecHandler.java:51)
    at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:287)
    at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:271)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.callHandleResponse(ServerDispatcher.java:341)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:189)
    at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
    at weblogic.wsee.server.jms.JmsWebservicesMessageDispatcher.dispatchMessage(JmsWebservicesMessageDispatcher.java:175)
    at weblogic.wsee.server.jms.JmsQueueListener.processMessage(JmsQueueListener.java:397)
    at weblogic.wsee.server.jms.JmsQueueListener.onMessage(JmsQueueListener.java:392)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4585)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:4271)
    at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3747)
    at weblogic.jms.client.JMSSession.access$000(JMSSession.java:114)
    at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5096)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    The "EquipmentHolderEnumType" is generated JAXB object (obviously it is not a String) from WSDL using WLS wsld generation. And here is how that Enum is defined in XSD:
    <xsd:simpleType name="EquipmentHolderEnumType">
    <xsd:annotation>
    <xsd:documentation>
    <p>Equipment holder type</p>
    </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="MINOR_EXT"/>
    <xsd:enumeration value="rack"/>
    <xsd:enumeration value="shelf"/>
    <xsd:enumeration value="sub_shelf"/>
    <xsd:enumeration value="slot"/>
    <xsd:enumeration value="sub_slot"/>
    <xsd:enumeration value="remote_unit"/>
    <xsd:enumeration value="remote_slots"/>
    </xsd:restriction>
    </xsd:simpleType>
    My question is why WLS is trying to cast the EnumType to String when marshalling it? How can I fix this exception?
    Also, second question: my WS will take some time to get the response ready (1+ minute). I was using WLS console test client to test my WS. And the test client always got time out:
    java.io.IOException: Request timed out
    at weblogic.wsee.connection.transport.jms.JmsTransport.receive(JmsTransport.java:356)
    at weblogic.testclient.WebServiceOperation.invokeJms(WebServiceOperation.java:463)
    at weblogic.testclient.WebServiceOperation.addWeblogicHeadersAndInvoke(WebServiceOperation.java:382)
    at weblogic.testclient.WebServiceOperation.invokeComplex(WebServiceOperation.java:305)
    at weblogic.testclient.WebServiceOperation.invoke(WebServiceOperation.java:626)
    How can I configure the WLS console test client so that I can increase teh timeout setting for the client?
    Thank you very much!
    Jian

    Hi, pls how did you solve your problem exatly? Because I have similar problem without solution.
    I have WSDL contract like:
    <xs:element name="duration">
    <xs:complexType>
    <xs:simpleContent>
    <xs:extension base="durationType">
    <xs:attribute name="days" type="xs:int" use="optional"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    </xs:element>
    <xs:simpleType name="durationType">
    <xs:restriction base="xs:string">
    <xs:enumeration value="PERIODIC"/>
    <xs:enumeration value="PERPETUAL"/>
    <xs:enumeration value="CREDIT_DAYS"/>
    </xs:restriction>
    </xs:simpleType>
    And client site generated by WLS ant task "generate-from-wsdl" with "JAXRPC" option and when I use calling of this client and exeption was appeared:
    FaultString [com.company.DurationType] FaultActor [null] Detail [<detail><java:string>java.lang.ClassCastException: com.company.DurationType</java:string></detail>];
    Note: all other messages are correct.
    thx

  • JAX-RPC: restrictions on service exception field types?

    When I define a service-specific exception type that has String fields only, it works fine. But if the exception class has an int field, xrpcc complains. It also fails if I change the field to Integer.
    Since JAX-RPC supports both int and Integer as operation argument and return types, I expected exceptions to be able to use these types as well. Are there restrictions on exception fields types?
    Here is the class with the int fields and the xrpcc errors it generates:
    public class InvalidRecordingIdException extends Exception {
         private int id;
         public InvalidRecordingIdException() {
              super();
         public InvalidRecordingIdException(int id) {
              this.id = id;
         public int getId() {
              return id;
    xrpcc-server:
         [echo] Running xrpcc for the server:
         [exec] rain\RainOrder_orderRecording_Fault_SOAPSerializer.java:69:
           Method serialize(int, javax.xml.namespace.QName,
           null, com.sun.xml.rpc.streaming.XMLWriter,
           com.sun.xml.rpc.encoding.SOAPSerializationContext)
           not found in interface com.sun.xml.rpc.encoding.CombinedSerializer.
         [exec] myns2__int__int_Int_Serializer_Serializer.serialize(((
           rain.InvalidRecordingIdException)detail).getId(),
           ns1_InvalidRecordingIdException_QNAME, null, writer, context);
         [exec]                                                                ^
         [exec] rain\RainOrder_orderRecording_Fault_SOAPBuilder.java:32:
         Invalid cast from java.lang.Object to int.
         [exec] instance.setDetail(new rain.InvalidRecordingIdException((int)detail));
         [exec]                                                                         ^
         [exec] 2 errors
         ...Here's the error for the Integer field in an exception:
    xrpcc-server:
         [echo] Running xrpcc for the server:
         [exec] error: generator error: generator error: java.lang.ClassCastException:
         com.sun.xml.rpc.processor.model.soap.SOAPSimpleType
         [exec] 1 error

    You have run into a bug that will be fixed in the next release of the JWSDP dealing with Exceptions with only one member that is a primitive type. However, changing that member to a boxed (Integer) representation should work, what version of JAXRPC are you using? As a work around you should be able to eliminate the problem by adding one more member to the Exception using a different type.
    Thank you for your interest in JAXRPC

  • How to go from a .wsdl to .war file to deploy on Tomcat ? (using jax-rpc?)

    I have created a .wsdl file using XMLSpy and I want to deploy the service on tomcat. I have been unsuccessful in using the "wscompile -import" option.
    Does anyone know how to cross-compile a .wsdl file into a .war so it can be deployed on tomcat? If there is another way other than a .war file, that is fine too...
    Currently, I am using WSDL2Java tool by Apache Axis. I take my .wsdl file use the WSDL2Java tool to get the java files, Then I run the java files through wscompile, wsdeploy etc.... the problem with this approach is that the .wsdl file produced by the wsdeploy does not support the document encoding (everything switched to rpc) and no literal either (I think).
    If anyone has figured out a better way of going from .wsdl to java or .war or tomcat.. please let me know.. I'm running out of options...
    Thank you !

    The link worked correctly for me. You can also refer to a recently published whitepaper at
    https://jax-rpc.dev.java.net/whitepaper/1.1/index-part1.html. Scenario 5 in second part (https://jax-rpc.dev.java.net/whitepaper/1.1/index-part2.html#Scenario5) of the whitepaper describes how to achieve your scenario.
    Post your JAX-RPC related questions to [email protected] for a quicker resolution.
    Send an email to [email protected] to subscribe to the alias.
    Send an mail to [email protected] for a complete list of help commands.
    Thanks for your interest in JAX-RPC.
    Regards,
    -Arun

  • Problems with types using JAX-RPC

    Hi,
    I have to convert an RMI application into a JAX-RPC application. I thought it was easy but I have some problems with the parameter types and the return types of the remote methods.
    For example, how can I pass a java Object as a parameter or as a return type, supposing this object could be anything during runtime? Is there any way to do it because the only types one could use with JAX-RPC are not enough for my application.
    Regards,
    Vincent

    Thanks, that was my mistake.
    Instead of using wscompile, you must generate the stub classes with the WTK. Then, you set a reference to the j2me-ws.jar (JSR-172). No additional libraries from the Web Service Development Kit are required.

  • Publish a JAX-RPC Java Web Service - HELP

    Hi,
    I try to generate a JAX-RPC web services as described in the tutorial : http://www.oracle.com/technology/tech/webservices/htdocs/series/jaxrpc1/index.html. but when generating the web services I have an exception : an unexpected error was encountered. Generation aborted. and when I click details I have the following message :
    java.io.FileNotFoundException: C:\jdev10g\jdev\mywork\WS2-TestOracle\Project1\src\__temp_assembler\public_html\WEB-INF\wsdl\MyWebService3.wsdl (Le chemin d'accès spécifié est introuvable)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:106)
         at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:66)
         at oracle.ide.net.FileURLFileSystemHelper.openInputStream(FileURLFileSystemHelper.java:481)
         at oracle.ide.net.URLFileSystemHelperDecorator.openInputStream(URLFileSystemHelperDecorator.java:242)
         at oracle.ide.net.URLFileSystem.openInputStream(URLFileSystem.java:1028)
         at oracle.jdevimpl.webservices.generator.JAXRPCGenerator.populateWSDLWithEndpoint(JAXRPCGenerator.java:2153)
         at oracle.jdevimpl.webservices.generator.JAXRPCGenerator.generateServiceImpl(JAXRPCGenerator.java:896)
         at oracle.jdevimpl.webservices.generator.JAXRPCGenerator.generateService(JAXRPCGenerator.java:241)
         at oracle.jdeveloper.webservices.JAXRPCSvcModel.saveEdit(JAXRPCSvcModel.java:1613)
         at oracle.jdevimpl.webservices.wizard.WebServicePublishWizard.runWizard(WebServicePublishWizard.java:504)
         at oracle.jdevimpl.webservices.wizard.WebServicePublish.invoke(WebServicePublish.java:95)
         at oracle.ide.WizardManager.invokeWizard(WizardManager.java:484)
         at oracle.ide.WizardManager$1.run(WizardManager.java:538)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    Can any one help,
    Thanks,

    The MyWebService1SEI.java interface does not get generated as indicated in the tutorial.
    If the Web service is generated with
    File>New>Business Tier>Java Web Service with the
    Autogenerate Service Endpoint Interface checkbox selected,
    the MyWebService1SEI.java interface does not get generated.
    The Autogenerate Service Endpoint Interface feature does not autogenerate java interface.

  • Unable to call the service using JAX-RPC

    Hi,
    I created a web service in Weblogic6.1 using the ant wsgen utility.
    When i tried to invoke the service using my client program, i get the following error.
    Exception in thread "main" modeler error: model error: invalid entity name: "string" (in namespace: "http://www.w3.org/1999/XMLSchema"
    at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:137)
    at com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:77)
    at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.getModel(ServiceInfoBuilder.java:96)
    at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.buildServiceInfo(ServiceInfoBuilder.java:59)
    at com.sun.xml.rpc.client.dii.ConfiguredService.<init>(ConfiguredService.java:44)
    at com.sun.xml.rpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:32)
    at JAXRPCClient.main(JAXRPCClient.java:20)
    CAUSE:
    model error: invalid entity name: "string" (in namespace: "http://www.w3.org/1999/XMLSchema")
    at com.sun.xml.rpc.processor.schema.InternalSchemaBuilder.buildTypeDefinition(InternalSchemaBuilder.java:61)
    at com.sun.xml.rpc.processor.schema.InternalSchema.findTypeDefinition(InternalSchema.java:45)
    at com.sun.xml.rpc.processor.modeler.wsdl.SchemaAnalyzer.schemaTypeToSOAPType(SchemaAnalyzer.java:66)
    at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.processSOAPOperationRPCStyle(WSDLModeler.java:592)
    at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.processSOAPOperation(WSDLModeler.java:423)
    at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.processPort(WSDLModeler.java:344)
    at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.processService(WSDLModeler.java:231)
    at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:196)
    at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:103)
    at com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:77)
    at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.getModel(ServiceInfoBuilder.java:96)
    at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.buildServiceInfo(ServiceInfoBuilder.java:59)
    at com.sun.xml.rpc.client.dii.ConfiguredService.<init>(ConfiguredService.java:44)
    at com.sun.xml.rpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:32)
    at JAXRPCClient.main(JAXRPCClient.java:20)
    CAUSE:
    invalid entity name: "string" (in namespace: "http://www.w3.org/1999/XMLSchema")
    at com.sun.xml.rpc.wsdl.framework.AbstractDocument.find(AbstractDocument.java:110)
    at com.sun.xml.rpc.processor.schema.InternalSchemaBuilder.buildTypeDefinition(InternalSchemaBuilder.java:54)
    at com.sun.xml.rpc.processor.schema.InternalSchema.findTypeDefinition(InternalSchema.java:45)
    at com.sun.xml.rpc.processor.modeler.wsdl.SchemaAnalyzer.schemaTypeToSOAPType(SchemaAnalyzer.java:66)
    at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.processSOAPOperationRPCStyle(WSDLModeler.java:592)
    at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.processSOAPOperation(WSDLModeler.java:423)
    at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.processPort(WSDLModeler.java:344)
    at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.processService(WSDLModeler.java:231)
    at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:196)
    at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:103)
    at com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:77)
    at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.getModel(ServiceInfoBuilder.java:96)
    at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.buildServiceInfo(ServiceInfoBuilder.java:59)
    at com.sun.xml.rpc.client.dii.ConfiguredService.<init>(ConfiguredService.java:44)
    at com.sun.xml.rpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:32)
    at JAXRPCClient.main(JAXRPCClient.java:20)
    My wsdl file is
    - <definitions targetNamespace="java:com.mountain.molehill.ejb.controller" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:tns="java:com.mountain.molehill.ejb.controller" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    - <types>
    <schema targetNamespace="java:com.mountain.molehill.ejb.controller" xmlns="http://www.w3.org/1999/XMLSchema" />
    </types>
    - <message name="getPointBalanceRequest">
    <part name="arg0" type="xsd:string" />
    </message>
    - <message name="getPointBalanceResponse">
    <part name="return" type="xsd:string" />
    </message>
    - <portType name="WSManagerPortType">
    - <operation name="getPointBalance">
    <input message="tns:getPointBalanceRequest" />
    <output message="tns:getPointBalanceResponse" />
    </operation>
    </portType>
    - <binding name="WSManagerBinding" type="tns:WSManagerPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    - <operation name="getPointBalance">
    <soap:operation soapAction="urn:getPointBalance" />
    - <input>
    <soap:body use="encoded" namespace="urn:WSManager" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    </input>
    - <output>
    <soap:body use="encoded" namespace="urn:WSManager" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    </output>
    </operation>
    </binding>
    - <service name="WSManager">
    <documentation>todo</documentation>
    - <port name="WSManagerPort" binding="tns:WSManagerBinding">
    <soap:address location="http://blrkec17805:7001/WS/rpc_URI" />
    </port>
    </service>
    </definitions>
    Could anybody help me in resolving this problem?
    Thanks in advance,
    Rajadurai

    Hello,
    edit the wsdl file and change 'http://www.w3.org/1999/XMLSchema' to 'http://www.w3.org/2001/XMLSchema' for both xmlns:xsd and xmlns then try again.
    Andre

  • Invoking a jax-rpc based web service from a jsp

    hello
    i'm trying to invoke a WS from a jsp page, working on tomcat + jwsdp
    the ws i'd created and deployed on the server is named TestCNRPS, it contains the method: int exist(int ..)
    i wrote this jsp page for testing :
    <%@ page contentType="text/html;charset=windows-1252" import="cnrps.*" %>
    <HTML>
    <HEAD>
    <TITLE>Appel service Web</TITLE>
    </HEAD>
    <BODY>
    <%
    int num_cin=45475645;
    TestCNRPSIF_Stub stub = (TestCNRPSIF_Stub)(new TestCNRPSService_Impl().getTestCNRPSIFPort());
    stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,System.getProperty("endpoint"));
    out.println(stub.exist(num_cin));
    %>
    </BODY>
    </HTML>
    but i received this exception:
    java.rmi.RemoteException: Erreur de transport HTTP : java.lang.NullPointerException; nested exception is:
    Erreur de transport HTTP : java.lang.NullPointerException
    cnrps.TestCNRPSIF_Stub.exist(TestCNRPSIF_Stub.java:87)
    org.apache.jsp.invoqueWS_jsp._jspService(invoqueWS_jsp.java:58)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:268)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:258)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:205)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    Has someone an idea ??
    thx
    ps : i tested the WS from a client class and it worked fine

    Hi Paul,
    This sound familiar, but I cannot at the moment locate a reference to
    the issue. I would encourage you to seek the help of our super support
    team [1].
    Regards,
    Bruce
    [1]
    http://support.bea.com
    [email protected]
    Paul Merrigan wrote:
    >
    I'm trying to invoke a secure 8.1 web service from a 6.1 client application and keep getting rejected with the following message:
    Security Violation: User: '<anonymous>' has insufficient permission to access EJB:
    In the 6.1 client, I've established a WebServiceProxy and set the userName and password to the proper values, but I can't seem to get past the security.
    If there something special I need to do on either the 8.1 securing side or on the 6.1 accessing side to make this work?
    Any help would be GREATLY appreciated.

  • Web Service  Stateless Session request using JDeveloepr 11g (JAX-RPC)

    I have been trying to consume web Service by sending Stateless Session request to the system.
    I generated the Java Proxy using JDeveloepr 11g, using JAX-RPC.
    As it is Stateless I need to add following SOAP Header for authentication
    <soap:Header>
    <wsse:Security soap:mustUnderstand="1">
    <wsse:UsernameToken>
    <wsse:Username>[email protected]</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wssusername-
    token-profile-1.0#PasswordText">adminOnDemand</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </soap:Header>
    To do this I tried clientuntcredentialprovider as suggested by most of the post online, but found of little help as the server complained of not be able to find the User Name and Password.
    To add to the mess problem I hit was I was not able to View the SOAP Request or Response sent by JDeveloper hence not helping me in debugging the same
    I have tried it on XML SPY by manually adding SOAP Header to the SOAP request and was able to find the response, but I have not been able to do the same using the JDeveloper 11g IDE.
    I have tried HTTP Analyzer assuming it might help, but unfortunately due to the huge size of WSDL, tool hanged my PC each time I loaded it.
    I know it should be fairly straight forward but just feel like missing something.
    Has anybody has got this thing working ?
    Regards,
    Deepak

    What exactly you mean that since your request is stateless you must send a Username token?
    Also, can you put here the code you used to populate the UNT.
    Finally, if possible, can you zip and email your wsdl, the http analyzer should be able to handle wsdls, even if they are huge.
    Thanks,
    Vishal

Maybe you are looking for

  • Depreciation on Reports does not agree to GL

    We ran various reports but they don't agree to the GL.   Seems like all the reports that give you depreciation by Asset class are using planned depreciation and not posted depreciation.   I pinpointed the problem to some assets that are in the last y

  • Poor image quality on computer

    I recently completed a short film in FCE and burned it to DVD using iDVD (7.0.4) set to Professional Quality. When the DVD is played back on my TV it looks fine. However when I play it on my iMac the image quality is rather poor (very grainy, pixelat

  • Firefox not connecting to website

    On trying to connect to my hosting companies support page I get this error "Firefox has detected that the server is redirecting the request for this address in a way that will never complete." Also on Safari I get a message saying it is redirecting t

  • F-47 - bupla is not  automatically filled in ERP 6.0

    People, when we was using R/3 4.6C, in f-47 transaction, the "Business Place" field was automatically filled. After migrate to ERP 6.0, this field is not filled anymore. Anyone notice this? Is it possible to change this? Thank you!

  • TABLESPACE Issue with DEV_SOAINFRA

    Hi, I am getting the following error while using the function ora:readBinaryFromFile ORA-01691: unable to extend lob segment DEV_SOAINFRA.SYS_LOB0000147944C00002$$ by 8192 in tablespace DEV_SOAINFRA. I know that automatic extending of DEV_SOAINFRA ta