Jwsc and map interface

Hi All,
I would like to expose java.util.Map as a parameter using JAX-WS web service generated using jwsc. I am getting the following error while executing jwsc ant task,
*JWS Validation failed: [Type java.util.Map on JWS is not supported., Type java.util.Map on JWS is not supported.]*
Here's what I have,
Complex.java
@WebService(name="complex", targetNamespace="http://abcd.org.jaxws")
@SOAPBinding(style=SOAPBinding.Style.DOCUMENT, parameterStyle=SOAPBinding.ParameterStyle.WRAPPED, use=SOAPBinding.Use.LITERAL)
@WLHttpTransport(contextPath="jaxws_complex", serviceUri="ComplexService")
public class Complex {
     @WebMethod
     @XmlJavaTypeAdapter(MyMapAdapter.class)
     public Map<Integer, String> processHashMap(Map<Integer, String> hashMap) {
          hashMap.put(1, "2");
          return hashMap;
I have written a custom MapAdapter to map the java.util.Map to a simple name/value string, but I think jwsc is not considering it while generating the web service.
MyMapAdapter.java
public class MyMapAdapter extends XmlAdapter<MyMapType, Map<Integer, String>> {
     @Override
     public MyMapType marshal(Map<Integer, String> v) throws Exception {
          // TODO Auto-generated method stub
          MyMapType myMapType = new MyMapType();
          List<MyMapEntryType> entries = new ArrayList<MyMapEntryType>();
          for(Map.Entry<Integer, String> entry : v.entrySet()){
               entries.add(new MyMapEntryType(entry.getKey(), entry.getValue()));
          myMapType.setEntry(entries);
          return myMapType;
     @Override
     public Map<Integer, String> unmarshal(MyMapType v) throws Exception {
          Map<Integer, String> Map = new HashMap<Integer, String>(v.getEntry().size());
          for (MyMapEntryType entry : v.getEntry())
               Map.put(entry.key, entry.value);
          return Map;
MyMapEntryType.java
public class MyMapEntryType {
     @XmlAttribute
public Integer key;
@XmlValue
public String value;
public MyMapEntryType() {
          super();
     public MyMapEntryType(Integer key, String value) {
          super();
          this.key = key;
          this.value = value;
     public Integer getKey() {
          return key;
     public void setKey(Integer key) {
          this.key = key;
     public String getValue() {
          return value;
     public void setValue(String value) {
          this.value = value;
MyMapType.java
public class MyMapType {
     List<MyMapEntryType> entry;
     public List<MyMapEntryType> getEntry() {
          return entry;
     public void setEntry(List<MyMapEntryType> entry) {
          this.entry = entry;
build.xml
<project name="webservices-jws_basic-complex" default="all"
     basedir=".">
<property name="complex.ear.dir" value="output/complex/complexEAR" />
     <property name="complex.war" value="complex" />
     <property name="complex.ws.file" value="org\abcd\jaxws\complex\Complex" />
     <target name="all" depends="build-complex-service" />
     <target name="build-complex-service">
          <jwsc verbose="on" debug="on" srcdir="src" destdir="${complex.ear.dir}" >
                    <jws file="${complex.ws.file}.java" explode="true"/>
          </jwsc>
     </target>
</project>
Exception stack trace:
[jwsc] 1 JWS files being processed for module /org/syed/jaxws/complex/Complex
[jwsc] C:\workspace\JAAS\JAXWS\src\org\syed\jaxws\complex\Complex.java 27:37
[jwsc] [ERROR] - Type java.util.Map on JWS is not supported.
[jwsc] C:\workspace\JAAS\JAXWS\src\org\syed\jaxws\complex\Complex.java 27:37
[jwsc] [ERROR] - Type java.util.Map on JWS is not supported.
[AntUtil.deleteDir] Deleting directory C:\DOCUME~1\p2085712\LOCALS~1\Temp\1\_i2m6up1
[AntUtil.deleteDir] Deleting directory C:\DOCUME~1\p2085712\LOCALS~1\Temp\1\_i2m6up1
BUILD FAILED
C:\workspace\JAAS\JAXWS\ComplexBuild.xml:22: weblogic.wsee.tools.WsBuildException: JWS Validation failed: [Type java.util.Map on JWS is not supported., Type java.util.Map on JWS is not supported.]
     at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:236)
     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     at org.apache.tools.ant.Task.perform(Task.java:348)
     at org.apache.tools.ant.Target.execute(Target.java:390)
     at org.apache.tools.ant.Target.performTasks(Target.java:411)
     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
     at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
     at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
     at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
     at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
     at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)
Caused by: weblogic.wsee.tools.WsBuildException: JWS Validation failed: [Type java.util.Map on JWS is not supported., Type java.util.Map on JWS is not supported.]
     at weblogic.wsee.tools.anttasks.JwsModule.buildAndValidate(JwsModule.java:589)
     at weblogic.wsee.tools.anttasks.JwsModule.loadWebServices(JwsModule.java:576)
     at weblogic.wsee.tools.anttasks.JwsModule.generate(JwsModule.java:369)
     at weblogic.wsee.tools.anttasks.JwsModule.build(JwsModule.java:256)
     at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:229)
     ... 16 more
Any idea on how to enforce jwsc to understand the adapter I have written? Many thanks for your help.
Regards
Syed
Edited by: 992473 on 07-Mar-2013 07:17

Just found the solution after posting the question, it is related to build.xml, have updated with type="JAXWS" as below:
<target name="build-complex-service">
          <jwsc verbose="on" debug="on" srcdir="src" destdir="${complex.ear.dir}" >
                    <jws file="${complex.ws.file}.java" explode="true" type="JAXWS"/>
                    <binding dir="${binding.dir}" casesensitive="yes">
                         <include name="**/*.xml"/>
                    </binding>
          </jwsc>
     </target>

Similar Messages

  • Forms 5.0 OLE2 and MAPI interface

    Does anyone know where I can get documentation on the MAPI
    interface commands that are used with the OLE2 forms built in
    package?
    null

    You can't. Upgrade to Forms 6 or 9.

  • Terrible on compass and maps interface

    Hello,
    when i using my COMPASS also MAPS in my iPhone3Gs OS 4.0.1.
    it's look doesn't work exactly. when i taping to Compass always shown " Compass Interference move away from any interference................"
    in the same case on MAPS, also my position on map and the blue ball not according, i don't know if it's come from network provider career.
    but i have not moving away, just stay on my position but alway shown like this picture's on link:
    http://www.flickr.com/photos/36700715@N08/?saved=1
    or
    http://www.manjam.com/iphone3Gs
    even i have been restore many time my device iPhone 3Gs,.
    what is solution?
    thank you..!!

    Same problem here........I made a post to this group concerning this a few days ago.
    Apparently Apple are aware there is a problem - but no idea of when there will be a fix for it.

  • How to configure one dsl connection and one public ip in cisco router and map to one interface for using exchange server

    how to configure one dsl connection and one public ip in cisco router and map to one interface for using exchange server

    Hi ,
     Have you got any additional public IP Address from your service provider , If yes on router you can have static route for those additional IP Address pointing to your ASA  outside interface . 
    Accordingly you can configure NAT 
    HTH
    Sandy . 

  • Value mapping, interface mapping, standard funtions and user defined functi

    I like have more information abt live scenario's use of value mapping, interface mapping, standard funtions and user defined functions.
    How to create user defined funtions and how to use it in XI?
    thanks in advance
    shiva

    Hi,
    Interface mappings register your mapping program for an interface pair in the Integration Repository. If you require a mapping at runtime, it is sufficient to select the interface mapping for the interface pair at configuration time .The Integration Server uses the interface mapping to identify associated mapping programs for request messages, response messages, fault messages, or all three.
    Features
    Executing Multiple Mapping Programs for One DirectionBy using an interface mapping you can execute multiple mapping programs consecutively for the transformation of a request or response message. In such cases, an interface mapping comprises multiple steps for which the following applies:
    &#9679;     The steps are executed in the sequence specified (from top to bottom). The result of the mapping program from the previous step is forwarded to the mapping program of the subsequent step.
    &#9679;     Each step can reference a mapping program that executes a 1:1, 1:n, n:1, or an m:n transformation. In the case of multi-mappings (1:n, n:1, or m:n), the previous step must create the same number of messages that the subsequent step expects.
    &#9679;     Multi-mappings use one envelope to put all messages in one structure. If one of the steps references a multi-mapping program, all subsequent steps must use the same envelope.
    The mapping for a request message comprises two message mapping programs: one 1:1 transformation and one 1:n transformation. Since the latter message mapping uses the multi-mapping envelope for both the target message and the source message, the message mapping for the 1:1 transformation must also create a transformation result with a multi-mapping envelope.
    You do not strictly need to divide up one direction of the whole mapping into different steps. However, this enables all the message formats in one system landscape to be mapped to a central message format, for example. This results in less mapping programs being required because you no longer need to be able to map all the different message formats to each other
    Activities
           1.      Create a message mapping on the design maintenance screen of the Integration Builder (see also: Creating an Object).
    You can also create multiple interface mappings for the same interface pair.
           2.      Enter the source and target interfaces that require a mapping of the request message, the response message, the fault message, or all three, in the table of the same name. The following restrictions apply:
    &#9675;     If you want to use the interface mapping in a transformation step in an integration process, you must only specify abstract message interfaces. Furthermore, all objects (integration process, interface mapping, and all objects that reference the interface mapping) must be in the same software component version. If you want to reference objects from underlying software component versions, you must access the objects from the Basis Objects branch (in the navigation tree or using an input help).
    &#9675;     If you want to map multiple messages to each other by using a multi-mapping, you can only specify asynchronous interfaces (for further restrictions, see: Multi-Mappings). If any message interfaces are missing, you can also create them by using the function Create New Object ().
    If the interface cannot be imported or cannot be created in the Integration Repository (in the case of an external adapter, for example), you must enter the interface names manually. However, it is not possible to check the technical name in this case.
           3.      To import the properties of the interfaces, choose Read Interfaces. The table in the lower area displays tab pages for the request message, response message, and if available, for the fault message, for each mode of the interfaces (either synchronous or asynchronous).
           4.      To develop an external mapping program, export the XSD schema of the respective request or response message as a zip file after you have imported the interfaces. The zip file can contain multiple schema files that reference each other, for example in a multi-mapping. In this case, the schema with the global message element has the name MainSchema.
           5.      To reference a mapping program for the respective message, you have the following options:
    &#9675;     Select an existing mapping program from the Integration Repository by using the input help (). If this is a message mapping, the default setting of the input help only displays those message mappings that are found using the source and target message in the Integration Repository (in multi-mappings, the first source and target messages are used as the search criteria). However, you can also display any number of message mappings, for example, because you are constructing a mapping from several mapping programs with intermediate instances which have no message types.
    &#9675;     You can create message mappings directly from the interface mapping. To do this, select the mapping type Message Mapping in the Type column. Position the cursor in the Name column and choose the function Create New Message Mapping () in the Mapping Program frame. The Integration Builder copies the specifications of the messages and their occurrence directly from the interface mapping.
    An interface mapping can only reference mapping programs that belong to the same or an underlying software component version of the interface mapping. This ensures that the mapping program can be shipped together with the interface mapping (see: Software Logistics).
           6.      If it is not a mapping for a fault message, you can execute multiple mapping programs in succession for request and response messages:
    &#9675;     To insert an additional line for a mapping program, choose .
    &#9675;     To delete the registration for a mapping program, choose .
    At runtime, the mapping programs are executed from top to bottom.
           7.      Save the interface mapping.
    Regards
    Aashish Sinha
    PS : reward points if helpful

  • Can i download google map and then interface with labview?

    i intend to interface labview with google map and indicate my required position on it.i need help on how to accomplish this?can i download google map and then interface with labview?

    Hi,
         The Example avalable on following link (C:\Program Files\National Instruments\LabVIEW 2009\examples\comm\axevent.llb\ActiveX Event Callback for IE.vi) on your PC, and using of Googlr map API u can indicate your position.document are avalable on following link (http://code.google.com/apis/maps/documentation/staticmaps/)
    I hope this is help for u..
    Siva
    Sivaraj M.S
    CLD

  • Sending Idocs from SAP-R/3 to XI, bundle and map them to one XML-file

    Hi All,
    We need to send IDoc's (DEBMAS06) from R/3 to XI and  bundle and map them to a single xml-file. Please help us with your suggestions on how to proceed using a simple solution (probably need of BPM).
    Regards,
    Theo

    Hi Theo,
    there is an example in SAP Library: <a href="http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm">Collecting and Bundling Messages - One Interface</a>. Plz post us your detailed quetions.
    Regards,
    Udo

  • Data Type, Message Type and Mapping for FTP

    Thanks in advance for your replies.
    As our first production XI scenario, we need to move several (at least 46) files from our SAP instance to a couple of different servers to support our legacy systems.  Once all locations are on SAP this requirement should go away.
    I only want to pick up the file from the one server and place it on the other and this leads me to some questions.
    How do I define the Data Type and Message Type for each of the files?   Do I need to consider the size of the record in each interface and create DT/MT with different sizes.
    Do I need a mapping program that simply maps one structure to the other?

    I recently completed a similar exercise.
    It looks like this...
    server1 ftp (Sender - delete file) - XI - Server2 ftp (receiver - create file).  This will move the file from one server to another.
    I used the same schema and mapped fields on a one to one basis.
    The Size of the files I process are between 6kb and 500kb each, but the mapping/fields remain constant, just the numebr of items change.
    Worked seemelessly for the last three weeks (since go-live)

  • Use of generics in the Map interface

    After using Java 1.5 for a while, I've gotten pretty comfortable using generics and the collections framework. Very often, I depend on the new generics-related compiler warnings to guide me when I've made changes to my code. Recently, I missed a fairly subtle bug because of the following issue. Why isn't the get() method in the java.util.Map interface declared as:
    V get(K key);Is there some subtle reason why this method isn't declared to enforce the generic type K for the key value? Likewise for containsKey() and remove() as well.
    Thanks!

    So where is the problem to use K in the first
    place??The cast to K is removed during complilation. It's
    not going to do anything at runtime.
    Just because a reference is of type Object doesn't
    mean it's not a K.
    If I get an Object of unknown type, why should I have
    to down-cast it just so that I can check to see
    whether it is in the Map?
    To state the point I wrote this simple code:
            Map<String,Integer> testMap = new TreeMap<String,Integer>();
            testMap.put("test", Integer.valueOf(100));
            // test the get method
            Integer value = testMap.get("test");
            System.out.println("First value: " + value);
            // test the method with differing parameter
            value = testMap.get(Float.valueOf(2));
            System.out.println("Second value: " + value);The code compiles without any error (so far so good) but the execution of this code results in Exception in thread "main" java.lang.ClassCastException: java.lang.String
         at java.lang.Float.compareTo(Unknown Source)
         at java.util.TreeMap.compare(Unknown Source)
         at java.util.TreeMap.getEntry(Unknown Source)
         at java.util.TreeMap.get(Unknown Source)
         at MapTest.main(MapTest.java:27)So when the Object parameter is allowed (I'm okay with that) why the ClassCastException. A similar approach to the implementations of Lists would be necessary. The current implementation is not satisfactory.

  • Code to retrive the sender and receiver interface names using custome adapter module

    Hello Team,
    I want to develop an custom adapter module which could retrieve the names of the sender and receiver interfaces of the scenario and for that i am trying to use com.sap.aii.af.service.administration.api.monitoring.ProcessContextFactory.ParamSet but i don't know whether this API will support or not and also i don't know how to develop the code using this API so please suggest me some code for it so that i could retrieve the names.
    Thanks you all in advance.
    Regards,
    Avinash.   

    Hi,
    Just ASMA setting will do the needful. Are you planning to rename your target file name. If yes then only you will require UDF.
    Update: Since your directory name will be taken from source file name then you have to use mapping for this, else it will not be possible.
    I don't know if creating a new module for this will help you solve the issue, but in that case rather creating adapter module, mapping will be easier.
    Regards,
    Sarvesh
    Edited by: Sarvesh Singh on Dec 7, 2009 3:04 PM

  • Extended receiver and enhanced interface determination

    Hi,
    Can somebody list me the business cases when we use the extended receiver and enhanced interface determination.In which scenarios we have to use them?
    Where we can use these features and whom they can replace?
    Regards,
    Anoop

    Hi Anoop
    have alook at thses URl's also
    http://help.sap.com/saphelp_nw04/helpdata/en/43/01322a7af25285e10000000a1553f7/frameset.htm
    :Dynamic file and variable substitution
    Similarly Extended Receiver determination is used to determine the receiver at runtime.
    Refer my reply:Re: Condition In Receiver Determination Not Working
    enhancement in ID
    Enhanced Receiver Determination:
    You use an enhanced receiver determination to have a mapping program determine the receivers of the message dynamically at runtime. Instead of creating the receivers in the receiver determination manually, you assign a mapping to the receiver determination and this returns a list of receivers at runtime.
    http://help.sap.com/saphelp_nw04/helpdata/en/43/a5f2066340332de10000000a11466f/content.htm
    Enhanced (Mapping-Based) Interface Determination
    In an enhanced interface determination you do not enter the inbound interfaces manually, but instead first select a multi-mapping. You get the inbound interfaces from the target interfaces of the multi-mapping. The inbound interfaces are determined at runtime during the mapping step.
    You typically use an enhanced interface determination if the source message has an element with occurrence 0 ... unbounded (for multiple items of a data record) and you want multiple messages (for the individual items) to be generated at runtime.
    http://help.sap.com/saphelp_nw04/helpdata/en/42/ed364cf8593eebe10000000a1553f7/frameset.htm
    <b>enhanced interface determination</b>
    /people/robin.schroeder/blog/2006/11/15/using-dynamic-receiver-determination-with-sync-interface
    /people/venkataramanan.parameswaran/blog/2006/03/17/illustration-of-enhanced-receiver-determination--sp16
    List of receivers can be dyamically determined and assigned at runtime using enhanced receiver determination .
    http://help.sap.com/saphelp_nw04/helpdata/en/43/a5f2066340332de10000000a11466f/content.htm
    Thanks
    Pls reward if useful

  • Eject DVD script and map to eject key?

    Could someone instruct me on how to create an eject script to open my SuperDrive DVD tray and map it to the "Eject" key? I need a powerful programming solution here and I don't mind opening some sensitive system files if necessary.
    For some reason my aluminum keyboard "Eject" key will not work and the menu extra (eject.menu) turns blue and freezes. However, dragging a CD/DVD to the trash works fine, disk utility works, itunes works and toast works. OS X 10.5.5/6 does not work.
    I'd like to be able to command my DVD drive to open when I need it.
    Thanks

    Thanks for your help, but I did an archive and install less than a week ago because I had trouble with the 10.5.6 update. All seems fine now except the Media Eject Key. Oh, I also tried a 2nd Aluminum keyboard from a new iMac, and I tried an older white keyboard from a G5 iMac.
    This is becoming very weird. Nothing seems to be working. Even eject.menu (menu extras) only works a couple times and then turns solid blue and freezes. I have repaired permissions many times and between every updater and restart along the update path back to 10.5.6. No abnormal problems detected. Also ran DiskWarrior from another hard drive. Oh... and started up from a second drive with 10.5.5 and still will not open!
    I have even reflashed my DVR-115D back to 1.18 as normal (down from 1.22) and that didn't help either. I know it's not the drive because all other programs and terminal can open it no problem.
    Only thing left is a firmware issue or keyboard interface coding. Anyway to force the keyboard firmware 1.0 to re-update? I tried to rerun it but it says already updated.
    Maybe if I zap the Pram??????? Haven't tried that yet.

  • Map.get(K) and Map.get(Object)

    When I first saw the new 2.0 generics compiler, I was very pleased to see that the signature of Map.get() has changed (since 1.3) from:
        interface Map<K,V> { V get(Object obj); }to:
        interface Map<K,V> { V get(K key); }because it means buggy code like this:
        Map<File,Integer> fileSizeMap = new HashMap<File,Integer>();
        Integer sizeOfFile = fileSizeMap.get("/tmp/foo");
        if (sizeOfFile == null) {
            System.err.println("File not found in map");
        }(where I have mistakenly called Map.get() with a String rather than a File) will now get a compiler error rather than a fault raised several months after the application has gone live.
    So, as I say, I am very pleased with the new signature for Map.get(), although I would also like to see the following methods changed:
        boolean containsKey(Object)   -> boolean containsKey(K)
        boolean containsValue(Object) -> boolean containsValue(V)
        V remove(Object object)       -> V remove(K)However, I just read on http://cag.lcs.mit.edu/~cananian/Projects/GJ/Bugs/v20/map.html that Neal Gafter says that putting Map.get(K) into 2.0 was a mistake, and that it will be put back to Map.get(Object) in the next version.
    I do hope I haven't missed something obvious, but keeping these methods with Object parameters seems to me to be a backwards step from the excellent type safety benefits provided by Generics.
    Does anyone else agree with me that having get(K) would be beneficial in allowing the compiler to identify bugs that would otherwise only be discovered much later?
    Or, could someone explain to me why having get(Object) is preferable, and whether this reason is more important than the type safety issue I identified in my example code above?
    Many thanks in advance
    Geoff

    Gafter wrote:
    The reason the argument type is Object and not K is that existing code depends on the fact
    that passing the "wrong" key type is allowed, causes no error, and simply results in the
    key not being found in the map.But "existing code" does not use Generics, and therefore as with all other non-generic code, the authors of that code can choose to either leave it as it is (in which case their Maps will become Map<Object,Object> and Map.get() will then take an Object), or to upgrade it to Generics, and take advantage of the helpful compiler messages that may highlight some design flaws in the original code.
    In Jakarta Commons Collections (this is "existing code"), there's a class MultiHashMap which extends HashMap. When you call MultiHashMap.put(someKey, someValue) it appends someValue to an ArrayList that gets stored as the value in the HashMap. However when you call MultiHashMap.get(someKey), it returns a Collection of values, rather than just a single value.
    If they try to upgrade MultiHashMap to Generics, they are going to come up with a problem: they would be needing something like this:
        public class MultiHashMap<K,V> extends HashMap<K,V> {
            public V put(K key, V value) { ... }
            public Collection<V> get(K key) { ... }
        }which of course is not allowed, since Map<K,V>.get() returns V, not Collection<V>.
    Now, I don't hear anyone saying: This "existing code" relies on Map.get() returning an Object, so in Generics we're going to make Map.get() return Object rather than V.
    No, instead we (correctly) say: That MultiHashMap code was wrong to abuse the flexibility provided by the use of Object as the return value of Map.get(), and if it wishes to use Generics, it will either need to become MultiHashMap<K,Object>, or if it insists on being MultiHashMap<K,V>, it will not be allowed to extend HashMap.
    I really don't see the problem in using Generics (and a typesafe Java Collections API) as a means of highlighting problems in existing code. As I said before, existing code will continue to work as before, because List will become List<Object> and Map will become Map<Object,Object>.
    This is no worse than "accidentally" trying to get() with a key of the right
    type but the wrong value. Since none of these methods place the key into the
    map, it is entirely typesafe to use Object as the method's parameter.Suppose for a moment that when String.endsWith() was first written, it took an Object parameter instead of a String. If I were to say to you: This method needs to change its parameter from Object to String, would you tell me that that there's no need to make the change, because a String can only ever end in a String, and so it is entirely typesafe to use Object as the method's parameter?
    Geoff

  • Decompress and map compressed payload

    Hello All,
    Does anyone know how to uncompress and map a payload in a receiver which has been compressed before using the PayloadZipBean?
    Regards,
    Matthias

    Hi Matthias,
    If you have used a compress bean in the adapter as a module, then you need to write a class (java class) and use it in the INterface mapping to de-compress it. Only then will you be able to work on your payload. In the interface mapping, the sequence will be 1. The java class which de-compresses the payload and 2. your mapping program.
    Award if helpful,
    Sarath.

  • The new "foreach" statement and maps

    The new "foreach" statement requires an object that implements the java.lang.Iterable<T> interface.
    But why do not extend "for" for accepting objects that implements the Map interface?
    Map<String,String> m = new TreeMap<String,String>();
    for (String key, String value : m) {
         System.out.println (key + "=" + value);   
    }The current alternative
    Map<String,String> m = new TreeMap<String,String>();
    for (Map.Entry<String,String> e : m.entrySet()) {
         System.out.println (e.getKey() + "=" + e.getValue());   
    }is not so clean.

    The new "foreach" statement requires an object that
    implements the java.lang.Iterable<T> interface.Incidentally, I believe "foreach" also allows an object that is an array.
    But why do not extend "for" for accepting objects that
    implements the Map interface?I think that the use of "Iterable" is a very good idea. The interface contains just one method (iterator) and that method is inherently linked to the concept of "foreach". This means anyone can write their own class that implements Iterable, and their class can then be used with "foreach".
    If we specified that "foreach" also worked with Map (with its umpteen methods, only one of which (entrySet) is relevant to "foreach"), this would prevent people writing their own classes which iterate through pairs of values (unless those classes happened to implement Map).
    Ideally, there would be a new interface Pair<A,B> in java.lang (with getFirst() and getSecond() methods), and then if the compiler came across something like this:
        for (String str, Widget widget : items) { ... }where items is an instance of Iterable<Pair<String,Widget>>, then for each iteration, the "Pair" would be split into its component parts and stored in the variables "str" and "widget".
    Unfortunately, it would be difficult to retrofit this concept to java.util.Map, since it would require Map to introduce a new method:
    interface Map<K,V> extends Iterable<Pair<K,V>> {
        Iterator<Pair<K,V>> iterator();
    }and Map.Entry would need to extend Pair, and therefore introduce two new methods:
    interface Entry<K,V> extends Pair<K,V> {
        K getFirst();
        V getSecond();
    }Both of these changes would break huge amounts of existing code that uses Map or Map.Entry.
    Maybe one for Java 3 :)
    Geoff

Maybe you are looking for

  • Help with my new Mac!

    Im just switching from a PC to a Mac...do I have to buy a AirPort Express for my Mac or can I use like Linksys?

  • Find tables in R3

    Hi Experts,            how do i find the underlying table for some fields.. eg table for billing document.. i would appreciate if someone gives me the navigation steps.. thanks dave

  • Regarding .java file

    Hi, I deployed a project with all tha class files with a single web.xml file. Afterwards what is the use of the .java file which I used to create the class file? (This was asked by a interviewer in an interview.) Please help me with the answer. Thank

  • Making description field editable

    hi, I want to make the field "description" editable in the shopping cart. For Limit shopping cart I have done through SPRO setting SRM Server-->Cross application Basic Settings --> Extensions and Field control -->Configure field control --> Configure

  • New lightroom not opening on mac

    Trying to open new lightroom CC on my mac and it shows the image and then crashes straight away. I've not taken off the old lightroom. What should I do?