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

Similar Messages

  • 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

  • Don't show data from web service to Cross-Tab in xcelsius

    Hi all visitors
    I have created one web service and my web service will show data like this.
    Group ___Floor ____Amount
    Member__Floor 1__1000000
    Member__Floor 2__1000000
    Member__Floor 1__1000000
    Member__Floor 2__1000000
    Member__Floor 2__2200000
    Member__Floor 1__     1000000
    Member__Floor 1__     1000000
    In my xcelsius, i have option to make it to cross-tab.
    when i use that data( data above by manual) to excel spreadsheet. The data will change to
    Group______________Floor1________________Floor2______________GrandTotal
    Member____________5000000_____________ 3200000_____________8200000           
    GrandTotal__________5000000_____________ 3200000_____________8200000
    But when i load the data from web service,It doesn't show anything.
    (when i use list view to show data from web server, i see all data)
    How can i load data from web service and show the data like manually?
    Best Regards,

    Hi Tony,
    As per your example i have used the SUMIF fucntion
    have a glance at that and let me know if you need help
    Data coming from webservice >>     Concat     Group     Floor     Amount
                                              =C7&D7     Member     Floor1     1000000
                                              =C8&D8     Member     Floor2     1000000
                                              =C9&D9     Member     Floor1     1000000
                                              =C10&D10     Member     Floor2     1000000
                                               =C11&D11     Member     Floor2     2200000
                                               =C12&D12     Member     Floor1     1000000
                                              =C13&D13     Member     Floor1     1000000
    Cross Tab >>Group     Floor1                                                                    Floor2
          Member     =SUMIF($B$7:$B$13,$H$7&I6,$E$7:$E$13)     =SUMIF($B$7:$B$13,$H$7&J6,$E$7:$E$13)
         Grand Total     =SUM(I7)                                                                     =SUM(J7)
    Original data after
    Group     Floor1     Floor2
    Member     4,000,000     4,200,000
    Grand Total     4,000,000     4,200,000
    Hope this may solve your issue.
    Ley me know if you have any other issues.
    Regards,
    AnjaniKumar C.A.

  • How to Retrieve Data From Web Service with Optional Arguments

    This should be a simple one. I have a web service that
    returns a list of books. There are 3 optional arguments that can be
    passed to this (ex. book type, author, id) to filter this list. Do
    I still need to use the <mx:request> tags if I am not going
    to pass any parameters to the web service?
    When I look at the services browser in Flex, it says "unable
    to get meta data for CFC". However, if I remove the arguments from
    the CFC and then call the service again, all my data now appears.
    What's the best way to appoach this?
    Thanks in advance

    I have a similar application. What I have done is create one
    argument in my CFC, with a type of "struct". Then, in the Flex
    Application, I create an Object (Associative Array), and pass this
    to the CFC as that one argument.
    Here is the ActionScript:
    // Create the variable to be passed to the WebService
    [Bindable]
    private var object:Object = new Object();
    Then in another function, you create the Object, based on
    specified values - perhaps from ComboBox selections:
    object.bookType = comboBox1.selectedItem["bookType"];
    object.author = comboBox2.selectedItem["author"];
    object.id = comboBox3.selectedItem["id"];
    Then you pass that one argument in your <mx:request>:
    <mx:WebService id="getBooks" wsdl"
    http://server.com/service.wsdl"
    showBusyCursor="true"
    fault="alert(event.fault.faultstring)">
    <mx:operation name="sBooks">
    <mx:request>
    <args>{object}</args>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    Your CFC might look like this:
    <cfcomponent>
    <cffunction method="sBooks">
    <cfargument name="args" type="struct">
    </cffunction>
    </cfcomponent>
    Then you can worry about validating the values passed to the
    CFC in the CFC function. That way, you could send an empty struct
    if you wanted, and the CFC would not throw an exception.
    Hope that helps.

  • How to get data from web service in ADF mobile

    I'm new to ADF mobile application development. I'm currently blocked in a scenario. I have a web service(from third party) which needs <wsse:Security> to retrieve data. In soapUI, the web service will retrieve the response only when there is this security tag. Otherwise it will give response as invalid security. The web service looks like this:
            <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xx="http://xmlns.oracle.com/apps/csf/soaprovider/plsql/xx_fs_mob_login/" xmlns:get="http://xmlns.oracle.com/apps/csf/soaprovider/plsql/xx_fs_mob_login/get_login/">
                   <soapenv:Header>
                      <xx:SOAHeader>
                         <!--Optional:-->
                         <xx:Responsibility>XXX</xx:Responsibility>
                         <!--Optional:-->
                         <xx:RespApplication>XXX</xx:RespApplication>
                         <!--Optional:-->
                         <xx:SecurityGroup>XXX</xx:SecurityGroup>
                         <!--Optional:-->
                         <xx:NLSLanguage>XXX</xx:NLSLanguage>
                         <!--Optional:-->
                         <xx:Org_Id>XXX</xx:Org_Id>
                      </xx:SOAHeader>
        <The portion which is excluded from the soap, but which is required for getting response>
        <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                         <wsse:UsernameToken wsu:Id="UsernameToken-1">
                            <wsse:Username>XXX</wsse:Username>
                            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXX</wsse:Password>
                            <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">XXX</wsse:Nonce>
                            <wsu:Created>2013-02-13T08:58:50.649Z</wsu:Created>
                         </wsse:UsernameToken>
                      </wsse:Security>
        <The portion which is excluded from the soap, but which is required for getting response>
                   </soapenv:Header>
                   <soapenv:Body>
                      <get:InputParameters>
                         <!--Optional:-->
                         <get:P_USERNAME>XXX</get:P_USERNAME>
                      </get:InputParameters>
                   </soapenv:Body>
                </soapenv:Envelope>
    I tried the steps described in ADF mobile tutorial to get web service data. But I'm getting response code 500 from the server. I tried the steps for secured web service also. But I'm not sure which security policy has been implemented in the web service. I tried with oracle/wss_username_client_token_policy and some others but didn't succeed. Later I tried by creating web service client/proxy. But as Oracle ADF only supports java 1.4, I got errors in the generated code(errors on generics and annotation).
    The WSDL for the web service is as follows:
        <definitions xmlns:tns="http://xmlns.oracle.com/apps/csf/soaprovider/plsql/xx_fs_mob_login/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns1="http://xmlns.oracle.com/apps/csf/soaprovider/plsql/xx_fs_mob_login/get_login/" name="XX_FS_MOB_LOGIN" targetNamespace="http://xmlns.oracle.com/apps/csf/soaprovider/plsql/xx_fs_mob_login/">
        <types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/apps/csf/soaprovider/plsql/xx_fs_mob_login/get_login/">
        <include schemaLocation="http://27.251.157.211:8000/webservices/SOAProvider/plsql/xx_fs_mob_login/APPS_XX_FS_MOB_LOGIN_GET_LOGIN.xsd"/>
        </schema>
        <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/apps/csf/soaprovider/plsql/xx_fs_mob_login/">
        <element name="SOAHeader">
        <complexType>
        <sequence>
        <element name="Responsibility" minOccurs="0" type="string"/>
        <element name="RespApplication" minOccurs="0" type="string"/>
        <element name="SecurityGroup" minOccurs="0" type="string"/>
        <element name="NLSLanguage" minOccurs="0" type="string"/>
        <element name="Org_Id" minOccurs="0" type="string"/>
        </sequence>
        </complexType>
        </element>
        </schema>
        </types>
        <message name="GET_LOGIN_Input_Msg">
        <part name="header" element="tns:SOAHeader"/>
        <part name="body" element="tns1:InputParameters"/>
        </message>
        <message name="GET_LOGIN_Output_Msg">
        <part name="body" element="tns1:OutputParameters"/>
        </message>
        <portType name="XX_FS_MOB_LOGIN_PortType">
        <operation name="GET_LOGIN">
        <input message="tns:GET_LOGIN_Input_Msg"/>
        <output message="tns:GET_LOGIN_Output_Msg"/>
        </operation>
        </portType>
        <binding name="XX_FS_MOB_LOGIN_Binding" type="tns:XX_FS_MOB_LOGIN_PortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="GET_LOGIN">
        <soap:operation soapAction="http://XXX:8000/webservices/SOAProvider/plsql/xx_fs_mob_login/"/>
        <input>
        <soap:header message="tns:GET_LOGIN_Input_Msg" part="header" use="literal"/>
        <soap:body parts="body" use="literal"/>
        </input>
        <output>
        <soap:body use="literal"/>
        </output>
        </operation>
        </binding>
        <service name="XX_FS_MOB_LOGIN_Service">
        <port name="XX_FS_MOB_LOGIN_Port" binding="tns:XX_FS_MOB_LOGIN_Binding">
        <soap:address location="http://XXX:8000/webservices/SOAProvider/plsql/xx_fs_mob_login/"/>
        </port>
        </service>
        </definitions>
    Please help me to figure out a solution for this.
    Thanks in advance
    Rino

    how to store the data in the mobile which i fetched from the server using RMS. Can u give me a eg. code. here and send me a link to my email id. [email protected]
    I am using Oravle10g as the database. It is installed in the server.
    I made a connection in servlet using ODBC:JDBC.
    I am able to see the data fetched from the server in my mobile.
    Now, i am trying to save the data. But i dont know how to use the RMS to connect to the Oracle database or pass the string etc.
    Do help me if you dont mind.
    I kept reading and tried some codes but i failed.
    Me still trying...........
    Thanks in Advance.

  • How to flush data from web service to a new page?

    Hi, all.
    I've created a web service that returns some data in xml format. I want to flush that data into a new page. Could anyone help me with this?
    Regards, Sergey.

    Hi,
    Create a portal application using <b>"AbstractPortal Component"</b> fro calling Web service...
    & deploy it in to portal..
    After that create Iview from that PAR file & and assign in to page...
    Regards,
    Senthil K.
    [Points r welcome].

  • Extracting the data from web service response

    Hi,
    I called a web service and in response got an XML data, now I have to extract the values and store in table
    My steps,
    1,call web service
    2,stored response in CLOB column
    3,Then used following query
    SELECT loc.*
    FROM my_xml PO,
    XMLTable(XMLNAMESPACES(
    'urn:schemas-microsoft-com:xml-diffgram-v1' as "diffgr"
    ,'http://api.***.com/' as "ns0"
    ,'/ns0:DataSet/diffgr:diffgram/NewDataSet/OptOutAll'
    PASSING xmltype.createxml(PO.xml_data)
    COLUMNS
    "Email" CHAR(100) PATH 'Email',
    "Reason" CHAR(150) PATH 'Reason'
    ) As loc
    WHERE ROWNUM <= 10;
    I have written it by using this example
    But it is not working, dont know why
    /Zab

    If I use the following sample XML (stored in XMLType table TMP_XML) :
    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap:Body>
        <GetOptOutAllResponse xmlns="http://api.***.com/">
          <GetOptOutAllResult>
            <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas- microsoft-com:xml-msdata">
              <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
                <xs:complexType>
                  <xs:choice minOccurs="0" maxOccurs="unbounded">
                    <xs:element name="OptOutAll">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="OptOutTime" type="xs:dateTime" minOccurs="0"/>
                          <xs:element name="Email" type="xs:string" minOccurs="0"/>
                          <xs:element name="MailingList" type="xs:string" minOccurs="0"/>
                          <xs:element name="SendQueueId" type="xs:int" minOccurs="0"/>
                          <xs:element name="Reason" type="xs:string" minOccurs="0"/>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:choice>
                </xs:complexType>
              </xs:element>
            </xs:schema>
            <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
              <NewDataSet xmlns="">
                <OptOutAll diffgr:id="OptOutAll1" msdata:rowOrder="0" diffgr:hasChanges="inserted">
                  <OptOutTime>2012-05-09T22:40:00+02:00</OptOutTime>
                  <MailingList>information</MailingList>
                  <SendQueueId>111111</SendQueueId>
                  <Reason>Subscriber confirmed</Reason>
                </OptOutAll>
                <OptOutAll diffgr:id="OptOutAll2" msdata:rowOrder="1" diffgr:hasChanges="inserted">
                  <OptOutTime>2012-06-07T22:30:00+02:00</OptOutTime>
                  <MailingList>information</MailingList>
                  <SendQueueId>111111</SendQueueId>
                  <Reason>Subscriber confirmed</Reason>
                </OptOutAll>
                <OptOutAll diffgr:id="OptOutAll3" msdata:rowOrder="2" diffgr:hasChanges="inserted">
                  <OptOutTime>2012-06-14T00:20:00+02:00</OptOutTime>
                  <MailingList>information</MailingList>
                  <SendQueueId>111111</SendQueueId>
                  <Reason>Subscriber confirmed</Reason>
                </OptOutAll>
                <OptOutAll diffgr:id="OptOutAll4" msdata:rowOrder="3" diffgr:hasChanges="inserted">
                  <OptOutTime>2012-06-19T20:50:00+02:00</OptOutTime>
                  <MailingList>information</MailingList>
                  <SendQueueId>111111</SendQueueId>
                  <Reason>Subscriber confirmed</Reason>
                </OptOutAll>
              </NewDataSet>
            </diffgr:diffgram>
          </GetOptOutAllResult>
        </GetOptOutAllResponse>
      </soap:Body>
    </soap:Envelope>Then I can do :
    SQL> SELECT x.*
      2  FROM tmp_xml t
      3     , XMLTable(
      4         XMLNamespaces(
      5           'http://www.w3.org/2003/05/soap-envelope' as "soap"
      6         , 'urn:schemas-microsoft-com:xml-diffgram-v1' as "diffgr"
      7         , 'http://api.***.com/' as "ns0"
      8         )
      9       , '/soap:Envelope/soap:Body/ns0:GetOptOutAllResponse/ns0:GetOptOutAllResult/diffgr:diffgram/NewDataSet/OptOutAll'
    10         PASSING t.object_value
    11         COLUMNS OptOutTime  TIMESTAMP WITH TIME ZONE PATH 'OptOutTime'
    12               , MailingList VARCHAR2(100)            PATH 'MailingList'
    13               , Reason      VARCHAR2(150)            PATH 'Reason'
    14       ) x
    15  ;
    OPTOUTTIME                          MAILINGLIST                    REASON
    09/05/12 22:40:00,000000 +02:00     information                    Subscriber confirmed
    07/06/12 22:30:00,000000 +02:00     information                    Subscriber confirmed
    14/06/12 00:20:00,000000 +02:00     information                    Subscriber confirmed
    19/06/12 20:50:00,000000 +02:00     information                    Subscriber confirmed
    Are you getting anything different?

  • SP 2013 Designer Workflow problems retrieving data from Web Service

    Hi all,
    I am creating a SharePoint 2013 Designer Workflow, and I am having trouble retrieving data from a web service. The web service URL is
    http://services.odata.org/V2/Northwind/Northwind.svc/Customers and the problem I am having is with the SharePoint Designer Workflow “Call HTTP Web Service” action URL. The URL I am
    having problems with is shown below:
    http://services.odata.org/V2/Northwind/Northwind.svc/Customers('[%Current Item:Customer ID%]')?$format=json&$select=CustomerID,CompanyName,ContactName,ContactTitle,Address,City,PostalCode,Country,Phone,Fax
    or
    http://services.odata.org/V2/Northwind/Northwind.svc/Customers('[%Current Item:Customer ID%]')?$select=CustomerID,CompanyName,ContactName,ContactTitle,Address,City,PostalCode,Country,Phone,Fax&$format=json
    The SharePoint 2013 Designer workflow works OK if I try to retrieve two items like "CompanyName" and "ContactName", but when I try to retrieve three or more items the workflow doesn’t work it just pauses
    with no error message. The URL that works OK is shown below:
    http://services.odata.org/V2/Northwind/Northwind.svc/Customers('[%Current Item:Customer ID%]')?$format=json&$select=CompanyName,ContactName
    or
    http://services.odata.org/V2/Northwind/Northwind.svc/Customers('[%Current Item:Customer ID%]')?$select=CompanyName,ContactName&$format=json
    Does anyone know why I cannot retrieve more than two items from a web server? Am I making a mistake with the URL?
    I hope you can
    Colin

    Hi Amit,
    According to your description, my understanding is that you want to approve workflow task using web service in SharePoint 2013.
    For troubleshooting this issue, please provide the more detailed code.
    Here are some similar posts, please check if they are useful:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/b999a417-dce3-4590-9173-89aea91f23a3/complete-workflow-after-approving-all-tasks?forum=sharepointdevelopment
    http://www.sharepointblog.in/2013/07/programmatically-approvereject-task-in.html
    http://aarebrot.net/blog/2011/10/how-sloppiness-and-spworkflowtask-altertask-could-inadvertantly-lock-your-workflow-task/
    I hope this helps.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Binding of Tree to recursive data from web service

    Hi,
    I can't figure out how to bind a Tree component to recursive data from a web service.
    I have a folders structure, where Folder consists of ID, label and array of subfolders (of type Folder).
    Imported model structure shows that recursion, as I repeatedly expand class tree to arbitrary level.
    However, when I try to create service controller for that web service, the recursive node for subFolders is not created - all that shows is ID and label. I was trying to create the recursive node in controller context manually, but it didn't work - the tree is still flat (with only first level visible), altough web service returns full tree with all levels.
    How can I make it work? I was searching forums and Internet, but found only references to artificial example from documentation, where context data are created in code on web dynpro side.
    Thanks for any help!

    Hi,
    Create a portal application using <b>"AbstractPortal Component"</b> fro calling Web service...
    & deploy it in to portal..
    After that create Iview from that PAR file & and assign in to page...
    Regards,
    Senthil K.
    [Points r welcome].

  • Displaying data from Web Service Data Control on a page

    Hi,
    I have a problem with a Web Service Data Control.
    The web service is executed:
    1) When the page (.jspx) is loading. Every time that the page is loaded, the web service is executed!
    2) From a submit button. In this case the web servide is executed two times, in the submit and in the loading of the page.
    I want to avoid the first case because i have to reduce the called to ws. I want to use the second case to call the web service (only one time).
    How can i avoid the execution of the web service when the page (form) is loading?
    Thanks

    Hello Arun,
    I've set refreshCondition property for the iterator to #{!adfFacesContext.initialRender} but doesn't work correctly.
    I'm testing the property with the example in:
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/wssamplebase-321929.zip
    I am using Oracle IDE 11.1.1.5.
    Have you got any ideas what might be the problem.
    Thanks in advance.

  • Re: Extracting the data from web service response

    Hi Odie,
    I am getting an runtime  error when I  ran this  procedure. Also noticed that,   if I  remove all prefix from p_path variable,  I do  not get any runtime error but the result are blanks.
    Would apprecaite, any  help.
    ===============================================
    ORA-19112: error raised during evaluation:
    XVM-01081: [XPST0081] Invalid prefix
    1   /soap:Envelope/soap:Body/ns0:GetOptOutAllResponse/ns0:GetOptOutAllResult/di
    -   ^
    ============================================
    create or replace    procedure temp34 as
    p_path varchar2(400)  := '/soap:Envelope/soap:Body/ns0:GetOptOutAllResponse/ns0:GetOptOutAllResult/diffgr:diffgram/NewDataSet/OptOutAll';
    begin
    for r in (
    SELECT x.*
         FROM tmp_xml t
            , XMLTable(
                XMLNamespaces(
                  'http://www.w3.org/2003/05/soap-envelope' as "soap"
                , 'urn:schemas-microsoft-com:xml-diffgram-v1' as "diffgr"
                , 'http://api.***.com/' as "ns0"
              , p_path
               PASSING t.XML
               COLUMNS OptOutTime  TIMESTAMP WITH TIME ZONE PATH 'OptOutTime'
                   , MailingList VARCHAR2(100)            PATH 'MailingList'
                    , Reason      VARCHAR2(150)            PATH 'Reason'
            ) x
             loop
             dbms_output.put_line(r.MailingList );
             end loop;
    end;
    Thanking you, in advance.

    Hi,
    Any good reasons to use a dynamic XQuery expression via a PL/SQL variable?
    It's not a good idea for two reasons :
    It doesn't work with the XMLNamespaces clause, it is simply ignored.
    It disables parse-time optimization, so no streaming evaluation even tough you're using a binary xmltype source.
    Use a static XQuery string as shown in the beginning of this thread.
    Or, if you really need a variable expression you'll have to declare the namespace mappings in it as well :
    'declare namespace soap = "http://www.w3.org/2003/05/soap-envelope";
    declare namespace diffgr = "urn:schemas-microsoft-com:xml-diffgram-v1";
    declare namespace ns0 = "http://api.***.com/";
    /soap:Envelope/soap:Body/ns0:GetOptOutAllResponse/ns0:GetOptOutAllResult/diffgr:diffgram/NewDataSet/OptOutAll'
    but again that usage is discouraged.
    Also note that declaring namespaces that way only apply to the scope of the main XQuery expression, so if there are any namespace-qualified PATH expressions in the COLUMNS clause, it won't work either.

  • Dates coming from web service

    Hi,
    I'm currently trying to consume in VC a CAF Application Service exposed as a Web Service. I'm able to retrieve what I want but I have a problem with dates format.
    The web service returns dates in the following format: YYYY-MM-DDTHH:NN:SS
    When I test my data service in VC it works fine. When I run my iview, VC swap the month and the day and compute the new date...
    It's not just a problem of formatting with DVAL and DSTR because the date is already computed.
    Example:
    Date returned from web service: 2007-09-21T00:00:01
    Date returned from test data service in VC: 21.09.2007
    Date returned at runtime: 09.09.2008
    VC understand 21.09.2007 not like DD.MM.YYYY but like MM.DD.YYYY so 21.09.2007 becomes 09.09.2008
    I also tried to check on the server Regional and Language option but it doesn't come from there.
    Have you ever faced this problem?
    Thx

    Hi,
    It is a Web Service generated by NWDS (to expose my CAF Application Service)and deployed on the server.
    The url si like http://<hostname>:<port>/mywebservice/Config1?wsdl
    The Web Service runs correctly.
    When I call a method of my web service to retrieve a list of objects (CAF Entity Services) and their attributes, it returns attributes of type String and Dates of type 'java.util.GregorianCalendar'.
    It seems that VC doesn't correctly understand this type of Date at runtime
    Regards,
    Thomas

  • BI 4.0 sp 6 service name to export data from webi to excel

    Hi there,
    I'm using BI 4.0 SP6 and I was just curious to find out which servers/services are invoked while exporting data from WebI report to Excel?
    Thanks in advance.
    Regards,
    samique

    Check below section in the Admin guide for this information.
    Architecture\Process Workflows

  • Itunes was unable to load provider data from sync services. Reconnect or try later

    Hi everyone
    This issue has got me stumped.
    I have a Dell Vostro desktop computer with Windows 7 SP1 64 bit edition.
    I used to be able to sync now I cannot bakup or sync.
    The device is an iphone 4s with the latest software IOS 5.1.
    Itunes is version 10.6.0.40, the latest.
    To try to fix this problem I removed itunes/quick time completely. Removed Bonjour, Apple Application Support, Apple Mobile Device Support, Apple Software Update,
    Deleted the itunes and quick time folders, the common file folders and files, deleted anything related to able under appdata local and roaming, removed apple folder under program data, scanned through registry and removed all apple entries.
    Then I rebooted the computer, re-installed itunes/quicktime and have the same error appear again.
    I have gone through this process at least 5 times , but still keep getting the same error, cannot go past it.
    I found a solution on this forum but it only applies to MACOS, could not find anything suitable for windows 7 environment.
    Also searche the web high and low and tried several different advice from people.
    This has to be a bug with Itunes! I would like to hear from Apple developers and programmers why I have to suffer so much to sync my device.
    As a last resort I am planning to rebuild windows 7 from scratch but is is a big job.
    Tried also to disable firewall, antivirus, check the apple windows services are running, nothing works to get me past this error.
    Please help someone!
    Thanks and regards
    Alfred

    Did you have a look ath this (rather) long thread about it?
    https://discussions.apple.com/message/17214161#17214161 , for example:
    danielfromkongsvinger
    Re: Unable to load provider data from Sync Services 
    16.12.2011 20:21 (in response to wisniak)
    "I then followed a tip found in PCWorld  and performed the following:
    1. Make sure iTunes isn't running.
    2. Click Start, type regedit, then press Enter.
    3. Navigate to this Registry location: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
    4. Look in the main pane for a key that refers to iTunes. If you find one, delete it, then exit the Registry.
    5. Start iTunes. The offending message should be gone!"
    This actually worked for me! I have struggeled with this error for years, and now it's gone. Thanks!

  • Create a schema from web service in eclipse

    Hi all,
    I'm trying to export some data out of SF to an 3rd party via a web service. In the webUI I have the possibility(Attachment 1) to create a schema from web service so my outgoing file matches the requirements. In Eclipse I cannot find that option and I'm encoutering some errors (attachement 2).
    Can anyone tell me if there is a possibility like the web UI in eclipse?
    Thanks in advance.

    Hi,
    You can create a portal service which can access KM to create a folder and then expose this portal service as Web Services.
    To know more:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/cb213e578c0262e10000000a11466f/frameset.htm
    https://www.sdn.sap.com/irj/sdn/thread?threadID=324931
    To know the api to create folder in your service method, check this:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5d0ab890-0201-0010-849d-98d70bd1d5f0
    Some code:
    IResourceContext context = new ResourceContext(user);
    ICollection parent = (ICollection) ResourceFactory.getInstance()
    .getResource(&#8243;/documents&#8243;, context);
    IResource resource = parent.createResource(&#8243;file&#8243;, null, null);
    ICollection collection = parent.createCollection(&#8243;folder&#8243;, null);
    Greetings,
    Praveen Gudapati
    p.s. Points are always welcome for helpful answers

Maybe you are looking for

  • [urgent ]runtime error  occured while creating the material using mm01

    hai am configure the ale program now . the problem is occured during the creating the material using mm01. am using client 000 (sending system). and i want to send the material to the client 400(receiving system) while am  save the created material u

  • IPhone 6 going haywire

    My wife's iPhone 6 is acting crazy.   All day yesterday it stayed at 66% charge but worked fine.   Then last night it went to 1% charge and now is acting very weird. It won't open anything and thebonly thing available on the home screen is to swipe f

  • IMac G5 Shuts down while running applications

    I installed iLife '06. Since then my iMac G5 (20") has started shutting down while I'm working. I'm not sure if the installation is related to the intermittent shut down or if there is another problem. Someone told me that the fan might be bad. I don

  • Possible to open original media file directly from subclip?

    One thing I don't like about subclips is that there are occasionally times when I wish I subclipped a different part of the media file. Is there any way (some kind of menu option or shortcut) to select/view a subclip, and from there view/open it's me

  • Cursor flickering with Excel 2008

    I have a power mac. My cursor keeps flickering when i open Excel. Any ideas??