Exception in Holder for Multiple Return Types

Hi,
I am implementing multiple return types as mentioned at url: -
http://e-docs.bea.com/wls/docs70/webserv/implement.html#1058020
I have a "Ticket" object and its holder "TicketHolder".
I have built the service successfully which has the following method with its
built files: -
public String serviceMethod(String arg,TicketHolder out) {
Ticket tc = new Ticket();
tc.setticketId("001");
out = new TicketHolder();
out.value = tc;
System.out.println("got it man");
return arg;
But when i try to invoke this method from its "http://localhost:8088/WebServices/RegisterTickets"
link (note - RegisterTickets is the service name here), it gives me the following
exception at server side as well as client side: -
javax.xml.rpc.JAXRPCException: Failed to invoke the target:test.MyService@630693
operation name:serviceMethod method:public java.lang.String test.MyService.serviceMethod(java.lang.String,test.TicketHolder)
args:[Ljava.lang.Object;@3d51e3arg.length:2 Due to exception:java.lang.IllegalArgumentException:
argument type mismatch                                                      
                           at weblogic.webservice.component.javaclass.JavaClassInvocationHandler.invoke(JavaClassInvocationHandler.java:97)
                                               at weblogic.webservice.core.handler.InvokeHandler.handleRequest(InvokeHandler.java:78)
                                                                         at weblogic.webservice.core.HandlerChain.handleRequest(HandlerChain.java:131)
    at weblogic.webservice.core.DefaultOperation.process(DefaultOperation.java:539)
  at weblogic.webservice.core.DefaultWebService.invoke(DefaultWebService.java:264)
Can someone help me in resolving this exception?
Any help would be appreciated...
thanks in advance,
Rajesh
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

apart from it getting ugly with more than twoparameters
What? How is this ugly? ;-)
public String, int, String, Color, String, String
getStateInfo(String abbrev) {
return name, population, stateFlower, stateColor,
or, stateAnimal, governorsName;
there no indication on what the return valuesrepresent.
Well, I guees the API docs would have to speak for
themselves. Or better method naming... In that
sense, it's no different then now. I could write a
method "getStateName()" and return totally different.
public String, int getStateNameAndPopulation(String
abbrev) {...
I used to like "tuples" when I studied The Tom Programming Language (that's how he calls them), as every CS student is a bit of a "featurist"... Now that I came to develop 40 hours a week and to love Java's simple and powerful expressiveness, I tend to find such constructs overly ugly to be avoided as possible... a matter of personal taste, too, I suppose...

Similar Messages

  • Multiple Return Types

    haven't been around in a while, so I thought I'd stir up some comments with a suggestion for a new feature in Java, which I'm sure has been suggested at some point, but I can't remember seeing it talked about, so here goes:
    Multiple Return Types:
    public String, int getStateInfo(String abbrev) {
       if("nj".equalsIgnoreCase(abbrev)) {
          return "New Jersey", 11408042;
       // ... and other states...
       return null, -1;
    String name, int population = getStateInfo("nj");
    System.out.println("The population of " + name + " is " + population + ".");Yes yes, I know. Create a StateInfo object with the fields needed. Still, I think that could be interesting.

    apart from it getting ugly with more than twoparameters
    What? How is this ugly? ;-)
    public String, int, String, Color, String, String
    getStateInfo(String abbrev) {
    return name, population, stateFlower, stateColor,
    or, stateAnimal, governorsName;
    there no indication on what the return valuesrepresent.
    Well, I guees the API docs would have to speak for
    themselves. Or better method naming... In that
    sense, it's no different then now. I could write a
    method "getStateName()" and return totally different.
    public String, int getStateNameAndPopulation(String
    abbrev) {...
    I used to like "tuples" when I studied The Tom Programming Language (that's how he calls them), as every CS student is a bit of a "featurist"... Now that I came to develop 40 hours a week and to love Java's simple and powerful expressiveness, I tend to find such constructs overly ugly to be avoided as possible... a matter of personal taste, too, I suppose...

  • Flex services with multiple return types

    Hello,
    We are creating a webapplication with flex and php.
    Everything is working very good, until we got to the library part of the application.
    Every service so far had only 1 return type (eg: User, Group, ...)
    Now for the library we want to return a ArrayCollection of different types of objects. To be more specific the LibraryService should return a ArrayCollection containing Folder and File objects.
    But how to configure this in Flex (Flash Builder 4 (standard))?
    So far it converts every object to the type Object, i would really like it to be Folder or File
    The only solution we can think of right now is to create a new object Library that will contain 2 ArrayCollections, one of type Folder and one of type File. This could work ofcourse, but I wonder if there is a better solution for this OR that i can configure multiple return types for a service.
    Any ideas/advice is greatly appreciated.

    Normally if you are using Blazeds(Java stuff, i'm sure there should be something similar for php), you can map java objects to that of the AS objects, when you get the data back you are actually seeing the object which is a Folder or a File object rather than just a Object.

  • Calculation formula userexit not working for multiple condition types

    Hi,
    we have a problem in the CRM ISA-B2B scenario where the custom user exit is only working for single condition type.
    but we need it for multiple condition types .
    the value of the subtotal is not being retrieved for multiple conditions. at a time only one condition value is being retrieved and shown in the webshop - shopping basket.
    for ex:
    we have scenario 1 where Y001 -Freight condition type is applicable for one customer.and Y002 is applicable for another customer.
    when we are trying to show the subtotal condition value in the webshop by using a single custom user exit in the pricing procedure it is only working for either of the above 2 customers depending on the VMC cache status.
    is there any problem if use the single user exit for both condition types?
    and if it needs to be differentiated how exactly we can do that with the same logic in the java class.
    Thanks in advance,
    PSR.

    Hi Arshi,
    below is the code:
    public class ZValFormula_ZZWI1 extends ValueFormulaAdapter {
         private static String zzwi = "ZZWI1";
         private static char  zzwiC = '@';
         private static UserexitLogger userexitlogger = new UserexitLogger(
         ZValFormula_ZZWI1.class);
         public BigDecimal overwriteConditionValue(IPricingItemUserExit item,
                   IPricingConditionUserExit condition) {
              ICurrencyValue val = condition.getConditionValue();
              userexitlogger.writeLogDebug( "value saved for " + zzwi + " (" + zzwiC + ") = "
                        + val.getValueAsString());
              item.setSubtotal( zzwiC, val.getValue());
              return val.getValue();
    hope this would give more idea to look at the problem.
    Thanks,
    PSR

  • Custom HoverPanel for Multiple File Types Preview

    Hi Everyone,
    We Have a requirement to customize SP2013 Search Results webPart to List down multiple file types (Word, Excel, PowerPoint, PDF, Images, etc). we created our own Design Template for Search Results Item to show managed Properties we require. and we need to
    create a Hover Panel to show the preview of those files. we tried to achieve this, but failed. can anyone please provide us a Solution for this ?
    Thank you!

    Hi  Mohamed,
    According to your description, my understanding is that you want to customize Hover Panel for multiple file type.
    For achieving your demand, you can refer to these blogs:
    http://sharepointfieldnotes.blogspot.com/2012/11/customizing-sharepoint-2013-search.html
    http://yeshagrawal.blogspot.com/2013/06/sharepoint-2013-search-adding-hover.html
    http://blogs.technet.com/b/tothesharepoint/archive/2013/09/17/how-to-display-values-from-custom-managed-properties-in-the-hover-panel-in-sharepoint-server-2013.aspx
    http://www.sharepointnutsandbolts.com/2014/01/extending-SP2013-Office-365-search-hover-panel.html
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support
    Thank you So much Eric,
    The First Link "http://sharepointfieldnotes.blogspot.com/2012/11/customizing-sharepoint-2013-search.html"
    Serves my purpose 100%, but seems like it has 3rd party Product Involved. can i achieve the same Results without using any 3rd Party Tools ?

  • Single batch for multiple Valuation Type on same Plant

    Hi,
    Is it possible to have single batch for multiple valuation type on same Plant.
    Regards

    No you cannot have different valuation type for same batch of material for same plant.
    Regards
    Srinivas.P

  • View for multiple Content Type List

    Hello
    I have a SP list with multiple Content types.
    i want add a kind of view for the list that have diffrent content types for the some item/record.
    it means that every time someone edit this item and change/add diffrent data in diffrent contant type
    is there any way to do that?
    or there is a way to add the Content type dropdown list in Display view and not just in Edit view? can i do it in SP Designer?

    Hi Avinoam, do you have access to InfoPath? You can do what your asking with that program.
    cameron rautmann

  • Getting an Annotation for a Return Type (Java 1.5 Beta)

    Hi
    I am trying to access the annoation information on a class using reflection. I can't find any way to get access to an annotation on the return type of a method. For example the code below complies however there is no method on the "java.lang.reflect.Method" class (that I can see) that gives me access to the annoation.
    Could someone point me to something I may have misses.
    example:
    import java.lang.annotation.*;
    @Retention(value=RetentionPolicy.RUNTIME)
    @Target(value=ElementType.ANNOTATION_TYPE)
    public @interface MyAnnotation {
    String value();
    public class TestClass {
    public static @MyAnnotation("hello")void myMethod() {
    Thank
    Raymond McCrae

    The annotation isn't on the return type, it is on the method.
    You want the method
        public <T extends Annotation> T getAnnotation(Class<T> annotationClass);It is used like this
      MyAnnotation m = TestClass.getMethod("myMethod").getAnnotation(MyAnnotation.class);Note that it is typesafe!

  • I want multiple return types, I think....

    I'm working on a system where I want a factory method that returns AWT Components that implement some interface X. I can't simply use an abstract class Y that extends component and implements X because the components that I want to have implement X subclass things like JLabels and JPanels. Furthermore, I don't really care about a type Y, as it would be meaningless in my system other than being the combination of these two types.
    This is a language issue because what I really want my function to look like is:
    public {Component, X} createXComponent(...) {
      return new (thing that is both Component and implements X);
    }where [Component, X] indicates the return type. Assuming that the abstract class is not an option, is there any way that I can design around this, and if not, might this sort of scenario possibly warrant a future langauge extension? It could come in the form of a type declaration that wasn't a class in itself, but indicated a named combination of 0 or 1 classes and some number of interfaces.
    Thoughts?
    Ben Kuhn

    I think the answer to my question at this point is
    that no, there's no convenient alternative design
    solution, and I've settled on using a sig. that
    returns X (and casting to component as needed), but I
    was looking for a more semantically correct solution.That seems like the best way to do it. When needed you can use the instanceof operator to see if the cast will be allowed.
    Another option may be to have your interface X include a method called
       public Component getComponent();The implementation in the concrete classes would be something like this:
       public Comonent getComponent() {
          return this;
       }Then if you wanted the Component view of the object you could call getComponent() rather than casting.
    Just a thought.

  • How to add a default user group for multiple document type's?

    Hi,
    I am trying to add same default user group for different document types when MA is created. Is there any way to setup using a single "Document Security Template"? Or I need to create different templates for different document types?
    Please confirm.
    Thanks,
    Saloni

    Hi Saloni,
    Based on what your specific requirement, it might be easier to do it with scripting.
    If you are doing it using Document Security Templates, you would have to create a Document Security Template for each of the 6 MA types and assign the default group. Create another one and leave the Document Type field blank, so it will apply to the other 4 MA types that don't have a default group.
    Regards,
    Vikram

  • User Exit for Put Away for multiple storage type

    Hi All ,
    we are using the exit EXIT_SAPML03T_002 for doing some capacity calculation and bin selection while doing a put away process in Ware house .
    now i want to have two different type of storage types
    say
    A and B ,
    if their are no empty bins in storage type A , then as per storage section search strategy the material should go in B storage type.
    Both the storage type has next empty bin search strategy with user exit activated.
    The difference between the two storage type is their individual capacity which is maintained in a custom table .
    I am facing the problem that the exit is getting triggered only once .
    ie. it will check for storage type A if the criteria is not met at a later stage while bin allocation , the system is not triggering the exit for B storage type .
    do i need to do all validation and possibilities of not getting placed in storage type A in the exit . or does this exit will trigger for each storage type as per strategy if for any reason the stock is not placed in the previous storage type ?

    Hi Experts
    Thanks for the response,
    As i tested for the 561 movement (initial upload) we need to do the put away manually.
    So the system will not suggest Full qty to move to one Bulk and partial to different.
    But for normal Goods receipt process the goods will be automatically placed to different storage type
    based on the search strategy and in the Bulk structure we need to unchek the  partial pallet allowed.
    If anybody has difference pls revert
    Regards
    Depin

  • Actual price calculation for multiple activity types

    Gurus,
    I am working on a scenario where we have 2 main cost centers  (A & B) from which services are used in different cost centers one of which is C. C is assigned to a work center. Now for the cost center C,two activity types are defined ATA and ATB which are actually the services from cost center A and B respectively.
       Now for standard cost estimate I can define planned rates for those two activities based on the cost center C. Now at the month end I want to draw the costs from A and B based on the % of the services drawn by C and then calculate the actual price for those activities, i.e. run revaluation cycle. My question is, when I would run the revaluation cycle, how am I going to differentiate the cost of each activity types based on the cost input from respective cost centers (A and B) ?
       I short, with more than one activity type and more than one input cost center, is it possible to valuate the activities on actual prices?
    Thanks in advance!
    Snigdho

    Hi Snigdho
    Yes, you can!!
    If I have understood your question well - What you want is that the Cost allocated to From A to C should be divided by Act type ATA and cost allocated from B to C, should be divided by ATB, at the period end... Is that what you want?
    You can achieve this in SAP... 
    1. Create 2 separate secondary cost elements for each Act Type ATA and ATB
    2. Create a Spliting structure in OKES... You would assign Secondary cost ele 1 to ATA and Sec Cost ele 2 to ATB
    Assign cost center C to this splitting structure in OKEW
    3. now, when you calculate Act price, you will get what you want
    Regards
    Ajay M

  • Single Excise Invoice for Multiple Return Delivery

    Suppose we have multiple number of material documents against a single PO and the excise invoice posting has been done. After quality inspection the material gets rejected and we create a return delivery using 122 movement type. In this situation, is it possible to create a single excise document for all the return delivery documents  ?

    Can you spell out clearly whether you are talking about sales return or vendor return ?  If it is for sales, please let me know whether the materials were left out or not.
    G. Lakshmipathi

  • Storage Type Search for Multiple Storage Types

    Hello experts.
    I have an issue that I cannot seem to resolve.
    Background
    - We are using kanban strategy 0006 in order to move materials from Plant A to Plant B.  Plant A is warehouse-managed but Plant B is not.
    - Within Plant A we have one wm-managed Storage Location with many Storage Types.
    - Within Plant B we have two Storage Locations ( each one representing a separate, physical building ).
    - A majority of the kanban materials in use only have one Supply Area assigned to them.  However we have approximately 15 materials that have multiple Supply Areas assigned to them.  This is because these materials are common parts across two different Storage Locations in Plant B.  As a result, they also have two different Storage Types assigned to them in Plant A ( the source of the material ).
    Problem
    Because we have common materials in two different Storage Types, the Storage Type Search (defined in OMLY) does not always return the correct Storage Type for the Stock Removal Strategy.
    I understand that this occurs because the Storage Type Search is defined based upon the Warehouse Number, Removal/Putaway Indicator and the Storage Strategy.  Therefore both Storage Types will use the same Storage Type Search when determining the Destination Storage Type for the transfer order.
    FYI, here's an example :
    - Material 123ABC is defined in Plant A, Storage Location SL00, Warehouse WH1 with Storage Types ST1 and ST2.
    - Material 123ABC is defined in Plant B, Storage Locations SL01 and SL02.
    - Material 123ABC has Supply Area SA1 for Storage Location SL01 and Supply Area SA2 for Storage Location SL02 defined for kanban.
    - Material 123ABC has Stock Removal Strategy 003 assigned in the WM1 view for Plant A, Storage Location SL00 and Warehouse WH1.
    - The Storage Type Search sequence defined for Stock Removal Strategy 003 is Storage Location SL01 then Storage Location SL02.
    - When I execute kanban for Material 123ABC for Supply Area SA2, the Destination Storage Type for the transfer order should be ST2.  However because the Storage Type Search is based upon the Warehouse (and not the Storage Type level), the Destination Storage Type for the transfer order is ST1 because it is the first item in the Storage Type Search sequence.
    So my question : does anybody know how I can resolve this issue?  We don't want to adjust our master data for these materials or supply areas.  Is there a USER_EXIT that we can implement that will account for this condition?

    Hi Mathew,
    Based on the storage location indicator you can maintan different storage types for picking and putaway. I think your scnario willl be addressed using this indicator.Please explore this option before going for User exits.

  • Single docuent for multiple  return deliverys for a PO

    Dear all
    Is there a possibity to combine 2 or 3 GR documents in a single Return delivery  MIGO transaction?  Currently i have a scenario where-in the vendor deliveries on 3  separate dates( for the same PO) all are rejected and i want to combine the 3 rejections in one return document .
    Is it possible
    Thanks
    Sam

    Hi,
    It is not possible in Return Delivery - 122 Movement Type, rather you can check the option of creating a Return PO for that particular PO & do MIGO - 161 Movement .
    Pl. check
    Regards,
    Vikas

Maybe you are looking for

  • HT1657 Movie rental! I know there are a lot of problems

    I cannot watch my rental from iTunes! After I google it I'm not the only one and it's happened for years?!? I guess I wont be upgrading with apple!

  • Use of RSL's with ie6 not working

    Hi All, It seems my RSL (framework_3.4.0.6955) for the framework.swc and rpc.swc is not working in IE6. I have configured the RSL's to one root location because 3 flex-apps at different locations of the site needs to use these. So the RSL's are not w

  • Tag Library Error

    I am using Jdeveloper and BEA Weblogic 8.1 application server environment. I have custom tag and tld file for the tag. When I try to compile it , I am getting this error which just points to the begininng of the jsp file which uses the tag. Error: ja

  • IOS8 Family Sharing Limitations

    I have a really interesting problem, and wonder if anyone might be able to help. In short. We have 4 iOS devices (iPhone x2 for me and my wife, iPad x2 for home/kids - under 12 yrs). All devices used to all use my iCloud/iTunes account. This gives us

  • Loading an image works when testing, fails in browser

    java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM)      at java.security.AccessControlContext.checkPermission(Unknown Source)      at java.security.AccessController.checkPermission(Unknown Source)      at java.la