How to Serialize/Deserialize Beans with Web Services using DII client

Dear All;
I had developed a web serivce by Oracle JDeveloper [J2EE 1.4 (JAX-RPC)] and trying to invoke methods within through DII client using Apache Axis 1.
The Beans I am using are structured as follows:
public class InBean {
public InBean() {
private int x;
private float y;
public setters/getters for x
public setters/getters for y
public class OutBean {
public OutBean() {
private String inString;
private String outString;
public setters/getters for inString
public setters/getters for outString
The (InBean) is used as method input and the (OutBean) is used as method output.
The problems I am facing are as follows:
[1] How to serialize/desrialize the Beans as they are not registered with Apache Axis 1?
[2] How to invoke the Beans using Dynamic client DII and not classic proxy and Stubs?
[3] How to create the Beans using WSD2Java of the Apache Axis 1 ?
In case you have any helping URL's, Book names or sample code, please attach as they will be very helpful.
Thanks alot for the help.-----
Best Regards,
Ahmed M. Abbas

You will find some working code at :
http://ksoap.objectweb.org/software/downloads/index.html
It's code that use kSOAP and kXML implementations ....
If you will also find some useful information here :
http://developers.sun.com/techtopics/mobility/apis/articles/wsa/
http://www-106.ibm.com/developerworks/wireless/library/wi-jsr/
http://www-106.ibm.com/developerworks/wireless/library/wi-xmlparse/
Regards.

Similar Messages

  • Authenticating to weblogic web service using a client cert with webserver

    I am trying to think of how to authenticate a client to a weblogic web service
    using a client certificate. The wrinkle is that a Web Server (iis or whatever)
    will be handling the ssl part and forwarding non-secure to weblogic. The cert
    will still be accessable in the request using: HttpServletRequest req.getAttribute("javax.net.ssl.peer_certificates).
    At this point it is not clear to me what I can do. When does CertAuthenticator
    get called? Can I even use it? Will I have to write my own version of the weblogic.soap.server.servlet.StatelessBeanAdapter
    class?
    Any help will be appreciated, even explaining why it can't be done.
    Thanks,
    Scott

    I am trying to think of how to authenticate a client to a weblogic web service
    using a client certificate. The wrinkle is that a Web Server (iis or whatever)
    will be handling the ssl part and forwarding non-secure to weblogic. The cert
    will still be accessable in the request using: HttpServletRequest req.getAttribute("javax.net.ssl.peer_certificates).
    At this point it is not clear to me what I can do. When does CertAuthenticator
    get called? Can I even use it? Will I have to write my own version of the weblogic.soap.server.servlet.StatelessBeanAdapter
    class?
    Any help will be appreciated, even explaining why it can't be done.
    Thanks,
    Scott

  • How to do a InsertOrUpdate with web services 2.0

    I understand that InsertOrUpdate method is just valid for Web Services 1.0.
    a) Is there a way to do it with web services 2.0 ? I imagine using a query and then Update or Insert.
    b) if we decide to use web services 1.0 would there be any cons ? (besides a possible performance issue as in the documentation)
    c) InsertOrUpdate uses the record "user key" for identification. If need to identify using another field, I suppose that the only way is thru query, etc. Any other ideas ?
    Txs. for any help.
    Antonio

    Hello Antonio,
    I understand that InsertOrUpdate method is just valid for Web Services 1.0.Correct, the InsertOrUpdate method is not available in WS v2.0.
    a) Is there a way to do it with web services 2.0 ? I imagine using a query and then Update or Insert.That is one possibility, however it means that every insert or update would consist of two operations. I would suggest reviewing your requirements and expected use cases for a way to determine whether a record is being inserted or updated within CRMOD. The specific approach would depend on whether how the records to be entered into CRMOD are compiled (i.e. user interaction vs. batch sync component)
    b) if we decide to use web services 1.0 would there be any cons ? (besides a possible performance issue as in the documentation)There are some objects that are not supported for WS v1.0 as well as the fact that field coverage is not as complete as the WS v2.0 interface.
    c) InsertOrUpdate uses the record "user key" for identification. If need to identify using another field, I suppose that the only way is thru query, etc. Any other ideas ?Only certain fields or sets of fields can be used as a user key. These are described in the WS user guide. You can query on other fields to find a record in CRMOD but a unique value must be provided to identify a record for an update operation.
    Thanks,
    Sean

  • How to call a secure external Web Service using Oracle BPEL and OWSM

    Hi,
    i have to invoke an external secure Web Service using SOA Suite 10.1.3.1, but i don´t know how to do this. Do i use OWSM gateway or Agent? how to configure the gateway or agent to pass the required security to the external secure web service.
    thanks in advance
    Dong

    Are you getting any errors? What type of XAI Class are you using?
    One thing I've noticed is that if you are making changes to the XAI Sender you will have to restart the environment before the changes can take effect.
    Also, if you are using RTHTTPSNDR as XAI Class you may have to include the HTTP Method - Post in the context.
    Hope this helps.
    Regards,
    Philip

  • How to design crystal report with web service data source?

    I want to design and run a Crystal Report 2008 against my ADO.NET DataSet from web service method.
    I choose New Report, for Data I choose XML, then "Use Web Data Source" hit next, then choose "HTTP WSDL URL" I enter http://localhost/RDWS/Service.asmx?wsdl, hit Next, I leave HTTP username and HTTP password blank. Then I see the Services, Ports and Methods screen. Services: Service, Ports: ServiceSoap, Methods: CustomerOrdersDataSet
    When I click Finish, I get Logon Failed, Details, Schema file is invalid. error:Element Schema@htttp://www.w3.or/2001XMLSchemal not found.
    How can I get this to work?

    The native XML driver is incompatible with ADO.NET DataSet XML.  The specific issue is that the driver cannot handle the recursive definition on "Schema" that the .NET DataSet XML uses.
    The workaround is to create a .NET class that Web References, invoke the Web Service method for the DataSet, then returns it. 
    Use the ADO.NET (XML) driver in Crystal Report to consume the .NET data source.
    Note - when you deploy your report, ensure you deploy the DLL for the .NET class you've created.
    Sincerely,
    Ted Ueda

  • Message serialization in XI with Web Service Adapters

    Hi All,
    I'm trying to configure the receiver SOAP communication channel to send serial messages to a Web-Service we created here, but i didn't find a way to do that.
    I tried to configure the QoS of the Receiver Communication Channel but this option was disabled in the Integration Directory.
    Is there any way of doing that without using BPM? If there is, please tell me how i can do it.
    Thanks in advance,
    Leonardo

    Hi,
    For Idoc Queue processing,
    Check this help-
    http://help.sap.com/saphelp_nw04/helpdata/en/bd/277264c3ddd44ea429af5e7d2c6e69/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/00/9ffe3e432fd861e10000000a114084/frameset.htm
    Regards,
    Moorthy

  • How to deploy a report with web service datasource

    Hi Guys,
               I have a RPT file(report) which is using some web service call to get data source and Information.
               I am not able to deploy it properly as It gives " Error in file testReport Unknown Database Connector Error " while click at preview at server Central management Console.
    Please tell me some way to resolve the issue.
    I am not sure If I need to configure something at C:\Business Objects\common\3.5\java\CRConfig.xml for web service.
    Actually, We are using web service call from report it self and probably there are some steps missed by me for deployment.
    Sincerely,
    Sanjay Patel
    Edited by: Adlyd Joseph on Mar 19, 2009 6:57 AM

    Hi Sanjay
    First you create a report using the data source in Crystal Reports DesignerStand Alone Application and then save it to repository.
    This is the easiest way to do it.
    You can refer to Crystal Reports User guide and also BOXI Admin guide for the version you are using.
    You can download the above from help.sap.com
    Hope this helps!!
    Regards
    Sourashree

  • Session bean as web service using JAXB

    Hi all,
    can anybody answer my question:
    I have created java classes from XSD files using JDeveloper JAXB compilation. Is it possible to use these classes as parameters for webservice created as ejb3 session bean?
    I'have tried but got this error when invoked web service method:
    <env:Body>
    <env:Fault>
    <faultcode>env:Client</faultcode>
    <faultstring>Caught exception while handling request: deserialization error: java.lang.NullPointerException</faultstring>
    </env:Fault>
    </env:Body>
    </env:Envelope>
    thanks,
    Aigars

    Hi Torstein,
    <i>Seems to me that the problem is related to the msg sent to AE:
    "HTTP response contains status code 401 with the description Unauthorized XML tag Envelope missing in SOAP message header (SAP XI Extension)"
    </i>
    According to you, the problem occurs within the SOAP envelope. Does your incoming SOAP message looks like the one below here?
    If that's not the case, then make sure your SOAP/Web Service client is sending a valid SOAP envelope/request (like the sample below) to XI.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <!--  Inbound Message -->
    <SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
    <SOAP:Header/>
    <SOAP:Body>
    <ns1:WebServiceRequest xmlns:ns1='http://company.com/xi/webservice/myws' SOAP:actor='http://schemas.xmlsoap.org/soap/encoding/' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
    <Customer xsi:type='xsd:string'>000025</Customer>
    <CompanyCode xsi:type='xsd:string'>BE01</CompanyCode>
    <KeyDate xsi:type='xsd:string'>20050310</KeyDate>
    <Selection>
    <OpenItems xsi:type='xsd:string'>X</OpenItems>
    <ClearItems xsi:type='xsd:string'></ClearItems>
    <GLItems xsi:type='xsd:string'></GLItems>
    <Dunning>
    <From xsi:type='xsd:string'>A</From>
    <To xsi:type='xsd:string'>Z</To>
    </Dunning>
    </Selection>
    </ns1:WebServiceRequest>
    </SOAP:Body>
    </SOAP:Envelope>
    Cheers,
    R.

  • How to pass in complex data to a web service using dynamic client

    I wrote to dynamic client to access the complex example in weblogic 7.000, I would
    like to know how I passed in a complex type to a dynamic client.

    An example of using dynamic client is attached:
    regards,
    -manoj
    "fkeita" <[email protected]> wrote in message
    news:3d051775$[email protected]..
    >
    I wrote to dynamic client to access the complex example in weblogic 7.000,I would
    like to know how I passed in a complex type to a dynamic client.[call4.jar]

  • Web services using OIM Client API.

    Hi All,
    decided to try out some webservices talking to OIM via the client api. have a few questions.
    is it better if the webservice app server and the OIM ejb app server are the same? i.e. weblogic.
    I noticed in some of the code that configurationclient is using "web-client" rather than "Discovery.Coreserver" as the first param. what's the difference?
    Im currently using tomcat5 and java5 with xfire. and I think tomcat is not liking the weblogic jar. I could swap out the app server but would like to keep using java5 and xfire if that's possible.
    curious to hear abut other setups.
    Thanx.
    Fred

    I have a couple of clients using web services to expose OIM APIs. The most common approaches is to either use Apache Axis or the web service module in Websphere.
    Perhaps you should try migrating to Apache Axis if your application server doesn't like the Weblogic jars?
    I personally like Axis but that is mostly because I have used Axis a couple of times.
    Best regards
    /M

  • Failure to create Web Service using Java client

    Attempting to create a WebService using a Java client (partial code follows):
    String xml = "<custId xmlns=\"http://samples.otn.com\">" + 101 + "</name>";
    //Context ic = new InitialContext();
    Locator lctr = new Locator("default", "bpel");
    IDeliveryService dservice = (IDeliveryService)lctr.lookupService(IDeliveryService.SERVICE_NAME);
    NormalizedMessage nm = new NormalizedMessage();
    nm.addPart("payload", xml);
    However - get the following error message:
    E:\OraBPELPM_1\jdk\bin\javaw.exe -client -classpath E:\OraBPELPM_1\integration\jdev\jdev\mywork\Workspace1\BPELProcess1\output;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel-common.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel-thirdparty.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\bpm-infra.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\bpm-services.jar -Dhttp.proxyHost=ges-proxy.oracle.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=jpa*.jp.oracle.com|jpe*.jp.oracle.com|*.oracle.co.jp|144.23.230.118|144.23.230.110|psh*.peoplesoft.com|*.us.oracle.com|ex*.oracle.com|es0*.oracle.com|localhost|127.0.0.1 BusinessProcess.TestBPEL
    java.lang.Exception: Failed to create "ejb/collaxa/system/DomainManagerBean" bean; exception reported is: "javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
         at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:218)
         at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
         at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:47)
         at com.oracle.bpel.client.Locator.<init>(Locator.java:65)
         at BusinessProcess.TestBPEL.main(TestBPEL.java:19)
         at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:232)
         at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
         at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:47)
         at com.oracle.bpel.client.Locator.<init>(Locator.java:65)
         at BusinessProcess.TestBPEL.main(TestBPEL.java:19)
    Exception in thread "main" Process exited with exit code 1.
    The line: Locator lctr = new Locator("default", "bpel");
    is the point of the error -
    What is the problem here. I have seen several similar issues on the forum but I have not foound one that iindicated a solution to the problem.
    THANKS - Ken Cooper

    Applied the suggested code and am getting following errors:
    E:\OraBPELPM_1\jdk\bin\javaw.exe -client -classpath E:\OraBPELPM_1\integration\jdev\jdev\mywork\Workspace1\BPELProcess1\output;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel-common.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel-thirdparty.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\bpm-infra.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\bpm-services.jar -Dhttp.proxyHost=ges-proxy.oracle.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=jpa*.jp.oracle.com|jpe*.jp.oracle.com|*.oracle.co.jp|144.23.230.118|144.23.230.110|psh*.peoplesoft.com|*.us.oracle.com|ex*.oracle.com|es0*.oracle.com|localhost|127.0.0.1 BusinessProcess.TestBPEL
    java.lang.Exception: Failed to create "ejb/collaxa/system/DomainManagerBean" bean; exception reported is: "javax.naming.NoInitialContextException: Cannot instantiate class: com.evermind.server.rmi.RMIInitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.evermind.server.rmi.RMIInitialContextFactory]
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
         at javax.naming.InitialContext.init(InitialContext.java:219)
         at javax.naming.InitialContext.<init>(InitialContext.java:195)
         at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:216)
         at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
         at com.oracle.bpel.client.Locator.<init>(Locator.java:126)
         at com.oracle.bpel.client.Locator.<init>(Locator.java:97)
         at BusinessProcess.TestBPEL.main(TestBPEL.java:30)
    Caused by: java.lang.ClassNotFoundException: com.evermind.server.rmi.RMIInitialContextFactory
         at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:219)
         at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
         ... 8 more
         at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:232)
         at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
         at com.oracle.bpel.client.Locator.<init>(Locator.java:126)
         at com.oracle.bpel.client.Locator.<init>(Locator.java:97)
         at BusinessProcess.TestBPEL.main(TestBPEL.java:30)
    Error occurs at the bold line below - same location as before:
    Properties props = new Properties();
    props.setProperty("orabpel.platform", "oc4j_10g");
    props.setProperty("java.naming.factory.initial",
    "com.evermind.server.rmi.RMIInitialContextFactory");
    props.setProperty("java.naming.provider.url", "ormi://localhost/orabpel");
    props.setProperty("java.naming.security.principal", "admin");
    props.setProperty("java.naming.security.credentials", "welcome");
    props.setProperty("dedicated.rmicontext", "true");
    Locator lctr = new Locator("default", "oracle", props);
    Thanks - Ken

  • Share adf content with web service

    Dear All.
    For my purpose I have to share adf context with web service. Let's have an example:
    I have managed bean class "Main.java":
    public class Main{
        public Main(){
        public String AnyResult() {            
            BindingContext bindingContext = BindingContext.getCurrent();
            DCBindingContainer dcb = bindingContext.findBindingContainer("view_page1PageDef");
            DCDataControl dc  = dcb.findDataControl("AppModuleDataControl1");
            AppModuleImpl appM = (AppModuleImpl)dc.getDataProvider();
            ViewObjectImpl vo = appM.getVO1();
            vo.executeQuery(); 
            Row row = vo.next();
            System.out.println(row.getAttribute("data1").toString());
    and web service class:
    @WebService
    public class Job {
        private WebServiceContext context;
    private Main cm;
        @WebMethod
        @Oneway
        public void run() {     
            cm = new Main();
        System.out.println(cm.AnyResult());
    Result: BindingContext bindingContext = BindingContext.getCurrent() :: returns NULL
    How to share ADF context with web service to be able to access ADF model.
    Regards.

    +1 on Shay's comment. Your architecture makes no sense.
    Try code like the below to access the AM from a method in the WS
    private final String amDef = " oracle.demo.model.viewer.soap.services.AmName";
    private final String config = "AmNameConfigurationLocal";
    //call in WS method to get AM reference
    private ApplicationModule getApplicationModule(String _amDef, String _config){
    return Configuration.createRootApplicationModule(_amDef,_config);
    //call at end of AM use to release AM
    private void releaseAm(ApplicationModule _am){  
    //release AM so it can be found in pool on subsequent calls
    Configuration.releaseRootApplicationModule(_am, false);  
    ... or, why don't you expose the AM as a Web Service ... See: http://docs.oracle.com/cd/E35521_01/web.111230/e16182/bcextservices.htm#CJAJGIEB   (works for all JDeveloper versions starting 11g+). If you Google for this then you find recordings Shay did about how to expose ADF BC AM as a service. Another piece of collateral is here: http://www.oracle.com/technetwork/issue-archive/2012/12-sep/o52adf-1735897.html
    Frank

  • How can I create a query with web service data control?

    I need to create a query with web service data control, in WSDL, it's query operation, there is a parameter message with the possible query criteria and a return message contains the results. I googled, but cannot find anything on the query with web service. I cannot find a "Named Criteria" in web service data control like normal data control. In Shay's blog, I saw the topics on update with web service data control. How can I create a query with web service data control? Thanks.

    Hi,
    This might help
    *054.     Search form using ADF WS Data Control and Complex input types*
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html

  • How can I authenticate and authorize with Web Service on ESB ?

    Hello,
    I want to authenticate and authorize client with Web Service published
    by HTTP/SOAP BC.
    Simply if it is an Web Service as J2EE application, I will use
    Basic Authentication with JAX-RPC and Realm.
    But I think that Web Service published by HTTP/SOAP BC is not belong
    to J2EE Application. Threre is no place to describe security role mapping
    (like web.xml).
    JBI 1.0 the section "5.5.1.1.3 Normalized Message Properties" comments
    JAAS Subject is given in the NM Properties. Really in this package
    com.sun.jbi.internal.security.*
    implements JAAS autentication and authorization (at JaasAuthenticator).
    But I can't see how to configure my Service to use this.
    How can I authenticate and authorize with Web Service on ESB ?
    I referred to the resources.
    Mutual Authentication for Web Services: A Live Example
    http://developers.sun.com/prodtech/appserver/reference/techart/mutual_auth.html
    XML and Web Services Security
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Security7.html
    JAAS Authentication Tutorial
    http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/tutorials/GeneralAcnOnly.html
    Thanks,
    Takurou
    - environment ---------------------------------------------
    OpenESB : Project Open ESB Starter Kit
    AppServer : Sun Java Systems Application Server 9.0 PE
    OS : Windows XP
    I don't assume to use SSL (if It's necessary I will try).
    User information is stored in a LDAP Server.
    -----------------------------------------------------------

    Hello,
    I read this resource.
    SecurityDesign
    http://www.glassfishwiki.org/jbiwiki/Wiki.jsp?page=SecurityDesign
    Then I think [non-ssl and ssl/tls and so on] securing by basic authentication is ongoing feature at this time.
    But I can't see well why this page comments 'HTTP over SSL, TLS'.
    HTTP/SOAP Binding Component Overview
    http://download.java.net/general/open-esb/docs/jbi-components/httpsoap-bc.html
    Does BC support only "SSL server authentication" ?
    Doesn't BC support "SSL client authentication" by username/password ?
    Thanks,
    Takurou

  • How to consume sap xi pi web services or sap RFC with oracle 11g forms.

    Dear All
    how to consume sap xi pi web services or sap RFC with oracle 11g forms.
    or
    how to config 11g forms with sap xi....
    or how to call sap xi web services in 11g forms....
    or can send sample code....
    Regards
    smfatmi
    Edited by: smfatmi on Oct 17, 2011 2:16 AM
    Edited by: smfatmi on Oct 17, 2011 2:17 AM

    Dear All
    how to consume sap xi pi web services or sap RFC with oracle 11g forms.
    or
    how to config 11g forms with sap xi....
    or how to call sap xi web services in 11g forms....
    or can send sample code....
    Regards
    smfatmi
    Edited by: smfatmi on Oct 17, 2011 2:16 AM
    Edited by: smfatmi on Oct 17, 2011 2:17 AM

Maybe you are looking for