Getting Inconsistent Results from Web Service

We have a web service that provides Qty Available for several item numbers (current 252 item numbers). It takes in an array of item numbers to be checked. It returns an xml file with those item numbers and the qty available, which is drawn directly from a single table that is repopulated every fifteen minutes. Our customer said that his system shows a different number of records returned each time with consecutive polls.
I tested the service using the endpoint testing web page. (I hope that's the correct term - I am fairly new to this.) I manually entered 175 item numbers.
The first result set had a block of 74 item numbers missing from the middle. The second result set returned everything.
Sample data excerpt:
   <ns0:result>
    <ROWSET>
     <ROW
       num="1">
      <ITEM_NBR>K5-8PE-RD</ITEM_NBR>
      <QTY_AVAILABLE>442</QTY_AVAILABLE>
     </ROW>
    </ROWSET>
   </ns0:result>
   <ns0:result>
    <ROWSET>
     <ROW
       num="1">
      <ITEM_NBR>K5-8PE-WH</ITEM_NBR>
      <QTY_AVAILABLE>5650</QTY_AVAILABLE>
     </ROW>
    </ROWSET>
   </ns0:result>
   <ns0:result
     xsi:nil="1"/>
   <ns0:result
     xsi:nil="1"/>
   <ns0:result
     xsi:nil="1"/>Does this make sense?
Thanks,
Gregory

Turns out the problem was in the Java method. It seems it was opening a new connection for each item number and not closing them.
Changed code to open the connection once, run through the item list, then close the connection.

Similar Messages

  • Problem in Flex to get XML result from web services

    Hi all
    I am struggling a proplem for a whole day, i hope somebody can help.
    I am trying to get the list file of files located on the server, so i use flex to access a ASP.NET ASMX web services, that returns all the file names in a folder.
    I can see that web servicese worked perfectly, however when i try to get the result from flex, i could not figure out how to get the real data i wantted
    public function LoadImage(e:ResultEvent):void{
    imageList.dataProvider = e.result;
    the e.result has some addtional tags, such as
    <GetImageFileListResponse xmlns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <GetImageFileListResult>
        <images>
          <image>01417_ccurve_1280x1024.jpg</image>
          <image>1915619295407381096.png</image>
          <image>21051802471898733113.png</image>
    where GetImageFileList is the operation name used in web service
    I am only interested in the data starting from <images> . I don't know why the addtioanl tag has been added.
    here is the code i have used in flex.
    <mx:WebService 
    wsdl="http://localhost/Flex/GetImageFiles.asmx?WSDL" id="imageWs">
    <mx:operation name="GetImageFileList" result="LoadImage(event)" fault="mx.controls.Alert.show(event.fault.faultString)" resultFormat="
    e4x">
    </mx:operation>
    </mx:WebService> 
    Thanks in advance!!!

    Hi,
    Just replace the below line in your code and check...
    imageList.dataProvider = e.result.GetImageFileListResult.images;
    If this post answers your question or helps, please mark it as such.
    Thanks,
    Bhasker Chari

  • Facing problem while going to  catch return result from web-services.

    Hi everybody,
    I am new to BPEL. I am facing problem while going to catch the attributes of resultsets returning from web-services(QAS). As far as my knowledge, two types of results it should return - XML entities and another is attributes which is coming as the part of XML entitites. I am able to catch the XML entities, but can't catch the attributes under it. Even, I am not able to see whether web-services returning something within that field.
    When, I tried to catch the attribute and store to a temporary varilable using the following code:
    *<assign name="AssignQASDoGetAddress1">*
    *<copy>*
    *<from variable="InvokeQAS_DoSearch_OutputVariable"*
    part="body"
    query="/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded"/>
    *<to variable="temp"/>*
    *</copy>*
    *</assign>*
    but, I am facing the following selectionFailure errors after running it:
    *"{http://schemasxmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.*
    -<selectionFailure xmlns="http://schemasxmlsoap.org/ws/2003/03/business-process/">
    -<part name="summary">
    *<summary>*
    empty variable/expression result.
    xpath variable/expression expression "bpws:getVariableData('InvokeQAS_DoSearch_OutputVariable', 'body', '/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded')" is empty at line 269, when attempting reading/copying it.
    Please make sure the variable/expression result "bpws:getVariableData('InvokeQAS_DoSearch_OutputVariable', 'body', '/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded')"is not empty.
    *</summary>*
    *</part>*
    *</selectionFailure>*
    Getting this error it seems to me that web-service is returning nothing, but, it returns something as it has been catched using a method called isPostcodeRecoded() Java Code in Oracle ADF. This method has been used as it should return boolean whereas for catching the xml entities using java code we used the method like getPostcode(), getMoniker().
    For your information, we are using Jdeveloper as the development tool for building the BPEL process.
    Am I doing any syntax error. Please consider it as urgent and provide me asolution.
    Thanks in advance.
    Chandrachur.

    Thanks Dave and Marc, for your suggestions. Actually what I found is QAS web-service is returning nothing as attributes when the attributes are set to the default value. For example, following is the part of the wsdl of the result which QAS webservice returns.
    <xs:element name="QASearchResult">
    - <xs:complexType>
    - <xs:sequence>
    <xs:element name="QAPicklist" type="qas:QAPicklistType" minOccurs="0" />
    <xs:element name="QAAddress" type="qas:QAAddressType" minOccurs="0" />
    </xs:sequence>
    <xs:attribute name="VerifyLevel" type="qas:VerifyLevelType" default="None" />
    </xs:complexType>
    </xs:element>
    <xs:complexType name="QAPicklistType">
    - <xs:sequence>
    <xs:element name="FullPicklistMoniker" type="xs:string" />
    <xs:element name="PicklistEntry" type="qas:PicklistEntryType" minOccurs="0" maxOccurs="unbounded" />
    <xs:element name="Prompt" type="xs:string" />
    <xs:element name="Total" type="xs:nonNegativeInteger" />
    </xs:sequence>
    <xs:attribute name="AutoFormatSafe" type="xs:boolean" default="false" />
    <xs:attribute name="AutoFormatPastClose" type="xs:boolean" default="false" />
    <xs:attribute name="AutoStepinSafe" type="xs:boolean" default="false" />
    <xs:attribute name="AutoStepinPastClose" type="xs:boolean" default="false" />
    <xs:attribute name="LargePotential" type="xs:boolean" default="false" />
    <xs:attribute name="MaxMatches" type="xs:boolean" default="false" />
    <xs:attribute name="MoreOtherMatches" type="xs:boolean" default="false" />
    <xs:attribute name="OverThreshold" type="xs:boolean" default="false" />
    <xs:attribute name="Timeout" type="xs:boolean" default="false" />
    </xs:complexType>
    <xs:complexType name="PicklistEntryType">
    - <xs:sequence>
    <xs:element name="Moniker" type="xs:string" />
    <xs:element name="PartialAddress" type="xs:string" />
    <xs:element name="Picklist" type="xs:string" />
    <xs:element name="Postcode" type="xs:string" />
    <xs:element name="Score" type="xs:nonNegativeInteger" />
    </xs:sequence>
    <xs:attribute name="FullAddress" type="xs:boolean" default="false" />
    <xs:attribute name="Multiples" type="xs:boolean" default="false" />
    <xs:attribute name="CanStep" type="xs:boolean" default="false" />
    <xs:attribute name="AliasMatch" type="xs:boolean" default="false" />
    <xs:attribute name="PostcodeRecoded" type="xs:boolean" default="false" />
    <xs:attribute name="CrossBorderMatch" type="xs:boolean" default="false" />
    <xs:attribute name="DummyPOBox" type="xs:boolean" default="false" />
    <xs:attribute name="Name" type="xs:boolean" default="false" />
    <xs:attribute name="Information" type="xs:boolean" default="false" />
    <xs:attribute name="WarnInformation" type="xs:boolean" default="false" />
    <xs:attribute name="IncompleteAddr" type="xs:boolean" default="false" />
    <xs:attribute name="UnresolvableRange" type="xs:boolean" default="false" />
    <xs:attribute name="PhantomPrimaryPoint" type="xs:boolean" default="false" />
    </xs:complexType>
    here the attributes like FullAddress, PostcodeRecodedare , etc. are not being return by the web-service when it is getting the default value false. But, if it gets true then , it is being displayed at the BPEL console.
    Do you have any idea how can I catch the attributes and its value even when it gets the default value which is already set. Previously, it was returning(it was not being displayed at the console).
    Thanks once again for your valuable suggestions...!!!
    Chandrachur.

  • Can't retrieve integer result from web services

    I'm trying to retrieve integer result from my web services.
    However, what I got always was zero without any exception caught.
    Can anyone help me?
    public function getIntegerHandler(event:ResultEvent):void {
    var anInteger: int;
    anInteger = event.result.echoInt;
    }

    SOAP response:
    <?xml version='1.0'
    encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="
    http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:getIntegerResponse
    xmlns:ns="
    http://test.com/xsd"><ns:return>2</ns:return></ns:getIntegerResponse></soapenv:Body></soap env:Envelope>

  • How to display complex type result from web service?

    Hi,
    I am trying to invoke a web service with the following code
    but I can't display the result. Can someone help me how to display
    the result?
    <cfset randomID = CreateUUID()>
    <cfset today = Now()>
    <cfset args = StructNew()>
    <cfset args.login = "wanna">
    <cfset args.key = "#DateFormat(today, 'YYYY-MM-DD')#
    #TimeFormat(today, 'hh:mm:ss')#:#Left(randomID,12)#">
    <cfset args.hash= LCase(Hash("123456" & args.key,
    "SHA"))>
    <CFINVOKE webservice="
    http://sandbox.voxbone.com/ws/services/VoxService?wsdl"
    METHOD="getCountriesList"
    AuthenticationToken="#args#"
    RETURNVARIABLE="Result">
    <cfoutput>#Result#</cfoutput>

    I have tried using that that it display the following. I was
    expecting a list of coutries but it display the following text
    only. Can you guide me in displaying list of countries?
    "object of
    voxbone.webservices.services.containers.ArrayOfCountry"
    Methods hashCode (returns int)
    equals (returns boolean)
    getCountry (returns
    [Lvoxbone.webservices.services.containers.Country;)
    getCountry (returns
    voxbone.webservices.services.containers.Country)
    getSerializer (returns interface
    org.apache.axis.encoding.Serializer)
    getDeserializer (returns interface
    org.apache.axis.encoding.Deserializer)
    getTypeDesc (returns org.apache.axis.description.TypeDesc)
    setCountry (returns void)
    setCountry (returns void)
    getClass (returns java.lang.Class)
    wait (returns void)
    wait (returns void)
    wait (returns void)
    notify (returns void)
    notifyAll (returns void)
    toString (returns java.lang.String)

  • Inconsistent Results from dbms_output.get_lines

    Hi,
    I am getting inconsistent results from using dbms_output.get_lines.
    I'm using get_lines in a procedure A that executes a function B to test if the function returns 0 or > 0 to indicate validity of my data. In that function, I use dbms_output.put_lines to communicate data points that I want to use. My procedure A does a get_lines after executing function B then either logs the lines into a table or sends an email.
    Right now, get_lines is behaving sporadically for me. Sometimes I the chararr returns some lines while other times it doesn't. The strange thing is numlines does return a value, and it's the value that I expected.
    Can someone please help?
    Thanks.

    Use parameters or even global package variables to transport data from one procedure to the other. dbms_output is not meant for this, it will not work.

  • Inconsistent results from CallableStatement

    We are getting inconsistent results from a call to an Oracle database. We have a CallableStatement that returns 4 INTEGERs.
    It runs perfectly if I run the Oracle procedure directly from the sql command line and then call it from the java code.
    However if I recompile the Oracle stored procedures and execute the Callable Statement (without first running it from sql) then I am getting incorrect results...1,2,1,1 is being returned instead of 1,2,0,3. Are these results being cached somewhere???
    We are using Oracle 8.1.7, JDK 1.3.1, and Oracle thin driver 8.1.7.
    The code is as follows:
    <pre>
    private CallableStatement autoLBNumbersNeeded;
    private void prepareStatements(){
         autoLBNumbersNeeded=dbConnection.prepareCall("{CALL
         pkg_scheduler.pr_auto_lb_nos(?,?,?,?)}");
         autoLBNumbersNeeded.clearParameters();
         autoLBNumbersNeeded.registerOutParameter(1, java.sql.Types.INTEGER);
         autoLBNumbersNeeded.registerOutParameter(2, java.sql.Types.INTEGER);
         autoLBNumbersNeeded.registerOutParameter(3, java.sql.Types.INTEGER);
         autoLBNumbersNeeded.registerOutParameter(4, java.sql.Types.INTEGER);
    public UserNumber[] doAutoLoadBalancing () throws SQLException {
    autoLBNumbersNeeded.clearParameters();
    autoLBNumbersNeeded.execute();
    mwFF = autoLBNumbersNeeded.getLong(1);
    mwHF = autoLBNumbersNeeded.getLong(2);
    wmFF = autoLBNumbersNeeded.getLong(3);
    wmHF = autoLBNumbersNeeded.getLong(4);
    autoLBNumbersNeeded.clearParameters();
    </pre>
    The Oracle procedure is
    <pre>
    PROCEDURE proc1( p_parm_1 OUT NUMBER, p_parm_2 OUT NUMBER, p_parm_3
    OUT NUMBER, p_parm_4 OUT NUMBER)
    AS
    BEGIN
    -- Get Counts
    SELECT COUNT(*)
    INTO p_parm_1
    FROM blah ......
    SELECT COUNT(*)
    INTO p_parm_2
    FROM blah ......
    SELECT COUNT(*)
    INTO p_parm_3
    FROM blah ......
    SELECT COUNT(*)
    INTO p_parm_4
    FROM blah ......
    EXCEPTION
    blah .......
    END proc1;
    </pre>
    Can anyone help?
    Many thanks
    Fionnuala

    Hi
    Yes I have a debug line that prints them out in the doAutoLoadBalancing method - this is the point where I am diagnosing the problem. It only prints the correct results after I have already run the procedure from the SQL command line.
    public UserNumber[] doAutoLoadBalancing () throws SQLException {
    autoLBNumbersNeeded.clearParameters();
    autoLBNumbersNeeded.execute();
    mwFF = autoLBNumbersNeeded.getLong(1);
    mwHF = autoLBNumbersNeeded.getLong(2);
    wmFF = autoLBNumbersNeeded.getLong(3);
    wmHF = autoLBNumbersNeeded.getLong(4);
    autoLBNumbersNeeded.clearParameters();
    if (m_cat.isDebugEnabled()) {m_cat.debug("mwFF: "+mwFF+"; mwHF: " +mwHF+"; wmFF: "+wmFF+"; wmHF: "+wmHF);}
    </pre>

  • How get data from Web Service with token?

    Can I get data from Web Service made with Java?
    This WS has a Token.
    Any ideas o reference?
    Regards!
    Fran Díaz | twitter: @frandiaz_ | Blog: {geeks.ms/blogs/fdiaz/} | Communities: {onobanet.es} & {secondnug.com}

    We've now added this ability to Web.Contents. You can say something like
    Web.Contents("http://my.web.service/1", [Headers=[#"The-Token"="0a0138ef2d"]])
    and it will pass a header with the key "The-Token" and the value "0a0138ef2d" as part of the HTTP request. For security reasons, this will only work for anonymous web requests.
    The December preview can be downloaded from
    http://www.microsoft.com/en-us/download/details.aspx?id=39933&WT.mc_id=blog_PBI_Update_PowerQuery

  • Error in testing XML query result set web service

    Hi
    I was trying to test a <b>XML query result set web service</b> in BW system with tcode wsadmin but getting error like
    <b>Cannot download WSDL from http://ibmbtsb02.megacenter.de.ibm.com:8070/sap/bw/xml/soap/queyview?sap-client=001&wsdl=1.1&mode=sap_wsdl: F:\usr\sap\W70\DVEBMGS70\j2ee\cluster\server0\apps\sap.com\com.sap.engine.services.webservices.tool\servlet_jsp\wsnavigator\root\WEB-INF\temp\ws1139464945296\wsdls\wsdlroot.wsdl (The system cannot find the path specified)</b>
    I had tried it first time few days ago and was able to test it successfully with the same configuration settings.
    Could any one of you please provide any suggestion on this?
    Thanks in advance
    Sudip

    hi
    check this links it may help u.
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/e3072e65f04445a010847aa970b68b/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/d8/3bfc3f8fc2c542e10000000a1550b0/frameset.htm
    Regards,
    Manoseelan

  • 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());

  • How to get Request Offering from given Service Offering using Service Manager SDK?

    Recently, I am working on application where I have to fetch all Request Offering from given Service Offering. 
    I can retrieve all Request Offering using following method of SM SDK : 
    var requestOfferings = group.Extensions.Retrieve<RequestOffering>();// group is Management Group
    But I am unable to get request Offering from given Service Offering as I am new to this platform. I have searched in web but can not find solution to this problem.
    It would be great if someone guide for this problem or give me any suggestion related to this problem.
    Thanks in advance.

    RequestOfferings are handled a little differently in the SDK, but fortunately, they're still backed by standard EnterpriseManagementObjects..it just takes a little work to get them.
    There are a few ways you can go about getting a request offering's related service offerings. I'm going to show you the relationship route, but you could also use a type projection to achieve the same goal.
    In your original post, you're simply retrieving _all_ request offerings..that's fine. If you wanted to retrieve a single request offering (as I do in my example) you need to find the request offering's identifier. This identifier is a pipe delimited string
    of various values. The quickest way to find it, in my opinion, is to query the MT_System$RequestOffering table in the database, but you can also find it by looping through all the RequestOfferings returned by group.Extensions.Retrieve<RequestOffering>();
    Anyway, for the following example to work, you only need your request offering's Identifier and your management server name. (Again, you could simply loop through all of your request offerings and retrieve the service offerings for all of them)
    The comments inline with this example should guide you through the steps.
    //Connect to the management group and prepare the class and relationship types that we'll need.
    String strMySCSMServer = "your server";
    EnterpriseManagementGroup emg = new EnterpriseManagementGroup(strMySCSMServer);
    ManagementPackClass mpcRO = emg.EntityTypes.GetClass(new Guid("8FC1CD4A-B39E-2879-2BA8-B7036F9D8EE7")); //System.RequestOffering
    ManagementPackRelationship relSORelatesToRO = emg.EntityTypes.GetRelationshipClass(new Guid("BE417A55-6622-0FC3-FCEA-90CD23E0FC23")); //System.ServiceOfferingRelatesToRequestOffering
    //An example of an extension identifier looks like this:
    //1|My.RO.MP|1.0.0.0|Offeringc921c4feujhoi8cdsjloiz352d7gf3k0|3|RequestOffering
    String strRequestOfferingIdentifier = "your request offering identifier";
    //Retrieve the request offering using an Extension Identifier.
    ExtensionIdentifier ei = null;
    ExtensionIdentifier.TryParse(strRequestOfferingIdentifier, out ei);
    RequestOffering ro = emg.Extensions.Retrieve<RequestOffering>(ei);
    //Using the request offering's Identifier, retrieve the enterprise management object that it represents
    EnterpriseManagementObjectCriteria emocRO = new EnterpriseManagementObjectCriteria("ID = '" + ro.Identifier + "'", mpcRO);
    IObjectReader<EnterpriseManagementObject> orROs = emg.EntityObjects.GetObjectReader<EnterpriseManagementObject>(emocRO, ObjectQueryOptions.Default);
    //Since we queried for only a single Request Offering, the object reader should contain 0 or 1 elements.
    EnterpriseManagementObject emoRO = null;
    if (orROs.Count > 0)
    emoRO = orROs.ElementAt(0);
    else
    Console.WriteLine("No Request Offering found");
    //Now, using the relationship type "System.ServiceOfferingRelatesToRequestOffering", get all Service Offering's related to our request offering
    IList<EnterpriseManagementRelationshipObject<EnterpriseManagementObject>> lstEMROs = emg.EntityObjects.GetRelationshipObjectsWhereTarget<EnterpriseManagementObject>(emoRO.Id, relSORelatesToRO, DerivedClassTraversalDepth.None, TraversalDepth.OneLevel, ObjectQueryOptions.Default);
    //The GetRelationshipObjectsWhereTarget method returns a list of EnterpriseManagementObjectRelationships..These objects represent that relationship between two objects.
    //Thus, these relationship objects have two properties of interest; TargetObject and SourceObject. In this case, service offerings are the source of this relationship type and
    //so, you can access the service offering object itself by using the relationship object's SourceObject property (which is nothing more than an EnterpriseManagementObject)
    foreach (EnterpriseManagementRelationshipObject<EnterpriseManagementObject> emro in lstEMROs)
    //emro.SourceObject is your Service Offering object. You can use it for whatever you need from here on out. In this example, i'm just writing out the DisplayName
    EnterpriseManagementObject emoServiceOffering = emro.SourceObject;
    Console.WriteLine(emoServiceOffering[null, "DisplayName"].Value);
    Give it a try, let me know if you have any questions :)

  • While upgrading Adobe Creative Suite CS4 ME into Adobe Creative Suite CS5.5 Design Premium, I get an error saying This serial number is not of a qualifying product, please try another. I used to be able to get a code from customer service but I can't get

    While upgrading Adobe Creative Suite CS4 ME into Adobe Creative Suite CS5.5 Design Premium, I get an error saying This serial number is not of a qualifying product, please try another. I used to be able to get a code from customer service but I can't get to the chat. Please advise!!!!

    MoeGhazal I reviewed your account and it looks like you have have upgraded from a CS4 volume license for Design Premium to a retail upgrade of Design Premium 5.5.
    I also show that you made two purchases of CS5.5 Design Premium but the second purchase was canceled.  Please make sure you are utilizing the serial number which ends in 7886.
    If you are using the correct serial number then it is likely the installer will not recognize your volume license CS4 serial number as being valid for an upgrade.  If you can contact our support team then you can be walked through an unlocking procedure to allow you to proceed with the installation.  You can contact our support team directly at Contact Customer Care.  You may want to try installing a web browser you have not previously utilized.  It is likely a toolbar or some other software application is affecting your ability to access chat support successfully.
    If you are still unable to reach our support team then please verify the information under your account is accurate.  If you can please then update this discussion after confirming this then I can request a member of our support team contact you directly.
    Again I would recommend reaching out directly if possible as it will be the most efficient method of resolving your current error.

  • Binding xml from web service to java objects

    I would appreciate if someone can tell me where can i get information regarding
    binding of xml from web service to java objects in weblogic 6.1 .
    Thanks,
    ag

    Hi Ag,
    To my knowledge, the only information on this topic is whatever you find in the
    documentation. What exactly do you want to know?
    Can you post a set of specific questions?
    Regards,
    Mike Wooten
    "ag" <[email protected]> wrote:
    >
    I would appreciate if someone can tell me where can i get information
    regarding
    binding of xml from web service to java objects in weblogic 6.1 .
    Thanks,
    ag

  • Calling portal service from web service

    Hello,
    I'm trying to call portal service from web service. Is this possible? I'm getting an error.
    For example, code:
    IJCOClientService clientService = (IJCOClientService) PortalRuntime.getRuntimeResources().getService(IJCOClientService.KEY);
    .. is generating exception:
    java.lang.LinkageError: Class com/sapportals/portal/prt/runtime/IPortalRuntimeResources violates loader constraints
    Do anybody knows what's wrong?
    Best regards,
    Josef Motl

    Hi Josef,
    Is the IJCOClientService located on the producer side or on the consumer side?
    Amit

  • Set listbox items from web service response

    Hi All
    I am trying to set list box items from a web service response. Couple of issues over here:
    1. The user should be able to select multiple items from the list. Hence if I set "Allow multiple values" and set Commit on "exit", then after the web service returns the output, no data is displayed in the listbox. I need to click inside the list box to see the data returned by the web service. How to overcome this..??  ( However this problem (clicking inside the listbox to see the items) does not exist if "Allow multiple values" is unchecked and Commit is set on "Select". )
    2. After the list box is filled up, certain default values should be selected. This selection is based on one of the response field (which is actually a table with multiple values... ). Hence, how to capture this response field and set the default values in the above list..??
    3. The same case for a dropdown. The values are visible in dropdown. However, a default value should be selected and displayed after returning a response from web service. Again, this default value is dependant on another field in the response as in point no.2
    I am trying to use postExecute event as described in [this|http://forms.stefcameron.com/2009/03/23/pre-process-web-service-responses/] link...however not able to achieve the functionality. Please provide suggestions / inputs.
    Thanks
    Deepak

    Hello,
    first: I don´t know anything about the right solution. I am unaware of the existence of the solution, because there were quite many of question about this multiple selection problem and I don´t remember a single "answer".
    I can recommend you to simplify everything and create the functionality yourself. I have done that before to avoid these "Adobe-standard" problems. If you have a problem with autofill of the object, ask your WS to send you a single string and pass it yourself using scripting (JS).
    And if you have problems with multiple selection, create your own field/ object. Get the string of values, parse it, create multiple lines of the dynamic table with some suitable tool to check/ select the rows you need (use checkbox for example, and your text as a table row). This way you can selected anything you want with no problems at all. It wil only cost you some extra work.
    Regards, Otto

Maybe you are looking for