XSLT Mapping with Java Enhancement - how to pass Java Errors

Hi all,
I plan to build a XSLT-Mapping and do a RFC-Call out of it. (Client order!) So, I have to call my selfwritten Java class from the XSLT mapping and therefore report Connection errors back to the XSLT mapping (from Java). Is there a definition for the interface between Java and XSLT I can use?
Thanks and regards.
Daniel

hi,
hope this one will be more appropriate link
http://help.sap.com/saphelp_nw04s/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/frameset.htm
and this link will also be useful
http://help.sap.com/saphelp_nw04s/helpdata/en/4c/b2ad3de2d76b3be10000000a114084/frameset.htm
regards,
sundararamaprasad

Similar Messages

  • XSLT Mapping with Java Enhancement

    Hi All
    I am working on XSLT Mapping with Java Enhancement.
    To do this scenario i have followed the following link.
    http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/frameset.htm
    As per the above link I have created Source and Target Data Types , Message Types , Mesage Interfaces, XSLT Mapping (using the transaction XSLT_TOOL) and Interface Mapping part and configred a simple file to file scenario in the ID part.
    Apart from this I have wirte the java code, compile the java code, create the jar file using .java and .class file and after creating the jar file import the .jar file in the imported archive of the IR..
    when I am trying to execute the scenario I am getting the successful message in SXMB_MONI but the target file is having the payload as given below.
    <?xml version ="1.0" encoding="UTF-8"?>
    <name xmlns:javamap="java:com.company.group.MappingClass"/>
    And as per the XSLT mapping the payload should be as below
    <?xml version ="1.0" encoding="UTF-8"?>
    <person>
    <name>Rinku Gangwani</name>
    </person>
    I have also followed the following blog link but still i am getting the same issue
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    could you please tell me what can be the reason that i am getting the blank targt field values in the payload.
    Thanks
    Rinku Gangwani

    Hi,
      The Transaction code XSLT_TOOL for ABAP xslt mapping.But the Java Enhancement is used for normal xslt mapping which we created using Stylus Studio.You can not access the Java Enhancement in ABAP xslt mapping.
    If you want to use Java Enhancement in xslt mapping then create a xslt mapping using Stylus Studio and save the file as .xsl and zip the .xsl and import to import archive.
    Regards,
    Prakasu.M
    Edited by: prakasu on May 28, 2009 1:46 PM

  • XSLT Maps with Java enhancements - JCO_SYSTEM_FAILURE

    Hi,
    I have reviewed several postings regarding XSLT Maps with Java enhancements. I followed instructions and build a jar file and the XSLT document. I built one imported archive with the .jar and .xsl. For the class, The path get loaded properly.
    However, I still have a problem when and execute the interface.
    My xslt has the following information
    <xsl:transform version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:ns="http://xyz.abc.sap.def.com"
        xmlns:javamap="java:xyz.Date_Time">
    <xsl:param name="inputparam" />
        <xsl:template match="/">
            <test><xsl:value-of select="javamap:getDateValue($inputparam)"/></test>
        </xsl:template>
    </xsl:transform>
    In SXMB_Moni I get the following error...
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="MAPPING">JCO_SYSTEM_FAILURE</SAP:Code>
      <SAP:P1>Exception in method processFunction.</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>"SYSTEM FAILURE" during JCo call. Exception in method processFunction.</SAP:Stack>
      <SAP:Retry>A</SAP:Retry>
      </SAP:Error>
    If i remove the line        
    <test><xsl:value-of select="javamap:getDateValue($inputparam)"/></test>
    The map ends successfuly.
    Comments would be appreciated.
    Regards,
    Sergio

    Stefan,
    Find the class and method definition below. The method is static and it returns the string.
    ==========
    package xyz;
    import java.util.Map;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import java.util.*;
    import java.text.*;
    public class Date_Time {
        private static AbstractTrace trace = null;
        public static String getDateValue(Map inputparam)
                trace = (AbstractTrace)inputparam.get(
                         StreamTransformationConstants.MAPPING_TRACE );
                Date now1 = new Date();
                SimpleDateFormat formatter = new SimpleDateFormat ("yyyyMMd");
                String dateString = formatter.format(now1);
                return dateString;

  • A Java application how to pass Microsoft OEM Ready program?

    Hello,
    I have a Java application that needs to pass OEM Ready program, but it fails on AppVerifier item. The error messages are:
    "Freeing memory block inside current thread's stack address range."
    "First chance access violation for current stack trace."
    These errors are occurred by JVM. Anybody understands a Java application how to pass AppVerifier? Thanks in
    advance.
    p.s. The Java application is only a simple "Hello World" program.
    p.s. I also test many popular Java applications (such as JBuilder/NetBeans), they
    also cannot pass AppVerifier.
    p.s. The OEM Ready Program web site: http://msdn.microsoft.com/en-us/windowsvista/cc315067.aspx

    One small update. These errors are reported by AppVerifier tool. But the origin of the errors seems to be coming from JNI Calls. Basically AppVerifier is a runtime verification tool and helps in monitoring an application's interaction with OS, the registry, the file system,heap, handles, locks, and more and reports the errors found.
    And when I check my application ( which interacts with few .jar files using JNI calls ) with AppVerifier, it is reporting the errors, upon debugging I found the source of the errors to be the JNI calls. Any idea about the reasons and fix for these errors.
    I thank you in advance.

  • XSLT Mapping with Java class not working in Integration Repository

    Hi,
    I have an XSLT mapping program with Java enhancement and I was able to successfully tested it in Stylus Studio. However, when I imported the Java class and the xslt program in Enterprise Service Builder and tested it, my program does not compile.
    Here is the error message: "Transformer Configuration Exception occurred when loading XSLT mapping_temp.xsl; details: Could not compile stylesheet".
    My java program is in a zip file containing SOAPHeaderHandler.java and SOAPHeaderhandler.class. My Java has a package com.nga.xslt.
    Here is the declaration of my Java class in the XSLT: xmlns:javamap="java:com.nga.xslt.SOAPHeaderHandler"
    It seems that it could not read the java class. Can you please advice what is wrong?

    Hi ,
    select XMLTOOLKIT option in Operation mapping and execute it.
    I am not sure we can call java program in XSLT Program,but alternative is copy the code and use it in XSLT mapping it self,that means your XSLT program will become with JAVA extensions.
    then in Operation mapping level select SAPXMLTOOL kit option and execute it. i hope it will work. if it is not working then you have deploy some JAXP files on server,because the way execution of XSLT Mpaping program got changed,like when eve you executing XSLT with extnasions( if you are not using XMLTOOL kit option) then you have to use latest version of JAXP.JDK files.
    Regards,
    Raj

  • XSLT mapping with Java helper classes

    Hi,
    I'm trying to implement a XSLT mapping to convert my request to a specific soap request message format for this I'm calling some methods from a java helper class. I have imported the jar file into the archives. When I tried to test the interface it keeps complaing there is some exception but doesn't give me the exact error. Has any one called any java helper classes with in XSLT mapping, if so I would appreciate if you could help me with this. Here is the code from xsl.
    <wsse:Security soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext"   xmlns:UserToken="java:com.company.test.mapping.UserTokenMap">
    <wsse:UsernameToken>
        <wsse:Username xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
          <xsl:value-of select="UserToken:getUsername()"/>
        </wsse:Username>
        <wsse:Password wsse:Type="wsse:PasswordDigest" xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        <xsl:value-of select="UserToken:getPasswordDigest()"/>
        </wsse:Password>
        <wsse:Nonce xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        <xsl:value-of select="UserToken:getNonce()"/>
        </wsse:Nonce>
        <wsu:Created xsi:type="soapenc:string" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        <xsl:value-of select="UserToken:getCreateDate()"/>
    </wsu:Created>
    </wsse:UsernameToken>
    </wsse:Security>
    Thanks,
    Joe

    Hi,
    I'm getting following exception when I refer to the java class with in my XSLT mapping. Any one encountered the same problem.
    com.sap.engine.services.ejb.exceptions.BaseRemoteException:
    Exception in method transform.
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.transform(MapServiceRemoteObjectImpl0.java:218)
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:104)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native
    Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: java.lang.UnsupportedClassVersionError:
    com/earthlink/xi/mapping/UserTokenMap (Unsupported
    major.minor version 49.0)
         at java.lang.ClassLoader.defineClass0(Native
    Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingLoader.findClass(RepMappingLoader.java:175)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at com.sap.engine.lib.xsl.xpath.JLBLibrary.<init>(JLBLibrary.java:33)
         at com.sap.engine.lib.xsl.xpath.LibraryManager.getFunction(LibraryManager.java:69)
         at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:98)
         at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56)
         at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43)
         at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51)
         at com.sap.engine.lib.xsl.xslt.XSLValueOf.process(XSLValueOf.java:76)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:272)
         at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:463)
         at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:431)
         at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:394)
         at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:398)
         at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:240)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingTransformer.transform(RepMappingTransformer.java:150)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepXSLTMapping.execute(RepXSLTMapping.java:81)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepSequenceMapping.execute(RepSequenceMapping.java:54)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80)
         at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107)
         at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127)
         at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104)
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40)
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.transform(MapServiceRemoteObjectImpl0.java:167)
         ... 10 more
    ; nested exception is:
         java.lang.UnsupportedClassVersionError:
    com/earthlink/xi/mapping/UserTokenMap (Unsupported
    major.minor version 49.0)

  • XSLT mapping with Java

    Hi,
    I'm trying to do my first XSLT mapping. For that, I'm testing the SAP example found in XI help: it's a concatenate function between a FirstName and a LastName which uses Java function "Merge".
    But... I have this error:
    <i>Unable to find resource com/company/group/MappingClass.class (http://test, -1) in the following software component versions: 60530c50-5a4c-11d9-9740-cb29ac1601f1</i>
    Do I declare the Java class "MappingClass" or "Merge" function somewhere in XI?
    Regards.
    Mickael.

    Unfortunately there are some errors in the documentation:
    In the XSLT:
    <xsl:if test="function-available('javamap:merge')">
    Here "merge" is wrong, write "concat" instead.
    In the Java Class:
    private MappingTrace trace = zero;
    This declaration has to be static, and of course "null" not "zero"
    To compile the Java Code, you need the library aii_map_api.jar.
    I have put all here:
    http://de.geocities.com/stefan_grube/MappingExample.zip
    Upload MappingExampleXSLT.jar and MappingExampleJava.jar as "Imported Archive" under "Mapping Objects"
    For testing use the file testXSLT.xml.
    Regards
    Stefan

  • XSLT Mapping with Dynamic Configuration for Mail Adapter

    Hi Guys,
    I am wondering if somebody can help me please.
    I have a requirement in which I need to pick up the file from FTP and email it to the user as an attachment with the same file name and content.
    I know it is possible via 3 method either by deploying adapter module or via XSLT or JAVA Mapping.
    I preferred XSLT Mapping because it is easier to use and we don't need to compile the code like JAVA Mapping.
    I have done the XSLT Mapping but the only problem I am facing is that how to copy the file name which we get it from Dynamic Configuration to the Mail ContentDisposition.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:map="java:java.util.Map"
      xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration"
      xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
    <xsl:output indent="no" />
    <xsl:param name="inputparam"/>
    <xsl:template match="/">
    <!-- change dynamic configuration -->
        <xsl:variable name="dynamic-conf" 
            select="map:get($inputparam, 'DynamicConfiguration')" />
        <xsl:variable name="dynamic-key"  
            select="key:create('http://sap.com/xi/XI/System/File', 'FileName')" />
        <xsl:variable name="dynamic-value"
            select="dyn:get($dynamic-conf, $dynamic-key)" />
        <xsl:variable name="dummy"
            select="dyn:put($dynamic-conf, $dynamic-key, $new-value)" />
        <!-- copy payload -->
    I tried many option but unfortunately none of them worked.
    <Content_Disposition>attachment;filename="$inputparam"</Content_Disposition>
    <Content_Disposition>attachment;filename="$dynamic-conf"</Content_Disposition>
    <Content_Disposition>attachment;filename="$dynamic-key"</Content_Disposition>
    <Content_Disposition>attachment;filename="$dynamic-value"</Content_Disposition>
    <Content_Disposition>attachment;filename="$dummy"</Content_Disposition>
             <Content_Disposition>
                attachment;filename=
                <xsl:value-of select="dynamic-key"/>
             </Content_Disposition>
    I really appreciate if someone can please provide some guidance.
    Thanks,

    Hi,
    Yes u r correct it will show error in operation mapping.. bcoz u cannot check the DynamicConfiguration in Operation mapping...
    It will throw Exception..
    The parameter to UDF depends on ur requirement.... Let us know ur requirements exactly...
    If u r doing for file to file means no UDF required,, just check ASMA on both sides....
    Babu

  • How to Pass Java Objects between Web Dynpro and Java SAP iViews

    Basically I have an SAP web dynpro iView that I do stuff with and I want to pass an object to another iView which is just a regular Java iView. From what I've read and tried, I can't just stick something in the session object and hope that the Java iView can pull it down the other end. I had a dream that it was possible (seriously).
    Anyway, are there any possible solutions around? Please advice and share you throughts. I will try to dream about it again tonight and see if its really gonna work this time.
    thanks for your help in advance

    There is no easy way you can pass objects other than those supported by express such as String, map, list etc.
    Though not advised, you can create a class with static variables to handle the storage of such java objects during transition between form and workflow. You will need to somehow identify the objects uniquely .

  • XSLT mapping with SOAP Envelope

    Hi
    I'm trying map SOAP response (with Envelope) to pick two values into the target. Here's the data:
    Source (with data):
    <?xml version="1.0"?>
    <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>
              <EnumerateResponse xmlns="http://www.approva.net/BizRights/Services">
                   <EnumerateResult>
                        <TaskID>-1</TaskID>
                        <Result>FinishedSuccessfully</Result>
                        <StatusInfo/>
                   </EnumerateResult>
                   <pageObject>
                        <startIndex>0</startIndex>
                        <pageSize>10</pageSize>
                        <totalRows>1</totalRows>
                        <moreRecords>false</moreRecords>
                        <rowsReturned>1</rowsReturned>
                   </pageObject>
                   <xmlObjects>(large string of valid data in here)</xmlObjects>
              </EnumerateResponse>
         </soap:Body>
    </soap:Envelope>
    Target:
    Only need Result and xmlObjects into target.
    Mapping:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="/">
              <poll_status_resp_r3>
                   <Result>
                        <xsl:value-of select="EnumerateResponse/Result"/>
                   </Result>
                   <xmlObjects>
                        <xsl:value-of select="EnumerateResponse/xmlObjects"/>
                   </xmlObjects>
              </poll_status_resp_r3>
         </xsl:template>
    </xsl:stylesheet>
    The values are not getting picked-up into the target.
    What am I missing here?
    Any help is appreciated.

    Hi,
    Save the following XSL file as RSpace.xsl
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" indent="no"/>
      <xsl:template match="/|comment()|processing-instruction()">
        <xsl:copy>
          <xsl:apply-templates/>
        </xsl:copy>
      </xsl:template>
      <xsl:template match="*">
        <xsl:element name="{local-name()}">
          <xsl:apply-templates select="@*|node()"/>
        </xsl:element>
      </xsl:template>
      <xsl:template match="@*">
        <xsl:attribute name="{local-name()}">
          <xsl:value-of select="."/>
        </xsl:attribute>
      </xsl:template>
    </xsl:stylesheet>
    Zip it and import it under Imported Archive.
    In the interface mapping click "+" to add one more mapping.
    Use this XSL as first mapping and your XSL mapping as the second mapping.
    In your XSLT mapping you can use the XPath as
    "Envelope/Body/EnumerateResponse/Result".
    I mean remove the namespace and use the XPATH.
    Thanks,
    Prakash

  • Problem when using XSLT Mapping with Java Methods.

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:javamap="java:at.pi.mapping.besoldung.BesoldungMapping">
         <xsl:template match="Messages">
              <Messages>
                   <Message1>
                        <xsl:apply-templates></xsl:apply-templates>
                   </Message1>
              </Messages>
         </xsl:template>
         <xsl:template match="Message1">
              <test></test>
              <xsl:param name="inputparam"></xsl:param>
              <xsl:for-each select="MT_BesoldungConversions">
                   <test1></test1>
                   <!-- Prüfen ob die subtractDates Methode verfügbar ist -->
                   <xsl:if test="function-available('javamap:createWhitespace')">
                        <xsl:if test="function-available('javamap:extendTextWithWhitespaces')">
                             <MT_BesoldungOut>
                                  <EDI_DC40>
                                       <xsl:param name="tablename">
                                            <xsl:value-of select="tablename"></xsl:value-of>
                                       </xsl:param>
                                       <xsl:variable name="constTen">10</xsl:variable>
                                       <xsl:value-of select="javamap:extendTextWithWhitespaces($tablename,$tablename, $inputparam)"></xsl:value-of>
                                  </EDI_DC40>
                             </MT_BesoldungOut>
                        </xsl:if>
                   </xsl:if>
              </xsl:for-each>
         </xsl:template>
    </xsl:stylesheet>

    incomplete post

  • How to pass Java signed byte into VB6 unsigned program

    Hello everyone
    I need to build a client in Java to talk to a VB6 server. I am the point to pass the encrypt username and password into the server. The VB6 code for the encryption is
    Crypt = Crypt & Chr(Asc(Mid$(Text, Len(Text) - X + 1, 1)) Xor &HA3)
    My Java code is
    cryptOutput = cryptOutput + ((char)(((int) input.charAt(i)) ^ ((byte)0xa3)));
    The server doesn't seem to understand my username and password. I highly suspect the reason being that Java byte is signed and VB6 is unsigned.
    How could I overcome this problem? I did some research and things like &0xFF didnt help...
    Thank you in advance!

    A bit more information about my problem
    The server uses Crypt function to encode or decode all the strings sent or received
    Public Function Crypt(ByVal Text As String) As String
        Dim X As Integer
        For X = 1 To Len(Text)
            Crypt = Crypt & Chr(Asc(Mid$(Text, Len(Text) - X + 1, 1)) Xor &HA2)
        Next X
    End FunctionIf you run Crypt(Crypt("0123")), you should get "0123" in return
    What I need to to make the same encode/decode function on my client side to be exactly the same as the server side. My java code for it is
    public static String crypt(String input)
            int i = 0;
            int len = input.length();
            int a2 = 0xa2; // variable used in original VB code for encoding
            String cryptOutput = new String("");
            for (i = 0; i < input.length(); i++)
                cryptOutput = cryptOutput + ((char)(((byte)input.charAt(len-i-1)) ^  ((byte)a5)));
            return cryptOutput;
        }My java crypt(crypt("0123")) can also return "0123", but the result between crypt("0123") and Crypt("0123") is different. Maybe thats why the server can't authenticate the password I send it. (I use Java Socket class, while the server uses Winsock).
    I can already pass un-encrypt data (i.e string like "hello") successfully between the client and the server. But with encrypt data, I have no success :(
    I really think it's because of the byte differences between Java and VB6. Please point out my error :)
    Thank you for your time!

  • XSLT mapping with bpel varable

    Hi Experts,
    I have two schemas (source and destination) from where I want to map and create xsl.However while doing mapping I need a variable (ll be data collection from db adapter) also passed to xsl mapping and hence forth using the variable I have the logic.How I ll handle this?
    Cheers-Aswini

    Drop a transform activity, add the variables which you want on the sources side and add the target variable(there can be only one target variable attached) and in the XSL, use the xsl constructs and other string functions to transform the data as required.

  • How to pass java.library.path as a VM argument in JNLP file

    I jave a jar file containing reference to sqljdbc4.jar as I am using JDBC to talk with SQL Server. It works fine through eclipse IDE when I give the fillowing VM Argument
    -Djava.library.path=C:\Users\reddys2\Downloads\sqljdbc_4.0\enu\auth\x86. Without this I get the "error message" saying that "failed to load sqljdbc_auth.dll
    Now I would like to bundle working jar file in .jnlp and invoke through browser. I tried to add vm argunment (<property name="java.library.path" value="C:\Users\reddys2\Downloads\sqljdbc_4.0\enu\auth\x86"/> ) in the .jnlp file. But still i am getting "WARNING:Failed to load the sqljdbc_auth.dll cause:no sqljdbc_auth in java.library.path"
    Any help is greatly appreciated. Here are the contents of JNLP file
    =======================================================================================
    ?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+" codebase="http://xxx.16.19.56:8080/ifsdTools/" href="PF_UserList.jnlp">
    <information>
    <title>Login into PF</title>
    <vendor>XXX XXXX</vendor>
    <description>Provides ability to mirror PF Data base locally</description>
    </information>
    <resources>
         <j2se version="1.4+"/>
         <jar href="PopulateIFSDProjectForgeData.jar" />
         <jar href="Psqljdbc4.jar" main/>
         <property name="java.library.path" value="."/>
         <property name="javax.net.ssl.keyStore" value="NONE"/>
         <property name="javax.net.ssl.keyStoreType" value="PKCS11"/>
         <property name="http.proxyHost" value="proxy1.lmco.com"/>
         <property name="http.proxyPort" value="80"/>
         <property name="java.library.path" value="C:\Users\xxxx\Downloads\sqljdbc_4.0\enu\auth\x86"/>
         <property name="pfProjectId" value="proj1073" />
    </resources>
    <security>
         <all-permissions/>
    </security>
    <application-desc main-class="ifsdTools.PopulateIFSDProjectForgeData" />
    </jnlp>
    =========================================================================================================
    Edited by: 878645 on Apr 26, 2012 3:43 PM

    Thanks for the pointer. Question that I have is I am referencing sqljdbc4.jar in my application, which in turn using sqljdbc_auth.dll.
    Which one should i refernce through <nativelib>. Is it sqljdbc4.jar or sqljdbc_auth.dll.
    have added the following line to the .jnlp.
    <nativelib href="sqljdbc4.jar"/>
    But still it is complaining on sqljdbc_audth.dll. If it is sqljdbc_auth.dll, can I use <nativelib> to pass it.
    In that case does it need to be signed?. If so,
    Is it possible to sign .dll using 'jarsigner'?.
    Edited by: 878645 on Apr 26, 2012 3:43 PM

  • How to pass java arraylist into javascript arrays

    Hi, i have declare an arraylist
    ArrayList list1 = new ArrayList();Inside the arraylist, there are elements. Now, i wan to pass the elements in the java arraylist into javascript arrays but i encounter javascript errors.
    This is how i code.
    var arr1 = new Array();
    <%
    for ( int x =0; x<list1.size(); x++)
    %>
         arr1[<%=x%>] = <%=(String)list1.get(x)%>;
    <%
    %>how do i solve this problem?
    Thanks for the guidance in advance

    JTech wrote:
    Hi,
    Use Quotes around string value ( arr1[indexposition] = "stringvalue";), when assign to javascript array as below.
    arr1[<%=x%>] = "<%=(String)list1.get(x)%>"; Regards,
    Ram.Hi Ram,
    How about using arr1 = <%=list.toArray()%> ??? Is this possible? I tried it but was not working on my IDE. Do you have any solutions for this??
    Regards,
    Thiagu

Maybe you are looking for