How to disable Base64 encoding
Hi,
I'm new to weblogic and my task is to develop a custom identity asserter, I used a SimpleSampleIdentityAsserter example that was available on BEA web some time ago.
I was progressing very slowly and now it seems I got stuck.
our proxy adds a header to HTTP request that contains the username in plaintext format (I know, it's not safe at all, but that is not my problem now)
I think that in this case I have to disable Base64 encoding in "Home >myrealm >Summary of Security Realms >myrealm >Providers >IdentityAsserter"
"Settings for SSIA2 > Configuration- Tab > Common tab"
by default the value is set to true : "Base64 Decoding Required: true"
I'm unable to change it niether via admin console nor have I found it in any xml config file, does anyone know where and how this can be configured?
we use WebLogic 10.3
any help would be much appretiated
thx, Vaclav
Hi Sandeep,
Thanks a lot for your reply.
I addded those lines in config.xml file as said by you and restarted the weblogic server.
But still i couldn't set Base64 decoding as false.
Could you please check this config.xml file where i added these lines.
<?xml version="1.0" encoding="UTF-8"?>
<domain xsi:schemaLocation="http://www.bea.com/ns/weblogic/920/domain
http://www.bea.com/ns/weblogic/920/domain.xsd" xmlns="http://www.bea.com/ns/weblogic/920/domain" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>base_domain</name>
<domain-version>9.2.3.0</domain-version>
<security-configuration xmlns:xacml="http://www.bea.com/ns/weblogic/90/security/xacml">
<name>base_domain</name>
<realm>
<sec:authentication-provider xsi:type="wls:default-authenticatorType"/>
<sec:authentication-provider xsi:type="wls:default-identity-asserterType">
<sec:active-type>AuthenticatedUser</sec:active-type>
<sec:active-type>wsse:PasswordDigest</sec:active-type>
<sec:active-type>X.509</sec:active-type>
<sec:base64-decoding-required>false</sec:base64-decoding-required>
<wls:use-default-user-name-mapper>true</wls:use-default-user-name-mapper>
<wls:default-user-name-mapper-attribute-type>CN</default-user-name-mapper-attribute-type>
</sec:authentication-provider>
<sec:role-mapper xsi:type="xacml:xacml-role-mapperType"/>
<sec:authorizer xsi:type="xacml:xacml-authorizerType"/>
<sec:adjudicator xsi:type="wls:default-adjudicatorType"/>
<sec:credential-mapper xsi:type="wls:default-credential-mapperType"/>
<sec:cert-path-provider xsi:type="wls:web-logic-cert-path-providerType"/>
<sec:cert-path-builder>WebLogicCertPathProvider</sec:cert-path-builder>
<sec:name>myrealm</sec:name>
</realm>
<default-realm>myrealm</default-realm>
<credential-encrypted>{3DES}Vi5yoJAzEZYw/U5nkiNT9B8M043431Rfr/QF2dMB65KlW2rbV3d7a0uGF9YxUnfFZwBv0q0BNLhzmIi/wjJ/sGUnWQ2SvNMK</credential-encrypted>
<node-manager-username>weblogic</node-manager-username>
<node-manager-password-encrypted>{3DES}RCc8ftzF/irGNnXbhZ3nRA==</node-manager-password-encrypted>
</security-configuration>
<server>
<name>AdminServer</name>
<listen-address/>
</server>
<embedded-ldap>
<name>base_domain</name>
<credential-encrypted>{3DES}tYhX7HO2bVJh5Pn4ldTY45UYYd2zBw/URUs++SXMZ8U=</credential-encrypted>
</embedded-ldap>
<configuration-version>9.2.3.0</configuration-version>
<admin-server-name>AdminServer</admin-server-name>
</domain>
Thanks & Regards,
Swathi
Similar Messages
-
How to do Base64 encoding?
I would like to know if the Java API provides a method to do Base64 encoding. I've been searching and not finding anything similar. If not, is there a readily available piece of code in public domain that does this?
Ok how about this pure Java API solution.
Yours for free free free, no unintened theft. Completely portable per the Java promise. This code sets no preferences! The class just extends AbstractPreferences to get access to the put and get and over rides them. The super still calls the Base64 to do the encoding and decoding. This extension intercepts the encoded/decoded strings and makes them visible. TaDa Java API supports, has, allows, does base64 encoding, for the clever anyway.
package yourpackage;
public class YourPreferences extends java.util.prefs.AbstractPreferences {
//keep the key state
private java.util.Hashtable encodedStore = new java.util.Hashtable();
/** Creates a new instance of YourPreferences*/
public YourPreferences(java.util.prefs.AbstractPreferences prefs, java.lang.String string) {
super(prefs, string);
//main acts as a driver i.e. used to test this class not required by this class
public static void main(java.lang.String[] args ){
java.util.prefs.AbstractPreferences myprefs = new yourpackage.YourPreferences(null, "");
java.lang.String stringToEncode = "Aladdin:open sesame";
java.lang.String key = "Aladdin:open sesame";
java.lang.String key_ = "KEYisNOTtheSAMEasTHEstring";
try{
java.lang.String encoded = ((yourpackage.YourPreferences)myprefs).encodeBase64(stringToEncode);
java.lang.System.out.println("ENCODED STRING TO: " + encoded);
java.lang.String base64 = (java.lang.String)((yourpackage.YourPreferences)myprefs).encodedStore.get(key);
java.lang.String decoded = ((yourpackage.YourPreferences)myprefs).decodeBase64("newkey",base64);
java.lang.System.out.println("DECODED STRING TO: " + decoded);
java.lang.String encoded_ = ((yourpackage.YourPreferences)myprefs).encodeBase64(key_,"ALONGSTRANGESTRINGTHATMAKESNOSENCEATALLBUTCANBEENCODEDANYWAYREGARDLESS");
java.lang.System.out.println("ENCODED STRING TO: " + encoded_);
java.lang.String base64_ = (java.lang.String)((yourpackage.YourPreferences)myprefs).encodedStore.get(key_);
java.lang.String decoded_ = ((yourpackage.YourPreferences)myprefs).decodeBase64(key_,base64_);
java.lang.System.out.println("DECODED STRING TO: " + decoded_);
java.lang.System.out.println("\n");
java.util.Enumeration enum = ((yourpackage.YourPreferences)myprefs).encodedStore.keys();
java.lang.String enumKey = null;
while(enum.hasMoreElements()){
enumKey = (java.lang.String)enum.nextElement();
java.lang.System.out.print(enumKey);
java.lang.System.out.println(" : " +((yourpackage.YourPreferences)myprefs).encodedStore.get(enumKey).toString());
}catch(java.io.UnsupportedEncodingException uee){
uee.printStackTrace();
}catch(java.io.IOException ioe){
ioe.printStackTrace();
public java.lang.String encodeBase64(java.lang.String key, java.lang.String raw)throws java.io.UnsupportedEncodingException{
java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
java.io.PrintWriter pw = new java.io.PrintWriter(
new java.io.OutputStreamWriter(baos,"UTF8"));
pw.write(raw.toCharArray());
pw.flush();//ya know
byte[] rawUTF8 = baos.toByteArray();
this.putByteArray(key, rawUTF8);
return (java.lang.String)this.encodedStore.get(key);
public java.lang.String encodeBase64(java.lang.String raw)throws java.io.UnsupportedEncodingException{
java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
java.io.PrintWriter pw = new java.io.PrintWriter(
new java.io.OutputStreamWriter(baos,"UTF8"));
pw.write(raw.toCharArray());
pw.flush();//ya know
byte[] rawUTF8 = baos.toByteArray();
this.putByteArray(raw, rawUTF8);
return (java.lang.String)this.encodedStore.get(raw);
public java.lang.String decodeBase64(java.lang.String key, java.lang.String base64String)
throws java.io.UnsupportedEncodingException, java.io.IOException{
byte[] def = {(byte)'D',(byte)'E',(byte)'F'};//not used at any point
this.encodedStore.put(key,base64String);
char[] platformChars = null;
byte[] byteResults = null;
byteResults = this.getByteArray(key, def);
java.io.InputStreamReader isr = new java.io.InputStreamReader(
new java.io.ByteArrayInputStream(byteResults),"UTF8");
platformChars = new char[byteResults.length];
isr.read(platformChars);
return new java.lang.String(platformChars);
//intercept key lookup and return our own base64 encoded string to super
public String get(String key, String def) {
return (java.lang.String)this.encodedStore.get(key);
//intercepts put captures the base64 encoded string and returns it
public void put(String key, String value){
this.encodedStore.put(key, value);//save the encoded string
//dummy implementation as AbstractPreferences is extended to get acces to protected
//methods and to overide put(String,String) and get(String,String)
protected java.util.prefs.AbstractPreferences childSpi(String name) {return null;}
protected String[] childrenNamesSpi() throws java.util.prefs.BackingStoreException {return null;}
protected void flushSpi() throws java.util.prefs.BackingStoreException {}
protected String getSpi(String key) {return null;}
protected String[] keysSpi() throws java.util.prefs.BackingStoreException {return null;}
protected void putSpi(String key, String value) {}
protected void removeNodeSpi() throws java.util.prefs.BackingStoreException {}
protected void removeSpi(String key) {}
protected void syncSpi() throws java.util.prefs.BackingStoreException {} -
Using either of the 4 examples shown below, to have a background image display inside about:blank worked in Firefox 3.x (using Stylish add-on), however since Firefox 4, only using the base64 encoded version of images works. Is there any way to fix this so I don't have to encode every image I wish to use? Encoding the image makes the stylish file absolutely huge, & a real pain to keep encoding whenever I want to change the image.
body:empty { background: url("resource:/res/images/OnFire.jpg")
body { background-image: url("resource:/res/images/OnFire.jpg")
body:empty { background:url("data:
body { background-image: url("data:
I've also previously disabled most of the add-ons, except for Status-4-Evar, Stylish, & Firebug, in an attempt to see if something else was interfering, but no change.
I can supply a copy of the previously working (FF 3.x) code to some of the about:blank styles if needed for testing purposes.Type '''about:addons'''<enter> in the address bar to open the '''Add-ons Manager.'''
Hot key; '''<Control>''(Mac:<Command>)'' <Shift> A)'''
On the left side of the page, select '''Plugins.'''
Is it listed here? Select '''Disable.''' -
Need to Base64 encode a String but How?
Hi everone:
I have to Base64 encode and decode a String, but I haven't found any method or API to do it. Does anybody know where to find it? Some ideas about how to?
Thank you all.
Jose.Hi everone:
I have to Base64 encode and decode a String, but I
haven't found any method or API to do it. Does anybodyOh, one thing struck me, why do you need to Base64 encode character data? Normally Base64 is used to encode binary data. If you can represent the bytes as a UTF-8 encoded String, and all components can handle UTF-8, then you should be fine without Base64.
know where to find it? Some ideas about how to?
Thank you all.
Jose. -
How to convert a base64 encoded string to binary?
Hi, gurus,
I want to convert a base64 encoded string (a image which is read from a xml file)
into a normal binary string and then upload to archive link.
could you pls give me some hints on that?
br.
junthank you for your quick reply!
my real requirement is to extract an image(it 's said it's encoded using base64?) from a xml file and upload it sap archive linke,
following is the xml content, does that mean i need to convert all the chars in the
<mime_content> pair to your fm, that will be convert to binary string?
<MIME_CONTENT xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" href="" xfa:contentType="image/jpg"
>/9j/4AAQSkZJRgABAAEAYABgAAD//gAfTEVBRCBUZWNobm9sb2dpZXMgSW5jLiBWMS4wMQD/2wCE
AAgFBgcGBQgHBgcJCAgJDBQNDAsLDBgREg4UHRkeHhwZHBsgJC4nICIrIhscKDYoKy8xMzQzHyY4
PDgyPC4yMzEBCAkJDAoMFw0NFzEhHCExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEx
MTExMTExMTExMTExMTExMf/EAaIAAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKCwEAAwEBAQEB
AQEBAQAAAAAAAAEC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wf
D4aj1DxVbR3t9bQsun2xuHjaR2wOisCRkAk9gKAPLvCvhfRdL8OZ4tHfijULxd0s1wiPHFGnUA
YccADOTz1oA9V0K28Nv8Fb6fw/o11Fo99azzNZbumPBViCxPPy5HPYUAeNXsiXR4tLPje+bSl8
OvJDACIg0wZgttIoyCccE9xigDu/gLqcreKYtLtfEF3qmnx6BFKYJZSyW0xZA0ajtt6UAe50ARXl
vHeWk1tMCYp0aNwDg4Iwf50AeJfEn4LaXYGUbwjpoXN6LmMeULhnAjJO44PFAHe+GPhX4X8Na1
DqnQXRvYVZY3nuWkCbhg4B9ifzoA4PxRpHjKyIHie80TTtXW11NoNlzYGH51SLaVIftk/pQByD
AvFkeiXGk6doOvFLoRR7LqSARIFk3huDnOS3/fRoA9XOvhGbxH4OQ6XpQv9Yt5I1hZQPMRM/OA
T24oAj1bxb4rvtEvNPT4daqjXFs8Ic3URALKVz+tAGn4HtNW8I/CKyt59KlutUs7dj9hjZSzMzkh
c9OjDP40AeSv4H8Z2aGe68Nzardalok1vLhogLWaSVivB7qoXp69aAO0D3h3XrLxaNQ1Xw2jW9
vocOn5Z0PnSoVy+F9cE8/nQB7BQAUAFABQAUAFABQAUAFABQAUAFAH//2Q==</MIME_CONTENT
> -
How to disable web service authentication by sap-user string in url
Hi Experts,
I am publish some RFC function as webservice for my SAP AS ABAP, i set the authentication as basic. I can using http basic authentication to call the service and get the result. But it also accept passing user/password through the url string: http://localhost:8001/sap/bc/soap/wsdl11?services=BAPI_PO_CHANGE&sap-client=100&sap-user=myId&sap-password=myPassword
I want to disable this, make it no user/password through url string. Can anyone tell me how to do it, thanks.
Best regards,
PeterWell, it's not a backdoor - but (extremely) bad style: an URL should never contain any authentication data (like UID & PWD) nor should it ever contain any (security) session ID (which, if valid, would allow to skip authentication).
So, I agree with you / your customer: it should be (made) possible to configure the system to discard / ignore any authentication data which is contained in the URL.
I recommend to submit a customer message to SAP (using message component BC-MID-ICF). You might refer to this SDN posting (by providing the URL) in the support ticket.
PS: Basic Authentication is not much better but at least the information (UID & PWD) is not sent in the clear (although simply Base64-encoded) and not in the URL (but in the http header). Sending cleartext data in the URL is really the worst. The best is: use stronger authentication mechanisms (e.g. X.509 client certificates, Kerberos, Biometric authentication mechanisms, etc.). -
Base64 Encoding in SOA 11.1.1.5.0
Hi All,
For writing a String to a Flat File(Opaque Schema) using FileAdapter the string needs to be converted to Base64 Encoding
I am not able to Encode the string to base64 in BPEL 11g.
JDEVELOPER VERSION.Studio Edition Version 11.1.1.5.0
SOA Suite Version 11.1.1.5.0
I tried with BPEL1.1 specification and BPEL2.0 specification with no luck
Steps carried out
a) Created a variable "input1" with String type
b) Assigned a custom message to input1 variable
c) In Java Embedding activity wrote the below snippet
String input = (String)getVariableData("input1");
addAuditTrailEntry(input);
String encodeData = oracle.soa.common.util.Base64Encoder.encode(input);
addAuditTrailEntry(encodeData);
I am getting different errors while using BPEL 1.1 spec and 2.0 spec
BPEL 1.1 Spec
Jdeveloper doesnt compile.
Error is Error: SCAC-50012
BPEL 2.0 Spec
Jdeveloper compile's but while deploying am getting the below error
Error deploying BPEL suitcase.
error while attempting to deploy the BPEL component file "/dtrb5o/admin/soa_domain/mserver/soa_domain/servers/soa_server1/dc/soa_04c5e5c5-eeb1-49da-841a-c793206a0285";
the exception reported is:java.lang.RuntimeException: failed to compile execlets of BPELProcess1
This error contained an exception thrown by the underlying deployment module.
Verify the exception trace in the log (with logging level set to debug mode).
+[05:40:21 PM] Check server log for more details.+
+[05:40:21 PM] Error deploying archive sca_Base64_2_rev1.0.jar to partition "default" on server soa_server1 [] +
+[05:40:21 PM] #### Deployment incomplete. ####+
+[05:40:21 PM] Error deploying archive file:/C:/JdevHome/Users/c_anishi/mywork/BPELApplication/Base64_2/deploy/sca_Base64_2_rev1.0.jar +
+(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)+
The SOA RunTime Library is already added to the project. I even tried explicitly adding fabric-common.jar and fabric-runtime.jar to the project library with no luck
Please let me know if any one has acheived the base64 encoding in 11.1.1.5.0Check this out,
http://yatanveersingh.blogspot.com/2011/08/how-to-call-java-method-inside-bpel.html
-Yatan -
Base64 encoding in SOAP adapter
Hi,
Is it possible to transform outgoing messages to Base64 encoding format in XI using module processors and security encryption? I'm using receiver SOAP adapter (without SOAP header) and using PayloadZipBean module processor to zip the outgoing message. Also I need to add digital signature and base64 encryption to the zipped message. Please let me know how this can be achieved.
Thanks,
Dipankarhi dipankar
check the below blog
How to use Digital Certificates for Signing & Encrypting Messages in XI
How to use Digital Certificates for Signing & Encrypting Messages in XI
hope this resolves your issue
additionally check this
How to use Client Authentication with SOAP Adapter
How to use Client Authentication with SOAP Adapter
also
How XML Encryption can be done using web services security in SAP NetWeaver XI
How XML Encryption can be done using web services security in SAP NetWeaver XI
reward points if helpfull
regards
kummari
Edited by: kummari on Jul 19, 2008 7:24 AM -
Support on 'Base64 encoding in XML gateway Web service SOAP content'
Hi Experts,
IHAC who's requirement is as follows:
They are currently using Web service protocol to send order information from Oracle Applications to their trading partner.
But need to encode the payload in base64 encoding in the SOAP request.
Further details:
=====================================================================
Current SOAP request is,
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bac="http://backend.ws.gtas.gridnode.com">
<soapenv:Header/>
<soapenv:Body>
<bac:backendImport4>
<bac:username>?</bac:username>
<bac:password>?</bac:password>
<bac:recipient>?</bac:recipient>
<bac:contentFileName>?</bac:contentFileName>
<bac:content>
<EMPLOYEE>
<EMPLOYEE_DATA>
<EMAIL_ADDRESS/>
<EMPLOYEE_ID>81</EMPLOYEE_ID>
<EMPLOYEE_NUM>2</EMPLOYEE_NUM>
<FIRST_NAME/>
<FULL_NAME>Eddi.S,</FULL_NAME>
<LAST_NAME>Eddi.S</LAST_NAME>
<MIDDLE_NAME/>
</EMPLOYEE_DATA>
</EMPLOYEE>
</bac:content>
<bac:docType>?</bac:docType>
</bac:backendImport4>
</soapenv:Body>
</soapenv:Envelope>
Required SOAP request with base64 encoding is:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bac="http://backend.ws.gtas.gridnode.com">
<soapenv:Header/>
<soapenv:Body>
<bac:backendImport4>
<bac:username>?</bac:username>
<bac:password>?</bac:password>
<bac:recipient>?</bac:recipient>
<bac:contentFileName>?</bac:contentFileName>
<bac:content>
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9J25vJz8+DQo8IURPQ1RZUEUgRU1QTE9ZRUU+DQo8IS0tIE9yYWNsZSBlWHRlbnNpYmxlIE1hcmt1cCBMYW5ndWFnZSBHYXRld2F5IFNlcnZlciAgLS0+DQo8RU1QTE9ZRUU+DQogIDxFTVBMT1lFRV9EQVRBPg0KICAgIDxFTUFJTF9BRERSRVNTLz4NCiAgICA8RU1QTE9ZRUVfSUQ+ODE8L0VNUExPWUVFX0lEPg0KICAgIDxFTVBMT1lFRV9OVU0+MjwvRU1QTE9ZRUVfTlVNPg0KICAgIDxGSVJTVF9OQU1FLz4NCiAgICA8RlVMTF9OQU1FPkVkZGkuUyw8L0ZVTExfTkFNRT4NCiAgICA8TEFTVF9OQU1FPkVkZGkuUzwvTEFTVF9OQU1FPg0KICAgIDxNSURETEVfTkFNRS8+DQogIDwvRU1QTE9ZRUVfREFUQT4NCjwvRU1QTE9ZRUU+DQo=
</bac:content>
<bac:docType>?</bac:docType>
</bac:backendImport4>
</soapenv:Body>
</soapenv:Envelope>
The issue in question is the content within the element <bac:content>.
Base64 encoding of the payload
<EMPLOYEE>
<EMPLOYEE_DATA>
<EMAIL_ADDRESS/>
<EMPLOYEE_ID>81</EMPLOYEE_ID>
<EMPLOYEE_NUM>2</EMPLOYEE_NUM>
<FIRST_NAME/>
<FULL_NAME>Eddi.S,</FULL_NAME>
<LAST_NAME>Eddi.S</LAST_NAME>
<MIDDLE_NAME/>
</EMPLOYEE_DATA>
</EMPLOYEE>
is
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9J25vJz8+DQo8IURPQ1RZUEUgRU1QTE9ZRUU+DQo8IS0tIE9yYWNsZSBlWHRlbnNpYmxlIE1hcmt1cCBMYW5ndWFnZSBHYXRld2F5IFNlcnZlciAgLS0+DQo8RU1QTE9ZRUU+DQogIDxFTVBMT1lFRV9EQVRBPg0KICAgIDxFTUFJTF9BRERSRVNTLz4NCiAgICA8RU1QTE9ZRUVfSUQ+ODE8L0VNUExPWUVFX0lEPg0KICAgIDxFTVBMT1lFRV9OVU0+MjwvRU1QTE9ZRUVfTlVNPg0KICAgIDxGSVJTVF9OQU1FLz4NCiAgICA8RlVMTF9OQU1FPkVkZGkuUyw8L0ZVTExfTkFNRT4NCiAgICA8TEFTVF9OQU1FPkVkZGkuUzwvTEFTVF9OQU1FPg0KICAgIDxNSURETEVfTkFNRS8+DQogIDwvRU1QTE9ZRUVfREFUQT4NCjwvRU1QTE9ZRUU+DQo=
========================================================================
Is there a way in XML gateway to encode the payload automatically to base64 encoding so that it can accommodate the unicode
Is there any way to encode the order information from EBS tables to base64 format in the outbound SOAP request ? Is this supported . If yes, how.?
Does this involve customization. Is it possible to use encoder/decoder provided in sites such as XSL on top of XML : http://gandhimukul.tripod.com/xslt/base64-xslt.html
Basically, They are trying to use XML Gateway to send and receive messages to a Trading Partner via SOAP. The issues is
1. Outbound: The TP web service can only receive xml content that is encoded in base 64 binary format. How do we configure to encode content using base64
2. Inbound: They want to receive messages using the SOAP architecture into XML gateway.
Please let us know if you have any detailed configuration document for this purpose. Please advise and share relevant details.
regards,
AjithHi Gurvinder,
Thanks for looking into this. Just to clarify again.
example XML content:
<?xml version="1.0" encoding="UTF-8" standalone='no'?>
<!DOCTYPE EMPLOYEE>
<!-- Oracle eXtensible Markup Language Gateway Server -->
<EMPLOYEE>
<EMPLOYEE_DATA>
<EMAIL_ADDRESS/>
<EMPLOYEE_ID>81</EMPLOYEE_ID>
<EMPLOYEE_NUM>2</EMPLOYEE_NUM>
<FIRST_NAME/>
<FULL_NAME>Eddi.S,</FULL_NAME>
<LAST_NAME>Eddi.S</LAST_NAME>
<MIDDLE_NAME/>
</EMPLOYEE_DATA>
</EMPLOYEE>
Sample Soap message that needs to be sent to our service provider is as follows
<?xml version="1.0" encoding="UTF-8" ?>
- <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
- <soapenv:Body>
- <ns5:backendImport5 xmlns:ns5="http://backend.ws.gtas.gridnode.com">
<ns5:username>admin</ns5:username>
<ns5:password>admin1</ns5:password>
<ns5:recipient>GT424</ns5:recipient>
<ns5:contentFileName>cabotTest.xml</ns5:contentFileName>
<ns5:content>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9J25vJz8+DQo8IURPQ1RZUEUgRU1QTE9ZRUU+DQo8IS0tIE9yYWNsZSBlWHRlbnNpYmxlIE1hcmt1cCBMYW5ndWFnZSBHYXRld2F5IFNlcnZlciAgLS0+DQo8RU1QTE9ZRUU+DQogIDxFTVBMT1lFRV9EQVRBPg0KICAgIDxFTUFJTF9BRERSRVNTLz4NCiAgICA8RU1QTE9ZRUVfSUQ+ODE8L0VNUExPWUVFX0lEPg0KICAgIDxFTVBMT1lFRV9OVU0+MjwvRU1QTE9ZRUVfTlVNPg0KICAgIDxGSVJTVF9OQU1FLz4NCiAgICA8RlVMTF9OQU1FPkVkZGkuUyw8L0ZVTExfTkFNRT4NCiAgICA8TEFTVF9OQU1FPkVkZGkuUzwvTEFTVF9OQU1FPg0KICAgIDxNSURETEVfTkFNRS8+DQogIDwvRU1QTE9ZRUVfREFUQT4NCjwvRU1QTE9ZRUU+DQo=</ns5:content>
<ns5:docType>3C3RN</ns5:docType>
</ns5:backendImport5>
</soapenv:Body>
</soapenv:Envelope>
. The xml content provided need to be encoded as base 64 encoding. The following is the equivalent of above xml content.
<ns5:content>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9J25vJz8+DQo8IURPQ1RZUEUgRU1QTE9ZRUU+DQo8IS0tIE9yYWNsZSBlWHRlbnNpYmxlIE1hcmt1cCBMYW5ndWFnZSBHYXRld2F5IFNlcnZlciAgLS0+DQo8RU1QTE9ZRUU+DQogIDxFTVBMT1lFRV9EQVRBPg0KICAgIDxFTUFJTF9BRERSRVNTLz4NCiAgICA8RU1QTE9ZRUVfSUQ+ODE8L0VNUExPWUVFX0lEPg0KICAgIDxFTVBMT1lFRV9OVU0+MjwvRU1QTE9ZRUVfTlVNPg0KICAgIDxGSVJTVF9OQU1FLz4NCiAgICA8RlVMTF9OQU1FPkVkZGkuUyw8L0ZVTExfTkFNRT4NCiAgICA8TEFTVF9OQU1FPkVkZGkuUzwvTEFTVF9OQU1FPg0KICAgIDxNSURETEVfTkFNRS8+DQogIDwvRU1QTE9ZRUVfREFUQT4NCjwvRU1QTE9ZRUU+DQo=</ns5:content>
See that the content is encoded using the base64 format.
Please help us to know how we can configure XML gateway to achieve this.
Regards,
Ajith -
EEM ::base64::encode unknown to the router...
An error occurs on an XR device :
invalid command name "::base64::encode"
while executing
"::base64::encode [read $fd]"
It seems that b64 encoding is not properly declare by default.
How could I fix that ?I don't have access to IOS-XR at the moment with which to test, but I'm not sure the same EEM libraries exist in XR that exist in IOS. However, there's nothing to keep you from adding them. At the very least, you can take the tmpsys:/lib/tcl/base64.tcl file from an IOS device, and paste that into your EEM script. You can also use the EEM user library directory on XR. Create a directory on the device to hold your library files (e.g. disk0:/lib). Copy the base64.tcl file to this directory, then configure:
event manager directory user library disk0:/lib
Then you can use the ::base64 namespace in your script. -
Yet another Base64 encoder / decoder
Hi, I would like introduce a different Base64 encoding scheme which yields slightly more compact results when encoding international characters.
This is an implementation of BASE64UTF9 encoder and decoder.
Common practice converts Java strings to UTF8 before Base64 encoding.
UTF8 is not so space efficient in representing non-ASCII characters.
While UTF9 is impractical as raw data in most 8 bit machines, it fits
well within Base64 streams since 3 symbols can represent 2 UTF9 nonets.
In this implementation, a modified UTF9 (flipped bit 9) is chosen to
ensure nonet '0x000' never appear but maybe be inserted if needed.
This implementation is also coded in such a way that it is possible to
use Base100 encoding. When run from command line, it will perform a
test with random strings and display encoding compactness compared to
to other existing schemes.
public class B64utf9 {
private static final String look =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
//"\u0010\u0011\u0012\u0013\u0014!\"#$%&'()*+,-./ 0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
private static final int BASE = look.length();
private static final int SYMB = (int)java.lang.Math.pow(BASE, 1.5) / 2;
public static String decode(String str) {
long j = 1, k = 0, q = 0;
StringBuffer buf = new StringBuffer();
for(int p = 0; p < str.length(); p++) {
k += look.indexOf(str.charAt(p)) * j;
for(j *= BASE; j >= SYMB * 2; j /= SYMB * 2) {
q = q * SYMB + k % SYMB;
if(k % (SYMB * 2) >= SYMB) {
buf.append((char)q);
q = 0;
k /= SYMB * 2;
return buf.toString();
public static String encode(String str) {
long j = 1, k = 0;
StringBuffer buf = new StringBuffer();
for(int p = 0; p < str.length(); p++) {
long r, q = str.charAt(p);
for(r = 1; r * SYMB <= q; r *= SYMB);
for(; r > 0; r /= SYMB) {
k += ((q / r) % SYMB + (r > 1 ? 0 : SYMB)) * j;
for(j *= SYMB * 2; j >= BASE; j /= BASE) {
buf.append(look.charAt((int)k % BASE));
k /= BASE;
if(j > 1) buf.append(look.charAt((int)k));
return buf.toString();
public static void main(String arg[]) throws Exception {
java.util.Random rnd = new java.util.Random();
for(double q = 1; q < 9; q++) {
int x = 0, y = 0, z = 0;
int r = (int)java.lang.Math.pow(Character.MAX_VALUE, 1 / q);
for(int p = 0; p < 999; p++) {
StringBuffer buf = new StringBuffer();
while(rnd.nextInt(99) > 0) {
char k = 1;
// varying ASCII density
for(int j = 0; j < q; j++)
k *= rnd.nextInt(r);
buf.append(k);
String str = buf.toString();
// regression
if(!decode(encode(str)).equals(str))
System.out.println(str);
// count encoded length
x += encode(str).length();
y += new sun.misc.BASE64Encoder().encode(str.getBytes("utf8")).length();
z += new sun.misc.BASE64Encoder().encode(str.getBytes("gb18030")).length();
System.out.println(x +","+ y +","+ z);
}{code}Good idea! Sometimes it depends on what you want to encode too, however.
I suppose there is a case where general purpose compression does not work very well - random generated data.
Here's how I tested it:
class Count {
private static String enc(String src, String set) throws Exception {
return new String(src.getBytes(set), "iso-8859-1");
private static byte[] dec(byte[] src, String set) throws Exception {
return new String(src, set).getBytes("iso-8859-1");
public static void main(String[] arg) throws Exception {
java.util.Random rnd = new java.util.Random();
int x = 0, y = 0;
for(int k = 0; k < 99; k++) {
byte[] raw = new byte[rnd.nextInt(99)];
for(int z = 0; z < raw.length; z++)
raw[z] = (byte)(rnd.nextInt(256));
String str = new String(raw, "utf16");
byte[] b6u = str.getBytes("x-base64utf9");
byte[] gz2 = enc(enc(str, "utf8"), "x-gzip").getBytes("x-base64");
x += b6u.length;
y += gz2.length;
if(!str.equals(new String(b6u, "x-base64utf9")))
System.out.println(str);
if(!str.equals(new String(dec(dec(gz2, "x-base64"), "x-gzip"), "utf8")))
System.out.println(str);
System.out.println(x +","+ y);
}The above code does not include my my encoders, I put my encoders code as nio.charset package and can be downloaded from [SF.|http://sourceforge.net/project/showfiles.php?group_id=248737]
PS: sorry about the confusion, please allow me to clarify that the UTF9 encoder is not interchangeable with existing Base64 encoders. There is a compatible (hopefully) encoder in my package, however. -
Hi,
We have a table with two columns (Name varchar2, Picture Blob).
How do we get XML output containing rows from table, with Picture (blob column) being base64 encoded.
Note: I have tried using utl_encode.base64_encode, but getting error due to large size of Picture.
Thanks,
YjI am not sure what you finally want to accomplish (create a binary xml?), but to base64 encode a blob you could do it »stepwise«:
declare
bl blob; /* your picture blob */
bl_enc blob; /* encoded blob */
offset integer := 1;
amt integer := 20000;
begin
dbms_lob.createtemporary (bl_enc, false);
while dbms_lob.substr (bl, amt, offset) is not null
loop
dbms_lob.append (bl_enc, utl_encode.base64_encode (dbms_lob.substr (bl, amt, offset)));
offset := offset + amt;
end loop;
convert_to_xml(bl_enc);
dbms_lob.freetemporary (bl_enc);
end;
/ -
How to disable product update on Cisco AnyConnect mobility client
Hallo,
Do you anybody know how to disable/turn off "Checking for product update" during _every_ connecting Cisco Anyconnect Secure Mobility Client (VPN) to remote sites?
I found it may by possible on the ASA side, but I need to disable it on the client (computer). I can see that checking is NOT during connecting to my company site, but when connecting to ANY OTHER site everytime is new version checked. It takes some time ... and I need to switch between VPN often.
Thank you for your help!
Regards, OndrejYou should be able to do this in the AnyConnect local policy. Just add (or edit, if you already have a local policy file) the following to the local policy file:
<!--?xml version="1.0" encoding="UTF-8"?-->
<anyconnectlocalpolicy acversion="2.4.140" xmlns="http://schemas.xmlsoap.org/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://schemas.xmlsoap.org/encoding/ AnyConnectLocalPolicy.xsd">
<BypassDownloader>true</BypassDownloader>
</AnyConnectLocalPolicy>
The local policy file can be found here:
Windows Vista/7/8: C:\ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\AnyConnectLocalPolicy.xml
Linux/Mac: /opt/cisco/anyconnect/AnyConnectLocalPolicy.xml
See the Enabling FIPS and Additional Security in the Local Policy section of the Cisco AnyConnect Secure Mobility Client Administrator Guide, Release 3.1 for more details. -
UIImage to Base64 Encoded String does not matched with PHP Encoded String
Hi, I have converted an image to base64 string using the following
UIImage* pic = [UIImage imageNamed:@"closeBtn.png"];
NSData* pictureData = UIImagePNGRepresentation(pic);
[Base64 initialize];
NSString * encodedString = [Base64 encode:pictureData];
The result obtained by this method and by converting the same image to base64 string in PHP or ASP is different. I am comparing the base64 string (testData) with online generated string from URL http://www.dailycoding.com/Utils/Converter/ImageToBase64.aspx
Please help ASAPKeith:
I am converting the PNG Image.Actually i want to post a image to PHP server via JSON. for that i am converting the image into base64 string and then sending JSON via HTTP. but when server receives a image data , it cannot convert and save it properl (blank image with 0x0 dimensions). I have compared the Base64 String created from xCode with some online conversion tools. and results are different. I have even tried with JPG images as well.
How can I get the Same Encoded String as PHP or ASP code can have? -
How to disable parent window while popup window is coming
Hi,
I am working on Oracle Applications 11i.
I am able to get the popup window using the Java script in the controller.
Please see the below code for the reference.
String pubOrderId = pageContext.getParameter("orderId");
StringBuffer l_buffer = new StringBuffer();
StringBuffer l_buffer1 = new StringBuffer();
l_buffer.append("javascript:mywin = openWindow(top, '");
l_buffer1.append("/jct/oracle/apps/xxpwc/entry/webui/AddAttachmentPG");
l_buffer1.append("&retainAM=Y");
l_buffer1.append("&pubOrderId="+pubOrderId);
String url = "/OA_HTML/OA.jsp?page="+l_buffer1.toString();
OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
String strUrl = popupUrl.createURL(pageContext);
l_buffer.append(strUrl.toString());
l_buffer.append("', 'lovWindow', {width:750, height:550},false,'dialog',null);");
pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
But here the problem is, even though popup window is there, i am able to do the actions on the parent page.
So how to disable the parent page, while getting the popup window.
Thanks in advance.
Thanks
NagaHi,
You can use javaScript for disabling parent window as well.
Refer below link for the same:
http://www.codeproject.com/Questions/393481/Parent-window-not-disabling-when-pop-up-appears-vi
--Sushant
Maybe you are looking for
-
Can't play songs after importing
I bought a new computer and imported all my music files from a thumb drive. Now when I try to play songs in ITunes I get an error message saying the song can not be played because the original file cannot be located.
-
How to convert catalog from 3.2 to Elements 8?
On Oct. 11 you answered a question similar to mine and I have followed your instructions through the "reconnecting missing files", but there is a broken link that is supposed to show me how to configure Windows Explorer to look for poisioned files.
-
Finding Permutations using perms in MathScript throws Memory is full error
I'm using the perms Mathscript function to find possible permutations of single digit numbers in an array. According to the perms function help it will accept 15 elements or fewer. I can feed this function up to 9 elements but when I try 10 I get t
-
Reconciliation fo stock report at stock type level
Hi gurus, I want to compare the stock quantities in a stock report with ECC when I drill down the report at Stock type level. I have tried to do it through MB5B but I found it not appropriate as the stock type calculation in BW as based on some LIS l
-
Language Version of InDesign vs. Dictionary Language
hi, i'm new here so first of all i'm saying hello to this forum. after i have tried some layout softwares i made my mind to buy InDesign. I'm from Slovakia and a Czech version of InDesign is closest to our language (since Slovak doesn't exist). bu