Dynamically append values to http url in BPEL http bindings
hi ,
I have a requirement where I have to post an xml over the http url 'http://todm2344:67033/access/auth'.
I have created a wsdl file with http bindings and the schema that this url expects and invoked that wsdl from my bpel process.
But now the requirement is that I need to send a value of an id appended to the above url.
Each time when i post an xml i should send it as say ''http://todm2344:67033/access/auth/34372''.
That appended value is some value that comes in the request of the my BPEL.
Please let me know on how this can be done.
Thanks in advance!!!
See thread Re: Noob Q - Override a WSDL location attribute
Several good answers. I wrote:
If you want to set the WS address at run time, e.g. from a property in your BPEL process that knows whether you in in DEV versus PROD, you just do a copy/assign from a variable with an XML fragment straight to the partnerlink. Looks weird, but it works (at least in 10.1.3):
+<assign name="asn_set_endpoint">+
+<copy>+
+<from variable="var_endPointAddress" query='/ns1:EndpointAddress"/>+
+<to partnerLink="myPartnerLinkName"/>+
+</copy>+
+</assign>+
+There's a good walkthrough at:+
+http://www.oracle.com/technology/pub/articles/bpel_cookbook/carey.html+
+They define a variable called partnerReference, and then show screen shots of how to assign it to the partnerlink (step 8).+
Good luck, Andy
Similar Messages
-
How to hide dynamic parameters values in the URL with Reports 6i
Hi,
I want to know a way of hiding the parameters values when asking for a report through the web.
Now I'm using the Reports 3.0.5.8 with a Cartridge defined in the Oracle Web Application Server 3.0.1.0.1. When you ask for a report with the parameters DESTYPE = cache and DESFORMAT = pdf, it is fully generated and in the Address or Location box of the browser, you can see http://webserver/cache/report.pdf (where cache is the virtual directory defined in the OWAS in which the .pdfs are cached). So, users cant see the Url used to generate the report.
Im trying to upgrade this configuration to Reports 6i with Cgi in a web server. I generate reports with no problems. The problem I have is I cant find how to hide the parameters values as before. I mean, when I ask for a report, once its generated I can see http://webserver/cgi-bin/rwcgi60.exe?server=ServerName&report=report.rdf&userid=user/pass@connection&destype=cache&desformat=pdf&P1=value1&P2=value2 in the Location box. It allows user to ask for another report changing the values of the parameters. I use these parameters to execute some query written in the Data Model. For example, imagine that the P1 represents the company id, the user (that is supposed to see only data of its company) can change this id, ask for a new report and see data of another company.
Ive already tried to use the key mapping option, but its not useful to me because the parameters values are dynamic and its impossible to define different entries in the cgicmd.dat for each possible value. The option of loading the parameter form before running a report is not useful to me either, because there exists specific screens for this purpose.
Is there any solution?
Thank you.
Marma Bonfiglio.Hi Rakesh,
I am using BI 7.0
The last option I have is 'Hide' for 'Calculate single values as' .
I have the below options for 'Calculate single values as'
1. Normalise according to Next group level Resul.
2. Normalize according to Overall Result
3. Rank number
4.Olympic Rank Number
5.Maximum
6. Minimum
7.Counter for all detailed values
8.Counter for all detailed values that are non zero
9.Moving average
10.Moving average That is Not zero ,null or Error
11. Hide.
So could you please tell me where i can find 'suppress result' option for the keyfigure .
Many thanks -
Can we pass values to custom headers through HTTP bindings in BPEL?
hi,
I have an urgent requirement where I have to pass values to custom headers of HTTP url through HTTP bindings in bPEL.
Is it possible? Say I have a http url http://localhost:80/test.
I need to post xml over the above HTTP url as well pass some values to the Custom Headers Variables.
Can I achieve this functionality thorugh BPEL or not?Hi,
My requirement is exactly the same as yours, can you please let me know what did you do to overcome the Oracle Forms Default change password screen.
Regards,
Praveen -
Appending values to dynamically created fieldsymbol
Hi ,
I have a requirement to append values to dynamically created fieldsymbols
from internal table .
I am using the following code but it dosnt work
<F4> declared as line of <dyn_table>.
loop at it_tab into wa_tab .( this contain the data to be appended to dyn fieldsymbol)
loop at it_fieldcat into wa_fieldcat. ( this contains the fieldnames )
case wa_final_fieldcat-FIELDNAME.
when 'AAA'.
v_field_name = 'AAA.
when 'BBB'.
v_field_name = 'BBB'.
endcase.
ASSIGN COMPONENT v_field_name of STRUCTURE wa_tab to <F4>.
endloop.
append <f4> to <dyn_table>
********************************************8
But only get one value i.e field BBB value appended to
<dyn_table>.
is there any way i can do the append to field symbol looping through internal
table ?
thanks
raji done it in alv so take the part you need .
1) to create dynamic table : CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
also create dynamic fieldcatalog .
2) you can pull data just one time from the DB to dynamic table
so i take the data in regulare it table and in the and i put it
in the dynamic table
hope i help , if you didnt understand some part , say so .
DATA : LT_FCAT TYPE LVC_T_FCAT ,
lo_struct TYPE REF TO data,
LV_STRUC_NAME TYPE TABNAME VALUE 'YMM_ST_TNUOT_MLY'.
REFRESH ls_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = LV_STRUC_NAME
I_BYPASSING_BUFFER = 'X'
CHANGING
CT_FIELDCAT = IT_COLUM_HEADER
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE e402(mo) WITH lv_struc_name.
EXIT.
ENDIF.
DATA INDX(3) .
IF G_COUNETR_NUMBER_OF_KOSTL > 0 .
DO G_COUNETR_NUMBER_OF_KOSTL TIMES.
INDX = SY-INDEX.
SHIFT INDX LEFT DELETING LEADING SPACE.
CONCATENATE 'KOSTL' INDX INTO LS_FCAT-FIELDNAME.
LS_FCAT-INTTYPE = 'I'.
LS_FCAT-COL_POS = 27 + SY-INDEX .
CONCATENATE TEXT-028 INDX INTO LS_FCAT-COLTEXT.
LS_FCAT-OUTPUTLEN = 10.
APPEND LS_FCAT TO IT_COLUM_HEADER.
ENDDO.
ENDIF.
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IT_COLUM_HEADER
IMPORTING
EP_TABLE = GT_TABLE
EXCEPTIONS
GENERATE_SUBPOOL_DIR_FULL = 1
OTHERS = 2.
ASSIGN GT_TABLE->* TO <DYN_TABLE>.
*--> Arbeitsbereich dynamisch erzeugen
CREATE DATA LO_STRUCT LIKE LINE OF <DYN_TABLE>.
ASSIGN LO_STRUCT->* TO <WA>.
LOOP AT IT_COLUM_HEADER INTO LS_FCAT.
IF LS_FCAT-FIELDNAME NE 'MANDT'.
ADD 1 TO LS_FCAT-COL_POS.
PERFORM TRANSLATE_HEADER.
MODIFY IT_COLUM_HEADER FROM LS_FCAT.
ENDIF.
ENDLOOP.
============= assigning to dynamic table
DATA : FIELD(10) ,
INDX1(3) .
DATA: WA_DREF TYPE REF TO DATA.
DATA : FS_SUM_GL LIKE LINE OF IT_YMM_ST_TNUOT_MLY.
CREATE DATA LP_DATA LIKE LINE OF <DYN_TABLE>.
ASSIGN LP_DATA->* TO <LS_LINE>.
LOOP AT IT_YMM_ST_TNUOT_MLY.
MOVE-CORRESPONDING IT_YMM_ST_TNUOT_MLY TO <LS_LINE>.
INSERT <LS_LINE> INTO TABLE <DYN_TABLE>.
ENDLOOP .
DATA L_COUNTER_ROLL TYPE I .
LOOP AT <DYN_TABLE> INTO <LS_LINE> .
MOVE-CORRESPONDING <LS_LINE> TO FS_SUM_GL.
CLEAR : FIELD , INDX1 , L_COUNTER_ROLL .
L_COUNTER_ROLL = 1 .
LOOP AT IT_EKKN WHERE EBELN = FS_SUM_GL-EBELN.
AND EBELP = FS_SUM_GL-EBELP.
IF SY-SUBRC = 0 .
INDX1 = L_COUNTER_ROLL.
SHIFT INDX1 LEFT DELETING LEADING SPACE.
CONCATENATE 'KOSTL' INDX1 INTO FIELD .
ASSIGN COMPONENT FIELD OF STRUCTURE <LS_LINE> TO <FS1>.
<FS1> = IT_EKKN-KOSTL .
MODIFY <DYN_TABLE> INDEX SY-TABIX FROM <LS_LINE> .
L_COUNTER_ROLL = L_COUNTER_ROLL + 1 .
ENDIF.
ENDLOOP .
ENDLOOP . -
Trying to dynamically output form fields returns URL values
Hello,
If there is a better way to go about this (which is quite likely), please let me know how to go about it.
I'm working on some code that is supposed to dynamically set the form variables as regular variables so that we can be lazy and not have to refer to the variable with form.somevariable name.
That part works perfectly. Until I start testing for URL conflicts in which a URL variable has the same name. For instance. . .
I have a form that passes two variables; FirstName and LastName. If I hit the page, the form shows up, I input a first and last name and click submit. The code works perfectly.
However, if I have URL variables with the same names, the code reports the url variable values instead of the form values.
Some sample values;
url.FirstName = Joe
url.LastName = Black
form.FirstName = Steve
form.LastName = White
My code that exposes the form variable will correctly find the form field names, but then when I 'evaluate' the value of the given form field, it will return the value of the URL variable of the same name rather than the form variable.
What I am really wanting (as I described briefly up above) is to have code that automatically converts client, URL and Form variables into 'regular variables' so that you don't have to write lots of extra code grabbing them later on. Frameworks like CFWHEELS and ColdBox do this by default, but at the company I work out, we aren't using any of them. I need it to expose the URL variables, but give presidence to form variables if they have the same name, because they are likely to be intended to do an update or such.
The code follows Feel free to ignore the code for the URL and client variables if you wish as they don't directly affect how the form code works, I have tested with them commented out and I get the same result. I provided all of it to give a more complete idea of what I have been toying with so far. Please note that I don't normally use 'evaluate'. There is probably a better way to go, but I don't know what it is.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<!--- Create a form so that we can post some form variables --->
<form action="" method="post">
First Name <input type="text" name="FirstName" />
Last Name <input type="text" name="lastName" />
<input type="submit" />
</form>
<!--- Set a variable to hold the list of URL variable names --->
<cfset paramsurl = structKeyList(url)>
<cfoutput>
<br />
URL variables:
<!--- Loop through the list of url variables and then dynamically set a new variable to be equal to whatever is held by it --->
<cfloop index="i" list="#paramsurl#">
<cfset myDynVar = Evaluate(i)>
<!--- Let's output the dynamically created variable as a test --->
#i# = #myDynVar#<br />
</cfloop>
</cfoutput>
<!--- If form fields exist --->
<cfif isdefined("Form.FieldNames")>
<cfoutput>
<b>Field Names:</b> #Form.FieldNames#
<p>
<b>Field Values:</b><br>
<cfloop INDEX="TheField" list="#Form.FieldNames#">
#TheField# = #Evaluate(TheField)#<br>
<cfset TheField = Evaluate(TheField)>
</cfloop>
</p>
Lets try and output the two form fields without using the "form." notation<br>
FirstName : #FirstName# <br />
LastName : #LastName#
</cfoutput>
</cfif>
<br />
The client variables currently available are:<br />
<cfoutput>
<cfset nVarCounter = 1>
<cfloop list="#GetClientVariablesList()#" index="whichClientVar">
#whichClientVar# : #client[whichClientVar]#<br />
<cfset whichClientVar = Evaluate(whichClientVar)>
</cfloop>
</cfoutput>Try this:
<cfset structAppend( FORM, {
'alpha' = 'bravo',
'charlie' = 'delta',
'echo' = 'foxtrot'
}, true ) />
<cfset structAppend( URL, {
'alpha' = 'zulu',
'lima' = 'mike',
'echo' = 'papa'
}, true ) />
<!--- List the scopes in ascending order of importance. --->
<cfdump var="#FORM#" label="FORM scope" />
<cfdump var="#URL#" label="URL scope" />
<cfset scopes = "url,form">
<cfloop list="#scopes#" index="i">
<cfloop list="#structKeyList( evaluate( i ) )#" index="j">
<cfset structInsert( VARIABLES, j, evaluate( i & '["' & j & '"]' ), true ) />
</cfloop>
</cfloop>
<cfdump var="#VARIABLES#" abort="1" label="Combined Variables Scope" />
What I did is insert 3 key/value pairs into the FORM and URL scope. I then dumped the scopes to show their structure and values. Then I defined a variable (scopes) which is a list of the least important scope to the most important. After that, the loop I do simply goes through the SCOPES, their exisiting key/values and sets them into the VARIABLES scope. Then, when it moves to the next scope of importance, it simply puts their value into the variables scope as well (overriding in the event it already exists), thus, the scopes defined later in the list override and replace.
Then I just dump the VARIABLES scope (you'll notice it has the I, J and SCOPES variables in there that I used to create the loop. If you perform this action in a function, simple make the I, J and SCOPES variables part of the LOCAL scope so they won't be in your VARIABLES scope. -
Using variable values form parametrized URL in Customer Exit in i_step = 1
Hello BW experts,
I call a parametrized URL to a Web Template that has a Query with the variable VAR1:
http://XXX?...&CMD=LDOC&template_id=TEMP1&VAR_NAME_1=VAR1&VAR_VALUE_EXT_1=2006
Then I try to access the value of VAR1 in i_step = 1 in the Customer Exit for BEx variables in order to determine the value for a customer exit variable VAR2:
WHEN 'VAR2'.
IF i_step = 1.
READ TABLE i_t_var_range INTO var_range
WITH KEY vnam = 'VAR1'.
fl_var_range-sign = 'I'.
fl_var_range-opt = 'EQ'.
fl_var_range-low = *some operation with var_range
APPEND fl_var_range TO e_t_range.
ENDIF.
The problem is that VAR1 contains either the default values (if the variable is set to have default variables) or is empty (if there are no default variables defined). It does not retrieve the value in the URL in the Customer Exit, but displays it correctly in the variable screen.
Is there any way I can acces the URL parameter in the Customer Exit?
Thanks for any answers in advance.
MichaelGili,
thanks for your answer. The problem was, though, that the first value determines the behavior of the variable screen by setting the value of a customer exit variable.
My goal was to have two variable screens. In the first a date is chosen and in the second a node of a time-dependant hierarchy is chosen. If one enters the date in the same screen as the hierarchy, the valid hierarchy for the date is not displayed.
I solved the problem now in following way:
<b>1. Saving the value in SAP Memory as a parameter.</b> The parameter has to be defined in SE80. A Dummy Web Template with a query on the same Infoprovider with just the two InfoObjects (Year/Month) displays a variable screen for Month/Year. In addition there is a Dummy Customer Exit variable that is needed in order to pass the variable values (month/year) into SAP Memory. Using JavaScript in the Dummy WebTemplate the second Web Template with the actual query is called without displaying anything else than the variable screen.
WHEN 'DUMMY_CUSTOMEREXIT_VAR'.
data: w_date like sy-datum
IF i_step = 2.
READ TABLE i_t_var_range INTO var_range
WITH KEY vnam = 'VAR1'.
do your peration
i.e. w_date(4)+2 = var_range-low.
w_date(6)+2 = var_range-high.
SET PARAMETER ID 'ZBW_PARA1' FIELD w_date.
ENDIF.
<b>2. Retrieving the value from SAP Memory</b> Before displaying the variable screen, the chosen date is retrieved from SAP Memory and used to set the date for a customer exit variable for the hierarchy validity date.
WHEN 'VAR2'.
IF i_step = 1.
GET PARAMETER ID 'ZBW_PARA1' FIELD w_date.
do some operation with
APPEND fl_var_range TO e_t_range.
ENDIF.
It is quite a comlex construct, but it works.... -
Passing Dynamic Filter values to Web template in VC
Hi Experts,
Iam working with a Web Template (which is created using WAD) in Visual Composer Model
I have an input screen ( Variables Form )in VC Iview which has Fiscal Year, Quarter, week and other input fields which need to be entered by a user.
This variables are passed to a couple of queires. Also i have a requirement to pass the same vvariable values to Web template also ( WAD)
I have created a HTML iview in VC Dashboard.and in URL i gave the below URL which is working fine
"pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=YWEB_PLANNING_ADLAYOUT_2"
But i wanted the template to be executed with filter values also
in the actual template i have 4 filters which user needs to enter after the above URL is displayed..
In order to make the template execution dynamic i added the following URL which is not working:
http://Host:port/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=YWEB_PLANNING_ADLAYOUT_2%26FILTER_IOBJNM%3DZFISCYEAR%26FILTER_VALUE%3D2009%26FILTER_IOBJNM%3DZREP_WEEK%26FILTER_VALUE%3D42%26FILTER_IOBJNM%3DZFISCALQTR%26FILTER_VALUE%3D3%26FILTER_IOBJNM%3ZNSPLITREG%26FILTER_VALUE%3DAS%26FILTER_IOBJNM%3DZRSKOPP%26FILTER_VALUE%3DR
Please let me know how to pass dynamic filter values from "Variables Form" of VC iview to Web template HTML iview
Thanks
P.NavakanthHi,
this is my sample:
'http://**********/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=TESTE1&DUMMY=0&BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING='&DSTR(NOW(),'MMYYYY')&'&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=GLIPM002&BI_COMMAND_2-BI_COMMAND_TYPE=SET_SELECTION_STATE_SIMPLE&BI_COMMAND_2-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=&BI_COMMAND_2-CHARACTERISTIC=GLC000079&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-EQUAL_SELECTION-MEMBER_NAME=****' -
How to Get Parameter Values from the URL ?
Hi,
I have built a calendar called cal_test. I am calling this calendar with this URL:
http://.../pls/.../xyz.cal_test.show?p_arg_names=p_sc_id&p_arg_values=2&p_arg_names=_start_date&p_arg_values=FEB-2002
In the 'Additional PL/SQL Code' tab of cal_test, I need to call a procedure which requires me to pass in as parameters the values of p_sc_id and startdate embedded in the URL named above. How can I retrieve these 2 values from the URL ? Any advice will be appreicated !
DorothyHi Daniel
The following thread might help;
if not, you could try posting the question in Application Server » Web Dynpro Java
Thanks
Kenny -
How to pass session variable value with GO URL to override session value
Hi Gurus,
We have below requirement.Please help us at the earliest.
How to pass session variable value with GO URL to override session value. ( It is not working after making changes to authentication xml file session init block creation as explained by oracle (Bug No14372679 : which they claim it is fixed in 1.7 version Ref No :Bug 14372679 : REQUEST VARIABLE NOT OVERRIDING SESSION VARIABLE RUNNING THRU A GO URL )
Please provide step by step solution.No vague answers.
I followed below steps mentioned.
RPD:
****-> Created a session variable called STATUS
-> Create Session Init block called Init_Status with SQL
select 'ACTIVE' from dual;
-> Assigned the session variable STATUS to Init block Init_Status
authenticationschemas.xml:
Added
<RequestVariable source="url" type="informational"
nameInSource="RE_CODE" biVariableName="NQ_SESSION.STATUS"/>
Report
Edit column "Contract Status" and added session variable as
VALUEOF(NQ_SESSION.STATUS)
URL:
http://localhost:9704/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FQAV%2FTest_Report_By%20Contract%20Status&RE_CODE='EXPIRED'
Issue:
When I run the URL above with parameter EXPIRED, the report still shows for ACTIVE only. The URL is not making any difference with report.
Report is picking the default value from RPD session variable init query.
could you please let me know if I am missing something.Hi,
Check those links might help you.
Integrating Oracle OBIEE Content using GO URL
How to set session variables using url variables | OBIEE Blog
OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
Thanks,
Satya -
Reading Dynamic Table Values in interactive form (web Dynpro ABAP)
Hi All,
I have created a Web Dynpro ABAP application which contains an Interactive Form, That Adobe Interactive Form contains Dynamic table (New rows can be added manually and deleted using a button).
I am not able to read the Dynamic table values in Web Dynpro u201COn Submitu201D.
In the Adobe form I have web Dynpro native button (I am using ZCI), while clicking the native button I need to read the dynamic table values.
How can I resolve this problem.
Thanks and Regards,
Boopathi Mthat means, when u add the table instance at runtime, you will also have to add an element to the node that is bound to the table.
probably addNew() mathos may be useful to you.
it appends a new record to the record set.
xfa.sourceSet.dataConnectionName.addNew()
also when on the exit event of the table field, do the following:
var i = xfa.parent.index
$record.rootnodename.tablenodename.data<i>.fieldname = $.rawValue
xfa.host.messageBox($record.rootnodename.tablenodename.data<i>.fieldname) -
How to retrieve query string value from the URL in my portlet
Hi,
When user clicks on "Advance Search", i am redirecting to page in the community. At the same i am adding some more values to the query string (to the URL).
My URL will look like this.
http://ctp-mc0149/portal/server.pt?space=CommunityPage&parentname=CommunityPage&parentid=0&in_hi_userid=200&cached=true&control=SetCommunity&PageID=202&CommunityID=200&searchType=2
Now in one of my portlet in that page, i want to retrieve the query string values from the URL.
Please help me regarding this.
Thanks in advance.
Thanks,
sreekanth.Hi,
Look at the following threads,
For programmatically getting the iview properties,
Programmatically getting iView Properties
Also,
Get Properties of IView Programmatically
Permanent change of iView property programmatically
Hope these threads help u.
Regards
Srinivasan T -
BC Ecommerce SOAP Error: Server did not recognize the value of HTTP Header SOAPAction
I am trying to add a product to an ecommerce site with this soap action: Product_UpdateInsert
I have followed this very brief instruction: https://jollyrogers.worldsecuresystems.com/catalystwebservice/catalystecommercewebservice. asmx?op=Product_UpdateInsert
I have a html page in a secure area with a jQuery ajax soap script.
I get the this error when I run the script:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Server did not recognize the value of HTTP Header SOAPAction: https://jollyrogers.worldsecuresystems.com/CatalystDeveloperService/CatalystEcommerceWebse rvice/Product_UpdateInsert.</faultstring><detail /></soap:Fault></soap:Body></soap:Envelope>
I have also tried to add a header with the Soap action with the beforeSend in the ajax call.
This must have been solved before I suppose?
Here is my script:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test SOAP Request</title>
<script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.3.1/jquery.cookie.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.1/underscore-min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min.js"></script>
<script type="text/javascript" src="//cdn.worldsecuresystems.com/bcapi/bcapi-0.0.1.min.js"></script>
</head>
<body>
<script>
var wsUrl = "https://jollyrogers.worldsecuresystems.com/catalystwebservice/catalystecommercewebservice. asmx";
var soapRequest =
'<?xml version="1.0" encoding="utf-8"?> \
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> \
<soap12:Body> \
<Product_UpdateInsert xmlns="https://jollyrogers.worldsecuresystems.com/CatalystDeveloperService/CatalystEcommerceWebse rvice"> \
<username>myEmailAdress</username> \
<password>mySecretPassw</password> \
<siteId>1894001</siteId> \
<productList> \
<Products> \
<productCode>ZJAWEyuuyN</productCode> \
<productName>My test product</productName> \
<description>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</description> \
<smallImage>/images/product1/small.jpg</smallImage> \
<largeImage>/images/product1/large.jpg</largeImage> \
<cataloguesArray> \
<string>/Store/</string> \
</cataloguesArray> \
<pricesSaleArray> \
<string>US/19.95,3/17.96,7/16.96</string> \
</pricesSaleArray> \
<pricesRetailArray> \
<string>US/20,5/19,8/20</string> \
</pricesRetailArray> \
<pricesWholesaleArray> \
<string>US/20,5/19,8/20</string> \
</pricesWholesaleArray> \
<wholesaleTaxCodeArray> \
<string>US/0.00</string> \
</wholesaleTaxCodeArray> \
<taxCodeArray> \
<string>GB/VAT</string> \
</taxCodeArray> \
<groupProducts> \
<string>580H0036BL</string> \
<string>ACAI60</string> \
<string>ABC-123</string> \
</groupProducts> \
<groupProductsDescriptions> \
<string>Lorem ipsum dolor sit amet</string> \
<string>consectetur adipisicing elit</string> \
</groupProductsDescriptions> \
<supplierEntityId>1234</supplierEntityId> \
<supplierCommission>0</supplierCommission> \
<weight>30</weight> \
<tags>NEW!</tags> \
<unitType>string</unitType> \
<minUnits>0</minUnits> \
<maxUnits>2</maxUnits> \
<inStock>43</inStock> \
<onOrder>3</onOrder> \
<reOrder>2</reOrder> \
<inventoryControl>true</inventoryControl> \
<canPreOrder>true</canPreOrder> \
<custom1>Text in custom field 1</custom1> \
<custom2>Text in custom field 2</custom2> \
<custom3>Text in custom field 3</custom3> \
<custom4>Text in custom field 4</custom4> \
<popletImages>/images/image1.jpg;/images/image2.jpg;</popletImages> \
<enabled>true</enabled> \
<deleted>false</deleted> \
<captureDetails>true</captureDetails> \
<downloadLimitCount>20</downloadLimitCount> \
<limitDownloadsToIP>0</limitDownloadsToIP> \
<isOnSale>true</isOnSale> \
<hideIfNoStock>true</hideIfNoStock> \
<productAttributes>Size*|5|Y:L||UK/2|US/20,S||UK/1|US/10</productAttributes> \
<isGiftVoucher>false</isGiftVoucher> \
<enableDropShipping>true</enableDropShipping> \
<productWeight>0</productWeight> \
<productWidth>0</productWidth> \
<productHeight>0</productHeight> \
<productDepth>0</productDepth> \
<excludeFromSearch>false</excludeFromSearch> \
<productTitle>My product title</productTitle> \
<cycletypeId>3</cycletypeId> \
<cycletypeCount>-1</cycletypeCount> \
<slug>my-product</slug> \
<hasVariations>true</hasVariations> \
<variations> \
<ProductVariation xsi:nil="true" /> \
<ProductVariation xsi:nil="true" /> \
</variations> \
</Products> \
</productList> \
</Product_UpdateInsert> \
</soap12:Body> \
</soap12:Envelope>';
$.ajax({
type: "POST",
beforeSend: function(xhr){xhr.setRequestHeader('SOAPAction', 'https://jollyrogers.worldsecuresystems.com/CatalystDeveloperService/CatalystEcommerceWebse rvice/Product_UpdateInsert');},
url: wsUrl,
contentType: "text/xml",
dataType: "xml",
data: soapRequest,
success: processSuccess,
error: processError
function processSuccess(data, status, req)
if (status == "success")
alert("Success!");
function processError(data, status, req)
alert("Failed!");
alert(req.responseText + " " + status);
</script>
</body>
</html>This line is a target namespace so it should not be changed: <Product_Retrieve xmlns="http://tempuri.org/CatalystDeveloperService/CatalystEcommerceWebservice"> It is very easy to think that it's a placeholder and that it should be replaced with your own url, which it should not and which will fail.
This works now:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test 7 SOAP Request</title>
<script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script>
</head>
<body>
<script>
var SoapMessage = '<?xml version="1.0" encoding="utf-8"?> \
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> \
<soap12:Body> \
<Product_Retrieve xmlns="http://tempuri.org/CatalystDeveloperService/CatalystEcommerceWebservice"> \
<username>Your Email</username> \
<password>Your password</password> \
<siteId>1894001</siteId> \
<productCode>HHKDKXS5MB</productCode> \
</Product_Retrieve> \
</soap12:Body> \
</soap12:Envelope>';
var url = "https://jollyrogers.worldsecuresystems.com/catalystwebservice/catalystecommercewebservice. asmx";
$.support.cors = true;
$.ajax({
type: "POST",
url: url,
data: SoapMessage,
dataType: "xml",
processData: true,
contentType: "text/xml; charset=\"utf-8\"",
success: function (msg) {
alert("suc: " + msg);
error: function (msg) {
alert("Failed: " + msg);
</script>
</body>
</html> -
Hi,
Is it possible to pass a value to a URL item?
Here is what I am trying to do:
Add a URL item that opens up in a new window(since inplace display of external URLSs is not yet poss. and applets etc don't work). The URL is http://www.mywebsite.com/pls/portal30/hellorpt?p_userid=
I would like to add the value returned by
wwctx_api.get_user to this URL. So that
when the user invokes the URL, it becomes http://www.mywebsite.com/pls/portal30/hellorpt?p_userid=PORTAL30 (if that was the user who was logged in).
I could probably add a pl/sql item which creates a page which redirects to the URL using window.location.href, but I wanted to
know if the above was possible.
SanjayNo, you can't substitute a parameter this way on a URL item.
-
Problem with editable combo box and creating dynamic table values using js
Hai
I have used jquery.jec.js to make my dropdown list as editable... I need to create dynamic table values on the onChange event of dropdown using javascript.
Now am facing the problem in it...
I am getting duplicate rows in the table... think(assumption) this jquery.jec.js is calling the dropdown again creating duplicate values...
Please help me out.... Any help is appreciable... Thanks in advanceThanks elOpalo, for your valuable response....
I have found the correct way of doing.
Before i had my code like this,
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>test</title>
<script type="text/javascript" src="js/jquery-latest.js"></script>
<script type="text/javascript" src="js/jquery.jec.js"></script>
<script type="text/javascript">
$(function(){
$('#list').jec();
function giveAlert(){
alert('hello');
</script>
</head>
<body>
<form>
Combo Box:
<select id="list" name="list" onChange="giveAlert();">
<option value="1">one</option>
<option value="2">two</option>
</select>
</form>
</body>
</html>
Now i have changed as the following,
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>test</title>
<script type="text/javascript" src="js/jquery-latest.js"></script>
<script type="text/javascript" src="js/jquery.jec.js"></script>
<script type="text/javascript">
$(function(){
$('select.combo').jec();
$('select.combo')
.change(function() {
alert($(this).val());
}).change();
</script>
</head>
<body>
<form>
<table>
<tr>
<td>Combo Box:</td>
<td><select class="combo"><option value="b">banana</option><option value="a">apple</option></select></td>
</tr>
</table>
</form>
</body>
</html>
The problem is with the function i have called on the onChange Event.. Now i have defined it inside the jquery function of dropdown to make it as editable... -
Server did not recognize the value of HTTP Header SOAPAction: .
hello friends,
I am wrote a WebService client as below
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;
public class AtmuClient
public static void main(String [] args) {
try {
String req="request";
String endpoint ="http://10.1.3.104/mims/service.asmx?WSDL";
String nameSpaceUri = "http://www.cum.com/MIMS";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName(nameSpaceUri, "echoString") );
String ret = (String) call.invoke( new Object[] { req } );
System.out.println("Sent 'Hello!', got '" + ret + "'");
} catch (Exception e) {
System.err.println(e.toString());
the out put I am getting is
Server did not recognize the value of HTTP Header SOAPAction: .
what still I need to incorporate to my code. Do i need to add any methods still ? and one more thing is do i need to write WSDD for this? how ?. can any bady guide me
thanQ for any greatful guidance.
HAN.Try setting an empty header object for the Call
SOAPContext ctx = new SOAPContext();
Header header = new Header();
Call call = new Call("", "", params, header, "", ctx); Regards
Byju Joy
Maybe you are looking for
-
Weird Positioning for Skinned Panel in Flex Builder 3
In the previous versions of the Flex Builder 3, even for the Flex Builder 3 Beta Milestone 4, my custom skinned Panel component worked fine. So I have an image skin and then I put into Flex Builder, set the 9 slice settings, did some adjustments to t
-
Hi All, Can u please tell me which table is used to see PO document flow? Thanks & Regards Santhosh
-
Issue with AD group based collection
Hi, We are using AD security group based membership. Also, we are uing the same SCCM infra to cover other domains as well. From Activie Direcoty, it could able to discover the machines (computer objects) belongs to other domains but those computer ob
-
I have an extra tab whenever firefox loads. I click the x to close it but it won't close. My home page is set to what it's meant to be. So there will be the tab I'm looking at and an extra blank tab. Cheers, Maxy
-
Hi All, I transferred the material data from one client to another client . and idoc is generated and material is also available in both the clients. generally we check the status of the idoc in we02 in both clients. I need to prepare a report to