Sending xsi types using Axis from web service client

Hello,
I am using axis to consume a web service, the soap message generated contain xsi types which cause the validation of the message to fail. Example:
xsi:type="xsd:string"I have tried to remove these types using call.setProperty(Call.SEND_TYPE_ATTR,Boolean.FALSE); but this does not seem to work.
OPERATION_STYLE=document
Can someone please help
Thanks

Haven't worked on this, but have you tried by putting the axis libraries inside the plugin lib folder when you are building up the plugin? Also you need to check asix2 compatibility with weblogic version with R2.
-Bikash

Similar Messages

  • Issue of invoke wf_engine function from web service client.

    hi,
    I want to update work flow item attribute from web service client through soa gateway. but got the below exception:
    Error Description Error occured while service was processing.
    Error Details oracle.apps.fnd.soa.util.SOAException: ServiceProcessingError: Exception returned from JCA Service Runtime. file:/pim/oracle/DEV/inst/apps/DEV_pimenv/soa/PLSQL/1318/SETITEMATTRTEXT.wsdl [ SETITEMATTRTEXT_ptt::SETITEMATTRTEXT(InputParameters) ] - WSIF JCA Execute of operation 'SETITEMATTRTEXT' failed due to: Error while processing an API interaction execution. An error occurred while processing the interaction for invoking the WF_ENGINE.SETITEMATTRTEXT API. Cause: oracle.tip.adapter.apps.AppsContextValidationException: Cannot set Context ; nested exception is: ORABPEL-11812 Error while processing an API interaction execution. An error occurred while processing the interaction for invoking the WF_ENGINE.SETITEMATTRTEXT API. Cause: oracle.tip.adapter.apps.AppsContextValidationException: Cannot set Context Check to ensure that the XML containing parameter data matches the parameter definitions in the XSD. Contact oracle support if error is not fixable. at oracle.apps.fnd.soa.provider.services.jca.JCAHandler.invoke(JCAHandler.java:173) at oracle.apps.fnd.soa.provider.services.jca.JCAHandler.handleRequest(JCAHandler.java:120)
    it indicate " cannot set context". but there is no method of wf_engine api to set it.
    Thanks,
    Rock

    Hi, Buddy,
    Did you fix your issue?
    Now, I have the same issue, EBS version is 12.1.3. Using Soapui invoking PL/SQL, then go back to SOA monitor to check the error message.
    Could you please give me some advises?
    Thanks,
    Jackie

  • Error when calling BPEL process from web service client

    I have created three projects here ,there're no problem when testing Composite Application(SynchronousSampleApplication) by test case inside this project.
    When I create a Java Application(SynchronousSampleApp),inside this project I've created a web service client from file WSDL of BPEL. After that, In Main class, I call an operation from web service client.But have the following error:
    Jul 17, 2008 4:48:22 PM synchronoussampleapp.Main main
    SEVERE: null
    java.rmi.RemoteException: HTTP transport error: java.net.MalformedURLException: For input string: "${HttpDefaultPort}"; nested exception is:
    HTTP transport error: java.net.MalformedURLException: For input string: "${HttpDefaultPort}"
    at SynSample.SynchronuosSamplePortType_Stub.synchronuosSampleOperation(SynchronuosSamplePortType_Stub.java:83)
    at synchronoussampleapp.Main.main(Main.java:24)
    Caused by: HTTP transport error: java.net.MalformedURLException: For input string: "${HttpDefaultPort}"
    at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpClientTransport.java:140)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:96)
    at SynSample.SynchronuosSamplePortType_Stub.synchronuosSampleOperation(SynchronuosSamplePortType_Stub.java:67)
    ... 1 more
    Please help me soon. Thanks very much!

    Can't anyone help me? I'm using Netbean 6.1 and Glassfish server.
    Do I need any additional plugin?

  • NoClassdefFound Problem using EJB as web service client

    Hello there, I am trying to use a MDB as a web service client. The architecture,
    briefly is in the form of a java program communicating with a MDB via JMS, the
    MDB gets the data from some external server via SOAP. I am using JBuilder to generate
    the client side classes choosing the Axis framework. When my MDB is trying to
    bind using locator.getPort() it throws an error as follows:
    java.lang.NoClassDefFoundError: org.apache.axis.client.AxisClient. java.lang.NoClassDefFoundError:
    org.apache.axis.client.AxisClient at org.apache.axis.client.Service.getAxisClient()Lorg.apache.axis.client
    AxisClient;(Service.java:143) at org.apache.axis.client.Service.<init>()V(Service.java:152)
    Note that it works fine if I use the web services client as a standalone java
    program(no weblogic ). I tried putting the Axis.jar file as well as the relevant
    files from this jar file(JBuilder's feature) in the EJB module that is deployed,
    of no avail. Following is the classloader printed from the EJB's onMessage method
    if needed for better understanding
    weblogic.utils.classloaders.GenericClassLoader@afdd3a finder: weblogic.utils.cla
    ssloaders.MultiClassFinder@20d7479 annotation: SecurityEJBModule@
    Any help will be appreciated

    Slava, I did exactly that and it worked! I wish I had seen your reply before.
    Thanks
    "Slava Imeshev" <[email protected]> wrote:
    >
    "Santosh" <[email protected]> wrote in message news:405074c7$[email protected]..
    Hello there, I am trying to use a MDB as a web service client. Thearchitecture,
    briefly is in the form of a java program communicating with a MDB viaJMS, the
    MDB gets the data from some external server via SOAP. I am using JBuilderto generate
    the client side classes choosing the Axis framework. When my MDB istrying to
    bind using locator.getPort() it throws an error as follows:
    java.lang.NoClassDefFoundError: org.apache.axis.client.AxisClient.java.lang.NoClassDefFoundError:
    org.apache.axis.client.AxisClient at org.apache.axis.client.Service.getAxisClient()Lorg.apache.axis.client
    AxisClient;(Service.java:143) at org.apache.axis.client.Service.<init>()V(Service.java:152)
    Note that it works fine if I use the web services client as a standalonejava
    program(no weblogic ). I tried putting the Axis.jar file as well asthe relevant
    files from this jar file(JBuilder's feature) in the EJB module thatis deployed,
    of no avail. Following is the classloader printed from the EJB's onMessagemethod
    if needed for better understandingYou need to package all Axis jars and dependancoes into the EAR and
    refer tham
    in your ejb-jar MANIFEST.MF. If you are running weblogic 8.1, you may
    just put them
    into APP-INF/lib. Than you won't need to modify manifest.
    Hope this helps.
    Regards,
    Slava Imeshev

  • OIM 11gR2 Request Validator Plugin and Axis based Web Service Client

    Hi,
    I am trying call a web service client generated using axis2 from a request validator plugin in OIM 11gR2 and I have all the axis related jar files under the plugin lib folder but it fails due to the axis reference issues.
    I tried putting the jar files under different locations like thirdparty folder, server lib etc. But it is giving issues every where. Please let me know if you have some solution.
    Thanks in advance,

    Haven't worked on this, but have you tried by putting the axis libraries inside the plugin lib folder when you are building up the plugin? Also you need to check asix2 compatibility with weblogic version with R2.
    -Bikash

  • If you use AXIS for Web Services then..

    I have been working on a Web Service the last 2 weeks and finally got a connection working with JAVA and AXIS. The question I have is this. First off, my code listed below is so very simple and it works. Now all the so called examples that I have seen out there seem to have the code replicated from the SoapBindingStub file and if I try to duplicate the way that they have there code, I can not get it to work.
    At the end of this file is a sample of what I have seen others posting. So what all should be in my client to communicate with the stubs of the Service?
    Why would the others be so redundant by putting code from the soapbindingstub into a client?
    Assuming you already have a web service deployed.
    You have gotten a wsdl.
    You have ran WSDL2Java on the wsdl
    Your client would look like the following.
    import folderPathToWSDL2JavaGeneratedFolder.*;
    public class MyClientCallerToWebServiceX {
       public static void main(String[] args) throws Exception {
                   // create an instance of our service locator
             MyWebServicesServiceLocator locator = new MyWebServicesServiceLocator();
                   // create an instance or our SoapBindingStub
             MyWebServicesSoapBindingStub stub = (MyWebServicesSoapBindingStub) locator.getMyWebServices();
                   // make a call to a method we created in our web service
           System.out.println("Data on server: " + (stub.getSomeMethodOfMine("pass in a value").toString()));
    Others type of coding........
    import org.apache.axis.attachments.AttachmentPart;
    import org.apache.axis.attachments.Attachments;
    import org.apache.axis.client.Call;
    import org.apache.axis.message.SOAPHeaderElement;
    import org.apache.axis.message.*;
    import javax.activation.DataHandler;
    import javax.activation.FileDataSource;
    import java.io.*;
    import javax.xml.namespace.QName;
    import org.apache.axis.encoding.XMLType;
    import javax.xml.rpc.ParameterMode;
    import org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory;
    import org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory;
    public class NC
    public static void main(String [] args)
    try
    Call call = new Call("web service address");
    //insert session id into header
    SOAPHeaderElement header = new SOAPHeaderElement("http://xml.apache.org/axis/session", "sessionID", 575757);
    call.addHeader(header);
    //testing attachment stuff
    DataHandler dh = new DataHandler(new FileDataSource(""));
    QName qnameAttachment = new QName("NescaumReport", "DataHandler");
    call.registerTypeMapping(dh.getClass(), //Add serializer for attachment.
    qnameAttachment,
    JAFDataHandlerSerializerFactory.class,
    JAFDataHandlerDeserializerFactory.class);
    call.addParameter("iID", XMLType.XSD_INT,
    ParameterMode.IN);
    call.addParameter("startDate", XMLType.XSD_STRING,
    ParameterMode.IN);
    call.addParameter("endDate", XMLType.XSD_STRING,
    ParameterMode.IN);
    //Add the filename.
    call.setReturnType(qnameAttachment);
    Object ret = call.invoke("", "generateData", new Object[] {new Integer(21),"11/11/2004", "11/12/2004"});
    catch (Exception e)
    System.err.println("Error : " + e.toString());
    }

    Sorry if this sounds like I am new to this but I am.
    So, the extended version is the format that would be used if you were not utilizing the files that the wsdl2java function creates?
    And this is done to when you want more flexibiility for the user to call your service?
    So, you would push to have the stub files used when you want to control how the web service is used?
    thanks for the feedback.

  • Weblogic queues each request from Web Services client

    Hello everyone,
    Currently, I have a performance issue deploying a web services application on Weblogic 11g Patch1 (10.3.2).
    There are 40 clients which consume Web Services. After Weblogic queues each requests (40 requests) which takes about 2 or 3 minutes, then it starts to process the request (i.e. try to connect AuotVue Server with a servlet called VueServlet).
    I also found that during the process of queuing, even I ping the VueServlet or Web Services WSDL file in IE, it will take a long time to response.
    Look like all the weblogic resource is used to receive the requests and no resource is available for VueServlet.
    The problem happens when I deploy WS on windows 2003 server which is VMware machine with 3G RAM, and it doesn't happen when I deploy it on Windows 2008 server with 4 G RAM and duo cpu.
    Any help will be appreciated.
    Thank you very much.
    Song

    Maybe there are some problems with WebLogic and Windows 2003. See also this thread Oracle HTTP Server (OHS)  Installation Problem on Win 2003 Server SP2
    I think it would be handy if you file a support request.

  • Design Suggestion on webapp using executable windows Web Service client

    We have existing web application that needs to interface with a web service through a client exe file.
    Inputs will be passed by xml file and output files generated after.
    This client exe has configuration file, among the important items on this file is the settings on where the output files will be created.
    I personally think this design is wrong but I will have to work through it because I am in no position to change the proposed solution.
    A synchronized method for the complete cycle of the call to this method will not be acceptable due to bottle neck issue.
    I'm planning to make a singleton class to provide the services for this this client.
    I'm planning to get the client IP to use for making temporary working folder for each user.
    File IO on creation of input file will be surrounded in a synchronized block.
    Runtime.exec call will also be wrapped in a synchronized block.
    I will be executing this single exe on seperate process each call,
    As for the config file, I will have to edit the config file for each call, since i cannot discern the output files if I put them in single location.
    /sigh
    Advise would be greatly appreciated.

    DarrylBurke wrote:
    Seifer wrote:
    Someone please tell me I'm doomed?If you say so.
    You're doomed.
    db
    Note: That's a joke, I don't have any knowledge on the specifics of your question.I thought so. I figured one workaround, maintain multiple copies of the client exe, each with their own config referring to each unique output folder and make a pool manager to manage these babies.
    I still think the better solution is to give away this client and have the webapp interact directly to the web service. The present kind of remind me how cgi process are used in the old times to serve web requests.

  • Presence data from web service

    Hello,
    i like to get presence data from the presenceconsumer web service. But everytime a call getUserPresence i get a PolicyException (POL0002): 'Privacy verification failed for address %1, request is refused'.
    I use a web service proxy generated from the wsdl of the presenceconsumer web service. Authentication is made against the appregationproxy by setting username and password. Both users (the one i use for authentication and the one whose presence data i want to get) are registered in the timesten database.
    The user whose presence data should be accessed is logged in the OracleCommunicator and has the other user on the allowed list for presence data.
    All other operations of the presence web services work without any problem, so why not getUserPresence?
    Thanks for help

    Hi,
    I have found the problem and fixed it :)
    If you see my code, I was checking for the pending subscriptions after publish() method. When I tried this check before publish() method, I got the expected results (All the pending subscriptions).
    Also, I got an error (ServiceException) while dynamically retrieving the subscribed attributes for some reason. I have found an alternative solution, by manually allowing only the PresenceAttributeType.Activity (instead of all getSubscribedAttributes()).
    Note: This code was working fine in my local machine because, I have already setup-ed the users (Buddy list) through Oracle communicator in my machine. I was not able to install OC in the VM for some reason though OS is same in both my machine and the VM (OS: Windows 2000 SP4).
    thanks & regards,
    S.Vasanth Kumar.
    My latest code for your reference.
    =======================================================
    package presencedemo;
    import java.net.URI;
    import java.rmi.RemoteException;
    import java.util.Calendar;
    import org.csapi.schema.parlayx.common.v2_0.PolicyException;
    import org.csapi.schema.parlayx.common.v2_0.ServiceException;
    import org.csapi.schema.parlayx.common.v2_0.SimpleReference;
    import org.csapi.schema.parlayx.presence.v2_0.ActivityValue;
    import org.csapi.schema.parlayx.presence.v2_0.AttributeTypeAndValue;
    import org.csapi.schema.parlayx.presence.v2_0.CommunicationMeans;
    import org.csapi.schema.parlayx.presence.v2_0.CommunicationMeansType;
    import org.csapi.schema.parlayx.presence.v2_0.CommunicationValue;
    import org.csapi.schema.parlayx.presence.v2_0.OtherValue;
    import org.csapi.schema.parlayx.presence.v2_0.PlaceValue;
    import org.csapi.schema.parlayx.presence.v2_0.PresenceAttribute;
    import org.csapi.schema.parlayx.presence.v2_0.PresenceAttributeType;
    import org.csapi.schema.parlayx.presence.v2_0.PresencePermission;
    import org.csapi.schema.parlayx.presence.v2_0.PrivacyValue;
    import org.csapi.schema.parlayx.presence.v2_0.SphereValue;
    import org.csapi.schema.parlayx.presence.v2_0.SubscriptionRequest;
    import org.csapi.wsdl.parlayx.presence.consumer.v2_0.interface_.PresenceConsumerClient;
    import org.csapi.wsdl.parlayx.presence.supplier.v2_0.interface_.PresenceSupplierClient;
    /* PresenceDemoClient.java
    * This class contains the primary functionality for
    * connecting to the Presence Server and retreiving
    * presence information for a set of buddies
    public class PresenceDemoClient {
    PresenceSupplierClient supplier;
    PresenceConsumerClient consumer;
    private String PresenceServer;
    private String PresenceUsername;
    private String PresencePassword;
    private String PresenceRealm;
    private String PresencePort;
    URI BuddyList[];
    PresenceAttributeType[] pat1;
    // Constructor - creates a supplier and consumer presence client
    // for publishing, subscribing to, and retrieving user presence.
    public PresenceDemoClient(String server, String username, String password,
    String realm, String port, URI[] buddies) {
    try {
    supplier = new PresenceSupplierClient();
    consumer = new PresenceConsumerClient();
    PresenceServer = server;
    PresenceUsername = username;
    PresencePassword = password;
    PresenceRealm = realm;
    PresencePort = port;
    BuddyList = new URI[buddies.length];
    BuddyList = (URI[])buddies.clone();
    } catch (Exception e) {
    System.out.println(e.toString());
    // publishPresence - this method publishes presence on behalf of the
    // current user. Allowed information includes and activityString and a note
    public void publishPresence(String activityString, String note) {
    try {
    System.out.println("Publishing presence for " + PresenceUsername);
    // create supplier web service endpoint
    supplier.setEndpoint("http://" + PresenceServer + ":" +
    PresencePort +
    "/aggregationproxy/presencesupplierws/presencesupplier");
    System.out.println("Supplier URL: " + "http://" + PresenceServer + ":" +
    PresencePort +
    "/aggregationproxy/presencesupplierws/presencesupplier");
    supplier.setMaintainSession(true);
    supplier.setUsername(PresenceUsername);
    supplier.setPassword(PresencePassword);
    ActivityValue activity = null;
    String expires = "3600"; // default expiration of subscription
    if (note == null || note.length() < 1)
    note = "From Web Service Client";
    if (activityString == null)
    activity = ActivityValue.ActivityNone;
    else if (activityString.equals("Available"))
    activity = ActivityValue.Available;
    else if (activityString.equals("Busy"))
    activity = ActivityValue.Busy;
    else if (activityString.equals("Meeting"))
    activity = ActivityValue.Meeting;
    else if (activityString.equals("Away"))
    activity = ActivityValue.Away;
    else
    activity = ActivityValue.ActivityNone;
    PresenceAttribute pa = new PresenceAttribute();
    AttributeTypeAndValue typeValue = new AttributeTypeAndValue();
    typeValue.setActivity(activity);
    if (Integer.parseInt(expires) == 0)
    typeValue.setUnionElement(PresenceAttributeType.Other);
    else
    typeValue.setUnionElement(PresenceAttributeType.Activity);
    CommunicationMeans mean = new CommunicationMeans();
    System.out.println(new URI("sip:" + PresenceUsername + "@" +
    PresenceRealm));
    mean.setContact(new URI("sip:" + PresenceUsername + "@" +
    PresenceRealm));
    mean.setPriority(1);
    mean.setType(CommunicationMeansType.Chat);
    CommunicationValue commValue = new CommunicationValue();
    commValue.setMeans(new CommunicationMeans[] { mean });
    typeValue.setCommunication(commValue);
    OtherValue other = new OtherValue();
    other.setName("Expires");
    other.setValue(expires);
    typeValue.setOther(other);
    typeValue.setPrivacy(PrivacyValue.PrivacyNone);
    typeValue.setPlace(PlaceValue.PlaceNone);
    typeValue.setSphere(SphereValue.SphereNone);
    pa.setTypeAndValue(typeValue);
    pa.setNote(note);
    //Allowing all pending subscriptions
    SubscriptionRequest[] srArray = supplier.getOpenSubscriptions();
    for (SubscriptionRequest sr:srArray) {
    URI watcher = sr.getWatcher().normalize();
    /*System.out.println("Blocking: " + watcher);
    supplier.blockSubscription(watcher);*/
    System.out.println("Allowing: " + watcher);
    /*PresenceAttributeType patArray[] = supplier.getSubscribedAttributes(watcher.toString());
    PresencePermission permissions[] = new PresencePermission[supplier.getSubscribedAttributes(watcher.toString()).length];
    for(int i=0;i<patArray.length;i++){
    PresenceAttributeType pat = patArray;
    System.out.println("\tPermission: " + pat);
    PresencePermission pp = new PresencePermission();
    pp.setPresenceAttribute(pat); //You always pass in Activity
    pp.setDecision(true); //Put the user on the allow list
    permissions[i] = pp;
    supplier.updateSubscriptionAuthorization(watcher,permissions);*/
    PresenceAttributeType pat = PresenceAttributeType.Activity;
    PresencePermission pp = new PresencePermission();
    pp.setPresenceAttribute(pat); //You always pass in Activity
    pp.setDecision(true); //Put the user on the allow list
    supplier.updateSubscriptionAuthorization(watcher,new PresencePermission[]{pp});
    Calendar dateTime = Calendar.getInstance();
    pa.setLastChange(dateTime);
    supplier.publish(new PresenceAttribute[] { pa });
    System.out.println("Publish done: " + "sip:" + PresenceUsername + "@" +
    PresenceRealm);
    } catch (Exception e) {
    System.out.println("Publish failed: " + e.toString());
    e.printStackTrace();
    // subscribePresence - this method subscribes to
    // presence information of buddylist members
    public void subscribePresence() {
    try {
    // create web services endpoint
    consumer.setEndpoint("http://" + PresenceServer + ":" +
    PresencePort +
    "/aggregationproxy/presenceconsumerws/presenceconsumer");
    System.out.println("Consumer URL: " + "http://" + PresenceServer + ":" +
    PresencePort +
    "/aggregationproxy/presenceconsumerws/presenceconsumer");
    consumer.setMaintainSession(true);
    consumer.setUsername(PresenceUsername);
    consumer.setPassword(PresencePassword);
    // Setting the attribute to activity.
    PresenceAttributeType pa = PresenceAttributeType.Activity;
    PresenceAttributeType[] pat = new PresenceAttributeType[] { pa };
    // These input are required but not used.
    SimpleReference sr = new SimpleReference();
    sr.setCorrelator("unused_correlator");
    sr.setInterfaceName("unused_interfacename");
    sr.setEndpoint(new URI("http://unused.com"));
    int counter = 0;
    // Calling the subscribe web service with sip
    // address of each buddy
    for (counter = 0; counter < BuddyList.length; counter++) {
    System.out.println("Subscribing presence for: " + BuddyList[counter]);
    consumer.subscribePresence(BuddyList[counter], pat, "unused",
    sr);
    Thread.sleep(3000); // Give the backend enough time to get the subscription.
    // Define Presence Activity types and attribute storage
    PresenceAttributeType pa1 = PresenceAttributeType.Activity;
    pat1 = new PresenceAttributeType[] { pa1 };
    } catch (Exception e) {
    System.out.println("Exception " + e.toString());
    e.printStackTrace();
    // getUserPresence - this method retuns the presence information
    // of a particular buddy(user)
    public PresenceAttribute getUserPresence(URI user) {
    PresenceAttribute pa;
    try {
    System.out.println(consumer.getEndpoint() + "," + consumer.getUsername());
    pa = consumer.getUserPresence(user, pat1)[0];
    } catch (PolicyException pEx) {
    pa = null;
    System.out.println("PolicyException:getUserPresence: " + pEx.getMessageId() + ":" + pEx.getText());
    String[] variables = pEx.getVariables();
    for(String str:variables){
    System.out.println(str);
    } catch (ServiceException serEx) {
    pa = null;
    System.out.println("ServiceException:getUserPresence: " + serEx.toString());
    } catch (RemoteException rEx) {
    pa = null;
    System.out.println("RemoteException:getUserPresence: " + rEx.toString());
    return pa;
    public static void main(String args[]) throws Exception{
    URI[] buddy_list = {new URI("sip:[email protected]"),new URI("sip:[email protected]"),new URI("sip:[email protected]")};
    PresenceDemoClient client = new PresenceDemoClient("192.168.111.222","employee1","welcome1","vitkovice","8888",buddy_list);
    client.publishPresence("Available",":)");
    client.subscribePresence();
    URI[] buddy_list2 = {new URI("sip:[email protected]"),new URI("sip:[email protected]"),new URI("sip:[email protected]")};
    PresenceDemoClient client2 = new PresenceDemoClient("192.168.111.222","employee2","welcome1","vitkovice","8888",buddy_list2);
    client2.publishPresence("Available",":)");
    client2.subscribePresence();
    URI[] buddy_list3 = {new URI("sip:[email protected]"),new URI("sip:[email protected]"),new URI("sip:[email protected]")};
    PresenceDemoClient client3 = new PresenceDemoClient("192.168.111.222","employee3","welcome1","vitkovice","8888",buddy_list3);
    client3.publishPresence("Available",":)");
    client3.subscribePresence();
    URI[] buddy_list4 = {new URI("sip:[email protected]"),new URI("sip:[email protected]"),new URI("sip:[email protected]")};
    PresenceDemoClient client4 = new PresenceDemoClient("192.168.111.222","employee4","welcome1","vitkovice","8888",buddy_list4);
    client4.publishPresence("Available",":)");
    client4.subscribePresence();
    Thread.sleep(10000); //Allow some time for all the subscription notifications.
    PresenceAttribute pa = client.getUserPresence(buddy_list[0]);
    System.out.println(buddy_list[0] + ": " + pa.getTypeAndValue().getActivity() + " " + pa.getNote());
    PresenceAttribute pa2 = client2.getUserPresence(buddy_list2[0]);
    System.out.println(buddy_list2[0] + ": " + pa2.getTypeAndValue().getActivity() + " " + pa2.getNote());
    PresenceAttribute pa3 = client2.getUserPresence(buddy_list3[0]);
    System.out.println(buddy_list3[0] + ": " + pa3.getTypeAndValue().getActivity() + " " + pa3.getNote());
    PresenceAttribute pa4 = client2.getUserPresence(buddy_list4[0]);
    System.out.println(buddy_list4[0] + ": " + pa4.getTypeAndValue().getActivity() + " " + pa4.getNote());

  • Using SSL for Web Service Access

    Hi,
    I'm not sure if this the best forum, but this is technically a J2EE question.
    I'm using JDeveloper and OC4J. I have a java class that I'm publishing as a stateful webservice; however, the only clients will be other java routines. (I generated a WSDL file and then stubs.) This webservice has to run on a Windows 2000 box inside of OC4J. I have this done and can call it from across the network from a Linux box. This all works fine. However, I need to add security preferably by going to SSL. I can't find out how to do this. Does anyone know? Do I manually edit the generated stub files? Any chance there is some sample code somewhere?
    thanks,
    Joe Gamache

    Please look at Appendix A of the "Web Services Developer's Guide" from iAS v9.0.2 covers Oracle SOAP. The section, "Working With Oracle9 iAS SOAP
    Transport Security", covers using SSL.
    Here is a simple example with steps:
    Prerequisites
    1 . Suppose you have configured Apache to use SSL , that is
    -     Apache has a valid server certificate
    -     Apache requires the client certificate
    -     Apache has a bundle of root certificates of CA with wich it can trust client certificates
    -     Apache is in front of OC4J with mod_oc4j (9.0.2) or mod_proxy ( 1.0.2.2)
    For more information on this please refer to Oracle9i Application Server Security Guide
    2. Have a working knowledge of Oracle Wallet Manager
    Steps
    The following steps let you use an https web services client
    1.     First you need a certificate store in order to store the private key , the client X509 certificate and some trusted authorities. This store in our case is a wallet exported by Oracle Wallet Manager.
    2.     In order to generate a correct wallet you need :
    a.     Start the Oracle Wallet Manager ( OWM )
    b.     Create a new empty wallet
    c.     Generate a Certificate Signing Request (CSR )
    d.     Import the X509 certificate that the CA generated from the CSR
    e.     Import the root certificate of the CA that trusts the server certificate you would like to connect to ( that of Apache )
    f.     Export the wallet
    3.     Let's call exported_wallet the wallet that we exported from OWM , and lets put it under c:\temp . Suppose that the wallet password is camarda.
    4.     The JDK you plan to use for your client , in the extension directory ( that is $JDK_HOME/jre/lib/ext ) , must contains the following library
    a.     jcert.jar
    b.     jsse.jar
    c.     jssl-1_1.jar
    5.     Oracle SSL library use JNI in order to implement some low level encryption API , so you need a shared library usually located in $ORACLE_HOME/bin . For NT platform this library is njssl9.dll . Be sure to have this library in your path
    6.     Now given a WDSL , use the Jdeveloper wizard to generate a proxy
    7.     Modify the URL end-point from http to https
    8.     Add to the proxy the following lines of code
    System.setProperty("ssl.SocketFactory.provider","oracle.security.ssl.OracleSSLSocketFactoryImpl");
    System.setProperty("ssl.ServerSocketFactory.provider","oracle.security.ssl.OracleSSLServerSocketFactoryImpl");
    System.setProperty("java.protocol.handler.pkgs","HTTPClient");
    System.setProperty("oracle.wallet.location","C:\\temp\\exported_wallet");
    System.setProperty("oracle.wallet.password","camarda");
    Example
    In red : modified
    In blue : added
    import oracle.soap.transport.http.OracleSOAPHTTPConnection;
    import java.net.URL;
    import org.apache.soap.Constants;
    import org.apache.soap.Fault;
    import org.apache.soap.SOAPException;
    import org.apache.soap.rpc.Call;
    import org.apache.soap.rpc.Parameter;
    import org.apache.soap.rpc.Response;
    import org.w3c.dom.Element;
    import java.util.Vector;
    import java.util.Properties;
    import oracle.xml.parser.v2.*;
    * Generated by the Oracle9i JDeveloper Web Services Stub/Skeleton Generator.
    * Date Created: Mon May 20 14:24:48 CEST 2002
    * WSDL URL: http://26.2.197.119:8888/InterOp/Services.wsdl
    public class AnagInquireServicesEJBStub {
    public String endpoint = "https://26.2.197.119/InterOp/AnagInquireServices";
    private OracleSOAPHTTPConnection m_httpConnection = null;
    public AnagInquireServicesEJBStub() {
    m_httpConnection = new OracleSOAPHTTPConnection();
    public Element ricercaPF(String istat1, String istat2, String codiceFiscale) throws Exception {
    System.setProperty("ssl.SocketFactory.provider","oracle.security.ssl.OracleSSLSocketFactoryImpl");
    System.setProperty("ssl.ServerSocketFactory.provider","oracle.security.ssl.OracleSSLServerSocketFactoryImpl");
    System.setProperty("java.protocol.handler.pkgs","HTTPClient");
    System.setProperty("oracle.wallet.location","C:\\temp\\exported_wallet");
    System.setProperty("oracle.wallet.password","camarda");
    Element returnVal = null;
    URL endpointURL = new URL(endpoint);
    Call call = new Call();
    call.setSOAPTransport(m_httpConnection);
    call.setTargetObjectURI("AnagInquireServices");
    call.setMethodName("ricercaPF");
    call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);
    Vector params = new Vector();
    params.addElement(new Parameter("istat1", String.class, istat1, Constants.NS_URI_SOAP_ENC));
    params.addElement(new Parameter("istat2", String.class, istat2, Constants.NS_URI_SOAP_ENC));
    params.addElement(new Parameter("codiceFiscale", String.class, codiceFiscale, Constants.NS_URI_SOAP_ENC));
    call.setParams(params);
    Response response = call.invoke(endpointURL, "");
    if (!response.generatedFault()) {
    Parameter result = response.getReturnValue();
    returnVal = (Element)result.getValue();
    else {
    Fault fault = response.getFault();
    throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
    return returnVal;
    public void setMaintainSession(boolean maintainSession) {
    m_httpConnection.setMaintainSession(maintainSession);
    public boolean getMaintainSession() {
    return m_httpConnection.getMaintainSession();
    public void setTransportProperties(Properties props) {
    m_httpConnection.setProperties(props);
    public Properties getTransportProperties() {
    return m_httpConnection.getProperties();
    public static void main( String args[] ) {
    AnagInquireServicesEJBStub a = new AnagInquireServicesEJBStub();
    try {
    XMLElement e = (XMLElement) a.ricercaPF("102030","102030","CMRGPP69M29D761K");
    e.print(System.out);
    } catch (Exception ex) {
    ex.printStackTrace();
    } finally {

  • Deploying Web Service clients to earlier versions of AS

    Hello,
    I'm using JDeveloper to create web service proxy for existing service to use in my Web Service client. For development, I'm using JDeveloper 10.1.3.3, for deployment of client application I'm using Application Server 10.1.3.0.
    The problem is that AS 10.1.3.0 contains other versions of the libraries, for example, wsclient.jar, so, there's an error using Web Service Proxy (stub) as method setSOAPVersion() doesn't exist.
    The question is how can I use generated stub with earlier versions of Application Server.
    I've tried some things, but they didn't work. Maybe I did something wrong and step-by-step guidelines to deploy application are needed - I hope, it could be useful not only for me.
    So, I found JDev 10.1.3 Release Notes (http://www.oracle.com/technology/products/jdev/htdocs/10.1.3.0.3/readme.html) and the following abstract:
    Workaround for URL / WS Data Control Apps When Deploying to Third Party Application Servers or Oracle Application Server 10.1.2 (4931009)
    1. Copy the following JAR files to your target application server along with the rest of the ADF installed JAR files. The following JAR files are available under your JDeveloper's home directory.
    bc4j/jlib/dc-adapters.jar
    bc4j/jlib/adf-connections.jar
    j2ee/home/lib/http_client.jar
    webservices/lib/wsdl.jar
    webservices/lib/orajaxr.jar
    webservices/lib/orawsrm.jar
    webservices/lib/wsclient.jar
    webservices/lib/orasaaj.jar
    webservices/lib/xsdlib.jar
    webservices/lib/mdds.jar
    jlib/osdt_core.jar
    jlib/osdt_cert.jar
    jlib/osdt_xmlsec.jar
    jlib/osdt_wss.jar
    jlib/osdt_saml.jar
    jlib/ojpse.jar
    jlib/oraclepki.jar
    webservices/lib/wssecurity.jar
    webservices/lib/orawsdl.jar
    j2ee/home/jazncore.jar
    2. Shutdown the application server and modify the application server's class path to include all of the JAR files that were extracted from the archive. Please refer to the application server documentation for details on how to modify the class path.
    3. Restart the application server. You are now ready to deploy / run the application successfully.
    So, I've created a new Shared Library with Enterprise Manager, uploaded all this files and, deploying application, checked this library too. This didn't help.
    Thanks in advance, Valeriy

    Hi Valeriy,
    I have exactly the same problem. Have you been able to resolve this yet?
    Thanks
    Stu

  • Web service as another web service client - problem in JavaEE SE?

    Hello,
    I observed strange behaviour with OpenESB, Glassfish (build 33) and following scenario:
    I need to call web service from another web service. When I use simple schema:
    web service client -> web service (as EJB) -> another Web service
    everything works. But I would like to use JBI/ESB, so:
    web service client -> HTTP SOAP BC -> JAVAEE SE -> web service (as EJB) -> another Web service
    the following exception prevents success:
    com.sun.xml.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class cz.muni.fi.yucca.client.jbiws.gamanager.Calculate is not fou
    nd. Have you run APT to generate them?
    at com.sun.xml.ws.model.RuntimeModeler.getClass(RuntimeModeler.java:254)
    at com.sun.xml.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:550)
    at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:497)
    at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:339)
    at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:225)
    at com.sun.xml.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:584)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:287)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:270)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:263)
    at javax.xml.ws.Service.getPort(Service.java:92)
    at cz.muni.fi.yucca.client.jbiws.gamanager.GAManagerService.getGAManagerPort(GAManagerService.java:51)
    When I call both services separately they work correctly, when I don't use JBI it works correctly too.
    Should anybody help me solving this problem?
    Thanks in advice, Vlado

    Fine,
    I've found out that this problem is caused by different classloaders assigned to directly (EJBClassloader) and through-JBI (improperly configured URLClassloader) called web services.
    I've moved my question to GlassFish forum (http://forums.java.net/jive/thread.jspa?threadID=24901&tstart=0) beacause of it's "technical" nature.
    Despite this, any help is welcome:-)

  • Dynamic Logical Port for Web Service Client

    Hi *!
    We want to use the same Web Service Client code with different Web Service instances running on different systems. So I need to configure the logical port (especially the URL of the endpoint) dynamically at runtime.
    Please give me a hint, how this is done.
    (we are using WebAS 6.40 SP7)...
    Thanks in advance,
         Frank

    Hi Frank,
    I hope you were able to solve your issue on you own in the meantime.
    I was looking for the answer to this question today. This was the only thread I found on SDN. Unfortunately, it did not contain an answer yet. I was able to figure out a way to set the endpoint address dynamically after searching help.sap.com and after examining the interfaces offered by the Stub (logical port in this case) classes.
    Here's an extract from my code:
    // Connect to JNDI context
    InitialContext ic = new InitialContext();
    // Get reference to web service proxy from JNDI context
    Z_MSC_GET_SCHEDULE_WSDService service =
         (Z_MSC_GET_SCHEDULE_WSDService) ic.lookup("wsclients/proxies/iot-online.de/msc~srv_ejb~proxy/de.iot_online.msc.proxy.ScheduleReaderProxy");
    // Get reference to logical port from web service proxy
    Z_MSC_GET_SCHEDULE_WSD logicalPort = service.getLogicalPort();
    // Set URL of web service Endpoint
    logicalPort._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://<FQDN>:8010/sap/bc/srt/rfc/sap/Z_MSC_GET_SCHEDULE_WSD?sap-client=100");
    This is explained on
    http://help.sap.com/saphelp_nwce10/helpdata/en/45/113a1221337249e10000000a155369/frameset.htm
    You can also set the credentials (username / password) with the method _setProperty.
    Best regards
    Christian

  • Web services client interface design

    I am looking into see how i can design a client side interface that will talk to mulitple web services. This client side interface will act as proxy and call multiple web services based on the input from web services clients. Can someone give some ideas/pattens that i could use to design this? I would like to use Java to implement.
    thanks
    B

    yep. java would be one way to implement that
    probably

  • Web service client ignores http proxy settings

    I have a web service client using Weblogic's web service client library. I'm trying to instruct it to use a http proxy. I've set all the following system properties:
    -Dhttp.proxyHost=127.0.0.1
    -Dhttp.proxyPort=8080 -Dweblogic.webservice.transport.http.proxy.host=127.0.0.1 -Dweblogic.webservice.transport.http.proxy.port=8080
    No traffic is passing through the proxy.
    When the proxy is down, the application works fine too. I suspect that the proxy settings are completely ignored for some reason.
    I'm using Weblogic 8.1 SP4 on a Windows XP box and JDK 1.4.2 (Sun's bundled JDK with Weblogic).

    Sorry about the delay,
    You just need to use the standard java http proxy properties, take a look at:
    http://download-west.oracle.com/docs/cd/A97329_03/web.902/a95453/useservices.htm
    Does this help?
    Gerard

Maybe you are looking for

  • Can no longer leave mail on server

    After 4 hours with ATT and Apple including an Apple call back that never came I have not solved what seemed a simple problem. In the past my phones have left messages that I deleted from my phone on the Att/yahoo server. They no longer do. If I delet

  • Photoshop CC crashes upon opening

    As soon as I open Photoshop CC, a message pops up saying 'Adobe Photoshop CC 2014 has stopped working. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.' My operating sys

  • New Query:-plz give ans asap

    help ... delete a duplicate rows wid out using rowid and rownum ex table test id name 1 a 1 a 2 b 2 b 3 c 3 c 4 a 4 c use delete statement with out using rowid and rownum such that data become id name 1 a 2 b 3 c 4 c

  • Error message during Mavericks install

      I downloaded successfully a copy of the Install OS X Mavericks app from the Apple App store to my MacBook Pro.  If I try to install Mavericks to my computer, I initially get the message, "preparing to install.  Your computer will restart automatica

  • Creating QRY and need Serial Number Table for Field SERNR

    I am creating a SQVI Query that will give me all material in stock and their serial number or batch number. I was able to create the batch number by using: LQUA-WERKS = Plant LQUA-MATNR = Part Number LQUA-LGPLA = Storage Bin LQUA-VERME = Available St