1 Reply Latest reply on Mar 23, 2007 5:28 PM by g king

    Rpc client

    Tremal Naik Newbie

      Hello,
      I've configured a jax-rpc style service in jboss version 4.0.2, which looks to work fine, if I access it using SOAPUI. The request get a response back from jboss. But when I try to access the server using a java client, I have the exception:

      serialization error: serialization error: java.lang.IllegalStateException
       at com.sun.xml.rpc.encoding.literal.LiteralObjectArraySerializer.serialize(LiteralObjectArraySerializer.java:129)
       at com.sun.xml.rpc.encoding.literal.GenericLiteralObjectSerializer.doSerializeInstance(GenericLiteralObjectSerializer.java:292)
       at com.sun.xml.rpc.encoding.literal.GenericLiteralObjectSerializer.doSerialize(GenericLiteralObjectSerializer.java:230)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.internalSerialize(LiteralObjectSerializerBase.java:172)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.serialize(LiteralObjectSerializerBase.java:107)
       at com.sun.xml.rpc.encoding.literal.LiteralRequestSerializer.doSerializeInstance(LiteralRequestSerializer.java:337)
       at com.sun.xml.rpc.encoding.literal.LiteralRequestSerializer.doSerialize(LiteralRequestSerializer.java:408)
       at com.sun.xml.rpc.encoding.literal.LiteralRequestSerializer.internalSerialize(LiteralRequestSerializer.java:305)
       at com.sun.xml.rpc.encoding.literal.LiteralRequestSerializer.serialize(LiteralRequestSerializer.java:260)
       at com.sun.xml.rpc.client.StreamingSender._writeRequest(StreamingSender.java:637)
       at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:83)
       at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:80)
       at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:482)
       at com.bitaplus.bitastar.traveller.connector.ws.TravellerSynchronizerTest.testServiceWithDDI(TravellerSynchronizerTest.java:94)
       at com.bitaplus.bitastar.traveller.connector.ws.TravellerSynchronizerTest.main(TravellerSynchronizerTest.java:52)
      
      CAUSE:
      
      serialization error: java.lang.IllegalStateException
       at com.sun.xml.rpc.encoding.literal.LiteralArraySerializer.serialize(LiteralArraySerializer.java:132)
       at com.sun.xml.rpc.encoding.literal.GenericLiteralObjectSerializer.doSerializeInstance(GenericLiteralObjectSerializer.java:292)
       at com.sun.xml.rpc.encoding.literal.GenericLiteralObjectSerializer.doSerialize(GenericLiteralObjectSerializer.java:230)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.internalSerialize(LiteralObjectSerializerBase.java:172)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.serialize(LiteralObjectSerializerBase.java:107)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectArraySerializer.doSerializeInstance(LiteralObjectArraySerializer.java:353)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectArraySerializer.doSerialize(LiteralObjectArraySerializer.java:332)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectArraySerializer.internalSerialize(LiteralObjectArraySerializer.java:178)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectArraySerializer.serialize(LiteralObjectArraySerializer.java:127)
       at com.sun.xml.rpc.encoding.literal.GenericLiteralObjectSerializer.doSerializeInstance(GenericLiteralObjectSerializer.java:292)
       at com.sun.xml.rpc.encoding.literal.GenericLiteralObjectSerializer.doSerialize(GenericLiteralObjectSerializer.java:230)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.internalSerialize(LiteralObjectSerializerBase.java:172)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.serialize(LiteralObjectSerializerBase.java:107)
       at com.sun.xml.rpc.encoding.literal.LiteralRequestSerializer.doSerializeInstance(LiteralRequestSerializer.java:337)
       at com.sun.xml.rpc.encoding.literal.LiteralRequestSerializer.doSerialize(LiteralRequestSerializer.java:408)
       at com.sun.xml.rpc.encoding.literal.LiteralRequestSerializer.internalSerialize(LiteralRequestSerializer.java:305)
       at com.sun.xml.rpc.encoding.literal.LiteralRequestSerializer.serialize(LiteralRequestSerializer.java:260)
       at com.sun.xml.rpc.client.StreamingSender._writeRequest(StreamingSender.java:637)
       at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:83)
       at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:80)
       at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:482)
       at com.bitaplus.bitastar.traveller.connector.ws.TravellerSynchronizerTest.testServiceWithDDI(TravellerSynchronizerTest.java:94)
       at com.bitaplus.bitastar.traveller.connector.ws.TravellerSynchronizerTest.main(TravellerSynchronizerTest.java:52)
      
      CAUSE:
      
      java.lang.IllegalStateException
       at com.sun.xml.rpc.util.xml.XmlWriter.attributeName(XmlWriter.java:418)
       at com.sun.xml.rpc.util.xml.XmlWriter.attributeUnquoted(XmlWriter.java:370)
       at com.sun.xml.rpc.streaming.XMLWriterImpl.writeAttributeUnquoted(XMLWriterImpl.java:239)
       at com.sun.xml.rpc.streaming.XMLWriterBase.writeAttributeUnquoted(XMLWriterBase.java:46)
       at com.sun.xml.rpc.encoding.literal.LiteralArraySerializer.internalSerialize(LiteralArraySerializer.java:177)
       at com.sun.xml.rpc.encoding.literal.LiteralArraySerializer.serialize(LiteralArraySerializer.java:126)
       at com.sun.xml.rpc.encoding.literal.GenericLiteralObjectSerializer.doSerializeInstance(GenericLiteralObjectSerializer.java:292)
       at com.sun.xml.rpc.encoding.literal.GenericLiteralObjectSerializer.doSerialize(GenericLiteralObjectSerializer.java:230)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.internalSerialize(LiteralObjectSerializerBase.java:172)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.serialize(LiteralObjectSerializerBase.java:107)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectArraySerializer.doSerializeInstance(LiteralObjectArraySerializer.java:353)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectArraySerializer.doSerialize(LiteralObjectArraySerializer.java:332)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectArraySerializer.internalSerialize(LiteralObjectArraySerializer.java:178)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectArraySerializer.serialize(LiteralObjectArraySerializer.java:127)
       at com.sun.xml.rpc.encoding.literal.GenericLiteralObjectSerializer.doSerializeInstance(GenericLiteralObjectSerializer.java:292)
       at com.sun.xml.rpc.encoding.literal.GenericLiteralObjectSerializer.doSerialize(GenericLiteralObjectSerializer.java:230)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.internalSerialize(LiteralObjectSerializerBase.java:172)
       at com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.serialize(LiteralObjectSerializerBase.java:107)
       at com.sun.xml.rpc.encoding.literal.LiteralRequestSerializer.doSerializeInstance(LiteralRequestSerializer.java:337)
       at com.sun.xml.rpc.encoding.literal.LiteralRequestSerializer.doSerialize(LiteralRequestSerializer.java:408)
       at com.sun.xml.rpc.encoding.literal.LiteralRequestSerializer.internalSerialize(LiteralRequestSerializer.java:305)
       at com.sun.xml.rpc.encoding.literal.LiteralRequestSerializer.serialize(LiteralRequestSerializer.java:260)
       at com.sun.xml.rpc.client.StreamingSender._writeRequest(StreamingSender.java:637)
       at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:83)
       at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:80)
       at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:482)
       at com.bitaplus.bitastar.traveller.connector.ws.TravellerSynchronizerTest.testServiceWithDDI(TravellerSynchronizerTest.java:94)
       at com.bitaplus.bitastar.traveller.connector.ws.TravellerSynchronizerTest.main(TravellerSynchronizerTest.java:52)
      


      This is strange for it doesn't give me any indication on what the error may be. The method implementation is:

      public interface TravellerSynchronizerIface extends Remote
      {
       public ClientCharacteristics synchronize(ClientCharacteristics characters)
       throws RemoteException;
      }
      


      and the client trying to access it is:

      ClientCharacteristics characters = new ClientCharacteristics();
      String urlstr = "https://cor319:8443/bitatraveller/TravellerSynchronizer?wsdl";
      System.out.println("Contacting webservice at " + urlstr);
      URL url = new URL(urlstr);
      String ns = "https://ws.web.bitastar.bitaplus.com/";
      QName qname = new QName(ns, "TravellerSynchronizer");
      QName port = new QName(ns, "TravellerSynchronizerIfacePort");
      QName operation = new QName(ns, "synchronize");
      ServiceFactory factory = ServiceFactory.newInstance();
      Service service = factory.createService(url, qname);
      Call call = service.createCall(port, operation);
      ClientCharacteristics cc = (ClientCharacteristics) call.invoke(new Object[] { characters });
      


      The exception is thrown at the invoke, in the last line. I'm using Java 1.4 and jwsdp 1.4. I downloaded the jbossws samples and inspecting the code I see an instruction like
      Service service = factory.createService(wsdlURL, qname, mappingURL);
      


      but my factory implementation doesn't have such a method. Did I set up the call wrongly? Please help me.


      thanks