Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ws exception:No serializer found  RSS feed

 
jim li
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ,
(my client is using .net)
when i try to invoke ws, i got the following error:

java.io.IOException: No serializer found for class com.microsoft.webservices.ISReferral in registry org.apache.axis.encoding.TypeMappingImpl@570e570e
at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1267)
at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:778)
at org.apache.axis.message.RPCParam.serialize(RPCParam.java:177)
at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:391)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1205)
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:484)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1205)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:297)
... 18 more
my code is :

QName serviceQN = new QName(namespace, serviceName);

try {
(should i use the code below?)
// DefaultSOAPEncodingTypeMappingImpl.getSingleton().register(
// ISReferral.class, new QName("urn:JPetStore", "ISReferral"),
// new EnumSerializerFactory(ISReferral.class, serviceQN),
// new EnumDeserializerFactory(ISReferral.class, serviceQN));
//
// DefaultSOAPEncodingTypeMappingImpl.getSingleton().register(
// ISUser.class, new QName("urn:JPetStore", "ISUser"),
// new EnumSerializerFactory(ISUser.class, serviceQN),
// new EnumDeserializerFactory(ISUser.class, serviceQN));

URL url = new URL(wsdlURL);

/* Service lookup */
ServiceFactory serviceFactory = ServiceFactory.newInstance();
Service sampleService = serviceFactory
.createService(url, serviceQN);

/* Service access */
EceptReferralWSSoap myProxy = (EceptReferralWSSoap) sampleService
.getPort(new QName(namespace, portName),
EceptReferralWSSoap.class);

/* Service invocation */
// System.out.println(myProxy.initiateReferral(null, null));
System.out
.println(myProxy.initiateReferral(new ISReferral(), null));

} catch (Exception e) {
e.printStackTrace();
}
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!