on 02-13-2007 1:14 PM
Hello Everyone,
I am using a java program to call a webservice as follows. For this I have generated the client proxy definition for Stand alone proxy using NWDS.
Now when I call the method of the webservice I am getting the correct result but along with the result I am getting one error and one warning message in the output.
The java code to call the webservice is as follows.
public class ZMATRDESCProxyClient {
public static void main(String[] args) throws Exception {
Z_MATRDESC_WSDService ws = new Z_MATRDESC_WSDServiceImpl();
Z_MATRDESC_WSD port = (Z_MATRDESC_WSD)ws.getLogicalPort("Z_MATRDESC_WSDSoapBinding",Z_MATRDESC_WSD.class);
String res = port.zXiTestGetMatrDesc("ABCD134");
System.out.print(res);
}
}
The result I am getting is :
Warning ! Protocol Implementation [com.sap.engine.services.webservices.jaxrpc.wsdl2java.features.builtin.MessageIdProtocol] could not be loaded (NoClassDefFoundError) !
Error Message is :com/sap/guid/GUIDGeneratorFactory
<b>Material Not Found</b> -
> This is the output of webservice method and it is right.
Can any one please let me know why I am getting the warning and error message and how can I fix this.
Thanks
Abinash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhilash,
I think your Z_MATRDESC_WSDService is an interface and Z_MATRDESC_WSDServiceImpl is the class which implements it.
Your first stmt is:
Z_MATRDESC_WSDService ws = new Z_MATRDESC_WSDServiceImpl();
so why are you creating an interface variable and assigning it to an object of a class. Instead you should use the below stmt:
Z_MATRDESC_WSDServiceImpl ws = new Z_MATRDESC_WSDServiceImpl();
Use the above stmt. Then i think your error may go.
Thanks,
Rajeev Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhilash,
Tell me currently in your NWDS project, is there any warning shown in your project. If there is any warning, then what warning is it. If there is no warning, then try one more thing:
as your first stmt use this stmt only:
Z_MATRDESC_WSDService ws;
Dont instantiate ws. just use ws in this way.
Tell what is now the output.
Thanks,
Rajeev Gupta
Hi Rajeev,
The Java project does not have any warning. But the stand alone proxy project has following warnings associated with it.
Warning The import javax.xml.rpc.holders is never used Config1BindingStub.java Demo/src/com/demo/callWS line 4
Warning The import javax.xml.rpc.encoding is never used Config1BindingStub.java Demo/src/com/demo/callWS line 6
Warning The import com.sap.engine.services.webservices.jaxrpc.exceptions.TypeMappingException is never used Config1BindingStub.java Demo/src/com/demo/callWS line 10
Warning The import com.sap.engine.services.webservices.jaxrpc.exceptions.accessors.XmlSerializationResourceAccessor is never used Config1BindingStub.java Demo/src/com/demo/callWS line 11
Warning The import com.sap.exception.BaseRuntimeException is never used Config1BindingStub.java Demo/src/com/demo/callWS line 12
When I tried using the stmt
Z_MATRDESC_WSDService ws;
I got the follwoing error. Variable ws is not intilaized.
When I intilazied the ws variable with null as expected I got null poniter exception.
Thanks
Abinash
Hi Abinash,
I have the same problem. Have you solve that problem?
I am using a java program to call a webservice too. And I have generated the client proxy definition for Stand alone proxy using NWDS. When I call the method of the webservice I am getting the correct result but along with the result I am getting one error and one warning message in the output.
The java code to call the webservice is as follows.
MIDadosPessoaisSyncService service = new MIDadosPessoaisSyncServiceImpl();
MIDadosPessoaisSync port = service.getLogicalPort("MIDadosPessoaisSyncPort");
port._setProperty("javax.xml.rpc.security.auth.username","xpto");
port._setProperty("javax.xml.rpc.security.auth.password","xpto");
String out = port.MIDadosPessoaisSync("xpto", "xpto");
System.out.println(out);
The result I am getting is :
Warning ! Protocol Implementation [com.sap.engine.services.webservices.jaxrpc.wsdl2java.features.builtin.MessageIdProtocol] could not be loaded (NoClassDefFoundError) !
Error Message is :com/sap/guid/GUIDGeneratorFactory
<b>The result of the WS is correct!!!</b>
The Java project does not have any warning. But the stand alone proxy project has following warnings associated with it.
This method has a constructor name MIDadosPessoaisSync.java
The import javax.xml.rpc.holders is never used MIDadosPessoaisSyncBindingStub.java
The import javax.xml.rpc.encoding is never used MIDadosPessoaisSyncBindingStub.java
The constructor BaseRuntimeException(ResourceAccessor, String, Throwable) is deprecated MIDadosPessoaisSyncBindingStub.java
It is very similar with your problem, could you help me?
Thanks
Gustavo Freitas
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.