check out the compatibility faq on the apache site....the short of it is
you must provide a mapper (on the apache client side) because the MS SOAP
toolkit does not provide an xsi:type attribute for the return value...

ex.)

//WRAP THE SEND IN CDATA SECITION...NEEDED OTHERWISE HTTP INTERPRETS THE <>
//may not be needed for
      String lsSendXML= new String("<![CDATA["+lsdoc2+"]]>");

      // Build the call object
      Call call = new Call();

      //Set the URI
      call.setTargetObjectURI("http://tempuri.org/message/";);

      //Set the method name
      call.setMethodName("GetSomeData");

      //Set the encoding style
      call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);

      Vector params = new Vector();

      //Add the parameter...our parameter is named sXML
      params.addElement(new Parameter("sXML", String.class,

lsSendXML,Constants.NS_URI_SOAP_ENC));
      call.setParams(params);

      //Set the security
      //HTTP security
      SOAPHTTPConnection httpconn = new SOAPHTTPConnection();
      httpconn.setProxyPort(80);
      httpconn.setPassword("yourpassword");
      httpconn.setUserName("yourdomain\\yourid");

//Set the http connection stuff
      call.setSOAPTransport(httpconn);

      //ADD YOUR OWN DESERIALIZER SINCE THIS IS CALLING A MS SERVER THERE
IS
      //NO xsi:type attribute returned....
      //Create a new SoapMappingRegistry
      SOAPMappingRegistry smr = new SOAPMappingRegistry();

      //Since all we return are strings...
      StringDeserializer ds = new StringDeserializer();

      //Map the datatype to the name provided..aka all our stuff is
"Result"
      smr.mapTypes(Constants.NS_URI_SOAP_ENC,new QName("","Result"),null,
null,ds);

       //Set the mapping to the call object
       call.setSOAPMappingRegistry(smr);

      // Invoke the call.
      Response resp;

      try
      {

            String lsAction = new String(
"http://tempuri.org/action/your_action_value_in_the_wsdl";);

            resp = call.invoke(url,lsAction);

      }
      catch (SOAPException e)
      {
        System.err.println("Caught SOAPException (" +
                                     e.getFaultCode() + "): " +
                                     e.getMessage());
        return;
      }







                                                                                       
                                        
                      [EMAIL PROTECTED]                                                
                                        
                                               To:       [EMAIL PROTECTED]       
                                        
                      06/07/2002 01:38         cc:       (bcc: Doug 
Swanson/US-Corporate/3M/US)                                
                      PM                       Subject:  Apache SOAP client MS SOAP 
server?                                    
                      Please respond to                                                
                                        
                      soap-dev                                                         
                                        
                                                                                       
                                        
                                                                                       
                                        



Argh!  I've found numerous examples of getting MSSOAP and Apache SOAP to
work together by either A) Making the Apache server talk nice to the MS
client code, or B) Making the MS SOAP client talk nice to the Apache
server; but I need to get the MS SOAP server to talk nice to Apache
clients.  I believe this will involve writing an ASP listener to parse the
incoming SOAP message.


Surely someone has written such code and released it into the wild.
Pointers please.


TIA.


        - Jasen.










Reply via email to