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.
Similar Messages
-
Adding Set of Session Beans generates client with wrong session bean names
Hi,
I am trying to import a set of session beans deployed on Sun Java Sever 8.2 using Netbeans 6.0. on windows XP.
The problem is that the imported set generated by the IDE has wrong session bean names and out of 8 session beans in the client jar only 6 are shown (and different 6 every time). Also the remote methods of one bean are associated with another bean and every time its a different set of bean clients generated.
I am really perplexed with this behavior. Any help on this issue will be highly appreciated.An RMI/IIOP parameter type must meet one of thefollowing criteria:
It must be a primitive type, or it must implementeither java.rmi.Remote or java.io.Serializable,
or it must be an interface for which the runtime typesatisfies the previous criteria,
or it must be an array containing elements thatsatisfy the previous criteria.This tells you exactly what you need to do. -
Revision: 22381
Revision: 22381
Author: [email protected]
Date: 2011-09-02 05:10:41 -0700 (Fri, 02 Sep 2011)
Log Message:
Add some unit tests for the flex.messaging.client.FlexClientManager, including one for the new getFlexClient(String id, boolean createNewIfNotExist) method signature.
Added Paths:
blazeds/trunk/modules/core/test/src/flex/messaging/client/
blazeds/trunk/modules/core/test/src/flex/messaging/client/FlexClientManagerTest.java -
Error while compile client! Please help
Hi everybody,
I am new to J2EE. I hav got application server and client in the same computer.
While compile client application to test the server part followint error is shown:
28-Feb-2007 10:36:05 com.sun.corba.ee.spi.logging.LogWrapperBase doLog
INFO: "IOP00710299: (INTERNAL) Successfully created IIOP listener on the specified host/port: all interfaces/3122"
Caught an exception:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: Exception thrown from bean; nested exception is: com.sun.jdo.api.persistence.support.JDOFatalInternalException: JDO76519: Failed to identify vendor type for the data store.
NestedException: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : oracle.jdbc.pool.OracleDataSource
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:161)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:142)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
at bank._CustomerFacadeRemote_DynamicStub.createAccount(_CustomerFacadeRemote_DynamicStub.java)
at bankaccountclient.Main.insertInfo(Main.java:55)
at bankaccountclient.Main.<init>(Main.java:38)
at bankaccountclient.Main.main(Main.java:78)
Caused by: java.rmi.RemoteException: Exception thrown from bean; nested exception is: com.sun.jdo.api.persistence.support.JDOFatalInternalException: JDO76519: Failed to identify vendor type for the data store.
NestedException: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : oracle.jdbc.pool.OracleDataSource
at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:199)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:853)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:160)
at $Proxy22.createAccount(Unknown Source)
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 com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:123)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1709)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1569)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:951)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:721)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:469)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1258)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:409)
BUILD SUCCESSFUL (total time: 4 seconds)
Please let me know the solution of the error!
And also if client and application server is in same mechine which interface must be used to talk client with session bean?
Please help me!1) It looks like you have an error in JDBC configuration.
The main string is "Class name is wrong or classpath is not set for : oracle.jdbc.pool.OracleDataSource
Check out JDBC connection pools and resources.
2) If your beans and client there are at the same JVM you can use local interface, else use remote interface. -
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,
VeerendraUma,
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 -
SUN AS generates wrong WS code very often !
Hi
I am using NB 4.1 and SUN AS 8.1 to create some WEB services. I am using JSR 109 compatible WS stub generation. Application server generates them when a WS is being deployed.
There are several cases when it generates wrong java code that cannot be compiled.
I have created a very simple WS that returns an array of custom class objects (DTOs).
package lv.test;
import lv.test.dto.OneDTO;
public class BugTestWebServiceImpl implements BugTestWebServiceSEI
public OneDTO[] test()
return new OneDTO[] {};
}And here is my DTO class.
package lv.test.dto;
import java.io.Serializable;
public class OneDTO implements Serializable
private String tx3dstatus;
public OneDTO()
public String getTx3dstatus()
return tx3dstatus;
public void setTx3dstatus(String tx3dstatus)
this.tx3dstatus = tx3dstatus;
}Quite simple, isn't it ? Now you can get very stupid code out from SUN AS just by changing some simple WS settings.
Let's disable documentliteral and enable rpcliteral. After all it should be RPC style WebService, not Document-style. And behold , you will get some stupid java code that doesn't even compile !
[#|2005-06-01T18:33:29.390+0300|WARNING|sun-appserver-pe8.1_01|javax.enterprise.system.tools.deployment|_ThreadID=21;|DPL5035:Error while running ejbc
com.sun.enterprise.deployment.backend.IASDeploymentException: Fatal Error from EJB Compiler -- jaxrpc compilation exception
C:\Sun\AppServer\domains\domain1\generated\ejb\j2ee-modules\RPCBug\lv\test\BugTestWebServiceSEI_Tie.java:56: incompatible types
found : lv.test.dto.OneDTO[]
required: lv.test.OneDTO[]
((lv.test.BugTestWebServiceSEI) getTarget()).test();
^
Why it assumes that DTO should be in the same package where WS implementation is ?
Another interesting thing happens if you disable both documentliteral and rpcliteral:
[#|2005-06-01T18:59:44.578+0300|SEVERE|sun-appserver-pe8.1_01|javax.enterprise.system.tools.deployment|_ThreadID=13;|Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException: Error while running ejbc -- Fatal Error from EJB Compiler -- jaxrpc compilation exception
C:\Sun\AppServer\domains\domain1\generated\ejb\j2ee-modules\RPCBug\lv\test\dto\OneDTO_SOAPSerializer.java:51: cannot resolve symbol
symbol : method setTx3Dstatus (java.lang.String)
location: class lv.test.dto.OneDTO
instance.setTx3Dstatus((java.lang.String)member);
^
|#]
[#|2005-06-01T18:59:44.312+0300|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=13;|C:\Sun\AppServer\domains\domain1\generated\ejb\j2ee-modules\RPCBug\lv\test\dto\OneDTO_SOAPSerializer.java:69: cannot resolve symbol
symbol : method getTx3Dstatus ()
location: class lv.test.dto.OneDTO
ns3_myns3_string__java_lang_String_String_Serializer.serialize(instance.getTx3Dstatus(), ns1_tx3dstatus_QNAME, null, writer, context);
^
|#]
[#|2005-06-01T18:59:44.312+0300|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=13;|C:\Sun\AppServer\domains\domain1\generated\ejb\j2ee-modules\RPCBug\lv\test\dto\OneDTO_SOAPBuilder.java:39: cannot resolve symbol
symbol : method setTx3Dstatus (java.lang.String)
location: class lv.test.dto.OneDTO
_instance.setTx3Dstatus((java.lang.String)memberValue);
^
|#]
Now it has generated code that tries to use non-existing method !
Why it's so buggy ?
If you don't believe me you can get whole NB 4.1project from http://maris.site.lv/RPCBug.zip and try it yourself.I think there are some known restrictions and bugs - check with JAXRPC folks : http://forums.java.net/jive/forum.jspa?forumID=46;
-
Question about changing method signature
Hello. I've inherited some code which contains a method with the following signature:
foo(int x, MyObject myObject)
Okay, so that's not really the exact signature :) In any case, I need to modify the signature to:
foo(int x, Object myObject)
I believe that I can do this without affecting any existing client code because Obect is a superclass of MyObject. Is that right or must I deprecate the first version and add the second separately? Whatever, happens I can't break code which was compiled against the old version. Thanks in advance.
-jasonThat's a good point. It's probably not an issue
however as we don't provide (supported) access to our
implementation classes. Thanks for the input.
-JasonThen I don't see another issue with it, as long as no other internally-written class has already overridden it and doesn't get changed at the same time. In a sense you're saying it's a "private" (not necessarily in the same sense of the private keyword) method, so you can change the implementation, including method signatures, at your whim. -
FATAL ERROR in native method: Wrong Method ID
I have a piece of C code from which I am trying to launch a piece of Java, but I am having severe problems just trying to get a simple integer value returned from any Java function. I keep getting the error message "FATAL ERROR in native method: Wrong method ID used to invode a Java method"
My C code looks like :
JNIEnv *env;
long result;
jmethodID mid;
jclass cls;
jobjectArray args;
jstring jstr;
jint res;
jobject myObj;
options[0].optionString = "-Djava.class.path=.";
options[1].optionString = "-Djava.compiler=NONE";
options[2].optionString = "-verbose:jni";
vm_args.version = JNI_VERSION_1_2;
vm_args.options = options;
vm_args.nOptions = 2;
vm_args.ignoreUnrecognized = JNI_FALSE;
// Create the Java VM
result = JNI_CreateJavaVM(&jvm,(void **)&env, &vm_args);
if (result == JNI_ERR )
printf("Can't create Java VM\n");
exit(1);
else
printf("Java VM created successfully\n");
cls = (*env)->FindClass(env, "Example1");
if (cls == 0){
printf("Can't find Class\n");
exit(1);
else
printf("Class Found\n");
mid = (*env)->GetMethodID(env, cls, "GetIntValue", "()I" );
if (mid == 0) {
printf("Can't find function\n");
exit(1);
else
printf("Function Found\n");
res = (*env)->CallIntMethod(env, cls, mid);
if (res != 0)
char pszTempString[256] = {'\0'};
sprintf (pszJavaString, "Returned from Java the value of %d", res);
printf("Returned from Java with ");
printf(pszJavaString);
My GetMethodID call works correctly and I have checked the signature (using javap -s) and that works fine. I've seen many references on these forums about using NewObject prior to calling CallIntMethod, but if I try to use that I then get the error message "FATAL ERROR in native method: a non-constructor passed to NewObject".
Any body got any ideas please.
ThanksWhat I couldn't figure out from your code is where you create the java object that is supposed to return the integer to your C code.
Alternatives:
o This is just code snippets, and you really are creating the object.
o Error - the object should have been created.
o Error - it is a static method, and you should be finding a static method and calling it on a class object.
(Other than that, I didn't see anything obviously wrong. -
Webservices: jwsc is unable to compile wsdlc-generated classes
Hello,
I'm trying to generate JAXWS web service classes using WebLogic 10.0 MP1 wsdlc and jwsc Ant tasks, following the steps described in [Creating a Web Service from a WSDL File|http://edocs.bea.com/wls/docs100/webserv/use_cases.html#wp220705].
I'm using the WSRP WSDL which I have in my local system and which is also available at [http://docs.oasis-open.org/wsrp/v2/wsrp-service.wsdl]. The only change I made is to remove all the references to "v1" specification of WSRP in there.
It seems that wsdlc can only work with a single service and single port so I'm currently trying to generate just the classes for WSRP_v2_Markup_Service port.
Here are my ant tasks:
<wsdlc type="JAXWS" srcWsdl="${wsdl.path}" srcPortName="WSRP_v2_Markup_Service" destJwsDir="${target.jws.dir}" destImplDir="${target.impl.dir}" />
<jwsc srcdir="${target.impl.dir}" destdir="target/wls-wsrp-ws.ear">
<jws type="JAXWS" file="oasis/names/tc/wsrp/v2/wsdl/WSRPV2ServiceImpl.java" compiledWsdl="target/compiledWsdl/wsrp-2_0-service_wsdl.jar">
<WLHttpTransport contextPath="${contextPath}" serviceUri="WSRP_v2_Markup_Service" />
</jws>
"wsdlc" part succeeds but jwsc part fails with the following error message:
[jwsc] C:\DOCUME~1\zachcial\LOCALS~1\Temp\_970x54\oasis\names\tc\wsrp\v2\wsdl\WSRPV2MarkupPortType.java 263:28
[jwsc] *[ERROR] - Method contains javax.jws.WebResult annotation but is not a WebMethod. Add the javax.jws.WebMethod annotation to the method definition.*
[jwsc] C:\DOCUME~1\zachcial\LOCALS~1\Temp\_970x54\oasis\names\tc\wsrp\v2\wsdl\WSRPV2MarkupPortType.java 290:28
[jwsc] *[ERROR] - Method contains javax.jws.WebResult annotation but is not a WebMethod. Add the javax.jws.WebMethod annotation to the method definition.*
[jwsc] C:\home\hp\WsrpTake5\wls-wsrp-ws\target\impl\oasis\names\tc\wsrp\v2\wsdl\WSRPV2ServiceImpl.java 17:8
[jwsc] [ERROR] - javax.jws.WebService.endpointInterface oasis.names.tc.wsrp.v2.wsdl.WSRPV2MarkupPortType is invalid.
Looking at the interface class and line I find both WebMethod and WebResult annotations for the methods above, e.g.:
*@WebMethod(action = "urn:oasis:names:tc:wsrp:v2:releaseSessions")*
*@WebResult(name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types")*
@RequestWrapper(localName = "releaseSessions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types", className = "oasis.names.tc.wsrp.v2.types.ReleaseSessions")
@ResponseWrapper(localName = "releaseSessionsResponse", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types", className = "oasis.names.tc.wsrp.v2.types.ReturnAny")
public List<Extension> releaseSessions(
@WebParam(name = "registrationContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types")
RegistrationContext registrationContext,
@WebParam(name = "sessionIDs", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types")
List<String> sessionIDs,
@WebParam(name = "userContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types")
UserContext userContext)
throws AccessDenied, InvalidRegistration, MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
I found the following post of somebody having a similar problem: [http://forums.bea.com/thread.jspa?threadID=600014665]. Unfortunately for me both interface and implementation method declarations look exactly the same except the @Web... annotations not present in the implementation class.
Can you think about anything I'm doing wrong?
Thanks in advance for any help.
/SlawekI figured that out.
It turns out that the order of exceptions in the interface class and in the generated implementation class are not the same. Even though this is fine from the Java perspective, jwsc gets confused by this. Putting the exceptions in the method signatures of the implementation class in the same order as in the interface fixes this issue.
Now, I hit another problem:
jwsc error: Response wrapper bean names must be unique and must not clash with other generated classes. Class: oasis.names.tc.wsrp.v2.wsdl.WSRPV2MarkupPortType method initCookie(oasis.names.tc.wsrp.v2.types.RegistrationContext,oasis.names.tc.wsrp.v2.types.UserContext)
Let's see how long will it take to find a fix for this one ...
/Slawek -
Wrong digital signature for Add-on
I have just upgraded to 2004 (patch 5). My Add-on is installed (finally) and is successfully loading (finally)when SAP B1 is launched. Whenever I re-compile my Add-on for development and replace my Add-on exe I get the error "Wrong digital signature for Add-on" when SAP goes to load the Add-on again.
I cannot successfully create my .ard file without a digital signature for the Add-on .exe (even though the documentation says it is optional).
How can I test my Add-on in development mode if I have to re-create the .ard file and re-install the Add-on everytime I re-compile?? This does not seem correct.
Please advise. Thanks.I found a solution to this problem.
We were not debugging in development mode properly. -
hi,
my deployment wizard generates wrong code: all custom finder methods are
generated wrong. i checked the xxxPSJDBC.java files and i saw that the
wizard generates the sql-statement correct but then:
Object __WL_typeObj = __WL_fieldSQLTypes.get("null");
i think that this is wrong! please help!
i am developing my beans in vaj 3.02 on nt. i found another problem which
belongs to the same topic, i guess:
generated code like the following is ridiculous:
java.lang.String __WL_stmt = " select id, partno, row from item where 1=0"
--> throws the following exception when starting Weblogic server:
java.lang.Exception: Couldn't get ResultSetMetaData to look up field types:
thanks for your help in advance,
martinhere it is.
regards,
martin
"Ravi Akella" <[email protected]> wrote in message
news:[email protected]..
Can you post DeploymentDescriptor.txt file.
-- Ravi Akella.
Martin Zach wrote:
hi,
sorry, i did not mention that i am using wls 4.5.2 with sp1.
martin
Ravi Akella <[email protected]> schrieb in im Newsbeitrag:
[email protected]..
It depends on the WL QL(Query Language). Can you post the
weblogic-cmp-rdbms-jar.xml?
-- Ravi Akella.
Martin Zach wrote:
hi,
my deployment wizard generates wrong code: all custom finder methods
are
generated wrong. i checked the xxxPSJDBC.java files and i saw thatthe
wizard generates the sql-statement correct but then:
Object __WL_typeObj = __WL_fieldSQLTypes.get("null");
i think that this is wrong! please help!
i am developing my beans in vaj 3.02 on nt. i found another problemwhich
belongs to the same topic, i guess:
generated code like the following is ridiculous:
java.lang.String __WL_stmt = " select id, partno, row from item
where
1=0"
--> throws the following exception when starting Weblogic server:
java.lang.Exception: Couldn't get ResultSetMetaData to look up fieldtypes:
thanks for your help in advance,
martin
[UserDescriptor.txt] -
This does not compile:
public class Main {
public static void main(String[] args) {
Object sok = Socket.class.newInstance();
foo(sok); // syntax error only as help to prevent runtime errors?
Object x = ArrayList.class.newInstance();
foo(x); // syntax error because method linkage must happen and i don't know the class of "x" yet.
public static void foo(Socket s) { println("i am a socket"); }
public static void foo(List l) { println("i am a list"); }
}Is the compiler complaining only to prevent a possible runtime (typecast) error? Or, is there actually some real problem (perhaps method linkage)?
I read that methods live in their own special place in memory (and each has an address)? And is that address inserted into the bytecode when the Java source is compiled? So, while in the runtime every object knows its type, and this would enable selection of the correct method, you can't wait because of the need for compile-time method linking? Or, while waiting is technically possible, you can't because the developers of Java wanted to help developers to minimize run-time errors.
If this question makes no sense, please help clear-up my misunderstanding about method linkage. thanks.dpxqb wrote:
It only cares about the reference type of the expression you pass to foo(expression), which is Object for both cases.awesome. So, I hope this means that the "type" of the concrete object is not relevant for method signature. Rather, it is the "type" of the reference .Correct. I believe it's common to say class when talking about the concrete runtime object, and "type" when talking about the compile-time reference.
And "reference typing" (aka "casting") happens at compile-time while "object typing" happens in the run-time.Yes and no. Your terminology is non-standard, so I'm not sure exactly what you mean, but approximately, yes, references types matter at compile time and object classes matter at runtime (for polymorphism in overridden methods, for example).
Casting is both a compile-time and a runtime operation, however. At compile time, the reference type has to be one that could possibly be cast to whatever the target type is, and at runtime, the actual object has to be of an appropriate class for the cast to succeed.
String s1 = (String)new Date(); // compile time error can't cast "across" the hierarchy
String s2 = (String)new Object(); // compiles fine, but ClassCastException at runtime
Object o1 = "abc";
String s3 = (String)o1; // success -
Hello All,
I'm confused about the following generic method signature . Compilation fails
public class Animal{}
public class Dog extends Animal{}
public <E super Dog> List<E> methodABC(List<E> list){
The compiler gives the following error
E cannot be resolved to a type
E cannot be resolved to a type
Syntax error on token "super", , expected
if i change the declaration of E to <E extends Dog>, no compiler error.
An early response will be highly appreciated. Thanks in advance.
Kind Regards.
Hasnain Javed Khan.you cannot use "super" on a type variable, only on wildcards
-
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 -
Wrong Digital Signature for Add-on - After Install - When Start Add - on
Hi there,
I have created Addon Installer with the B1DE Installer Setup. After that also use batch file AddOnRegDataGen.bat to Generate Ard File.
After I addon install successfully, BUT when I want to Start it , It Prompts message
"Wrong Digital Signature for Add-on."
I do not know more what to make, already I read all the answers of the SDN and I did not solve the problem.
I am losing the hopes. Please Help!
Thanks a lot!Hi
Try editing the AddOnRegDataGen.bat and changing the version number to corellate to the setup executable you have created and then execute the batch file to recreate a new ard file.
Regards
John
Maybe you are looking for
-
I can't get my external hard drive to read
Since I upgraded from snow leopard (or maybe even the one before that) to Lion it hasnt worked. It still lights up and sounds like its running but it wont show up at all. All of my USB ports work but it wont read at all
-
Lightroom message "an error occurred when attempting to change modules"
has anyone sen this before?
-
External ITWorks Numpad won't work on MBP with Mavericks
Hello, I'd be really thankful if anyone knows the solution to this one: I have a new MBP with Mavericks 10.9.2, for working in Sibelius (notation software) I always used an external numeric pad, an I.T. Works model (KP-6910W) via USB. It perfectly wo
-
Conversion of a attached file in raw format to text format
Hi All, We have a requirement where in which we will be getting an attachement to the mail which wil be in rqw format,we wanted to convert this attachement in raw format to text fiel.Is there any function moduel for the same. Pointers
-
Files on my computer. I upgraded the DNG file. I am using Photoshop 6. This camera takes pretty good pictures in JPG. but I would love to have the RWL files open. Does anyone have any idea of what works?