Hi,

I'd like to send a service invocation to a server with any types parameter
.... for example, I have a "XML" file, I want to parse it and constructs a
DOM tree representation ... and I'd like to send it to a SOAP server in
order to get the content of an element ... so I tried to send a "call" with
one "dom.Document" parameter .... here is the client program (without catch
etc ....):
------------------------------------------------------------------------------------------------------------------------------------------------
     String encodingStyleURI = Constants.NS_URI_SOAP_ENC;
     URL url = new URL("http://localhost ......");
     SOAPMappingRegistry smr = new SOAPMappingRegistry();
     BeanSerializer beanSer = new BeanSerializer();
      try
     {
                    Call call = new Call();
                     call.setSOAPMappingRegistry(smr);
          call.setTargetObjectURI("urn:SOAP");
                     call.setMethodName("Getting");
                    call.setEncodingStyleURI(encodingStyleURI);

          DOMParser parser = new DOMParser();
          try
          {
               parser.parse("XMLFile.xml");
          }
          Document docXML = parser.getDocument();

           Vector params = new Vector();
------------------>      params.addElement(new Parameter("addedfile",
org.w3c.dom.Document.class, docXML, null));

          call.setParams(params);

          Response resp;

          resp = call.invoke(url, "");


          if (!resp.generatedFault ())
          {
                Parameter result = resp.getReturnValue ();
                System.out.println((String)result.getValue ());
          }
}
---------------------------------------------------------------------------------------------------------------------------------------

but it doesn't work because of :
     [SOAPException: faultCode=SOAP-ENV:Client; msg=No Serializer found to
serialize a 'org.w3c.dom.Document' using encoding style "
http://schemas.xmlsoap.org/soap/encoding/'.;
targetException=java.lang.IllegalArgumentException: No Serializer found to
serialize a              'org.w3c.dom.Document' using encoding style
'http://schemas.xmlsoap.org/soap/encoding/'.]
                    at
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:224)
                at org.apache.soap.rpc.Call.invoke(Call.java:203)
                   at ClientSOAP.main(ClientSOAP.java:65)


What is the solution ?? what do I forget to do  ???

thank you !!


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to