Hi All,
Thanks for all those reply's.
But my problem still remains but now in a different form.
I modified the code as: -
System.setProperty("javax.xml.soap.MessageFactory","weblogic.webservice.core.soap.MessageFactoryImpl");
System.setProperty( "javax.xml.rpc.ServiceFactory","weblogic.webservice.core.rpc.ServiceFactoryImpl");
ServiceFactory factory = ServiceFactory.newInstance();
String targetNamespace = "http://tempuri.org/";
QName serviceName = new QName(targetNamespace,"JavaService1");
QName portName = new QName(targetNamespace,"JavaService1Soap");
QName operationName = new QName("http://schemas.xmlsoap.org/soap/http","JavaTest");
URL wsdlLocation = new URL("http://delgtel304:7070/WebService2/JavaService1.asmx?WSDL");
Service service = factory.createService(wsdlLocation, serviceName);
Call call = service.createCall(portName, operationName);
call.setProperty(javax.xml.rpc.Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
call.setProperty(javax.xml.rpc.Call.SOAPACTION_URI_PROPERTY, "MySoapAction");
String result = (String) call.invoke(new Object[] {"BEAS"});
System.out.println("\n");
System.out.println("This example shows how to create a dynamic client application that invokes a non-WebLogic Web service.");
System.out.println("The webservice used was:http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl");
System.out.println("The quote for BEAS is: ");
System.out.println(result);
I get this on console :-
WARNINIG: Unable to find a javaType for the xmlType:['http://tempuri.org/']:Java
Test. Make sure that you have registered this xml type in the type mapping
Using SOAPElement instead
WARNINIG: Unable to find a javaType for the xmlType:['http://tempuri.org/']:Java
TestResponse. Make sure that you have registered this xml type in the type mappi
ng
Using SOAPElement instead
Exception in
thread "main" javax.xml.rpc.JAXRPCException: failed to invoke opera
tion. Error in the soap layer (jaxm); nested exception is: Message[ failed to se
rialize xml:weblogic.xml.schema.binding.SerializationException: mapping lookup f
ailure. class=interface javax.xml.soap.SOAPElement class context=TypedClassConte
xt{schemaType=['http://tempuri.org/']:JavaTest}]StackTrace[
javax.xml.soap.SOAPException: failed to serialize xml:weblogic.xml.schema.bindi
ng.SerializationException: mapping lookup failure. class=interface javax.xml.soa
p.SOAPElement class context=TypedClassContext{schemaType=['http://tempuri.org/']
:JavaTest}
at weblogic.webservice.core.DefaultPart.toXML(DefaultPart.java:266)
at weblogic.webservice.core.DefaultMessage.toXML(DefaultMessage.java:456
)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
a:407)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
a:363)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:423)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:292)
at TestClient2.main(TestClient2.java:35)
Caused by: weblogic.xml.schema.binding.SerializationException: mapping lookup fa
ilure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContex
t{schemaType=['http://tempuri.org/']:JavaTest}
at weblogic.xml.schema.binding.RuntimeUtils.lookup_serializer(RuntimeUti
ls.java:144)
at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUti
ls.java:180)
at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUti
ls.java:167)
at weblogic.webservice.core.DefaultPart.toXML(DefaultPart.java:258)
... 6 more
]
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:432)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:292)
at TestClient2.main(TestClient2.java:35)
Thanks
Ajay