Mapping Array string response from Web service

Hi
Need to map the response from a sync call to a WS which contains an array of strings the response message looks like:
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <SOAP-ENV:Body>
- <rpl:readAllRecFromDQStrArrayResponse xmlns:rpl="urn:AS400DBAccessVi">
- <rpl:Response xmlns:pns="urn:java/lang">
  <pns:String>Row 1</pns:String>
  <pns:String>Row 2</pns:String>
  <pns:String>Row 3</pns:String>
  </rpl:Response>
  </rpl:readAllRecFromDQStrArrayResponse>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>
Need to map it to the following MT:
WSResponse
   Response String  1..unbounded

Hi Udo
This the the source and target:
SOURCE:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:AS400DBAccessWsd/AS400DBAccessVi/rpc" targetNamespace="urn:AS400DBAccessWsd/AS400DBAccessVi/rpc">
<xsd:import namespace="urn:java/lang" />
<xsd:element xmlns:ns1="urn:java/lang" name="Response" type="ns1:ArrayOfString" />
</xsd:schema>
TARGET:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://dubal.ae/SOP/SD003" targetNamespace="http://dubal.ae/SOP/SD003">
<xsd:element name="executeDQResponse" type="executeDQResponse" />
<xsd:complexType name="executeDQResponse">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
4c98a2b0c22d11dbbd74001125bd7544
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="String" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
09d279c0c01011dbb867001641ad833b
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Thanks

