Changing the value of the SOAPElement in the SOAP message
Now another problem I encountered was of overwriting a value in the SOAP message by my value. SOAPElement interface which extends Node interface provides me the method getValue() to get the value of the node but doesnt give me any method to set any other value instead of this.
<token xsi:type="xsd:string">token123</token>
I want to replace the value "token123" with my value.
Is there no provision for altering a value in the SOAP message? Is this due to security contraints?
If yes then can we detach the same node and add a similar node with the new value. I wanted to try the same using addChildElements() method but then the problem here is how do I create a new SOAPElement in the handler as its an interface and not a class. Why I want to add a similar node is because I am having the definition of this object in the WSDL file, so if I attach the node corresponding to the parameter of the object then I would get the object populated with this value at J2EE or .net layer.
Also I thought of adding an attribute to the same node but then since this attribute will not be defined in the WSDL, the value of this attribute will not populate the java object at the J2EE layer. Hence attribute introduction also didnt help.
This is the userData object in the soap body:
</q1:FetchDetailsInput><q2:UserData xmlns:q2="java:com.anthem.enb.common.data" xsi:type="q2:UserData" id="id2">
<password xsi:type="xsd:string">12345</password>
<token xsi:type="xsd:string">token123</token>
<userID xsi:type="xsd:string">vikas123</userID>
</q2:UserData>
This is my code to extract the values from the above message:
Iterator i = ctx.getMessage().getSOAPPart().getEnvelope().getBody().getChildElements();
System.out.println(" i.hasNext() =" + i.hasNext());
while (i.hasNext())
Object obj = i.next();
System.out.println(" obj :" + obj.getClass());
if (obj instanceof SOAPElement)
SOAPElement e = (SOAPElement) obj;
System.out.println("e :" + e);
String operationName = e.getElementName().getLocalName();
LOG.info(CLASS_NAME + "operationName :" + operationName);
if (operationName.equals("UserData"))
Iterator j = e.getChildElements();
LOG.info(CLASS_NAME + " j.hasNext() : " + j.hasNext());
while (j.hasNext())
Object obj2 = j.next();
LOG.info(CLASS_NAME + " obj2 :" + obj2);
LOG.info(CLASS_NAME + " obj2 :" + obj2.getClass());
if (obj2 instanceof SOAPElement)
SOAPElement eGrandChild = (SOAPElement) obj2;
String operationName2 =
eGrandChild.getElementName().getLocalName();
if (operationName2.equals("userID"))
String strPass = eGrandChild.getValue();
LOG.info(CLASS_NAME + " strPass:" + strPass);
else if (operationName2.equals("password"))
String strUserID = eGrandChild.getValue();
LOG.info(CLASS_NAME + " strUserID:" + strUserID);
else if (operationName2.equals("token"))
String strToken = eGrandChild.getValue();
Please help.
how do I create a new SOAPElement in the handler as its an interface and not a class?Here is an example:
<example>
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage m = messageFactory.createMessage();
SOAPEnvelope env = m.getSOAPPart().getEnvelope();
SOAPBody body = env.getBody();
SOAPElement fResponse =
body.addBodyElement(env.createName("fResponse"));
fResponse.addAttribute(env.createName("encodingStyle"),
"http://schemas.xmlsoap.org/soap/encoding/");
SOAPElement result =
fResponse.addChildElement(env.createName("result"));
result.addTextNode("test");
ctx.setMessage(m);
</example>
Jong
Similar Messages
-
How to chang the idoc message type
Hi,
I want to change the idoc message type...because the idoc has the status 51...pls advice how to change
I have tried it from we81 .......but i cant open the msg type ...when i double click on it.
Regards,
SomenathHi,
This may help u
Steps To Create Custom IDOC
1.Create Segment Type (WE31)
Go to Transaction code WE31
Enter Segment type, click on Create
Give Description
Enter the Necessary Fields & Data Elements for those Fields.
Save the Changes.
2.Create Idoc Type (WE30)
Go to transaction code WE30
Enter the Object Name, select Basic type and click Create icon
Select the create new option and enter a description for your basic IDOC type and press enter
Select the IDOC Name and click Create icon
The system prompts us to enter a segment type and its attributes
Choose the appropriate values and press Enter
The system transfers the name of the segment type to the IDOC editor.
Follow these steps to add more number of segments to Parent or as Parent-child relation
Save it and go back
Go to Edit -> Set release
3.Create Message Type (WE81)
Go to transaction code WE81
Change the details from Display mode to Change modenAfter selection, the system will give this message u201CThe table is cross-client (see Help for further info)u201D. Press EnternClick New Entries to create new Message Type
Fill details
Save it and go back
4.Assign Idoc Type to Message Type (WE82)
Go to transaction code WE82
Change the details from Display mode to Change moden After selection, the system will give this message u201CThe table is cross-client (see Help for further info)u201D. Press Enter.
Click New Entries to create new Message Type.
Fill details
Save it and go back
Regards
Seshagiri -
To change the warning message to error message in VA01.
I want to change the warning message into error message in the standard VA01 transaction..
The steps I follow :
order type -->
enter
sold to part -->
ship to party -->
Purch order no -->
Req deliv date -->
Material -->
Order quantity -->
SU -->
enter.
The warning error dispayed is
No add. vendor / customer data maint. for 16320340 - please maintain J_1IMOCUST...
Want to change the above into error so that it shud not go further.Hi Arif,
Click on Save Icon.
System will give information: No add. Vendor / Customer data maint. For INJ95C01 -Please maintain J_1IMOCUST.<b> Ignore it.</b>
Result
System will calculate Price of the Material creates Schedule Lines and saves the document. System will give a message: Standard Order has been saved.
<b>**REWARD IF THIS HELPS WITH POINTS**</b>
Regards
AK -
How to change the error message Invalid login credentials
Hi all,
How to change the default error messages .
1) In the Login page while giving wrong username or password .It showing
Error message "Invalid login credentials".
But requirement is change the above error message.
2) I need to change the error message instead of "1 error has occureed"
Thanks in Advance
SudhakarOn the Login Page of the application create a 'Before Header' process with this code if apex_application.g_notification ='Invalid Login Credentials' then
apex_application.g_notification :='Your Altered Failed Login Message Here';
end if;varad -
Hi,
<br />
<br />How do I change the error message generated for a function such as an expired login.
<br />
<br /> <?php<br /> echo $tNGs->getErrorMsg();<br />?>
<br />
<br />Thanks
<br />
<br />LaurenceHi Laurence,
ADDT´s error messages are spread across all those XYZ.res.php files located in the includes/resources folder -- and in your case it seems to be the file "tNG_pro.res.php" which provides the error messages related to the login.
In here you´ll find two message variants : one for ADDT´s "development" mode, and the other for the "production" mode. As you most likely will not need to edit the "development mode" messages which are identified by a trailing "_D" in the variable name
(e.g. BADWORDS_SQL_ERROR_D), you´ll just need to adapt the "production mode" messages
(e.g. BADWORDS_SQL_ERROR)
Cheers
Günter Schenk
Adobe Community Expert, Dreamweaver -
Changing the WarnAboutChanges message?
dear all,
i want to know whether we can change the text message of the WarnAboutChanges pop up or not.
i.e this message -:
" The Changes made to the page have not been saved. If you continue the changes will be discarded.Do you wish to continue?? "
as per our requiement we need the message as follows(change discarded by saved)
The Changes made to the page have not been saved. If you continue the changes will be saved. Do you wish to continue??
kindly help in this.
regards and thanks
Shivdeep Singh"Warn About Changes" feature is an inherrent feature in OAF, you can not change its message as it is based on default JS API.Ideally you should not change this message as pet OA standards.Can you let me know y excatly u wanna change this?
--Mukul -
I followed the instructions at
https://support.mozilla.org/en-US/kb/how-customize-new-mail-sound
to change the "new messages" sound. It does play when I click on "Play" in the Preferences pane.
However, when new mail comes in, it plays the default sound. So why is it ignoring the Preference?I was wrong. It's playing both the default sound AND the sound I selected. How do I get the default sound to stop?
-
hi,
As iam changing the ical message allert date to "daybefore" automatically it is changing to "on the date"
please help me,You could simplify the decode(... into to_char(sysdate + 1,'d')
select sysdate + level input_date,
TRIM(TO_CHAR(SYSDATE + level,'DAY')) the_day,
DECODE(TRIM(TO_CHAR(SYSDATE + level,'DAY')),
'SATURDAY',1,
'SUNDAY',2,
'MONDAY',3,
'TUESDAY',4,
'WEDNESDAY',5,
'THURSDAY',6,
'FRIDAY',7
) daynumber,
to_char(sysdate + level + 1,'d') alternative
from dual
INPUT_DATE
THE_DAY
DAYNUMBER
ALTERNATIVE
10/14/2013
MONDAY
3
3
10/15/2013
TUESDAY
4
4
10/16/2013
WEDNESDAY
5
5
10/17/2013
THURSDAY
6
6
10/18/2013
FRIDAY
7
7
10/19/2013
SATURDAY
1
1
10/20/2013
SUNDAY
2
2
10/21/2013
MONDAY
3
3
10/22/2013
TUESDAY
4
4
10/23/2013
WEDNESDAY
5
5
10/24/2013
THURSDAY
6
6
10/25/2013
FRIDAY
7
7
10/26/2013
SATURDAY
1
1
10/27/2013
SUNDAY
2
2
10/28/2013
MONDAY
3
3
Regards
Etbin -
Is there a way to change the xml message generated by JDeveloper Proxy
Hi,
I have created jax-ws proxy client using JDeveloper 10g. I need to change the generated xml message tags. I need to remove the namespace prefix tags from the xml message. For ex: the current request message looks like this:
<ns0:EMPLOYEE_NAME>John</ns0:EMPLOYEE_NAME>
should be
<EMPLOYEE_NAME>John</EMPLOYEE_NAME>
without the nso prefix.
How can I do that? Please help me.
Thanks.To original poster, please just select "Problem Solved" to help any future questions about this.
Is there a way to change the text message ringer? No.
End of thread -
How can I change the default message after System Call Handler transfer error?
Hi,
I'm using Unity Connection 9.1 and System Call Handlers to allow to join internal extensions (not reachable from the PSTN).
I succeeded but I would like to change the default message played when the extension dialed is not known. I tried with Error greetings but nothing changed.
Thanks for your help.
Regards,
JulienJust tried this on my 9.1 and 10.0(1) servers and it worked fine.
I went to the opening greeting call handler, selected the "error" greeting, set the greeting to play my personal greeting (it defaults to the system generated greeting), recording "hey, you dialed the wrong number" and then called in and during the opening greeting I dialed "88" - I heard "hey, you dialed the wrong number" and then it repeated the opening greeting recording as it should.
the default action after playing your custom greeting in this case is to "restart greeting" - which is why the opening greeting plays again.
Not sure what you did in your testing with the error greeting - check to make sure you have it set to play your personal greeting instead of the default system greeting - since you can't disable the error greeting there's not a lot of other items I can think of to check. -
How to change the SOAP version from 1.0 to 1.2 while registering to ESB
Hi All,
I have problem here,
Is there any possibility to change the soap version from 1.0 to 1.2 for oracle ESB.
Because it is using SOAP1.1 while registering any service to ESB, Is there any possiblity to change it.
Hi guys is there any solution for this...........:-(
OR Will SOA suite 10.1.3.4 supports SOAP 1.2 ?
Cheers,
Kalyan.PHi,
The current version of ESB does not support SOAP 1.2. You need to make sure your message contains the correct SOAP 1.1 namespace so ESB uses the correct SOAP version:
SOAP 1.1: http://schemas.xmlsoap.org/soap/envelope/
SOAP 1.2: http://www.w3.org/2003/05/soap-envelope
For SOAP 1.2 you have to wait until 11g SOA Suite is released.
Kind Regards,
Andre Jochems -
ADDING xml to the SOAP Message from client
Hi, does anyone know how to add an xml file to the SOAP message passed by the client to the server?
I need to send an xml file, I have already tried attachments but they dont meet the purpose. I need to send the xml as part of the soap message in AXIS 1_4.
I read this somewhere about
SOAPEnvelope env = message.getSOAPEnvelope;
env.addBodyElement( new RPCElement("SOAPaccess","webservicename", new
Object[] { }) );
FileInputStream file = new FileInputStream( "c:\\abcd.xml");
SOAPBodyElement aBody = new SOAPBodyElement( file );
file.close();
env.addBodyElement( aBody );
However I am not certain how to go about doing this in axis.
I have been trying to find something related to this, but havent been able to.
Please let me know if you know how to add xml file to the body of a SOAP message.If anyone is interested...I got this working,
//b is the byte form of the xml document.
InputStream is = new ByteArrayInputStream(b);
Document doc =XMLUtils.newDocument(is);
SOAPElement me = new MessageElement(doc.getDocumentElement());
SOAPElement a=message.getSOAPBody().addChildElement(me);
MessageContext mc=_call.getMessageContext();
mc.setMessage(message);
mc.getMessage().getSOAPBody().detachNode();
SOAPBody sb = (SOAPBody)mc.getMessage().getSOAPPart().getEnvelope().addBody();
sb.addChild(new MessageElement(doc.getDocumentElement()));
mc.getMessage().saveChanges();
System.out.println(mc.getMessage().getSOAPPart().getEnvelope());
SOAPEnvelope env=(SOAPEnvelope)mc.getMessage().getSOAPPart().getEnvelope(); -
JWSDP1.4 Access the SOAP Message in an RPC server
hi i am new to web services... i have created RPC using JSWDP 1.4.
I used the wscompile and wsdeploy tool to create the WSDL and server side of the web service.
but because of a requirement change now i have to get the SOAP message Header and verify the client details (log who is using my service). How can i access the SOAP header??Make a backup then edit this file,
TomcatRoot: ./shared/classes/com/tarantella/tta/webservices/client/apis/Resources.properties
Edit all locations to point to https://localhost:443 -
Problem to serialise the soap message in a handler
I'm using a sun web service with a handler on the server side.
In this handler I want to analize the soap message.
First I try to serialize it :
public boolean handleRequest(MessageContext arg0) {
SOAPMessageContext context = SOAPMessageContext) arg0;
SOAPMessage mes = context.getMessage();
Document doc= mes.getSOAPPart();
OutputFormat format = new OutputFormat(doc);
format.setLineSeparator(LineSeparator.Windows);
format.setIndenting(true);
format.setLineWidth(0);
format.setPreserveSpace(true);
StringWriter sw = new StringWriter();
XMLSerializer serializer = new XMLSerializer(sw , format);
serializer.asDOMSerializer();
serializer.serialize(doc);
System.out.println(sw.toString());
}The result I get looks like that :
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope><soapenv:Header>
Where are the namespaces ?
This xml is not correct because the soapenv prefix is not bound.
How can I get a correct xml from the SOAP message ?Hi,
Is ZYBTT a new attribute? Have you changed the status of the attribute to implemented or released (in SWO1: Edit -> Change release status)?
And actually I think that your syntax is wrong too (BOR world is different compared to classes). If you want to use an attribute, I think that the syntax should be something like this:
SWC_GET_PROPERTY <Object> <Attribute> <AttributeValue>.
Read more here:
http://help.sap.com/saphelp_nw04/helpdata/en/c5/e4acef453d11d189430000e829fbbd/content.htm
Regards,
Karri -
Hi All,
I am using project server 2007 and WSS 3.0.
I have been facing a strange issue for couple of days. I am unable to open PWA in browser and MS Project Pro on application server.
Everything is correct whether it is URL or MS Project profile account on MSP. This is strange because i can open same PWA/MSP from other computers (Database server / Client PCs) but not locally on server.
When i try to connect to MSP on App server, i get the following errors in event viewer.
Event Type: Error
Event Source: MSSOAP
Event ID: 16
User: N/A
Computer: APP-Server-Name
Description:
Soap error: Connection time out..
Event Type: Error
Event Source: MSSOAP
Event Category: Client
Event ID: 16
User: N/A
Computer: APP-Server-Name
Description:
Soap error: An unanticipated error occurred during the processing of this request..
Event Type: Error
Event Source: MSSOAP
Event Category: Client
Event ID: 16
User: N/A
Computer: APP-Server-Name
Description: Soap error: Sending the Soap message failed or no recognizable response was received.
Event Type: Error
Event Source: MSSOAP
Event Category: Client
Event ID: 16
User: N/A
Computer: APP-Server-Name
Description:
Soap error: Unspecified client error..
One more issue i am facing and i guess that is related to above issue. The Issue is, when i am creating a new project, It's workspace gets created but doesn't get linked to the project and i can't link it manually because it already exists for the project.
sandeepHi Paul ,
Thanks for reply. The project server URL was already added to the Trusted
Sites/Local Intranet areas in IE.
sandeep
Maybe you are looking for
-
EncodeURL - uses semi-colon or question mark in path?
I am confused about the encodeURL method and how it formats urls when adding the session ID. It was my understanding that the sessionID is added as a path parameter, which means it becomes part of the query string following a "?" in the url, like so:
-
Installing OEM 10.2.0.1 on RH4 update 3
hey, I want to install the OMS, the Repository and the agent separately from each other, and not under ORACLE_HOMES ? Thanks, Avi
-
Beta Refresh Release Now Available! Sun Cluster 3.2 Beta Program
The Sun Cluster 3.2 Release team is pleased to announce a Beta Refresh release. This release is based on our latest and greatest build of Sun Cluster 3.2, build 70, which is close to the final Revenue Release build of the product. To apply for the Su
-
Oracle db Migration from one server to another
Can any body guide me why companies migrate Oracle db from one server to another , & what is the process for doing that?
-
Stopping a Thread (where I don't have control of run)
Is there any way to stop a thread whose run method simply calls a method of another class? For example: public class myThread extends Thread private String className = ...; public void run() // get className's "main" method and run it