Complex types returned from web services

I'm having problems getting values from a complex type from a
CFC web service. Are there any tutorials that show you how this is
done? The only tutorials I've seen have been returning simple
types.
I have tried everything I know, which is not a lot I must
admit, I'm just a beginner! *L*
Thanks in advance.

I'm having problems getting values from a complex type from a
CFC web service. Are there any tutorials that show you how this is
done? The only tutorials I've seen have been returning simple
types.
I have tried everything I know, which is not a lot I must
admit, I'm just a beginner! *L*
Thanks in advance.

Similar Messages

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

  • Can objects returned from web services be cast to strongly typed objects?

    Can objects returned from web services be cast to strongly
    typed objects?
    Last I tried this was with one of the beta of Flex2 and it
    did not work. You had to use ObjectProxy or something like that...
    Thanks

    Please post this question in the CRM On Demand Integration Development forum.

  • The format of XML file returned from web service

    Hi everyone,
    My web service (build in asp.net 2.0 with C#) returns the
    following xml file which is not what I want.
    <Root>
    <Root2>
    <Person> .... </Person>
    <Person> .... </Person>
    <Person> .... </Person>
    </Root2>
    </Root>
    But I want my web service to return the following xml file.
    How can I get the following xml file instead of the above xml file
    ? Thanks.
    <Root>
    <Person> .... </Person>
    <Person> .... </Person>
    <Person> .... </Person>
    </Root>

    Thanks for everyone's reply!
    Sorry, I don't know where to set resultFormat="e4x". Below is
    my code. And LINE 111 gives error. And the error message is below.
    And the xml returned from the web service is below.
    Error: Error #2093: The Proxy class does not implement
    getDescendants. It must be overridden by a subclass.
    at Error$/throwError()
    at flash.utils::Proxy/
    http://www.adobe.com/2006/actionscript/flash/proxy::getDescendants()
    at
    LogIn/loginHandler()[P:\JIMMY-FLEX\Flex_LogIn\LogIn.mxml:58]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at
    mx.rpc::AbstractService/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\A bstractService.as:232]
    at mx.rpc::AbstractOperation/
    http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\3.0.x\frameworks\pro jects\rpc\src\mx\rpc\AbstractOperation.as:193
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\3.0.x\frameworks\projec ts\rpc\src\mx\rpc\AbstractInvoker.as:191
    at
    mx.rpc::Responder/result()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:4 1]
    at
    mx.rpc::AsyncRequest/acknowledge()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncR equest.as:74]
    at
    DirectHTTPMessageResponder/completeHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\ messaging\channels\DirectHTTPChannel.as:381]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="100%" height="100%" xmlns:ns1="*">
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.ResultEvent;
    namespace FaciNS = "
    http://FaciNet.com/";
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.soap.WebService;
    //public var __xmlResult:XML;
    public var ws:WebService;
    public function Log_In(UN:String, PW:String):void
    ws.Login(UN, PW);
    public function getLoginData():void {
    loadWSDL();
    Log_In(UN.text, PW.text);
    public function loadWSDL():void
    ws = new mx.rpc.soap.WebService();
    ws.wsdl = "
    http://localhost:50779/VS2008_LogIn/Service.asmx?wsdl"
    ws.useProxy = false;
    ws.addEventListener("fault", faultHandler);
    ws.addEventListener("result", loginHandler);
    ws.loadWSDL();
    public function loginHandler(e:ResultEvent):void {
    var wkSouID:String = e.result[0]..SouID; // LINE 111
    trace(wkSouID);
    public function faultHandler(event:FaultEvent):void
    dispatchEvent(new Event("Error"));
    public function checkUser(UName:String, PWord:String):void {
    getLoginData();
    ]]>
    </mx:Script>
    <mx:Panel id="loginPanel" horizontalScrollPolicy="off"
    verticalScrollPolicy="off" width="400" height="200" x="97"
    y="66">
    <mx:Form id="loginForm" width="100%" height="100%">
    <mx:FormItem label="Username:" color="red">
    <mx:TextInput id="UN" />
    </mx:FormItem>
    <mx:FormItem label="Password:" color="red">
    <mx:TextInput id="PW"/>
    </mx:FormItem>
    </mx:Form>
    <mx:ControlBar>
    <mx:Spacer width="100%" id="spacer1"/>
    <mx:Button label="Login" id="loginButton"
    click="checkUser(UN.text, PW.text)" />
    </mx:ControlBar>
    </mx:Panel>
    </mx:Canvas>
    <?xml version="1.0" encoding="utf-8" ?>
    - <ArrayOfLogIn xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="
    http://www.w3.org/2001/XMLSchema"
    xmlns="
    http://tempuri.org/">
    - <LogIn>
    <SouID>2</SouID>
    <LogInUserID>3</LogInUserID>
    <LogInUserName>samlam</LogInUserName>
    <Password>abc123</Password>
    <DialectID>4</DialectID>
    <CreatedByUserID>5</CreatedByUserID>
    <UpdatedByUserID>5</UpdatedByUserID>
    </LogIn>
    - <LogIn>
    <SouID>3</SouID>
    <LogInUserID>4</LogInUserID>
    <LogInUserName>samlam</LogInUserName>
    <Password>abc123</Password>
    <DialectID>4</DialectID>
    <CreatedByUserID>5</CreatedByUserID>
    <UpdatedByUserID>5</UpdatedByUserID>
    </LogIn>
    </ArrayOfLogIn>

  • How to show all data returned from web service in a dashboard

    Hi I need  create a dashboard with conection with a web service  and  whitout  establish a range in excel,  so be displayed on the dashboard n rows returned by the web service.
    how can I do this?

    Hi Ezequiel,
    I agree with Alan.
    You might find it useful to read the Xcelsius 2008 Best Practices whitepaper: [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a084a11c-6564-2b10-79ac-cc1eb3f017ac]
    Regards,
    Matt

  • Reading complex types of a Web Service  using Axis.

    Hi,
      I am trying to read a WSDL using AXis APIs. Lets say I use this WSDL.
    http://www.dataaccess.com/webservicesserver/conversions.wso?WSDL
      This contains 3 complex types and 7 simple types.
    SymbolTable symbolTable = wsdlParser.getSymbolTable();
    BindingEntry bEntry =  symbolTable.getBindingEntry(binding.getQName());
    Collection c = bEntry.getParameters().values();
        Now when I read through the collection I get only 7 simple types contained in the complex types. Can I read the complex types only when they are registered. I expect this to be available because the parser is expected to read the WSDL. I get only these types.
         Urgent !! So please help !!
          (java.util.HashMap$Values) [
    returnParam = (QName:         string
    name:          null
    isReferenced?  true
    Class:         org.apache.axis.wsdl.symbolTable.BaseType
    Base?:         true
    Undefined?:    false
    isSimpleType?  false
    Node:          null
    Dims:         
    isOnlyLiteralReferenced: false
    RefType:       null
    , NumberToWordsResult, OUT)
    faults = {}
    signature = null
    (inputs, inouts, outputs) = (1, 0, 1)
    list = [(QName:         unsignedLong
    name:          null
    isReferenced?  true
    Class:         org.apache.axis.wsdl.symbolTable.BaseType
    Base?:         true
    Undefined?:    false
    isSimpleType?  false
    Node:          null
    Dims:         
    isOnlyLiteralReferenced: false
    RefType:       null
    , ubiNum, IN)],
    returnParam = (QName:         string
    name:          null
    isReferenced?  true
    Class:         org.apache.axis.wsdl.symbolTable.BaseType
    Base?:         true
    Undefined?:    false
    isSimpleType?  false
    Node:          null
    Dims:         
    isOnlyLiteralReferenced: false
    RefType:       null
    , TitleCaseWordsResult, OUT)
    faults = {}
    signature = null
    (inputs, inouts, outputs) = (2, 0, 1)
    list = [(QName:         string
    name:          null
    isReferenced?  true
    Class:         org.apache.axis.wsdl.symbolTable.BaseType
    Base?:         true
    Undefined?:    false
    isSimpleType?  false
    Node:          null
    Dims:         
    isOnlyLiteralReferenced: false
    RefType:       null
    , sText, IN), (QName:         string
    name:          null
    isReferenced?  true
    Class:         org.apache.axis.wsdl.symbolTable.BaseType
    Base?:         true
    Undefined?:    false
    isSimpleType?  false
    Node:          null
    Dims:         
    isOnlyLiteralReferenced: false
    RefType:       null
    , sToken, IN)],
    returnParam = (QName:         string
    name:          null
    isReferenced?  true
    Class:         org.apache.axis.wsdl.symbolTable.BaseType
    Base?:         true
    Undefined?:    false
    isSimpleType?  false
    Node:          null
    Dims:         
    isOnlyLiteralReferenced: false
    RefType:       null
    , NumberToDollarsResult, OUT)
    faults = {}
    signature = null
    (inputs, inouts, outputs) = (1, 0, 1)
    list = [(QName:         decimal
    name:          null
    isReferenced?  true
    Class:         org.apache.axis.wsdl.symbolTable.BaseType
    Base?:         true
    Undefined?:    false
    isSimpleType?  false
    Node:          null
    Dims:         
    isOnlyLiteralReferenced: false
    RefType:       null
    , dNum, IN)]]

    Hi Shiva
    just check the following link
    http://wiki.apache.org/ws/FrontPage/Axis/StaticDeployment
    thanks & regards
    Shishir Shah

  • 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.

  • 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

  • Complex xml types in a web service request

    Hello,
    I'm a newcomer to APEX and wondered how to create complex data types in a web service reference, and how to address these fields from a page item type. I have a wsdl containing nested lists of strings and don't know how to solve this in APEX, can anyone help me?

    hi Jonjeao,
    i too searching the steps and refrerences for my project.
    i found the solution from
    http://www.oracle.com/technology/products/database/application_express/pdf/Using_Oracle_Application_Express_to_Interact_with_XML-RPC_Style_Web_Services.pdf
    please try your url with xml to web service.
    Thanks
    ~Logaa
    Edited by: Logaa on Apr 2, 2009 1:35 AM

  • Assign error with complex type return message

    Dear all,
    I have an axis web service with complex type return message. When I invoke the web service, and try to assign one element of the result to other variable, it fails with following error message(BPEL Fault:{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure{}
    The invoking web service and assignment BPEL source is as follows:
    <invoke name="registerConference" partnerLink="conferenceCenter" portType="tns:ConfArrangementPort" operation="Conference_Register" inputVariable="registerInput" outputVariable="registerOutput"/>
    <copy>
    <from variable="registerOutput" part="Conference_RegisterReturn" query="/Conference_RegisterReturn/confcity"></from>
    <to variable="bookHotelInput" part="si" query="/si/city"/>
    </copy>
    I tunneled the response SOAP message:
    ==== Response ====
    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Date: Sun, 31 Oct 2004 08:28:27 GMT
    Server: Apache Coyote/1.0
    Connection: close
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <ns1:Conference_RegisterResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://conference.sjtu.edu">
    <ns1:Conference_RegisterReturn href="#id0"/>
    </ns1:Conference_RegisterResponse>
    <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:ConfInfo" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://conference.sjtu.edu">
    <confcity xsi:type="xsd:string">star</confcity>
    <confend xsi:type="xsd:string">20041120</confend>
    <confstart xsi:type="xsd:string">20041116</confstart>
    </multiRef>
    </soapenv:Body>
    </soapenv:Envelope>
    ==============
    However, when i check the invoke activity audit trail, it return the following info:
    <messages>
    <registerInput>
    <part xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" name="gi">
    <gi xmlns="http://conference.sjtu.edu">
    <attendeename xmlns="">ss</attendeename>
    <confname xmlns="">hh</confname>
    </gi>
    </part>
    </registerInput>
    <registerOutput>
    <part xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" name="Conference_RegisterReturn">
    <ns1:Conference_RegisterReturn xmlns:ns1="http://conference.sjtu.edu" href="#id0" />
    </part>
    </registerOutput>
    </messages>
    The detailed value of the return message lost, only leaving the href. Can I find the desired value again? should I try another XPATH expression? should I parse the result from the SOAP message directly? Or it's a problem of the system itself?
    Hope you can do me a favor, thanks.

    From Axis's user guide: RPC services default to the soap section 5 encoding rules, objects will be encoded via "multi-ref" serialization. Document services do not use any encoding (so in particular, you won't see multiref object serialization or SOAP-style arrays on the wire)
    May be I should try document service style instead of RPC. Thanks for your reply.

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

  • 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

  • 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

  • (261705413) Q RPCC-21 Can you compare a performance of "usual" RPC from EJB and RPC from Web Services?

    Q<RPCC-21> Can you compare a performance of "usual" RPC from EJB and RPC from Web
    Services?
    A<RPCC-21> There are additional performance overheads for invoking a web service
    when compared to straight EJB invocation. However, you should not think of web
    services as a way to replace your EJBs instead you should be willing to accept
    some performance decline for the massive gains in platform interoperability and
    the ability to exposure your services outside of you firewall.
    Additionally, performance decreases will be dependent on several factors. The
    most significant of which is the XML-Java and Java-XML translation of the SOAP
    message. This can be very fast if the XML structure is simple but if you web services
    requires a parameter that has a complex XML format you may see a more significant
    slow down.
    Adam

    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.

  • 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

  • WHILE DELETING A SALE ORDER GETTING A RUNTIME ERROR

    hi to all experts, whenever i try to delete a particular sale order im getting a runtime error stating that Short text     Screen: Illegal message What happened?     The current screen processing action was terminated since a situat     occurred wher

  • What is AS for playing external video ?

    Hello, This is probably very basic question, but that just proves the fact that I struggle with AS. I would like to place a thumbnail picture on my web page, which would take the viewer ( when he clicks on it ) to the external video file, which is lo

  • The Tilda character inserts into my text without keyboard input.  Or any input.  Has anyone seen this?

    When I have an AI file open and in the text mode.  The Tilda character "~" is inserted into the text string every few minutes.  I can go away and when I come back there will be 20 "~" all in a row.  Is there any cure?

  • Reg: Copy Control..

    Dear Gurus, while copying from Quatation to Contract line item qty is not copying from quotation. i've checked copy control also, but qty is not copying. is there any special requiement there? Pls. Guide me on this regard. Thanks & Regards, GSK.

  • NoSuchRoleException

    Hi all, we are currently faced with the following issue. (EP7.0SP17) but the issue still exists at least since SP14 or less. In defaultrace we are always having the following error line: SAPEngine_Application_Thread[impl:3]_31##0#0#Error##Plain###com