Call http service extract value from person/group field
Hi
I have a list that has people or group field.
When Runing my WF I want to get in to a variable the members of the group that is in people or group field.
I would like to extract members from group using call http action.
How can i start?
which URL should i put in "Enter the HTTP service URL"?
pleas your help.
Hi,
You can use the following URL to extract the members from group
http://siteurl/_api/Web/SiteGroups/getbyname('groupname')/users
You can create a workflow variable and extract the value from the people or group field
Build the URL using as follows
[%Workflow Context:Current Site URL%]/_api/Web/SiteGroups/getbyname([%Variable: GroupName%])/Users
For more information how to use the Web Service in workflow use the following article.
http://blogs.msdn.com/b/sharepointdesigner/archive/2012/09/05/how-to-work-with-web-service-using-call-http-web-service-action.aspx
Please don't forget to mark it answered, if your problem resolved or helpful.
Similar Messages
-
For some business requirements, users want to extract values from a multi-value enabled lookup column
and add items to another list based on each separate value. In contrast, others want to find duplicate values in the list and merge associated values to a multi-value enabled column and then
add items to another list based on the merged value. All of these can be achieved using SharePoint Designer 2013 Workflow.
How to extract values from a multi-value enabled lookup column and add items to another list based
on each separate value using SharePoint Designer 2013.
Important actions: Loop Shape; Utility Actions
Three scenarios
Things to note
Steps to create Workflow
How to merge values to a multi-value enabled column and add item to another list based on the
merged value using SharePoint Designer 2013.
Important actions: Call HTTP Web Service; Build Dictionary
Things to note
Steps to create Workflow
How to
extract values from a multi-value enabled lookup column and
add items to another list based on each separate value using SharePoint Designer 2013.
For example, they have three lists as below. They want to
extract values from the Destinations column
in Lookup2 and add items to Lookup3 based on each country and set Title to current item: ID.
Lookup1:
Title (Single line of text)
Lookup2:
Title (Single line of text), Destinations (Lookup; Get information from: Lookup1 in Title column).\
Lookup3:
Title (Single line of text), Country (Single line of text).
Important action
1. Loop Shape: SharePoint Designer 2013 support two types of loops: loop n times and loop with condition.
Loops must also conform to the following rules:
Loops must be within a stage, and stages cannot be within a loop.
Steps may be within a loop.
Loops may have only one entry and one exit point.
2. Utility Actions: It contains many actions, such as ‘Extract Substring from Index of String’ and ‘Find substring in String’.
Three scenarios
We need to loop through the string returned from the look up column and look for commas. There are three
scenarios:
1. No comma but string is non-empty so there is only one country.
2. At least one comma so there is at least two or more countries to loop.
3. In the loop we have consumed all the commas so we have found the last country.
Things to note
There are two things to note:
1. "Find string in string (output to Variable:index)" will return -1 if doesn't find
the searched for string.
2. In the opening statement "Set Variable: Countries to Current Item:Destinations" set the return
field as "Lookup Values, Comma Delimited".
Steps to create Workflow
Create a custom list named Lookup1.
Create a custom list named Lookup2, add column: Destinations (Lookup; Get information from: Lookup1 in Title column).
Create a custom list named Lookup3, add column: Country (Single line of text).
Create a workflow associated to Lookup2.
Add conditions and actions:
Start the workflow automatically when an item is created.
Add item to Lookup2, then workflow will be started automatically and create multiple items to lookup3.
See the below in workflow History List:
How to merge values to a multi-value enabled column and add item to another list based on the
merged value using SharePoint Designer 2013
For example, they have three lists as below. They want to find duplicate values in the Title column in
Lookup3 and merge country column to a multi-value enabled column and then add item to lookup2 and set the Title to Current Item: Title.
Lookup1:
Title (Single line of text)
Lookup3:
Title (Single line of text), Country (Single line of text).
Lookup2:
Title (Single line of text), Test (Single line of text).
Important actions
"Call HTTP Web Service"
action: In SharePoint 2013 workflows, we can call a web service using a new action introduced in SharePoint 2013 named Call HTTP Web Service. This action
is flexible and allows you to make simple calls to a web service easily, or, if needed, you can create more complex calls using HTTP verbs as well as allowing you to add HTTP headers.
“Build Dictionary"
action:
The Dictionary variable type is a new variable type in the SharePoint 2013 Workflow.
The following are the three actions specifically designed for the Dictionary variable type: Build Dictionary, Count Items in a Dictionary and Get an Item from a Dictionary.
The "Call HTTP Web Service" workflow action would be useless without the new "Dictionary" workflow action.
Things to note
The
HTTP URI is set to https://sitename/_api/web/lists/GetByTitle('listname')/items?$orderby=Id%20desc and the HTTP method is set to “GET”. Then the list will be sort by Id in descending order.
Use Get
d/results(0)/Id form
Variable: ResponseContent (Output to
Variable: maxid) to get the Max ID.
Use Set
Variable: minid to Current List:ID to get the Min ID.
Use Copy from
Variable: destianation , starting at
1 (Output to
Variable: destianation) to remove the space.
Steps to create Workflow
Create a custom list named Lookup1.
Create a custom list named Lookup2, add column: Test (Single line of text).
Create a custom list named Lookup3, add column: Country (Single line of text).
Create a workflow associated to Lookup3.
Add a new "Build Dictionary" action
to define the http request header:
Add a Call HTTP Web Serviceaction, click on
this and paste your http request.
To associate the
RequestHeader variable, select the Call action property,
set the
RequestHeaders property to
RequestHeader:
In the Call action, click on
response and associate the response to a new
variable: ResponseContent (of type Dictionary).
After the Call action add Get item from Dictionary action to get the Max ID.
Add Set Workflow Variable action to get the Min ID.
Add Loop Shape (Loop with Condition) to get all the duplicate titles and integrate them to a string.
Create item in Lookup2.
The final Stage should look like this:
Start the workflow automatically when an item is created.
Add item to Lookup3, then workflow will be started automatically and create item to lookup2.
See the below in workflow History List:
References
SharePoint Designer 2013 - Extracting values from a multi-value enabled lookup column into a dictionary as separate items:
http://social.technet.microsoft.com/Forums/en-US/97d34468-1b53-4741-88b0-958472f8ca9a/sharepoint-designer-2013-extracting-values-from-a-multivalue-enabled-lookup-column-into-a
Workflow actions quick reference (SharePoint 2013 Workflow platform):
http://msdn.microsoft.com/en-us/library/jj164026.aspx
Understanding Dictionary actions in SharePoint Designer 2013:
http://msdn.microsoft.com/en-us/library/office/jj554504.aspx
Working with Web Services in SharePoint 2013 Workflows using SharePoint Designer 2013:
http://msdn.microsoft.com/en-us/library/office/dn567558.aspx
Calling the SharePoint 2013 Rest API from a SharePoint Designer Workflow:
http://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/GREAT info, but it may be helpful to note that when replacing a portion of the variable "Countries" with a whitespace character, you may cause the workflow to fail in a few specific cases (certain lookup fields will not accept this and will automatically
cancel). I only found this out when recreating your workflow on a similar, but much more complex list set.
To resolve this issue, I used another utility action (Extract Substring from Index of List) to clear out the whitespace. I configured it as "Copy from
Variable: Countries, starting at
1 (Output to Variable: Countries), which takes care of this issue in those few cases.
Otherwise, WOW! AWESOME JOB! Thanks! :) -
Can you set default values for person/group picker fields? To current user?
Two-part question/issue . . .
Part 1:
In InfoPath 2013 in use with SharePoint 2013, how do you set a Default Value for Person/Group Picker fields? Other field types like Text Boxes have a Default Value section in the Data tab of Properties. There doesn't appear to be any equivalent for
the Person/Group Picker field type in Properties. I'd like to set a default person for a few fields in a form I've created. Is this possible?
Part 2:
The default user I want to set for one of those Person/Group fields is the "current user." I want a user to log into our SharePoint 2013 intranet, load a new form for edit/creation, and have one of the Person/Group fields in that form to
automatically populate this particular user. Is this possible?Hi Stephen,
You can auto populate your InfoPath farm with current user Name and all other property that you have in your User profile, you have couple of options.
First you can make a secondary connection in your InfoPath form with user profile and can use the UserProfileService.asmx and call the GetUserProfileByName method. Here is the steps you can follow.
http://blogs.technet.com/b/anneste/archive/2011/11/02/how-to-create-an-infopath-form-to-auto-populate-data-in-sharepoint-2010.aspx
Secondly you can use JQuery and SPServices ,
$().SPServices.SPGetCurrentUser function to populate the values with script to achieve the same in this case you no need to use InfoPath form just create simple text type column in SharePoint
list and auto populate it with getting the current user Name from User Profile here is the scripts
<script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery-1.4.2.min.js"></script>
<script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery.SPServices-0.5.4.min.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
var userCurrentName = $().SPServices.SPGetCurrentUser({
fieldName: "CurrentUser"
$("input[Title='CurrentUser']").val(userCurrentName);
var userPhone = $().SPServices.SPGetCurrentUser({
fieldName: "WorkPhone"
$("input[Title='Phone']").val(userPhone);
</script>
Krishana Kumar http://www.mosstechnet-kk.com -
CALL function to extract data from a structure table
Hi Gurus,
Anyone knows how to write a call function to extract data from a structure table?
Your help is very much appreciated.
Thanks alot.Hi,
structure doesnot hold any data. instead of it you can check the stucture in which table it is used, find the table name,use select query to extract the data u needed.
you can use where used list option to find the structure in which table it is used.
regards
siva -
Problem extracting value from reference
Hi all,
I have a main VI where the user specifies a range for acquiring data. These values are then passed to a subVI which iterates a loop an according number of times. I have created a reference in the subVI which passes the position of the data acquisition in the range specified as I want to provide a progress bar which would be calculated as (max value - current value)/(maxvalue - minvalue).
I created an indicator to show the current value on the main VI which is related to the reference I created and when I run the main VI I can see this value changing correctly. The problem is that I cannot find a way to wire this value into the formula above. I tried changing the indicator to a control, but the value is not passed.
I have attached my code along with the subVIs to illustrate the problem. Current Frequency A increments correctly on the screen whereas Current Frequency B stays constant. I have also tried using local variables, property nodes and an OpenVIReference Node but none of these solve the problem.
I'm sure this must be possible so if somebody could tell me the correct way to go about it then that would be much appreciated :-)
Many thanks,
Ian
Attachments:
FRA SubVI.vi 71 KB
extract value from reference.vi 52 KB
DATA FROM RIG v2.vi 553 KBNo worries - I managed to solve my own problem.
I realised if I did the calculation and created the progress bar on the subVI and made the reference straight to that then it wouldn't required the need to bring a wire from the reference.
Still, I'd be intrigued to know if I could've done it the other way tho...
Ian -
Extract values from a long text
Hi, I need help in extracting value from a long text
Sample data:
A_BOARD_MEETING_600
I need to extract MEETING from the text.
I tried to use CHARINDEX and SUBSTRING but it's not returning the text I wanted. I hope you can help me.
select SUBSTRING(ID, CHARINDEX('_', ID,1+CHARINDEX('_', ID))+1, CHARINDEX('_', ID, 1+CHARINDEX('_', ID, 1+CHARINDEX('_', ID,1)))-1 ) from table
Using the query above it's returning MEETING_600.Hi, thanks! But would like to ask how can this be converted where it can get the column ID in a table, I'm still learning SQL.
Select Parsename(Replace(YOURCOLUMNNAME,'_','.'),2)From your tablename -
How to move the value from a character field to numeric or packed decimal
Hi,
can anyone explain me on how to move the value from a character field to numeric or packed decimal.
Please help me on this. Thanks...
Regards,
Rose.Hi ,
if you use keyword MOVE u may loose the decimal and thoussan separator and if u don't want to loose them just call the FM ..HRCM_STRING_AMOUNT_CONVERT.
i doubt wherther it is HRCM or HCRM just try using *
this will suit ur requirement.
Regards,
KK -
Hi All,
I am a newbie to ABAP Webdynpro.I would liketo know how should I get the value from an input field at runtime?
Thanks,MuktaBy reading the context attribute which bound to inputfield, you can get the value.
Say you have a node called 'MAIN_NODE' and has the attribute 'INPUT_VALUE', which is bound to the Inputfield.
DATA LO_ND_MAIN_NODE TYPE REF TO IF_WD_CONTEXT_NODE.
DATA LO_EL_MAIN_NODE TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LS_MAIN_NODE TYPE WD_THIS->ELEMENT_MAIN_NODE.
DATA LV_INP_VALUE LIKE LS_MAIN_NODE-INP_VALUE.
* navigate from <CONTEXT> to <MAIN_NODE> via lead selection
LO_ND_MAIN_NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = 'MAIN_NODE' ).
* get element via lead selection
LO_EL_MAIN_NODE = LO_ND_MAIN_NODE->GET_ELEMENT( ).
* get single attribute
LO_EL_MAIN_NODE->GET_ATTRIBUTE(
EXPORTING
NAME = `INPUT_VALUE`
IMPORTING
VALUE = LV_INP_VALUE ). "LV_INP_VALUE will have the value of inputfield
Raja T
Message was edited by:
Raja Thangamani -
Extracting Year from the date field
Hi,
I want to extract year from the date field... I've tried following code but got the error
SELECT to_char(a.A_EXPIRY_DATE,'yyyy') as EXP_YEAR from Table_A a
Please advice
Thanks in advanceuser12863454 wrote:
SELECT to_char(a.A_EXPIRY_DATE,'yyyy') as EXP_YEAR from Table_A aThis should work and returns a string.
What error did you get?
maybe your column name is wrong? Is it really A_somthing? This is possible but slightly unusual.
also possible
select extract(Year from sysdate) from dual;
/* with your table and column */
SELECT extract(year from a.A_EXPIRY_DATE) as EXP_YEAR from Table_A a;Edited by: Sven W. on Aug 18, 2010 6:41 PM -
Capture value from the input field
Hello All,
I'm new to BSP.
I have a small querry.
I have a input field.
beside this a push button.
if i enter a value in the input field and press the push button, i need to capture the value from the input field and pass it to a variable contained in a class.
i'm attaching the layout code here.
but i'm not knowing what to write in the event(on input processing)
<u><b>Layout code </b></u>
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content design="design2003" >
<htmlb:page title = "Page to take the value from the screen and pass to the class "
marginBottom = "100"
marginLeft = "250"
marginRight = "100"
marginTop = "100"
scrolling = " AUTO" >
<htmlb:form>
<htmlb:tray id = "tray1"
hasMargin = "TRUE"
title = "Value Capture"
width = "350" >
<htmlb:textView text = "Enter a value"
design = "emphasized"
textColor = "negative" >
</htmlb:textView>
<br>
<htmlb:inputField alignment = "left"
id = "gv_var"
required = "true"
type = "STRING"
design = "standard" />
<htmlb:button design = "emphasized"
id = "button"
text = "SUBMIT"
onClick = "btn_click" />
</br>
</htmlb:tray>
</htmlb:form>
</htmlb:page>
</htmlb:content>
eventhandleron input processing code
DATA: event TYPE REF TO if_htmlb_data.
event = CL_HTMLB_MANAGER=>get_event_ex( request ).
IF event->EVENT_NAME = 'button' AND event->EVENT_TYPE = 'click'.
ENDIF.HI BSPian,
htmlb:inputField value = "<%= v_value %>"
id = "gv_var"
required = "true"
size = "10"
type = "STRING"
maxlength = "10"
design = "standard" />
Here u mean to say that v_value must be one more field type string. is it so ?
But i want to see the value in the same input field
id ="gv_var". i.e if i enter the value "BSPian" in the input field and press "submit" the internal processing will be done as told by u and after that ,on the screen i want to keep that value till i end that session.
i passed a variable v_value in the inputfield value but it's not working ..
regards,
deepu. -
How to call https service from OSB
hi
I need to call thirt party https service. Its a secured service with authentication.
I have Imported ssl certificate in keystore.
It's one way ssl with authentication and I need to pass wsse token (username/password) from Business service to invoke third party service.
What steps do I need to follow to call this service?
I have gone through all other
Thanks
VibhorBelow note gives the high level steps to be performed for implementing different security requirements with OSB
OSB - Proxy Service HTTPS one way
Configure Identity & Trust Keystore
OSB - Proxy Service HTTPS 2 way
Configure Identity Assertion Provider to support X509
Configure user mapper class for default identity assertion provider
Change 2 way Client Cert behaviour from default
('Client Certificate Not requested”) to “Client Certificate requested but not enforced”
OSB - Business Service HTTPS one way
Add root & intermediate CA certificates of the server to the trust keystore
OSB - Business Service HTTPS 2 way
Add root & intermediate CA certificates of the server to the trust keystore
Configure PKI Credential Provider containing the client certificate
Configure a Service Key provider with SSL Client Authentication key
Associate the service key provider to the proxy service which invokes the business service
OSB - Proxy Service WS-Security User Name Token
Configure Auth.xml or custom username token WS-Security Policy
OSB - Proxy Service WS-Security X509 Token
Configure Auth.xml and Sign.xml Policy
Change UseX509ForIdentity attribute in domain → WS Security → Inbound Mbean Token handlers Page to true
Ensure Certificate passed by client is present in certificate registry or the root CA in trust keystore depending upon weblogic certification path provider configuration
Configure Identity Assertion Provider and Username mapper class.
OSB - Business Service WS-Security User Name Token
Configure Auth or custom username token WS-Security Policy
Configure Service account for username provider
OSB - Business Service WS-Security X509 Token
Configure Sign.xml and Auth.xml policy ( or custom signing and username token policies) in the business service
Configure a PKI credential provider and service key provider containing the certificate to be used for signing and authentication
Associate the service key provider to the proxy service which invokes the business service.
*OSB - Proxy Service Digital Signature [ Request Only]*
Configure Sign.xml or a custom signing policy to the proxy service
Ensure Certificate passed by client is present in certificate registry or the root CA in trust keystore depending upon weblogic certification path provider configuration
*OSB – Business Service Digital Signature [ Request Only]*
Configure Sign.xml policy ( or custom signing policy) in the business service
Configure a PKI credential provider and service key provider containing the certificate to be used for signing
Associate the service key provider to the proxy service which invokes the business service.
Edited by: atheek1 on Aug 26, 2010 5:17 AM
Edited by: atheek1 on Aug 26, 2010 8:20 AM -
OSB called stateful service & extracting Set-Cookie Transport header
I need to call a Stateful Web service which returns a JSessionId (Set-Cookie) which I need to use to subsequent service calls. In my message flow, a service callout calls a web service which returns a JSessionId which is part of the Transport Header. I need to extract this value into a variable and use it to call a couple of other web service calls using Service callouts. I have tried numerous things listed below but failed
1) In the service callout Response actions, I have added a Transport header to capture this into a variable but in vain
2) Added a Transport header in the Response action on the main pipeline
3) Used Inbound variable to extract however it turns up empty.
any useful ideas would be appreciated. ThanksWhen you call the external service it returns a SessionID in the header?
If that is the case then test the service from sbconsole debug console and in the invocation trace check the value of $inbound variable within the context of service callout and check if external service has actually added a transport header for session ID. -
Need help in extracting value from an xml tag.
Hi ALL,
Good Morning to all, i have problem in fetching a value from a xml tag. I have created a xml schema based on the schema i have created a xmltype table and inserted a value to the table. When i am trying to fetch a value from a particular tag i am unable to do so.. Kindly help me to solve this. Here by i am posting all the workings i have done...
I am using the following client:
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 31 11:44:59 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
////////////////////////////////// XML Schema ///////////////////////
begin
dbms_xmlschema.registerSchema(
'http://www.oradev.com/chipsxml.xsd',
'<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.oradev.com/chipsxml.xsd"
xmlns:samp="http://www.oradev.com/chipsxml.xsd"
version="1.0">
<element name="Field1">
<complexType>
<sequence>
<element name="UTI">
<complexType>
<sequence>
<element name = "U01" type = "string"/>
<element name = "U02" type = "string"/>
<element name = "U03" type = "string"/>
<element name = "U03a" type = "string"/>
<element name = "U03b" type = "string"/>
<element name = "U03c" type = "string"/>
<element name = "U04" type = "string"/>
<element name = "U05" type = "string"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</schema>',
TRUE, TRUE, FALSE, FALSE);
end;
////////////////////////// Table which has multiple Column //////////////////////////
CREATE TABLE chipsxmltable1 (
id number, XMLDATA XmlType)
XMLTYPE XMLDATA STORE AS OBJECT RELATIONAL
XMLSCHEMA "http://www.oradev.com/chipsxml.xsd"
ELEMENT "Field1";
///////////////////////////////// Insert Query in chipsxmltable //////////////////////////
INSERT INTO chipsxmltable VALUES(
xmltype.createxml('<?xml version="1.0"?>
<samp:Field1 xmlns:samp="http://www.oradev.com/chipsxml.xsd" >
<UTI>
<U01>No</U01>
<U02>Y</U02>
<U03>Y</U03>
<U03a>Y</U03a>
<U03b>Y</U03b>
<U03c>Y</U03c>
<U04>Y</U04>
<U05>Y</U05>
</UTI>
</samp:Field1>'));
To show the data as a field with structure:
1. Query:
Select * from chipsxmltable1;
Output:
ID XMLDATA
1 <?xml version="1.0"?>
<samp:Field1 xmlns:samp="http://www.oradev.com/chipsxml.xsd">
<UTI>
<U01>No</U01>
<U02>No</U02>
<U03>Y</U03>
<U03a>Y</U03a>
<U03b>Y</U03b>
<U03c>Y</U03c>
<U04>Y</U04>
<U05>Y</U05>
</UTI>
</samp:Field1>
2. Query: (Both the query displays the same Output)
SELECT X.xmldata.getClobVal() "XMLDATA" FROM chipsxmltable1 X;
select extract(XMLDATA, '/Field1').getstringval() "XMLDATA" from chipsxmltable1 x;
Output:
XMLDATA
<?xml version="1.0"?>
<samp:Field1 xmlns:samp="http://www.oradev.com/chipsxml.xsd">
<UTI>
<U01>No</U01>
<U02>No</U02>
<U03>Y</U03>
<U03a>Y</U03a>
<U03b>Y</U03b>
<U03c>Y</U03c>
<U04>Y</U04>
<U05>Y</U05>
</UTI>
</samp:Field1>
To show the data as a single string without structure using "getstringval()":
3. Query
select extract(XMLDATA, '//text()').getstringval() "CHIPS - XML" from chipsxmltable1 x;
OUtput:
CHIPS - XML
NoNoYYYYYY
To show the data as a single string without structure using "getclobval()":
4.Query
select extract(XMLDATA, '//text()').getClobVal() "CHIPS - XML" from chipsxmltable1 x;
Output:
CHIPS - XML
NoNoYYYYYY
To show the data in a particular tag with/Without structure (Which is not working) using "EXTRACT" function:
6.Query:
select extract(XMLDATA, '/Field1/text()').getstringval() "XMLDATA" from chipsxmltable1 x;
select extract(XMLDATA, '/Field1/UTI').getstringval() "XMLDATA" from chipsxmltable1 x;
select extract(XMLDATA, '/Field1/UTI/U01').getstringval() "XMLDATA" from chipsxmltable1 x;
select extract(XMLDATA, '/Field1/UTI/U01/text()').getstringval() "XMLDATA" from chipsxmltable1 x;
Output:
CHIPS - XML
The above queries are not fetching the value.
To show the data in a particular tag with/Without structure (Which is not working) using "EXTRACTVALUE" function:
7. Query:
select extractValue(XMLDATA, '/Field1/UTI') "XMLDATA" from chipsxmltable1 x;
select extractValue(XMLDATA, '/Field1/UTI/U01') "XMLDATA" from chipsxmltable1 x;
Output:
X
The above queries are not fetching the value.
My question is:
How to fetch values from xml tag when the value are inserted through xml schema?
Apologies if the description is not clear. Kindly let me know if further details are needed. Many thanks for your help.
Very best regards,
Godwin Jebakumar C.V.Hi,
You need to declare the namespace of each element used in the XPath expression, like this :
SQL> select extractvalue( XMLDATA
2 , '/samp:Field1/UTI/U01'
3 , 'xmlns:samp="http://www.oradev.com/chipsxml.xsd"' ) "XMLDATA"
4 from chipsxmltable1 x
5 ;
XMLDATA
No
SQL> select extract( XMLDATA
2 , '/samp:Field1/UTI'
3 , 'xmlns:samp="http://www.oradev.com/chipsxml.xsd"'
4 ).getstringval() "XMLDATA"
5 from chipsxmltable1 x
6 ;
XMLDATA
<UTI>
<U01>No</U01>
<U02>Y</U02>
<U03>Y</U03>
<U03a>Y</U03a>
<U03b>Y</U03b>
<U03c>Y</U03c>
<U04>Y</U04>
<U05>Y</U05>
</UTI>
Please see EXTRACT and EXTRACTVALUE documentation :
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions051.htm#i1006712
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions052.htm#SQLRF06173
BTW, "XMLDATA" is a pseudo-column used by Oracle. I don't know if it'll ever cause any conflict but maybe you should rename your column.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/pseudocolumns010.htm#SQLRF00256
Regards. -
Error while extracting values from SOAP Body using XPath (Retrieve from Message filter)
Hi,
I am using 'Retrieve from Message' filter to extract element value from the following SOAP response envelope:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:math="http://example.com/math.xsd">
<soapenv:Header/>
<soapenv:Body>
<math:DivideResponse>
<iResult>10</iResult>
</math:DivideResponse>
</soapenv:Body>
</soapenv:Envelope>
I am using the XPath expression - /soapenv:Envelope/soapenv:Body/math:AddResponse/iResult
soapenv = http://example.com/math.xsd
math = http://schemas.xmlsoap.org/soap/envelope/
ERROR
4/19/15, 19:29:03.016
Empty attribute retrieved from message via XPath
ERROR
4/19/15, 19:29:03.016
The message [Id-59643455b76a00000000000045edd6a6] logged Failure at 04.19.2015 19:29:03,015 with log description: Failed to extract attributes via XPath
ERROR
4/19/15, 19:29:03.017
Retrieve math result from SOAP response
Could you please help me resolve it?
Thanks,
Aneesh.Hi Aneesh,
XPath Expression: /soapenv:Envelope/soapenv:Body/math:DivideResponse/iResult
You are using AddResponse in your XPath there is no element named like that.
Cheers,
Stefan -
Calling Web Service passing xml from Oracle Forms
Hello,
I need to call a .net web service from Oracle Forms that passes in xml data and returns xml data.
I have seen several examples of how to create a wrapper in jdev and then to import the code
into forms. I just have not seen any examples that are passing parmameters especially not xml
as a parameter and that have an active wsdl that I can see how it relates to the code created.
I have a wrapper but cannot figure out where and what notation to use to include passing in
an xml object.
Does anyone have an example passing in xml where the wsdl is still available to see?'
Forms version 10.1.2.0.2. Jdev 10.1.3.4
Thanks,
Linda
Edited by: lboyce on Jan 5, 2009 2:30 PMAlso here you have several options...
1. you can make a PJC (bean) which include a webservice stub generated with axis (you can make a stub and also test a webservice with this tool: www.soapui.org)..
2. you can make a database webservice with JPublisher and then just call a pl/sql wrapper for this webservice
4. you can call a webservice with java api (HttpsURLConnection, HttpURLConnection or with apache HTTPClient api) from your PJC for example:
the code below is used as java stored procedure to call a .net webservice on https
====================================
public static int getPStopnja(String polica, String reg_oznaka,
String ime_osiguranika,
String naziv_osiguranika,
String leasing,
String[] doc) {
String l_polica="";
String l_reg_oznaka="";
String l_ime_osiguranika="";
String l_naziv_osiguranika="";
String l_leasing ="";
URL url = null;
HttpsURLConnection conn = null;
BufferedReader br = null;
String lineIn = null;
StringBuffer sb = new StringBuffer();
OutputStream os = null;
int rc = 0;
//kontrole
l_polica = polica==null ? "":polica;
l_reg_oznaka = reg_oznaka==null ? "": reg_oznaka;
l_ime_osiguranika = ime_osiguranika==null ? "": ime_osiguranika;
l_naziv_osiguranika = naziv_osiguranika==null ? "": naziv_osiguranika;
l_leasing = leasing==null ? "": leasing;
String body = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
body += "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:web=\"https://services.huo.hr/web_ao/\">";
body += "<soapenv:Header/>";
body += "<soapenv:Body>";
body += "<web:get_pstupanj>";
body += "<web:param_in>";
body += "<web:polica>"+l_polica+"</web:polica>";
body += "<web:reg_oznaka>"+l_reg_oznaka+"</web:reg_oznaka>";
body += "<web:ime_osiguranika>"+l_ime_osiguranika+"</web:ime_osiguranika>";
body += "<web:naziv_osiguranika>"+l_naziv_osiguranika+"</web:naziv_osiguranika>";
body += "<web:leasing>"+l_leasing+"</web:leasing>";
body += "</web:param_in>";
body += "</web:get_pstupanj>";
body += "</soapenv:Body>";
body += "</soapenv:Envelope>";
SSLContext sslContext = null;
try {
sslContext = SSLContext.getInstance("TLS");
X509TrustManager[] xtmArray = new X509TrustManager[|http://forums.oracle.com/forums/] { xtm };
sslContext.init(null, xtmArray, new java.security.SecureRandom());
} catch (GeneralSecurityException gse) {
doc[0] = gse.toString();
return -1;
if (sslContext != null) {
conn.setDefaultSSLSocketFactory(sslContext.getSocketFactory());
try {
conn.setDefaultHostnameVerifier(hnv);
} catch (Exception ex) {
doc[0] = ex.toString();
return -1;
try {
URL st = new URL("https://services.huo.hr/web_ao/web_ao.asmx");
conn = (HttpsURLConnection)st.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Host", "services.huo.hr");
conn.setRequestProperty("Content-Length", "" + body.length());
conn.setRequestProperty("SOAPAction",
"\"https://services.huo.hr/web_ao/get_pstupanj\"");
conn.setRequestProperty("Content-Type", "text/xml;charset=UTF-8");
conn.setDoOutput(true);
OutputStreamWriter wr =
new OutputStreamWriter(conn.getOutputStream());
wr.write(body);
wr.flush();
BufferedReader in =
new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
sb.append(new String(inputLine.getBytes(),"UTF-8"));
in.close();
//System.out.println(new String(sb.toString().getBytes(),"ISO8559_2"));
doc[0] = sb.toString();
return 0;
} catch (Exception e) {
doc[0] = e.toString() + " ===> " + body + " ==>length= " + body.length();
return -1;
====================================
best regards
Edited by: Peterv6i on Jan 6, 2009 8:34 AM
Edited by: Peterv6i on Jan 6, 2009 8:40 AM
Maybe you are looking for
-
Error while executing the WorkBook
Hi, While executing WorkBook, I am facing an error "A critical program error has occured. The program will now terminate.Please refer to the trace for further information". When I check in the trace, the error description is "System.NullReferenceExce
-
Text dissapears when making a pdf
Hello, I have a problem when I make a pdf from a word file. I have a word file with text in a special font. I embed the font when I make the pdf. But when I open the pdf, pieces of text are gone.. All the text is in the same font. Example: Word file:
-
Invoice output as PDF attachment via email.
Hi All, I have a requirement wherein an invoice when saved should generate a mail output (external send) with the invoice as a PDF attachment. I have the system set up for external send & scot settings but am stuck up with the PDF attachment. I also
-
Unable to sort the content of the jTable
Hi all , I m using this code for sorting in the Jtable JTable table = new JTable(new MyTable()); table.setPreferredScrollableViewportSize(new Dimension(500,500)); table.setFillsViewportHeight(true); table.setAutoCreateRowSorte
-
SQL express 2008 r2 on windows server 2003
install ends with the following error : "MsiEnumRelatedProducts failed to enumerate products with UpgradeCode='{1B117BA7-5BC1-419E-820E-7D4F3F412C7B}'. Error code: 1610."