Detecting webservice methods signatures

Hi,
I'm searching for an elegant solution for the following problem:
My application is a webservice client that will consume a webservice with some methods.
let's suppose service interface has methods :
public void methodA(String A, String B, String C);
public void methodB(String D, String B, String E);my application will parse a String stream and figure out what method to call .if for example the string pattern is : methodA:A,valueA:B,valueB:C,valueC;then i'll need to call method :public void methodA(String A, String B, String C);I need to know what is an elegant and clean why to implement this feature. Note that i don't know the webservice methods signatures in advance!
I guess i'll have to use java Reflection. I'm not sure what is a good solution for this problem .
thanks for your help.
NB: I posted this same topic at [coderanche.com|http://www.coderanch.com/t/441073/Web-Services/java/detecting-webservice-methods-signatures] but couldn't get responses.

slowfly wrote:
That is imo a very bad idea. That's no java problem, it's a communication problem. If the service providers can't provide you the interface or the wsdl, you can't code towards it. They also should provide you a test-environment, where you can test your client implementations. Everything else is just... not right...
I'm just curious: Where comes the string stream from? And why don't you know the endpoint interface? There must be another approach.
regards
slowflythe webservice client i'm coding is part of a complex system with many components communicating through JMS and using Spring Managed beans.
my plug-in will receive a command from an external provisioning system. i'll have to parse this command string then figure out what webservice method i'll need to call on remote webservice.
i know this is weired. but my boss is not helpful. he can't yet get the WSDL from the customer and I have now to manage testing with dummy webservice methods without actually talking to real webservice.
I want to know what is a good solution to Map the above String command Pattern into a java method . it seems like to be a Mapping from String Pattern to java method with arguments. the only problem is that i can't know the names of method parameters.and the command string pattern might contains method args in un-ordered state. so after collecting the method args (from command) i will need to figure out which one fits in the args list of webservice method.
probably using method parameters annotations? does this means the WSDL should also contain the parameter annotaions?
anyway i hope someone here can suggest me some good solution.
thanks

Similar Messages

  • Ws compile client generates wrong method signature

    Hi,
    the wscompile - option client - always generates the wrong method signature in the class AdresseIF_Stub:
    --> public de.skkoeln.webservice.web.Adresse_Type[]
    I need the signature public de.skkoeln.webservice.web.Adresse[] due to I can't compile the generated classes. This is the signature of the AdresseIF interface.
    What is my fault ?
    Oliver
    Adresse ist the JavaClass which I expect to get as return value. The webservice was successfully installed

    Oliver, is it only wrong in the stub? Does all of the generated code compile? If it all compiles then there is no error. The reason the _Type was added is because they are other WSDL names that have the same name.  Please read section 4.3.12 of the JAXRPC spec for more detail.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Problem while invoking webservice-method in client-code

    Hi,
    I had written webservice-client-code (using uddi-ext.jar, as i am using uddi for publishing webservices.) which is invoking webservice method successfully with complex datatypes(both for return type and input paramters).
    But while calling following webservice-method from my client-code:
    public ComplexType[] getData(String[] p_str1, String[] p_str2)
    it is throwing exception
    The Exception is:
    [ERROR] - 27 Mar 2007 12:34:38 -failed to invoke operation 'getData' due to an error in the soap layer (SAAJ); nested exception is: Message[failed to deserialize xml:weblogic.xml.schema.binding.DeserializationException: mapping lookup failure. type=['java:language_builtins.lang']:ArrayOfString schema context=TypedSchemaContext{javaType=[Ljava.lang.String;}]
    Although I had done correct registration of mapping of ArrayOfString in client-code:
    registry = m_Service.getTypeMappingRegistry();
                   m_TypeMapping = registry.getTypeMapping(SOAPConstants.URI_NS_SOAP_ENCODING );
                   m_TypeMapping.register( ArrayOfStringHolder.class,
    new QName( "java:language_builtins.lang", "ArrayOfString" ),
    new ArrayOfStringCodec(),
    new ArrayOfStringCodec());
    But some how it doesnt works.
    I had searched on google as well but didnt find any reliable solutions.
    Please advice.
    Edited by meetmrdeepak at 03/27/2007 2:43 AM
    Edited by meetmrdeepak at 03/27/2007 2:45 AM

    See item A.1 of the [RMI FAQ|http://java.sun.com/j2se/1.5.0/docs/guide/rmi/faq.html].

  • Call a  Webservice method from DotNetApplication

    Hi all,
    I have created One web service using Axis. My WebServices are below:
    import java.util.*;
    public class NHLService {
      HashMap standings = new HashMap();
      public NHLService() {
        // NHL - part of the standings as per 04/07/2002
        standings.put("atlantic/philadelphia", "1");
        standings.put("atlantic/ny islanders", "2");
        standings.put("atlantic/new jersey", "3");
        standings.put("central/detroit", "1");
        standings.put("central/chicago", "2");
        standings.put("central/st.louis", "3");
      public String getCurrentPosition(String division, String team) {
        String p = (String)standings.get(division + '/' + team);
        return (p == null) ? "Team not found" : p;
    }Its name is NHLService.jws. Then I run this service in my localhost like this "http://localhost:8080/axis/NHLService.jws" It is running and show that
    There is a Web Service here
    Click to see the WSDL Now I can view the wsdl. Now I want to call this webservice method from DotNet Application.Please any one knows that can you guide me the steps.
    Thanks in Advance,
    Raj

    but i don't understand a thing...
    when i create a static stub client i link with the config-wsdl file the path of my webservices wdsl and the client compile and run well...
    why with the servlet i had to link .class file or jar file??
    thanks a loto

  • How to call a WebService method using HttpsURLConnection?

    Hi,
    I want to know how i could use HttpsURLConnection to call a WebService method.
    I can use the following:
    String endpoint = "https://xyz:8443/axis/services/MSecurity";
    System.setProperty("javax.net.ssl.keyStore", keyStorepath);
    System.setProperty("javax.net.ssl.keyStoreType", "PKCS12");
    System.setProperty("javax.net.ssl.keyStorePassword", keyStorePassword);
    System.setProperty("javax.net.ssl.trustStore", trustStorePath);
    System.setProperty("javax.net.ssl.trustStoreType", "JKS");
    System.setProperty("javax.net.ssl.trustStorePassword", trustpass);
    //Call Web Service
    URL url = new URL(endpoint);
    MSecuritySoapBindingStub service = new MSecuritySoapBindingStub(url, null);
    //get list of people
    String[] vo = service.getVO();
    for (int i = 0; i < vo.length; i++) {
    System.out.println(vo);
    However, loading my cert. this way is not flexible. Therefore, I am using SSLContext to initialize my keystore and truststore and then I am using the following to connect to my webservice:
    SSLContext sc = SSLContext.getInstance("SSLv3");
    sc.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
    SSLSocketFactory ssf = sc.getSocketFactory();
    URL url = new URL(endpoint);
    HttpsURLConnection htp = (HttpsURLConnection) url.openConnection();
    htp.setSSLSocketFactory(ssf);
    However, I do not know how I could use the "htp" object to call the getVO() method above.

    Use Apache Axis to do SOAP in Java.
    Nobody can just mail you the code. You first have to create java source files from the web service via its WSDL file.

  • How to use generic webservice methods in java

    Hi,
    I am working on jdk1.5 and axis web service client version 1.3.
    I am calling webservice which developed in wcf service using .net ,Extesion like .svc?asmx
    input of webservice method is generic like list<IEmployee>
    When i try to call in cleint side , it is showing like object[] array.
    but it has to show like list<object>
    May i know solution for this.
    Thanks,
    Murali

    Hi konanki,
    Web services are using SOAP as protocol and SOAP has been designed for interoperability between computers installed with different platforms : Java, .Net, PHP, ...
    As List<IEmployee> or List<Object> are specific to Java language, they are translated in a way understandable for other platforms. Just have a look to your WSDL file.

  • Not able to pass cyclic XML schema type to a webservice method

    I have a webservice method called getData(GetDataDocument
    gDoc).
    I constructed a request with object (which exactly satisfy
    the XML schema def) to call up the getData(). [From my java client
    also I did the same; but the java classes have been generated using
    apache's xmlBeans; this works fine with the same kind of request].
    But the soap request constructed from flex does not get
    generated with all the values that I set in the request object.
    On further observation, I found out that if the schema
    involves cyclic elements, the soap request is not getting
    constructed as desired.
    My schema def:
    <complexType name="PredicateBagType">
    <sequence>
    <choice>
    <element maxOccurs="unbounded" minOccurs="0"
    name="PredicateBag" type="tns:PredicateBagType"/>
    <element maxOccurs="unbounded" minOccurs="0"
    name="BinaryPredicate" type="tns:BinaryPredicateType"/>
    <element maxOccurs="unbounded" minOccurs="0"
    name="UnaryPredicate" type="tns:UnaryPredicateType"/>
    </choice>
    </sequence>
    <attribute name="contextNode"
    type="tns:contextNodeIDType"/>
    <attribute default="false" name="negate"
    type="boolean"/>
    <attribute name="type"
    type="tns:PredicateBagTypeType"/>
    </complexType>
    Note that the PredicateBagType may contain another
    PredicateBagType.
    I have constructed my request with objects in my flex
    application . Though I have set the BinaryPredicate object in my
    PredicateBag object, the soap request constructed looks like this
    which is not desired
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="
    http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="
    http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:Body>
    <tns:get_Data maxPrograms="0" personalInfoUse="false"
    xmlns:tns="urn:tva:transport:2005">
    <tns:QueryConstraints>
    <tns:PredicateBag contextNode="1" negate="false"
    type="AND"/>
    </tns:QueryConstraints>
    <tns:RequestedTables>
    <tns:Table type="ProgramInformationTable"/>
    </tns:RequestedTables>
    </tns:get_Data>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>.
    If I comment out the PredicateBagType choice in my xsd, the
    flex application constructs the soap request looks like this.
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="
    http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="
    http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:Body>
    <tns:get_Data maxPrograms="0" personalInfoUse="false"
    xmlns:tns="urn:tva:transport:2005">
    <tns:QueryConstraints>
    <tns:PredicateBag contextNode="ProgramInformation"
    negate="false" type="AND">
    <tns:BinaryPredicate fieldID="Genre" fieldValue="Fiction"
    test="contains"/>
    </tns:PredicateBag>
    </tns:QueryConstraints>
    <tns:RequestedTables>
    <tns:Table type="ProgramInformationTable"/>
    </tns:RequestedTables>
    </tns:get_Data>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    This request holds good. But I cannot comment out the
    PredicateBagType from my choice. Is this an issue with soap request
    construction issue in Flex..?

    Yes, <choice> is just "partial" supported in Flex 2 .
    read this
    link
    for partial and not supported tags
    Partially supported XML Schema structures
    The following XML Schema structures or structure attributes
    are only partially implemented in this release:
    <choice>
    <all>
    <union>
    regards
    kcell

  • BPM process interactive activity(JSP) - external webservice method interac

    I am using Oracle BPM studio 10.3.1.0.
    I have one external web service published on glassfish application server, I have introspected it in my BPM process using its WSDL.
    Now one of my BPM process interactive activity is there, which is represented by one JSP, I am giving some input to my JSP.
    I want this input to be passed to the web service method as a parameter, and it should fetch the output, so basically I want to invoke the web service method, could you please guide me how to do it?
    Thanks & Regards
    Ashish

    Hy Ashih
    I dont know if this is best way to do that, but I have a similar situation here, and I'm using AJAX do call the webservice method by BPM and retrieve data.
    Something like this:
    1 - Create the XMLHttpRequest() object in your jsp (if you need I have the entire code)
    2 - Create the a JavaScript method for to call the OBPM method in your component
    function mymethod(arg1, arg2, arg3)
    xmlhttp.onreadystatechange=function()
                                                      if( xmlhttp.readyState==4 )
                                                           document.getElementById("AnyDIV").innerHTML = xmlhttp.responseText;
         var resp = "<f:invokeUrl var='YourComponenteName' methodName='YourMethodName'/>";
    //Incude how many args your need here
         resp+="&arg1=" + arg1;
         resp+="&arg2=" + arg2;
         resp+="&arg3=" + arg3;
         xmlhttp.open("POST",resp,true);
         xmlhttp.send(null);
    3 - You'll need a div html tag called "AnyDIV" to receive the BPM answer
    4 - On you BPM component, in YourMethodName method (needs to be ServerSide = no), create two args, the first is httpRequest type (name request), and the second is httpResponse type (name response) (fuego lib)
    5 - Type the code below in your BPM method to send info back to the JSP
    //getting the args
    String arg1 = request.getParameter(string : "arg1");
    String arg2 = request.getParameter(string : "arg2");
    String arg3     = request.getParameter(string : "arg3");
    //Do the webservice call here, prepare the html answer and put it into an string variable
    strReturn = "bla bla bla";
    //Send the anwser back to the jsp
    response.bodyTextContent(arg1 : strReturn);
    Or you can do this using xml answer and deal with the tags with javascript
    that's it

  • No Method Signature - initQuery error after VO Substitution

    Hi All,
    I have done a VO Substitution for "NewBankAccountVOImpl". Below is the exact Requirement,
    iReceivables -> Query for a given Customer -> Go to accounts Tab -> Try to Pay off an invoice -> You get an option choose Payment Method as "New Bank Account" ->
    Now there are three field Routing Number, Account Number and Account Holder
    I need to restrict Account Number to minimum three characters. In 11.5.10 Oracle do not have this validation.
    So I checked out the place where the Routing Number and Account Number Validation happen i.e "NewBankAccountVOImpl" and extended the same to custom VOImpl and copied all the standard code to my custom code as below,
    package mercury.oracle.apps.ar.irec.accountDetails.pay.server;
    import oracle.apps.ar.irec.accountDetails.pay.server.NewBankAccountVOImpl;
    import oracle.apps.ar.irec.accountDetails.pay.server.NewBankAccountVORowImpl;
    import java.sql.Types;
    import java.lang.String;
    import oracle.apps.ar.irec.accountDetails.pay.utilities.PaymentUtilities;
    import oracle.apps.ar.irec.framework.IROAViewObjectImpl;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.server.*;
    import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
    import oracle.jbo.RowIterator;
    import oracle.jbo.RowSetIterator;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.DBTransaction;
    import oracle.jdbc.driver.OracleCallableStatement;
    import oracle.jdbc.driver.OraclePreparedStatement;
    // --- File generated by Oracle Business Components for Java.
    // --------------- Modification History --------------------------
    // Date Created By Description
    // 04/01/2011 Veerendra K Account Number Validation to raise
    // error if Account Number entered is
    // less than 3 Digits
    public class MMARNewBankAccountVOImpl extends NewBankAccountVOImpl
    * This is the default constructor (do not remove)
    public MMARNewBankAccountVOImpl()
    public void initQuery()
    if(!isExecuted())
    executeQuery();
    reset();
    // Wrapper Method to validate Routing Number and Account Number
    public void validateNewBankAccount()
    OAApplicationModuleImpl oaapplicationmoduleimpl = (OAApplicationModuleImpl)getApplicationModule();
    RowSetIterator rowsetiterator = createRowSetIterator("iter");
    rowsetiterator.reset();
    NewBankAccountVORowImpl newbankaccountvorowimpl = (NewBankAccountVORowImpl)rowsetiterator.next();
    rowsetiterator.closeRowSetIterator();
    OAException oaexception = null;
    //object obj = null;
    int i = validateRoutingNumber(newbankaccountvorowimpl.getStrippedRoutingNumber());
    if(i == 0)
    OAException oaexception1 = new OAException("AR", "ARI_INVALID_ROUTING_NUMBER");
    if(oaexception == null)
    oaexception = oaexception1;
    else
    oaexception.setNextException(oaexception1);
    } else
    if(i == 2)
    OAException oaexception2 = new OAException("AR", "ARI_CREATE_BANK_ACCOUNT");
    if(oaexception == null)
    oaexception = oaexception2;
    else
    oaexception.setNextException(oaexception2);
    // Added by VEERENDRA KODALLI to limit addition of New Bank Account with Minimum 3 Digits
    if(validateBankAccountNumber(newbankaccountvorowimpl.getStrippedBankAccountNumber()))
    // Define Exception with FND Message MMARI_INVALID_BA_NUMBER
    OAException oaexception4 = new OAException("AR", "MMARI_INVALID_BA_NUMBER");
    if(oaexception == null)
    oaexception = oaexception4;
    else
    oaexception.setNextException(oaexception4);
    // Method to Validate if Entered Account Number and Routing Number Combination already exist
    if(validateDuplicateBankAccountNumber(newbankaccountvorowimpl.getStrippedBankAccountNumber(), newbankaccountvorowimpl.getStrippedRoutingNumber(), newbankaccountvorowimpl.getAccountHolderName()))
    OAException oaexception3 = new OAException("AR", "ARI_DUPLICATE_BA_NUMBER");
    if(oaexception == null)
    oaexception = oaexception3;
    else
    oaexception.setNextException(oaexception3);
    if(oaexception != null)
    oaexception.setApplicationModule(oaapplicationmoduleimpl);
    throw oaexception;
    } else
    return;
    // Method to Validate Routing Number
    public int validateRoutingNumber(String s)
    boolean flag = PaymentUtilities.checkDigits(s);
    if(!flag)
    return 0;
    OAApplicationModuleImpl oaapplicationmoduleimpl = (OAApplicationModuleImpl)getApplicationModule();
    OADBTransaction oadbtransaction = (OADBTransaction)oaapplicationmoduleimpl.getDBTransaction();
    if(oadbtransaction.isLoggingEnabled(2))
    oadbtransaction.writeDiagnostics(this, "Start validateRoutingNumber", 2);
    String s1 = "BEGIN :1 := ARP_BANK_DIRECTORY.is_routing_number_valid(:2,:3); END;";
    OracleCallableStatement oraclecallablestatement = (OracleCallableStatement)oadbtransaction.createCallableStatement(s1, 1);
    int i = 0;
    try
    oraclecallablestatement.registerOutParameter(1, -5, 38, 38);
    oraclecallablestatement.setString(2, s);
    oraclecallablestatement.setString(3, "ABA");
    oraclecallablestatement.execute();
    i = oraclecallablestatement.getInt(1);
    catch(Exception exception1)
    exception1.printStackTrace();
    throw OAException.wrapperException(exception1);
    finally
    try
    oraclecallablestatement.close();
    catch(Exception exception2)
    throw OAException.wrapperException(exception2);
    // Debug Message
    if(oadbtransaction.isLoggingEnabled(2))
    oadbtransaction.writeDiagnostics(this, "End validateRoutingNumber", 2);
    return i;
    // Method to Validate Duplicate Account Number
    public boolean validateDuplicateBankAccountNumber(String s, String s1, String s2)
    OAApplicationModuleImpl oaapplicationmoduleimpl = (OAApplicationModuleImpl)getApplicationModule();
    OADBTransaction oadbtransaction = (OADBTransaction)oaapplicationmoduleimpl.getDBTransaction();
    if(oadbtransaction.isLoggingEnabled(2))
    // Debug Message
    oadbtransaction.writeDiagnostics(this, "Start validateDuplicateBankAccountNumber", 2);
    String s3 = "BEGIN :1 := AR_IREC_PAYMENTS.is_bank_account_duplicate(:2,:3,:4); END;";
    OracleCallableStatement oraclecallablestatement = (OracleCallableStatement)oadbtransaction.createCallableStatement(s3, 1);
    boolean flag = true;
    try
    oraclecallablestatement.registerOutParameter(1, -5, 38, 38);
    oraclecallablestatement.setString(2, s);
    oraclecallablestatement.setString(3, s1);
    oraclecallablestatement.setString(4, s2);
    oraclecallablestatement.execute();
    Number number = new Number(oraclecallablestatement.getLong(1));
    if(number.equals(new Number("0")))
    flag = false;
    else
    flag = true;
    catch(Exception exception1)
    exception1.printStackTrace();
    throw OAException.wrapperException(exception1);
    finally
    try
    oraclecallablestatement.close();
    catch(Exception exception2)
    throw OAException.wrapperException(exception2);
    // Debug Message
    if(oadbtransaction.isLoggingEnabled(2))
    oadbtransaction.writeDiagnostics(this, "End validateDuplicateBankAccountNumber", 2);
    return flag;
    public boolean validateBankAccountNumber(String s)
    OAApplicationModuleImpl oaapplicationmoduleimpl = (OAApplicationModuleImpl)getApplicationModule();
    OADBTransaction oadbtransaction = (OADBTransaction)oaapplicationmoduleimpl.getDBTransaction();
    // Debug Message
    if(oadbtransaction.isLoggingEnabled(2))
    oadbtransaction.writeDiagnostics(this, "Start validateBankAccountNumber", 2);
    boolean flag = true;
    try
    // Check if the Account Number Length is less than 3 Digits
    if(s.length() < 3)
    flag = true;
    // Debug Message
    if(oadbtransaction.isLoggingEnabled(2))
    oadbtransaction.writeDiagnostics(this, "Account Number Less than 3 Digits!", 2);
    else
    // Debug Message
    if(oadbtransaction.isLoggingEnabled(2))
    oadbtransaction.writeDiagnostics(this, "Account Number greater than 3 Digits!", 2);
    flag = false;
    //return PaymentUtilities.checkDigits(s);
    catch (Exception exception4)
    //if(oadbtransaction.isLoggingEnabled(2))
    //oadbtransaction.writeDiagnostics(this, "Entered Catch", 2);
    throw OAException.wrapperException(exception4);
    if(oadbtransaction.isLoggingEnabled(2))
    // Debug Message
    oadbtransaction.writeDiagnostics(this, "End validateBankAccountNumber", 2);
    return flag;
    public static final String RCS_ID = "$Header: NewBankAccountVOImpl.java 115.8 2008/07/21 13:49:37 nkanchan noship $";
    public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: NewBankAccountVOImpl.java 115.8 2008/07/21 13:49:37 nkanchan noship $", "oracle.apps.ar.irec.accountDetails.pay.server");
    I did compile the Java File and also the JPX import. It was all successful. I tested the code and it worked as expected. Now I see an exception on the page when I click the Pay button stating "No Method Signature No Method Signature - initQuery".
    The error do not come when I take out my substitution. Any one know what might be the reason for above issue. I have no idea why all of a sudden it stopped working and checked all standard filles but none got changed.
    Any pointers towards to resolve the same would be appreciable.
    Thanks in Advance,
    Veerendra

    Uma,
    try to delete all class files, recompile and run! Also, check if any CO is not extended other than from OAControllerImpl, although it would not be generally.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Problems deploying application with updated method signatures on WLS8.1

    Hi,
    I have an jar file under applications which I have deployed fine on WLS 8.1 in the past. I changed the method signature on one of the EJB classes in the jar. One of the parameters now takes a different Java class type. I have recompiled everyone and repackaged the jar but when I try to deploy the jar it gives me an error because the the local interface of the EJB does not have the old Java class parameter type.
    I have checked the jar, classes in the jar, and the ejb-jar.xml and weblogic-ejb-jar.xml in the jar and it is looks fine. I have cleaned out my server deployment directories and verified the classpath in case the older jar was in there and everything looks OK. It seems for some reason 8.1 is caching the old ejb-jar.xml or somehow is remembering the old method signature and will not process the updated jar. Has anyone seen anything like this?
    Thanks for any help or recommendations

    Can you show me the error you receive?
    Another simple test would be to deploy your application to a new, empty
    server.
    You can create a new domain as easy as this:
    mkdir testDomain;
    cd testDomain;
    java weblogic.Server
    Type in the username/password that you want and answer 'Yes' when it
    asks if you want to create a new domain.
    Try deploying your jar to this new domain, and let me know if it still
    fails.
    -- Rob
    Jeff Dooley wrote:
    Hi,
    I have an jar file under applications which I have deployed fine on WLS 8.1 in the past. I changed the method signature on one of the EJB classes in the jar. One of the parameters now takes a different Java class type. I have recompiled everyone and repackaged the jar but when I try to deploy the jar it gives me an error because the the local interface of the EJB does not have the old Java class parameter type.
    I have checked the jar, classes in the jar, and the ejb-jar.xml and weblogic-ejb-jar.xml in the jar and it is looks fine. I have cleaned out my server deployment directories and verified the classpath in case the older jar was in there and everything looks OK. It seems for some reason 8.1 is caching the old ejb-jar.xml or somehow is remembering the old method signature and will not process the updated jar. Has anyone seen anything like this?
    Thanks for any help or recommendations

  • Problem in passing xstring data from abap to webservice method.

    Hi,
    I want to upload the document from ABAP to Microsoft SharePoint. So for that i have created the webservice in .net for uploading the document in SharePoint.
    Now in Abap i have consumed this service by creating proxy class. The web service has one method as Upload_File which takes byte[] as paramerter, so in wsdl file this parameter get converted into s:base64Binary and in abap it get converted into RAWSTRING.
    Now, when i try to upload the file with very small content (less than 54 character mean the rawstring variable which contain the file content has length less than 108 ), file gets uploaded with no problem, but when the file has content more than 54 character, it give error like "SOAP:1.032 SRT: Wrong Content-Type and empty HTTP-Body received"
    And also one thing when i have created the proxy class it gives warning that "The XSD type base64Binary does not exactly correspond to the ABAP type RAWSTRING"
    What can be the problem? how to pass file content to external web service?
    Thanks,
    Vikram

    Hi Nick,
    Yes, when i declare the data type as string in XSD it get converted into xsd:string.
    I have already tried using String as parameter in WebService method instead of byte[].
    But then in .Net, I need to write some code for converting the string variable ( which content the file content in hexadecimal format) into byte array and for that there is a method provided by .Net framework but when I use it, it write the hexadecimal content in file.
    So I have written my own code for converting hexadecimal content which string variable content to byte array.
    By doing this, it working fine and all type of file getting uploaded in SharePoint but when I try to open the file only .TXT file get open properly and other type of file give me some error.

  • Deciding when to use "final" in method signatures

    Please consider this source code:
    public void foo(final Set<String> set) { ... }People who use this class don't need to know that the "set" reference is "final", right?
    Edited by: dpxqb on Apr 30, 2010 3:28 AM

    Kayaman wrote:
    They should be implicitly final so there would be no need for questions like this.I don't understand what that means.
    Or does someone here admit to having a habit of reassigning the parameters?I don't understand. I do it when it needs doing. Here is an example where I re-assigned the reference in the method signature:
    void foo(Writer w) {
      int i = 0;
      boolean hit = false;
      BufferedWriter bw = new BufferedWriter(w);
      Set<String> set = new HashSet<String>();
      bw.write(c);
      w.write(c); // no exception thrown. the object on the other end of the Writer will act weird
                  // which further masks the bug.
    }There are two working Writers going to the same location. There is no reason for this, it makes no sense, and it is a bug waiting to happen.
    This is how I got my BufferedWriter. Reassign the initial reference:
    void foo(Writer w) {
      if(! (w instanceof BufferedWriter)) {
        w = new BufferedWriter(w);
    }The only way to write is via a single object. It just prevents me from doing something stupid. I feel safer by eliminating unused references.

  • Webservice from Portal Service - Import Param of WebService Method Error

    Hello,
    I have developed a portal service and after that I created a portal web service from that portal service... If I use a String variable for the import parameter of my webservice method everything works fine! But if I us a custom class for the im port parameter of the method I get an soap error when I call the webservice!
    Error:
    Service: MyService
    URL: Endpoint
    http://myportal/irj/servlet/prt/soap/com.sap.portal.prt.soap.MyServicec?style=rpc_enc
    Method: add1to1
    Exception: System.Web.Services.Protocols.SoapException
    Message: com.company.ImportClass
    The WSDL was generated Correctly:
         <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://namespace.com" elementFormDefault="qualified">
              <complexType name="ImportClass">
                   <sequence>
                        <element name="Import1" nillable="true" type="xsd:string"/>
                        <element name="Import2" nillable="true" type="xsd:string"/>
                   </sequence>
              </complexType>
         </schema>
    Thanks for your help!
    Johannes
    Edited by: Johannes Freitag on Jun 24, 2009 2:54 PM

    Hi Ozzie,
    in newer NWDS versions this wizard doesn't exist any more.
    [http://help.sap.com/saphelp_nw70/helpdata/en/1f/4554426dd13555e10000000a1550b0/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/1f/4554426dd13555e10000000a1550b0/frameset.htm] describes how to create a web service from a portal service.
    I personally didn't create a web service by this description however. I just created a normal Java class and created a Web Service out of this class (using EAR deployment).

  • Changing exception clause in method signature when overwriting a method

    Hi,
    I stumbled upon a situation by accident and am not really clear on the details surrounding it. A short description:
    Say there is some API with interfaces Foo and Bar as follows:
    public interface Foo {
       void test() throws Exception;
    public interface Bar extends Foo {
       void test();
    }Now, I find it strange that method test() for interface Bar does not need to define Exception in its throws clause. When I first started with Java I was using Java 1.4.2; I now use Java 1.6. I cannot remember ever reading about this before and I have been unable to find an explanation or tutorial on how (or why) this works.
    Consider a more practical example:
    Say there is an API that uses RMI and defines interfaces as follwows:
    public interface RemoteHelper extends Remote {
       public Object select(int uid) throws RemoteException;
    public interface LocalHelper extends RemoteHelper {
       public Object select(int uid);
    }As per the RMI spec every method defined in a Remote interface must define RemoteException in its throws clause. The LocalHelper cannot be exported remotely (this will fail at runtime due to select() in LocalHelper not having RemoteException in its clause if I remember correctly).
    However, an implementing class for LocalHelper could represent a wrapper class for RemoteHelper, like this:
    public class Helper implements LocalHelper {
       private final RemoteHelper helper;
       public Helper(RemoteHelper helper) {
          this.helper = helper;
       public Object select(int id) {
          try {
             return (this.helper.select(id));
          } catch(RemoteException e) {
             // invoke app failure mechanism
    }This can uncouple an app from RMI dependancy. In more practical words: consider a webapp that contains two Servlets: a "startup" servlet and an "invocation" servlet. The startup servlet does nothing (always returns Method Not Allowed, default behaviour of HttpServlet), except locate an RMI Registry upon startup and look up some object bound to it. It can then make this object accessible to other classes through whatever means (i.e. a singleton Engine class).
    The invocation servlet does nothing upon startup, but simply calls some method on the previously acquired remote object. However, the invocation servlet does not need to know that the object is remote. Therefore, if the startup servlet wraps the remote object in another object (using the idea described before) then the invocation servlet is effectively removed from the RMI dependancy. The wrapper class can invoke some sort of failure mechanism upon the singleton engine (i.e. removing the remote object from memory) and optionally throw some other (optionally checked) exception (i.e. IllegalStateException) to the invocation servlet.
    In this way, the invocation servlet is not bound to RMI, there can be a single point where RemoteExceptions are handled and an unchecked exception (i.e. IllegalStateException) can be handled by the Servlet API through an exception error page, displaying a "Service Unavailable" message.
    Sorry for all this extensive text; I just typed out some thoughts. In short, my question is how and why can the throws clause change when overwriting a method? It's nothing I need though, except for the clarity (e.g. is this a bad practice to do?) and was more of an observation than a question.
    PS: Unless I'm mistaken, this is basically called the "Adapter" or "Bridge" (not sure which one it is) pattern (or a close adaptation to it) right (where one class is written to provide access to another class where the method signature is different)?
    Thanks for reading,
    Yuthura

    Yuthura wrote:
    I know it may throw any checked exception, but I'm pretty certain that an interface that extends java.rmi.Remote must include at least java.rmi.RemoteException in its throws clause (unless the spec has changed in Java 1.5/1.6).No.
    A method can always throw fewer exceptions than the one it's overriding. RMI has nothing to do with it.
    See Deitel & Deilte Advanced Java 2 Platform How To Program, 1st Ed. (ISBN 0-13-089650-1), page 793 (sorry, I couldn't find the RMI spec quick enough). Quote: "Each method in a Remote interface must have a throws clause that indicates that the method can throw RemoteException".Which means that there's always a possibility of RemoteException being thrown. That's a different issue. It's not becusae the parent class can throw RE. Rather, it's because some step that will always be followed is declared to throw RE.
    I later also noticed I could not add other checked exceptions, which made sense indeed. Your explanation made perfect sense now that I heard (read) it. But just to humour my curousity, has this always been possible? Yes, Java has always worked that way.
    PS: The overwriting/-riding was a grammatical typo (English is not my native language), but I meant to say what you said.No problem. Minor detail. It's a common mistake, but I always try to encourage proper terminology.

  • Method signature of a two dimensional array of an object

    Hi,
    Does anyone know how to set the method signature of a two dimensional array of an object (e.g. : String[][]).
    Thank you.

    using javap for the following function:
    public int testFunction(String myStr[][]);
    public int disconnectServer(java.lang.String[][]);
    /* ([[Ljava/lang/String;)I   */
    so the signature is:
    ([[Ljava/lang/String;)I                                                                                                                                                                                                                                                                                                                                                                                                                                                            

Maybe you are looking for

  • Dual ISP on ASA VPN question.

    Hi all. My question is very simple is there any way or feature that could allow us to have a backup VPN tunnel on at the secondary ISP at the asa 5520? Lets assume if the primary isp goes down is there any way for  the VPN tunnel come online at the b

  • Mail for Exchange does not send letters

    Hi. I am from Ukraine and use MTS operator. The E-mail sets up OK both with IMAP and POP and woks both through GPRS and Wi-Fi. But I have a problem with bult-in Mail for Exchange application. I had set it up for a gmail account, it synchronizes mail,

  • EP6 Role Assignment

    Hello, Scenario: portal uses an LDAP as its UM store in read only mode. As I understand it: Users and Groups are stored on the LDAP Roles are stored in the Portal database Is this correct so far? Secondly: Where is the actual User/Role or Group/Role

  • Ship to party change to Sold to party

    Hi, I want to change the following code which is for Ship to party, to for Sold to Party. How to go ahead? <select name="headerShipTo"> <isa:iterate id="shipTo" name="<%= MaintainBasketBaseAction.SC_SHIPTOS %>" type="com.sapmarkets.isa.businessobject

  • Problem in Creating Subcontracting PO

    Hi Friends,                               We are running with MTO scenario. I have created a Finished  Material TESTFG1 with Strategy group 85. Then for a semi finished TESTSF2 under this finish is assigned for sub contracting. So after running MRP,