How to apply condition for 3 countries out of 6 counties (in smartforms)
Moved to correct forum
hi friends,
i have a requirement in SMARTFORMS...
my requirement: i need to implement some logic which should effect only 3 countries out of 6 countries.
now i implemented my logic but the thing is how to restric only for 3 countries?
do i need to write the condition in program line like:
IS_BIL_INVOICE-HD_ORG-SALESORG = 'O110'
IS_BIL_INVOICE-HD_ORG-SALESORG = 'Y110'
IS_BIL_INVOICE-HD_ORG-SALESORG = 'W110'
or
do i need to write condition like:
IS_BIL_INVOICE-HD_ORG-SALESORG = 'O110'
OR
IS_BIL_INVOICE-HD_ORG-SALESORG = 'Y110'
OR
IS_BIL_INVOICE-HD_ORG-SALESORG = 'W110'
please guide me...
thanks in advance,
Edited by: Matt on Mar 23, 2009 10:09 AM
Hi,
your 2 (second) option (with the OR) is the right one.
Gr., Frank
added the SAP help for the operands to inform GURU RAM.
SAP Smart Forms: operand
Specification of a field name or operand
Use
Within a Smart Form a node and all inferior nodes are processed only if
the respective output condition is true. A condition can either be a
logical expression on field values or consist of events or position
queries in the form processing.
You can determine a condition as logical expression using a table
control. Each line of the table control consists of a field name, a
comparison operator, and a comparison value. The comparison value can
itself be a field name. As compariosn operators, the ABAP operators =,
<>, <, >, <=, >=, CP (contains pattern) and NP (not contains pattern)
are allowed.
All lines of the table control are linked with the logical AND. In
addition, you can use a pushbutton of the table control to insert an OR
link for comparisons. In the table control, it is displayed as line with
gray background. The Check function checks whether all field names that
appear in the comparisons are declared in the form interface or in the
global data of the form.
See also: Determining OutputConditions
Similar Messages
-
How to apply license for SSM 7.5 & Netweaver CE 7.1?
How to apply license for SSM 7.5 & Netweaver CE 7.1?
My application server java in SAPMMC: appear message: no valid license found.
Acually we already bought license and download,
So, how to solve this license problem?Chamnap,
When your NetWeaver license expires, it can be restarted, but will only run for 1/2 hour, to allow installing a new license.
Step 1- Start NetWeaver CE from the control console
Step 2 - Log on to NetWeaver Administrator http:///[server]:50000/nwa and go to Configuration tab then Infrastructure sub-tab, then Licenses
Step 3 - Make note of your System Number and Active Hardware Key in the System Parameters section
Step 4 - Navigate to the Service Marketplace http://service.sap.com/licensekey
Step 5 - You are looking for SAP Business Suite - SAP Products with ABAP Stack, Without ABAP stack (WEB AS Java-J2EE Engine) SAP Enterprise Portal link
Step 6 - Fill in your Hardware Key and System # - Make sure you choose this License Type: J2EE Engine - Web Application Server Java (it is not the default selection)
Step 7 - A message at the bottom of the page will note a new key has been generated and you can Download the txt file needed (you also receive an email with the info as well)
Step 8 - (Restart NetWeaver CE - if its timed-out) On the Licenses page of nwa click Install from File > Browse to the txt doc you downloaded and ADD
You now have the new license install. Make note of the date to schedule the time for any future updates, so that service is not interrupted.
If you cannot access the license key on the Service Marketplace you will need to contact your SAP account representative.
Regards,
Bob -
How to put condition for one date range should not interfear with another ?
hi friends,
how to put condition for one date range should not interfear with another date range.
my data base table has two fields
from date
to date.
when we enter the date range in the data base , new date range means from date and to date should not interfear.
can anybody help me.
thanks &Regards,
Revanth
Edited by: rk.kolisetty on Jul 1, 2010 7:18 PMDo it the SAP way....
First entry...from is today, to is 99991231.
New dates entered, now we have two rows...:
from is original date to becomes yesterday.
From is today to is 99991231 -
How to apply business rules with out breaking to patch missing data
Hello Experts,
I am very new to SQL And i have no idea how to apply below rules
Data is polling for every 5 minutes so 12 time intervals per hour 6:00 -->1
6:05---->2
6:50---->11
6:55---->12
6:50---->11
Missing value
Patching
Rule
No values missing
No patching
0
Time interval 1 is null
Time interval 1 is patched with the value from time interval number 2 subject to this not being null.
1.1
Time interval 12 is null
Time interval 12 is patched as the value of time interval 11 subject to this not being null.
1.2
Time intervals 1 and 2 are null
Time interval 1 and 2 are both patched with the value of time interval 3 subject to this not being null
1.3
Two consecutive time intervals (excluding both 1 & 2 or both 11&12) are null e.g. time interval 3 and 4 are null
Average the preceding and succeeding time intervals of the missing 2 values. If time intervals 3 and 4 are null then these become the average of time intervals 2 and 5.
1.4
Time intervals 11 and 12 are missing
Time interval 11 and 12 are both patched with the value of time interval 10 subject to this not being null
1.5
Some time intervals between 2 and 11 are null with 6 or more non null time intervals
Time interval is patched with the average of interval – 1 and interval + 1 subject to these not being null.
For example if time interval 5 was null this would be patched with an average of time interval 4 and time interval 6
n.b this rule can happen up to a maximum of 5 times.
1.6
Three consecutive time intervals are missing
Set all time intervals for the period as null
2.1
More than 6 time intervals are null
Set all time intervals for the period as null
2.2
This will be more info table structure
CREATE TABLE DATA_MIN
DAYASNUMBER INTEGER,
TIMEID INTEGER,
COSIT INTEGER,
LANEDIRECTION INTEGER,
VOLUME INTEGER,
AVGSPEED INTEGER,
PMLHGV INTEGER,
CLASS1VOLUME INTEGER,
CLASS2VOLUME INTEGER,
CLASS3VOLUME INTEGER,
LINK_ID INTEGER
Sampledata
DAYASNUMBER TIMEID COSIT LANEDIRECTION VOLUME AVGSPEED PMLHGV CLASS1vol LINK_ID
20,140,110 201,401,102,315 5 1 47 12,109 0 45 5,001
20,140,110 201,401,102,325 5 1 33 12,912 0 29 5,001
20,140,110 201,401,102,330 5 1 39 14,237 0 37 5,001
20,140,110 201,401,102,345 5 1 45 12,172 0 42 5,001
20,140,110 201,401,102,350 5 1 30 12,611 0 29 5,001
20,140,111 201,401,100,000 5 1 30 12,611 0 29 5,001
output something like FOR above sample data
DAYASNUMBER TIMEID COSIT LANEDIRECTION VOLUME AVGSPEED PMLHGV CLASS1 LINK_ID
Rule
20,140,110 201,401,102,315 5 1 47 12,109 0 45 5,001
0
20,140,110 201,401,102,320 5 1 40 12,109 0 45 5,001
1.4(patched row)
20,140,110 201,401,102,325 5 1 33 12,912 0 29 5,001
0
20,140,110 201,401,102,330 5 1 39 14,237 0 37 5,001
0
20,140,110 201,401,102,335 5 1 42 14,237 0 37 5,001
1.4(patched row)
20,140,110 201,401,102,345 5 1 45 12,172 0 42 5,001
0
20,140,110 201,401,102,350 5 1 30 12,611 0 29 5,001
0
20,140,110 201,401,102,355 5 1 30 12,611 0 29 5,001
1.2(patched row)
20,140,111 201,401,100,000 5 1 30 12,611 0 29 5,001
Any help and suggestions to extend the code to achieve would be greatly appreciate.
Note:Here the key value is Volume to be patched for missed time intervals
Thanks in advancerow_number() OVER (PARTITION BY LANEDIRECTION ORDER BY TIMEID) AS RN,DAYASNUMBER,(*to_date*(timeid,'yyyymmdd hh24miss')) as cte, COSIT,
Are you in the right place? to_date is an Oracle function, and this forum is for Microsoft SQL Server which is a different product.
Erland Sommarskog, SQL Server MVP, [email protected] -
Urgent! how to add Warning for Phase out product
Hi, Can anyone guide soon on how to add a warning message when an Order/Quatation in SAP CRM for phase out product is created so that any sales representive will come to know if total amount/unit defined in the order can be delivered. Reason is to avoid bigger quantity being entered compared to remaining quantity in warehouse.
Hi Piyush
You can define a status in the product master. If you are downloading the product from ECC, you can mention the reason in the material master as "Phase Out Product" and when you download this product in CRM, the status will be shown in Sales and Distribution tab against the field Status.
If the reason is added, then it will give a error message to the sales representative that the product is blocked or phased out.
Hope this will be useful
Thanks and Regards
DJ -
How to update CONDITIONS for SERVICES in ME51N, ME52N.
Hi All,
My requirement is to update the CONDITIONS for SERVICES for the transaction ME51N, ME52N. I'm using BAPI_REQUISITION_CREATE to create the Purchase Requisition.
Thanks.Hi Swetha,
u will definitely update the condition and services by using the bapi
*BAPIREQUISITION_CREATE*_
with regards,
Kiran.G -
How to restrict values and apply condition for a characteristic in a query.
Hi,
I have to add two customer class(characteristic) fields to my query which is available as a navigational attribute in my multiprovider ( from which my query is built ).
One field should give the values directly from master data. The values would be PV, CV, IT, OT. The other field should give only PV and CV based on the condition - Except CV, all others (ie. IT and OT) should be converted as PV.
I like this to be achieved in the query level since i dont want to disturb the underlying cubes in the multicube.
So i have two questions.
1. How to bring two fields in the query for the same characteristic.
2. How to achieve the condition in a characteristic for second customer class field mentioned above.
Could somebody help me in solving this?
Thanks in advance,
SomenathHi Somenath,
you are absolutely right;)
Besides the Third step
Try to add two new Selections to your Structure as
New Selection1 -> Set the Customer Class value to fix 'PV'
New Selection2 -> Set the Customer Class value to fix 'CV'
<b>you have to add</b>
New Selection3 -> Set the Customer Class value to fix 'IT'
New Selection4 -> Set the Customer Class value to fix 'OT'
Fourth step
Hide these four selections
Fifth step: Add a new formula to your Structure
(Customer Class == New Selection3)* New Selection1(Customer Class == New Selection4)* New Selection1(Customer Class == New Selection1)* New Selection2+Customer Class == New Selection2)* New Selection2
Hope it helps
Gabor
ps: experts maybe suggest easier way... -
How to apply metrics for different platform
Hi,
If a metric has different code for different platform, or the metric only runs on some specific type of system, how can we apply it to a group of hosts?
For example, I have a metric that checks only Sun T3 types of systems. I can create a group of hosts that are T3 type system, but how do I apply the metric to this group?
The other example is the way to collect data is different for Soaris and Linux platform, can I have 2 metrics, one apply to the group of Solaris machines, and the other apply to the group of Linux machines?
Thanks.Hi,
You can use EM groups and monitoring templates to accomplish what you want to do. For example, create a group for Solaris hosts and a template to push out appropriate metric settings for the group.
Documentation links:
- EM groups:
http://docs.oracle.com/cd/E24628_01/doc.121/e24473/group_management.htm#DAFHBFCB
- Monitoring templates:
http://docs.oracle.com/cd/E24628_01/doc.121/e24473/monitor_overview.htm#sthref38
Regards,
- Loc -
How to apply condition when parsing XML using XMLTable
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for Linux: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
XML Response to be processed by stored proc:
<TFSResponse>
<TFS>
<referenceNumber>39760</referenceNumber>
<reqId>39760</reqId>
<fromAccount>
<id>1550796</id>
<number>0003210011</number>
</fromAccount>
<toAccount>
<id>1550769</id>
<number>3199109643</number>
</toAccount>
<createdBy>
<userId>627892</userId>
<userLoginId>AAAAAA</userLoginId>
<userTypeId>1</userTypeId>
</createdBy>
</TFS>
</TFSResponse>
Register schema script:
DECLARE
l_schema CLOB;
BEGIN
l_schema := '<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xdb="http://xmlns.oracle.com/xdb">
<xs:element name="TFSResponse" type="TFSResponseWSResponseType" xdb:defaultTable="TEMP_RESULT" />
<xs:complexType name="TFSResponseWSResponseType">
<xs:sequence>
<xs:element maxOccurs="unbounded" name="TFS" type="TFSSummaryWSTO"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TFSSummaryWSTO">
<xs:sequence>
<xs:element name="referenceNumber" type="xs:string"/>
<xs:element name="reqId" type="xs:long"/>
<xs:element name="fromAccount" type="tns:AccountSummaryWSTO" />
<xs:element name="toAccount" type="tns:AccountSummaryWSTO"/>
<xs:element name="createdBy" type="tns:userWSTO"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="AccountSummaryWSTO">
<xs:sequence>
<xs:element minOccurs="1" name="accountId" type="xs:long" />
<xs:element minOccurs="1" name="accountNumber" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="userWSTO">
<xs:sequence>
<xs:element name="userId" type="xs:long" />
<xs:element name="userLoginId" type="xs:string" />
<xs:element name="userTypeId" type="xs:short" />
</xs:sequence>
</xs:complexType>
</xs:schema>';
dbms_xmlSchema.registerSchema(schemaurl => 'TFSWebService_schema.xsd',
schemadoc => l_schema,
enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE);
END;/
Object Type:
CREATE OR REPLACE TYPE DOC_ROWTYPE AS OBJECT
REFERENCENUMBER VARCHAR2(255),
REQID NUMBER(12),
FROMACCOUNTID NUMBER(12),
FROMACCOUNTNUMBER VARCHAR2(35),
TOACCOUNTID NUMBER(12),
TOACCOUNTNUMBER VARCHAR2(35),
CREATEDBYUSERID NUMBER(12),
CREATEDBYUSERLOGINID VARCHAR2(12)
Collection Type:
CREATE OR REPLACE TYPE DOC_TABLETYPE IS TABLE OF DOC_ROWTYPE;
CREATE OR REPLACE PROCEDURE SP_TFS_REPORT (LoginId IN STRING,
requestedByUser IN STRING,
result_cursor OUT SYS_REFCURSOR)
IS
SYSTEM_USER VARCHAR2(12) := 'SYSTEM';
l_http_request UTL_HTTP.req;
l_http_response UTL_HTTP.resp;
l_string_request VARCHAR2(1024);
l_result_xml XMLTYPE;
docExtTable_XML DOC_TABLETYPE := DOC_TABLETYPE();
docExtRecord DOC_ROWTYPE;
BEGIN
l_string_request := .....(prepare web service request here)
l_http_response := UTL_HTTP.get_response(l_http_request);
resp_in_xml := XMLTYPE(l_clob_response);
INSERT INTO TEMP_RESULT VALUES l_result_xml;
SELECT DOC_ROWTYPE (t1.referenceNumber, t1.reqId, t2.accountId, t2.accountNumber, t3.accountId, t3.accountNumber,
t4.userLoginId, t4.userId)
BULK COLLECT INTO docExtTable_XML
FROM TEMP_RESULT ltr,
XMLTABLE('/TFSResponse/TFS'
PASSING ltr.object_value
COLUMNS
referenceNumber VARCHAR2(255 BYTE) PATH 'referenceNumber',
reqId NUMBER(12) PATH 'reqId',
fromAccountXML XMLTYPE PATH 'fromAccount',
toAccountXML XMLTYPE PATH 'toAccount',
createdByXML XMLTYPE PATH 'createdBy'
) t1,
XMLTABLE('/fromAccount'
PASSING t1.fromAccountXML
COLUMNS
accountId NUMBER(12) PATH 'accountId',
accountNumber VARCHAR2(35 BYTE) PATH 'accountNumber'
) t2,
XMLTABLE('/toAccount'
PASSING t1.toAccountXML
COLUMNS
accountId NUMBER(12) PATH 'accountId',
accountNumber VARCHAR2(35 BYTE) PATH 'accountNumber'
) t3,
XMLTABLE('/createdBy'
PASSING t1.createdByXML
COLUMNS
userId NUMBER(12) PATH 'userId',
userLoginId VARCHAR2(12 BYTE) PATH 'userLoginId' ----- This value should be set based on a condition*
) t4
OPEN result_cursor FOR SELECT * FROM TABLE (DOC_TABLETYPE);
COMMIT;
END SP_TFS_REPORT
The condition is like this
IF (requestedByUser = true and createdByUserType = '2') then
CREATEDBYUSERLOGINID := SYSTEM_USER;
ELSE
Take CREATEDBYUSERLOGINID from XML value 'userLoginId'
where 'requestedByUser' is the input parameter to the stored procedure and 'createdByUserType' is the value from XML.
'userTypeId' is not required to be set in collection.
Now my question is how to put that condition when doing the XML parsing.
Edited by: 991900 on Mar 19, 2013 9:54 AMAdd a projection for "userTypeId" in T4, then use a CASE statement in the SELECT clause :
SELECT DOC_ROWTYPE (
t1.referenceNumber, t1.reqId, t2.accountId, t2.accountNumber, t3.accountId, t3.accountNumber,
t4.userId,
CASE WHEN requestedByUser = 'true' AND t4.userTypeId = 2
THEN system_user
ELSE t4.userLoginId
END
BULK COLLECT INTO docExtTable_XML
FROM TEMP_RESULT ltr,
XMLTABLE('/TFSResponse/TFS'
PASSING ltr.object_value
COLUMNS
referenceNumber VARCHAR2(255 BYTE) PATH 'referenceNumber',
reqId NUMBER(12) PATH 'reqId',
fromAccountXML XMLTYPE PATH 'fromAccount',
toAccountXML XMLTYPE PATH 'toAccount',
createdByXML XMLTYPE PATH 'createdBy'
) t1,
XMLTABLE('/fromAccount'
PASSING t1.fromAccountXML
COLUMNS
accountId NUMBER(12) PATH 'accountId',
accountNumber VARCHAR2(35 BYTE) PATH 'accountNumber'
) t2,
XMLTABLE('/toAccount'
PASSING t1.toAccountXML
COLUMNS
accountId NUMBER(12) PATH 'accountId',
accountNumber VARCHAR2(35 BYTE) PATH 'accountNumber'
) t3,
XMLTABLE('/createdBy'
PASSING t1.createdByXML
COLUMNS
userId NUMBER(12) PATH 'userId',
userLoginId VARCHAR2(12 BYTE) PATH 'userLoginId',
userTypeId NUMBER PATH 'userTypeId'
) t4
; -
How to change URL for "Log Out" link in CE?
We need the Communications Express "Log Out" link to go to a different page to the usual log in page. How can I change this?
I've found the logout function in the uwc/common/Header.jsp file which looks like:
function logout() {
url = "<%= getLogoutURL(request) %>";
top.window.location = url;
}and I've found the getLogoutURL fuction in the uwc/js/resourceBundleUtils.js file which looks like:
public String getLogoutURL(HttpServletRequest request)
return UWCApplicationHelper.getLogoutURL(request);
}But I can't find where the URL is actually configured.
any help would be much appreciated.
Edited by: brett_ac on Jun 30, 2009 5:05 PMbrett_ac wrote:
We need the Communications Express "Log Out" link to go to a different page to the usual log in page. How can I change this?
I've found the logout function in the uwc/common/Header.jsp file which looks like:
function logout() {
url = "<%= getLogoutURL(request) %>";
top.window.location = url;
You got it in one. If you wanted the logout button to redirect to google you would set:
function logout() {
url = "http://google.com/";
top.window.location = url;Then restart the web-container.
and I've found the getLogoutURL fuction in the uwc/js/resourceBundleUtils.js file which looks like:
public String getLogoutURL(HttpServletRequest request)
return UWCApplicationHelper.getLogoutURL(request);
}But I can't find where the URL is actually configured.UWCApplicationHelper is in inbuilt java class. The UWCApplicationHelper.getLogoutURL java function returns:
<current URL context>/base/UWCMain?op=logoutSo for example if UWC is deployed to http://myserver.domain.com/uwc you would get a logout URL of:
http://myserver.domain.com/uwc/base/UWCMain?op=logoutRegards,
Shane. -
How to Apply Databank for 2 or more than 2 fields?
hi,
Suppose on a form we have 2 fields like First name and Last name . So in .csv file I have given like First Name,Last Name (comma separated) and my databank file gets created.
But before playing back the application , how can i attach the databank(.csv file) for 2 different script nodes in Tree View?
If i try to substitue variable , where i have to apply databank then at the time of applying to First Name field it fetches the value for both of the fields value i.e First Name, Last Name
So at the time of playback the application for First Name field it will fetch the value for both First name, Last Name.hi,
Suppose my form contains the following fields as:
Project,Category,Start Time,End Time,Task Assigned,Task Description
and I want to apply databank values for these fields
Steps which i do are as follows.
1. First of all i Configure the databank file as:
Project,Category,Start Time,End Time,Task Assigned,Task Description
and the values pass are :
Orgnization Process,General,13: 00,14 : 00,test1,test2(in the first row)
NMDGF,General,14:00,15:00,test3,test4(in the second row).
2. After configuring the databank file i have to link with Script node. But since there are more than one fields so how i can link the csv file with script node?
as for the single variable script node , i just substitute the value and link with the databank file its work perfectly fine and it add the folowing code in java code
getDatabank("Timesheet Project").getNextDatabankRecord(); in the starting of run function
3. So i have to add custom code for fetching the value for the next field? As I am not so gud in Java Code so what wil be the code to fetch the values for the next field from CSV file -
How to apply Authentication for a webservice getting SOAPFaultException :(
Hi ,
I am working with weblogic 10.1.3 and running build.xml in eclipse for EE
I would like to know the steps to include security parameters to authenticate with weblogic server and call webservice
I have written a build.xml that takes input as wsdl , When I run the build.xml it generates
all the necessary stubs and interfaces
I have written a main program that imports generated classes and invoke the webservice method
below are buidl.xml and two classes( main program and one java class) which I used to invoke webservice
Build.xml
=====
<project name="webservices-simple_client" default="all">
<!-- set global properties for this -->
<property name="wls.hostname" value="localhost" />
<property name="wls.port" value="8002" />
<property name="example-output" value="output" />
<property name="clientclass-dir" value="${example-output}/srcclasses" />
<property name="clientclassfiles-dir" value="${example-output}/classfiles" />
<path id="client.class.path">
<pathelement path="${clientclass-dir}" />
<pathelement path="${java.class.path}" />
</path>
<taskdef name="clientgen" classname="weblogic.wsee.tools.anttasks.ClientGenTask" />
<target name="clean">
<delete dir="${clientclass-dir}" />
<delete dir="../src/com/bea/wlcp/wlng/ws/presence" />
<delete dir="../src/org/csapi/schema/paralyx/common/v2_1" />
<delete dir="../src/org/csapi/schema/paralyx/presence/consumer/v2_3/local" />
<delete dir="../src/org/csapi/schema/parlayx/presence/v2_3" />
<echo message="Cleaning Completed" />
</target>
<target name="build-client">
<clientgen wsdl="http://${wls.hostname}:${wls.port}/parlayx21/presence/PresenceConsumer?WSDL" destdir="${clientclass-dir}" generatepolicymethods="true" packageName="com.bea.wlcp.wlng.ws.presence" />
<javac srcdir="${clientclass-dir}" destdir="${clientclassfiles-dir}" includes="*/.java" />
<copy overwrite="true" todir="../src">
<fileset dir="${clientclass-dir}" />
</copy>
<copy overwrite="true" todir="../src">
<fileset dir="${clientclassfiles-dir}" />
</copy>
<delete dir="${clientclass-dir}" />
<delete dir="${clientclassfiles-dir}" />
<echo message="Building Completed" />
</target>
<target name="all" depends="clean,build-client" />
</project>
======================================================
import java.net.URI;
import javax.xml.rpc.Stub;
import javax.xml.ws.BindingProvider;
import java.net.Proxy;
import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.List;
import weblogic.webservice.wsdl.WsdlPort;
import weblogic.wsee.connection.transport.http.HttpTransportInfo;
import weblogic.wsee.jaxrpc.ServiceImpl;
import org.csapi.schema.parlayx.common.v2_1.PolicyException;
import org.csapi.schema.parlayx.common.v2_1.SimpleReference;
import org.csapi.schema.parlayx.presence.consumer.v2_3.local.SubscribePresence;
import org.csapi.schema.parlayx.presence.consumer.v2_3.local.SubscribePresenceResponse;
import com.bea.wlcp.wlng.et.core.module.session_manager.GTUsernameTokenPolicy;
import com.bea.wlcp.wlng.et.core.module.session_manager.SessionManagerService_Impl;
import com.bea.wlcp.wlng.ws.presence.PresenceConsumer;
import com.bea.wlcp.wlng.ws.presence.PresenceConsumerService_Impl;
import com.bea.wlcp.wlng.ws.sessionmanager.SessionManager;
import com.bea.wlcp.wlng.ws.sessionmanager.SessionManagerService;
import weblogic.wsee.security.unt.ClientUNTCredentialProvider;
import weblogic.xml.crypto.wss.WSSecurityContext;
import weblogic.xml.crypto.wss.provider.CredentialProvider;
@SuppressWarnings("deprecation")
public class Main {
@SuppressWarnings("unchecked")
public static void main(String[] args) throws javax.xml.rpc.ServiceException,PolicyException{
try{
/*PresenceConsumerService_Impl pcs_impl = new PresenceConsumerService_Impl("http://localhost:8002/parlayx21/presence/PresenceConsumer?WSDL");
PresenceConsumer pc = (PresenceConsumer) pcs_impl.getPresenceConsumer();
UserCredentialsvalidation gt = new UserCredentialsvalidation("sdpai","sdp");*/
SimpleReference rf = new SimpleReference();
rf.setCorrelator("correlatorid");
rf.setEndpoint(URI.create("http://localhost:8002/PresenceConsumerService/services/PresenceConsumer"));
rf.setInterfaceName("PresenceConsumer");
SubscribePresence sb = new SubscribePresence();
sb.setApplication("sdp");
sb.setPresentity(URI.create("tel:1234"));
sb.setReference(rf);
System.out.println(" Before calling subscribe presence ==" );
//SubscribePresenceResponse spr = pc.subscribePresence(sb);
System.out.println(" Hi There here 2226678565");
System.out.println(" Hi There here 333");
//raja
String strUrl = "http://localhost:8002/parlayx21/presence/PresenceConsumer?WSDL";
Stub objStub = (Stub) new PresenceConsumerService_Impl().getPresenceConsumer();
objStub._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY,"sdpai");
objStub._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY,"sdp");
objStub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,strUrl);
PresenceConsumer port = (PresenceConsumer) objStub;
String returnVal = "";
System.out.println(" Hi There here 77");
SubscribePresenceResponse spr = port.subscribePresence(sb);
System.out.println(spr);
//ended here
catch(Exception e)
e.printStackTrace();
=======================================
UserCredentialsvalidation.java
import com.bea.wlcp.wlng.et.core.module.session_manager.SessionManagerService_Impl;
import com.bea.wlcp.wlng.schema.ews.common.ServiceException;
import com.bea.wlcp.wlng.ws.sessionmanager.SessionManager;
import com.bea.wlcp.wlng.ws.sessionmanager.SessionManagerService;
import weblogic.wsee.security.unt.ClientUNTCredentialProvider;
import javax.xml.rpc.Stub;
import java.util.ArrayList;
import java.util.List;
public class UserCredentialsvalidation implements PolicyBase {
private String username;
private String password;
public UserCredentialsvalidation(String username, String password) {
this.username = username;
this.password = password;
String sessionManagerURL="http://localhost:8002/session_manager/SessionManager";
SessionManagerService accessservice = null;
try {
accessservice = (SessionManagerService) new SessionManagerService_Impl(sessionManagerURL+"?WSDL");
SessionManager port = accessservice.getSessionManager();
System.out.println(" port >>>>>");
System.out.println(" port >>>>>" +port);
UserCredentialsvalidation pbase = new UserCredentialsvalidation();
pbase.prepareStub((Stub)port,username,password);
} catch (Exception e) {
System.out.println(" helo helo");
// TODO Auto-generated catch block
e.printStackTrace();
public UserCredentialsvalidation() {
// TODO Auto-generated constructor stub
public void prepareStub(Stub stub,String username,String password) throws Exception {
List<ClientUNTCredentialProvider> credProviders = new ArrayList<ClientUNTCredentialProvider>();
System.out.println(" username >>> " + username.getBytes());
System.out.println(" password >>> " + password.getBytes());
credProviders.add(new ClientUNTCredentialProvider(username.getBytes(),
password.getBytes()));
System.out.println("setting standard wssec");
stub._setProperty("weblogic.wsee.security.wss.CredentialProviderList",
credProviders);
System.out.println("Getting property from stub== " + stub._getProperty("weblogic.wsee.security.wss.CredentialProviderList"));
@Override
public void prepareStub(Stub port) throws Exception {
// TODO Auto-generated method stub
=========================================
When I run the main program I am getting below exception
Before calling subscribe presence ==
Hi There here 2226678565
Hi There here 333
Hi There here 77
java.rmi.RemoteException: SOAPFaultException - FaultCode {http://schemas.xmlsoap.org/soap/envelope/}Server FaultString Unable to add security token for identity FaultActor nullNo Detail; nested exception is:
weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Unable to add security token for identity
at com.bea.wlcp.wlng.ws.presence.PresenceConsumer_Stub.subscribePresence(PresenceConsumer_Stub.java:37)
at Main.main(Main.java:62)
Caused by: weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Unable to add security token for identity
at weblogic.wsee.codec.soap11.SoapCodec.decodeFault(SoapCodec.java:355)
at weblogic.wsee.ws.dispatch.client.CodecHandler.decodeFault(CodecHandler.java:115)
at weblogic.wsee.ws.dispatch.client.CodecHandler.decode(CodecHandler.java:100)
at weblogic.wsee.ws.dispatch.client.CodecHandler.handleFault(CodecHandler.java:88)
at weblogic.wsee.handler.HandlerIterator.handleFault(HandlerIterator.java:309)
at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:269)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.handleResponse(ClientDispatcher.java:213)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:150)
at weblogic.wsee.ws.WsStub.invoke(WsStub.java:87)
at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:337)
at com.bea.wlcp.wlng.ws.presence.PresenceConsumer_Stub.subscribePresence(PresenceConsumer_Stub.java:32)
... 1 more
Caused by: weblogic.xml.crypto.wss.WSSecurityException: Unable to add security token for identity
at weblogic.wsee.security.wss.SecurityPolicyDriver.processIdentity(SecurityPolicyDriver.java:175)
at weblogic.wsee.security.wss.SecurityPolicyDriver.processOutbound(SecurityPolicyDriver.java:73)
at weblogic.wsee.security.WssClientHandler.processOutbound(WssClientHandler.java:71)
at weblogic.wsee.security.WssClientHandler.processRequest(WssClientHandler.java:55)
at weblogic.wsee.security.WssHandler.handleRequest(WssHandler.java:74)
at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)
at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:107)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:132)
... 4 more
==========================================================
I am working for 3 days to solve this issue, but helpless
Please tell me I am going in right way , I read many forums and implemented different ways , but getting same problem, that too before calling webservice method .
Do i need to do anything more apart from adding username and password parameters
Please tell me the exact steps how to perform authentication with webservices
Your answer will help me a lot .
Thanks in Advance
Regards
RajasekharPlease find the modified file Main.java
import java.net.URI;
import javax.xml.rpc.Stub;
import javax.xml.ws.BindingProvider;
import java.net.Proxy;
import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.List;
import weblogic.webservice.wsdl.WsdlPort;
import weblogic.wsee.connection.transport.http.HttpTransportInfo;
import weblogic.wsee.jaxrpc.ServiceImpl;
import org.csapi.schema.parlayx.common.v2_1.PolicyException;
import org.csapi.schema.parlayx.common.v2_1.SimpleReference;
import org.csapi.schema.parlayx.presence.consumer.v2_3.local.SubscribePresence;
import org.csapi.schema.parlayx.presence.consumer.v2_3.local.SubscribePresenceResponse;
import com.bea.wlcp.wlng.et.core.module.session_manager.GTUsernameTokenPolicy;
import com.bea.wlcp.wlng.et.core.module.session_manager.SessionManagerService_Impl;
import com.bea.wlcp.wlng.ws.presence.PresenceConsumer;
import com.bea.wlcp.wlng.ws.presence.PresenceConsumerService_Impl;
import com.bea.wlcp.wlng.ws.sessionmanager.SessionManager;
import com.bea.wlcp.wlng.ws.sessionmanager.SessionManagerService;
import weblogic.wsee.security.unt.ClientUNTCredentialProvider;
import weblogic.xml.crypto.wss.WSSecurityContext;
import weblogic.xml.crypto.wss.provider.CredentialProvider;
@SuppressWarnings("deprecation")
public class Main {
@SuppressWarnings("unchecked")
public static void main(String[] args) throws javax.xml.rpc.ServiceException,PolicyException{
try{
/*PresenceConsumerService_Impl pcs_impl = new PresenceConsumerService_Impl("http://localhost:8002/parlayx21/presence/PresenceConsumer?WSDL");
//PresenceConsumer pc = (PresenceConsumer) pcs_impl.getPresenceConsumer();*/
UserCredentialsvalidation gt = new UserCredentialsvalidation("sdpai","sdp");
SimpleReference rf = new SimpleReference();
rf.setCorrelator("correlatorid");
rf.setEndpoint(URI.create("http://localhost:8002/PresenceConsumerService/services/PresenceConsumer"));
rf.setInterfaceName("PresenceConsumer");
SubscribePresence sb = new SubscribePresence();
sb.setApplication("sdp");
sb.setPresentity(URI.create("tel:1234"));
sb.setReference(rf);
System.out.println(" Before calling subscribe presence ==" );
//SubscribePresenceResponse spr = pc.subscribePresence(sb);
System.out.println(" Hi There here 2226678565");
System.out.println(" Hi There here 333");
//raja
String strUrl = "http://localhost:8002/parlayx21/presence/PresenceConsumer?WSDL";
Stub objStub = (Stub) new PresenceConsumerService_Impl().getPresenceConsumer();
objStub._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY,"sdpai");
objStub._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY,"sdp");
objStub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,strUrl);
PresenceConsumer port = (PresenceConsumer) objStub;
String returnVal = "";
System.out.println(" Hi There here 77");
SubscribePresenceResponse spr = port.subscribePresence(sb);
System.out.println(spr);
//ended here
catch(Exception e)
e.printStackTrace();
==============================
When I run the main program getting below exception
port >>>>>
port >>>>>com.bea.wlcp.wlng.ws.sessionmanager.SessionManager_Stub@19c0bd6
username >>> [B@1cd280b
password >>> [B@29ac
setting standard wssec
Getting property from stub== [[ClientUNTCredentialProvider: username=sdpai password=is set]]
Before calling subscribe presence ==
Hi There here 2226678565
Hi There here 333
Hi There here 77
java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}Server] FaultString [Unable to add security token for identity] FaultActor [null]No Detail; nested exception is:
weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Unable to add security token for identity
at com.bea.wlcp.wlng.ws.presence.PresenceConsumer_Stub.subscribePresence(PresenceConsumer_Stub.java:37)
at Main.main(Main.java:62)
Caused by: weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Unable to add security token for identity
at weblogic.wsee.codec.soap11.SoapCodec.decodeFault(SoapCodec.java:355)
at weblogic.wsee.ws.dispatch.client.CodecHandler.decodeFault(CodecHandler.java:115)
at weblogic.wsee.ws.dispatch.client.CodecHandler.decode(CodecHandler.java:100)
at weblogic.wsee.ws.dispatch.client.CodecHandler.handleFault(CodecHandler.java:88)
at weblogic.wsee.handler.HandlerIterator.handleFault(HandlerIterator.java:309)
at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:269)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.handleResponse(ClientDispatcher.java:213)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:150)
at weblogic.wsee.ws.WsStub.invoke(WsStub.java:87)
at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:337)
at com.bea.wlcp.wlng.ws.presence.PresenceConsumer_Stub.subscribePresence(PresenceConsumer_Stub.java:32)
... 1 more
Caused by: weblogic.xml.crypto.wss.WSSecurityException: Unable to add security token for identity
at weblogic.wsee.security.wss.SecurityPolicyDriver.processIdentity(SecurityPolicyDriver.java:175)
at weblogic.wsee.security.wss.SecurityPolicyDriver.processOutbound(SecurityPolicyDriver.java:73)
at weblogic.wsee.security.WssClientHandler.processOutbound(WssClientHandler.java:71)
at weblogic.wsee.security.WssClientHandler.processRequest(WssClientHandler.java:55)
at weblogic.wsee.security.WssHandler.handleRequest(WssHandler.java:74)
at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)
at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:107)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:132)
... 4 more -
How to apply conditional build tags to the topic title that is displayed in Search tab of CHM?
I have the project in which 2 different words are used to reffer to one objects (this word/term depends on the customer). All other information related to functionality, steps, etc. are common. So:
In the help content (body of the files), I created 2 conditional build tags (CBT) for these terms.
In TOC, if topic title contains the term, I created 2 different topics reffered to the single topic file, but the title of the topic shows correct term (depends on CBT).
File names of this topics contain only term1.
The problem occurs when I generate CHM for CBT2 and search for the term1 (marked with CBT1) using the Search tab. All occurrencies where term1 presence in the file name, appear in the found results.
How can I resolve the issue?
These topics must be found by search (that's why "Exclude from search" option is not a decision).Ahhh, you are correct. I believe it was Version 10 introduced that.
So here's what I'd suggest. Even though you are unable to use a variable in a Topic Title, it can still be used in other places such as the TOC, the Index and in the Topic content. So I'd still recommend that you declare and use a variable for those items. Just to simplify things.
As for any topics that have the term in the title, you could create two topics. One with the term one way and the other with the term the opposite way. Then use a Conditional Build Tag to exclude and remove the one that shouldn't be found.
This may cause you a bit of a maintenance issue by having the same topic content in more than one place. (one for each topic)
So to overcome that, you would be able to add the main body information to a topic and use an Inline Frame in the two topics that would then simply be shells with appropriate Topic Titles. Either that or declare a snippet and use the snippet in both topics. Put the main part in the snippet.
Cheers... Rick -
Very URGENT!! How to apply CRT for support packs?
Hi falks,
This is urgent, I'll appreciate your quickest reply. I'm trying to apply Stack_14 ABAP, I'm getting the following errors.
Conflicts Betwen Add-On CPRXRPM 400 and support pages
SAP_ABA 700 SAPKA70013 Include CRT
Conflicts Between Add-On ST 400 and support Packages
SAP_BASIS 700 SAPKB70012 Include CRT
SAP_BASIS 700 SAPKB70013 Include CRT
Please help me how to do approach?..
Thanks,
Points will be given for sure.Hi Afi
For your second conflict, you need to download the Support package 15 for SOLMAN.
This will fix your problem,
You could check this information in:
1) https://websmp105.sap-ag.de/ocs-schedules
2) click in SAP Solution Manager Support Package Schedule
3) Search the SAP Solution Manager 4.0 and find the SP 15, in the table you could find that the support package resolves the problem with the component SAP_BASIS SP 14
I recommend you check this note:
Note 662441 - Solution Manager: SAP Notes for Support Packages
and you can check this too:
Note 619054 - Release strategy for Solution Manager Service Desk (ST-SUP)
Regards
P.S. Please reward points
Edited by: Eydar Del Angel on Feb 21, 2008 5:42 PM -
How to apply filters for union all report in OBIEE 11g
Hi All
Can we apply saved filters to union reports in obiee 11g?
I am able to apply saved filters for normal reports but not for union reports.
The catalog pane is blank, when i click on result columns or each criteria.
The only option i see is to manually create the filters for each criteria, dont i have any choice to use a saved filter for union report?
Is this a bug or something i am unaware. Please guide me
ThanksHi manu,
Filter is created based on subject area.we can't use save filter in any other subject areas.
now we can use new filter for union reports.
if Helps please mark as correct.. :)
Maybe you are looking for
-
Question about X-series with the bundled 65W adapter, gets very hot
Hi all, My company purchased many X230 notebook in last year. some are standard configuration (i3 CPU) and some are (i5 CPU). The i3 seems to have no problem. However, the i5 model had some issue that it can't full run all the 4-c
-
New to report painter - what is 8A-A-PL
Gentleman, I am new to Report painter but have a fairly modest report to build, so I went into building it: I have copied PCA standard report 8A26-001 from report group 8A2. I want nothing more than the output of the standard report, but orga
-
Does the 'Process Manager' in CDE also exist in the 'Java Desktop System'? It would be nice if this great tool would also be availlable in JDS.
-
in my application i want to manage just 1 arraylist i have 2 objects CD DVD i want to put all the values from those objects into 1 arraylist here my arraylist declared in my itemcontroller class private ArrayList<Item> items = new ArrayList<Item>();
-
What is SAP Best Practices?Could it be installed to my IDES ECC6?
Hi, Could the SAP best practices be installed to my IDES ECC6? And how to?? Let's take example for High-Tech industry. Thank you very much.