Similar Messages

  • Extracting Array of objects from web service

    After a couple days of head banging I now have a webservice
    call executing and I am trying to extract / create a class from the
    ResultEvent:
    If the xml returned from the web service is:
    <people>
    <person name="Mike" />
    <person name="Dave" />
    </people>
    and the class is:
    class Person
    public var Name:String;
    The result event is:
    private function doResults(result:ResultEvent):void
    // how do I create an array of Person objects from result, I
    would also like to know how to create a typed array something like
    class PersonList if possible. I just need the raw how to loop the
    result and set the values on the class
    Thanks,
    Mike

    Well I wound up with just trial and error until I got it
    working, Im sure this will be improved as I go, but it's enough to
    press on with the app for now, this code is in the result function
    and result is the ResultEvent wich appears to be an array of
    generic objects representing the objects returned by the service.
    This in no way uses FDS and is talking to a simple dotnet / asp.net
    web service.
    // here app is a singleton class for app level data it is
    bindable and is used to update the view which in this example is
    bound to a public var MyObjects which in this case is an
    ArrayCollection, I unbox to MyObject in a custom view control
    for (var s:String in result.result)
    m = new MyObject();
    m.ID = result.result[s].ID;
    m.Name = result.result[s].Name;
    m.Type = result.result[s].Type;
    app.MyObjects.addItem(m);
    It also appears that you should create the WebService one
    time, and store refrences to the methods during app startup, the
    methods are called Operations and it appears you set the result and
    fault events then call send on the operation to get the data.
    // store this in a singleton app class
    var ws:WebService = new WebService();
    ws.wsdl = "
    http://dev.domain.com/WebService.asmx?WSDL";
    ws.addEventListener("result",doResults);
    ws.addEventListener("fault",doFault);
    ws.loadWSDL();
    // this is the operation which is also stored in the
    singleton app class
    var op:AbstractOperation = ws.getOperation("GetModules");
    // elsewere in the app we get the operation refrence setup
    result and fault and call send, then copy the generic object into
    our cutom classes using the first chunk of code above
    op.addEventListener("result",doResults);
    op.addEventListener("fault",doFault);
    op.send();
    I thought I would post this as I could find no such example
    in the offline or online docs, If anyone has a better way or see's
    a problem please post.
    I hope helps others with non FDS service calls and I look
    forward to hearing comments.
    Thanks,
    Mike

  • ValidateXML and response from Web Services

    Hi,
    I'd like to be able to validate the reponse from a web service invoked via a partner link. I have validateXML true for the PL but that doesn't appear to validate the response. Should it ? Or would I have to come up with a 'manual' method of validating the returned xml ?
    Cheers
    Rob

    I got an exception when I tried to access an expected element in an assign that followed the invoke, but that was all. The response was actuall empty, ie returned
    <MyWSOutputVariable>
    <part name="parameters" >
    <MyWSResponse/>
    </part>
    </MyWSOutputVariable>

  • Response from web service

    hello,
      is there a way to view the response from a web service in a log or something ?
      thanks
    regards

    Hi,
    Yes, In transaction SOAMANAGER, you can activate the trace and display the XML payloads.
    Regards,
    Olivier

  • Axis2 client- Exception while processing response from web service

    Hi,
    My client request is sending the request successfully but on receiving response , it throws the following exceptions:
    Exception in thread "main" org.apache.axis2.AxisFault: Must Understand check failed for header http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd : Security
         at org.apache.axis2.engine.AxisEngine.checkMustUnderstand(AxisEngine.java:97)
         at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
         at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:364)
         at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
         at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
         at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
    Client using Rampart module for WS-Security, plus addressing module by default which is engaged gloabally in axis2.
    Some user suggested me to disable addressing module in axis2 client but no use. Please help!

    Check the header that is being generated in the request , I do not think it has all the elements that has been put in the contract , you can print the SOAP request using handlers in Axis2 . check that and also can you post your config file and the actual contract so that i can help

  • 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

  • Mapping input values for a web service connection to a range of cells

    I've created a web service connection in Xcelsius data manager. My web service requires an array of integer as input parameter. How do I map input values for a web service connection to read from a range of cells in the spreadsheet, e.g. $A$2:$A$20, in similar way of mapping output values to write to a range of cells in the spreadsheet?
    For output values of the web service, I can specify to map the output values to write to a range of cells. However, it doesn't seem to work for reading the input values.
    I can map input values for each node to a single cell, e.g. $A$2, in the spreadsheet. However, when I set the "Read From" field to a range of cells, e.g. $A$2:$A$20, it only reads in the first value in the range.
    Is there any way that we can do this mapping for input values as we do for output values?
    Your assistance is very much appreciated.
    Regards,
    Van

    Van,
    There is a workaround for that...
    Example:
    My Webservice accepts input data range in a specific format with " :" symbol, i.e. 072008:082008
    Now what i do is
    A1 = 072008
    A2 = 082008
    A3 = CONCATENATE(A1,":",A2)
    so A3 = 072008:082008
    Now i map the input value in web service to cell A3
    P.S have 2 input box components and map it to cells A1 and A2, i.e you are giving users an  option to enter the range of values...then web service will capture the range and refreshes data with the range of values user entered.
    hope this helps..
    -Anil

  • What do I do to close eform on screen and display response of web service in another screen.?

    Hi,
    I am trying to build following functionality.
    I want to submit form to a web service through SOAP request on click of a button.
    I want to display response of web service like “form has been submitted successfully” on screen.
    What has been achieved.
    I am able to submit form to an adobe web service passing base64 string to adobe process.(see the script in image#1).
    When I receive base64 string in adobe process, I am able to re-generate document (using getDocFromBase64(/process_data/@inputStr) ).
    After that I am returning a message string to as response “Form submitted successfully”.
    When I get the response I populate response to a text field variable (Out Str). See image#2
    Problem/Desirable functionality.
    I want to close this eform and display the message “form has been submitted successfully” on another page in browser so that it depicts to end user that form has been submitted successfully with confirmation.
    What do I do to close eform on screen and display response of web service in another screen.?
    Image#1
    Image#2

    Method1: This method only works in same PDF window.
    On the click of the submit button, based on the webservice result we can close the PDF. As you already having in the "Out Str", this variable having detailed message kind of thing, so it would be easier if you have one more output variable to know if this submission is success or failure or can use the "Out Str", it self to compare and close the PDF.
    Here i am using "strResult" to hold webservice success or failure using true/ false values.
    Get the "strResult" value from binded field of webservice response and compare and close or display messages based on requirement.
    var strResult = YourFieldname.rawValue;
                        if(strResult != "" && strResult != null){
                                  if(strResult.toUpperCase() == "TRUE"){
                                            xfa.host.messageBox("Successfully Saved the Data.", "Submit Confirmation", 3,0);
                                            //Close the PDF
                                            app.execMenuItem("Close");
                        else{
                                  xfa.host.messageBox("Failed to Save the Data.", "Submit Confirmation", 3,0);
    If the result need to show in separate window and having LiveCycle process connected to PDF via. webservice or REST:
    Method2. If the PDF inside the browser
    Type1 - You can set the process output is document variable, this PDF may contain your static/dynamic message and this PDF. But with this method result PDF opens in same window, host pdf will be disappeared.
    Type2 - You can set the process output is string variable, this STRING may contain your static/dynamic message. In this method the string will be appered in the same PDF window, host pdf will be disappeared.
    Method3. If the PDF is stand alone (not opend in any browser)
    Type1 - You can set the process output is document variable, this PDF may contain your static/dynamic message and this PDF. But with this method result PDF opens in new window, host pdf will be also stayed and may make readonly after submission success.
    Type2 - If the process output is string, it cannot handle this situation, may get the content type exception while receiving the result string, because.
    Used all of the above methods in various situations and it worked without any issues.
    -Raghu.

  • 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

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

  • Error when calling BPEL process from web service client

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

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

  • No response from Web Server

    Hello,
    I have installed Oracle9i application server Rel 2,9i Infrastructure & oracle 8i DB on Win 2000 server.The installation was successful.
    When I access the browser with http://<hostname>:7777 it works fine, it shows HTTP server welcome page.
    Now I am trying to access Portal home page using http://<hostname>:7779/pls/portal
    It seems, it searches for the Web site for sometime & then gives the error "No response from Web Server"
    What is the problem ?? Is there anything with the services ?? I can see two http servers(apps & infrastructure)in the program listing,is it related with these ??
    Please help.I will appreciate your support.
    Regards
    Sandeep

    Hi Sandeep.
    Try run EM WebSite running in http://&lt;hostname&gt;:1810.
    If you are familiarized with this service it should be easy to solve your problem.
    Once you access EM WebSite, you'll see two farms(One for iasdb, and one for Portal). That are some symbols that tell you about the status of Portal. If You see an red arrow pointing down, then you need to access Portal farm to put some services "up".
    Choose the link for Portal Farm.
    This page shows the status of all Portal components.
    For you to get response from your portal http server, there a few of these that must be working.
    They are (by order):
    1. OC4J_Portal;
    2. Web Cache;
    3. HTTP Server;
    For you to start them, you must (for each one) click on it's radio button an choose start.
    With this components "up" you should be able to access Portal.
    Some of other components cannot be started by us, because it's radio button is disabled, but Single Sign-On:orasso:7777 must be "up", and
    Portal:portal:7778 in my case is "down". The rest of OC4J components are needed for other utilities like deploying components.
    Hope i helped you.
    Pedro.

  • Issue with receiving response from web application

    Hi,
    I have configured B2B with business protocol as 'Custom document document over Internet', document exchange protocol as AS2-1.1 and transport protocol HTTPS1.1 to invoke a web application deployed in Oracle Application server. B2B is able to invoke the web application with HTTPS request which contains an xml.
    I have set the acknowledgment mode as 'Sync' and 'Is acknowledgement handled by B2B' as true. But while receiving the response from web application which is an xml, B2B is showing the error as
    Description: Unable to identify the document protocol of the message
    StackTrace:
    Error -: AIP-50083: Document protocol identification error
         at oracle.tip.adapter.b2b.engine.Engine.identifyDocument(Engine.java:3244)
         at oracle.tip.adapter.b2b.engine.Engine.processIncomingMessage(Engine.java:1665)
         at oracle.tip.adapter.b2b.msgproc.Request.postTransmit(Request.java:2382)
         at oracle.tip.adapter.b2b.msgproc.Request.outgoingRequestPostColab(Request.java:1825)
         at oracle.tip.adapter.b2b.msgproc.Request.outgoingRequest(Request.java:974)
         at oracle.tip.adapter.b2b.engine.Engine.processOutgoingMessage(Engine.java:1166)
         at oracle.tip.adapter.b2b.data.MsgListener.onMessage(MsgListener.java:833)
         at oracle.tip.adapter.b2b.data.MsgListener.run(MsgListener.java:400)
         at java.lang.Thread.run(Thread.java:534)
    I have added headers as present in the wire message of the request. In B2B, it is showing the wire message for response as follows.
    TO_PARTY=XXX
    AS2-To=XXX
    DOCTYPE_NAME=TestAS2DT
    DOCTYPE_REVISION=1.0
    Date=Tue, 03 Nov 2009 06:09:22 GMT
    AS2-Version=1.1
    AS2-From=YYY
    Content-Transfer-Encoding=binary
    [email protected]
    ACTION_NAME=TestAS2_BA
    Content-Type=application/xml
    Server=Oracle-Application-Server-10g/10.1.3.4.0 Oracle-HTTP-Server
    MIME-version=1.0
    User-Agent=AS2 Server
    FROM_PARTY=YYY
    Content-Disposition=attachment; filename=1.0
    Connection=Keep-Alive
    From=YYY
    Keep-Alive=timeout=15, max=100
    <?xml version="1.0" encoding="UTF-8"?>
    <Books>
    <Book>
    <BookTitle>Ajax Hacks</BookTitle>
    <Author>Bruce W. Perry</Author>
    <PubDate>March 2006</PubDate>
    </Book>
    </Books>
    I am able to see the xml sent as response from web application in Payload as follows.
    <?xml version="1.0" encoding="UTF-8"?>
    <Books>
    <Book>
    <BookTitle>Ajax Hacks</BookTitle>
    <Author>Bruce W. Perry</Author>
    <PubDate>March 2006</PubDate>
    </Book>
    </Books>
    I am able to see the HTTP response in b2b_dc_transport.log. In transport log it is not showing any error. Please help me to fix this issue.

    Hi,
    Request and Response should be part of same agreement. I hope you are not confused between Acknowledgement and Response. Acknowledgement can be received in the same session (sync mode) but Response will always come in a different session and will be treated as a different document. If, for request, party A is initiator and B is responder then for response party B will be initiator and party A will be responder (as Requset and Response are two docs in case of Custom Document)
    For configuring X-Path, please refer section 8.3.11 Configuring the XPath Expression for a Custom XML Document at below link -
    http://download.oracle.com/docs/cd/B14099_19/integrate.1012/b19370/busact_coll.htm#sthref784
    Please let us know whether you are trying to receive a response or Ack?
    Regards,
    Anuj

  • 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

  • Not getting required output from XML transform in servlet

    I have an XML document and an XSL stylesheet that will produce the output I require when I use the Xalan in-line parser. However, I cannot manage to do the same in a servlet. I have trawled through loads of examples but can't find anything that works

  • ME32L Material Group change

    Hello Guys, In transaction 'ME32L' - agreement, I can see some line's Mat. Grp were '0000'. when I use mm02 change some material's Material Group and come back to see in the ME32L. The Mat. Grp have no change. Can some guys know what is this probelm?

  • Purchase Order from ProMan

    Hi Gurus Im trying to create a purchase order for a component using CNMM but i get the error message : ME648 Tax code V0 in schema TAXUSX invalid. If i convert the purchase requisition from ME21N everything works fine Any ideas what could be missing?

  • Can i get the new iPhone?

    I have the original iPhone and the black part (antenna cover) broke off and it just generally seems to not be working well. Quite frankly i am sick of having to reset it. If i got the phone in September and agreed to a 2 year deal, can i terminate th

  • Failed to send the mail message error code: -49

    Hi, When sending mail outside the company (outside the domain), getting this error: Failed to send the mail message error code: -49 When sending mail internally (within the domain) successfully submitted. I was looking for notes relating to the subje