Forum Stats

  • 3,837,625 Users
  • 2,262,276 Discussions
  • 7,900,331 Comments

Discussions

Error invoking Web Service from Java client

Hi

I have created an ALSB Proxy service and exposed it as a web service. I have created a Java Client the code for which is pasted below:

String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
String url = "http://localhost:7001/Dummy_ALSB_Project/proxy/Dummy_Proxy_Service?WSDL";
String TARGET_NAMESPACE = "http://www.bea.com/servers/wls810/samples/examples/webservices/handler/log";
QName xsdString = new QName("http://www.w3.org/2001/XMLSchema", "string");
ServiceFactory factory = ServiceFactory.newInstance();
QName serviceName = new QName(TARGET_NAMESPACE, "LogHandler");
QName portName = new QName(TARGET_NAMESPACE, "ProcessSoap");
QName operationName = new QName("writeCustNameToFile");
Service service = factory.createService(serviceName);
Call call = service.createCall();

call.setPortTypeName(portName);
call.setOperationName(operationName);
call.addParameter("param0", xsdString, ParameterMode.IN);
call.setProperty(ENCODING_STYLE_PROPERTY,URI_ENCODING);
call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
call.setProperty(Call.SOAPACTION_URI_PROPERTY,"");

//set end point address
call.setTargetEndpointAddress(url);
call.invoke(new Object[]{ "The Joshua Tree" });


When I run the service, I get the following error:

java.rmi.RemoteException: BEA-380001: Internal Server Error
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:524)
at TC.methodB(TC.java:67)
at TC.main(TC.java:9)


Any clues about what is going wrong?? Thanks in advance.
This discussion has been closed.