#######################################################################
Thank you for your reading my mail nevertheless you are busy !!
HELLO! This is chihongkim from KOREA will hold WORLD-CUP in 2002. 
___________________________________________________
I am developing a client/server project that use soap.
The project is on remote management of mail in Client-side 
        using <MS-Outlook2000-mail-program in Server-side > through Agent 

(this is made of VB) .

but, i have difficulties in solving the following problem.

1. Environment                                                                

             
    - client : java Language
    - server(Agent) : Visual Basic (for Application)
    - protocol : soap
    - now, i am using the MS-soap  Toolkit help me make the 'wsdl file' in 

server side 
      to communicate with Client.

2. Test
    - In Client-side (java) : I have made the class file that sends parameter 

and the method to call
    - In Server-side (VB) : I have made the '.dll' File consisting of '.cls' 

files that will 
                                    handle the procedure of Client's request. 
    - and made the wsdl file in Server-side using MS-Soap-Toolkit.
    - and In client-side I requested the mails from outlook2000 through the 

Agent made of VBA
        (Visual Basic for Application) ; this time, the Client program access 

to the wsdl file.

3. Problems
    1) The NOT KOREAN-language-supported response 
        =>The returned String-Type mails consisting of xml-file format are 

Not supported in KOREAN Language. 
           All the Korean words except english-words and tags are broken.

    2) and I want to receive the response  by File-type. 
       => In this case, would you show me the proposal how to compose the 

message call. 
           - what do i have to  make coding for the request in client-side 
                ; how to send the parameters and method for the request. 
           - what do i have to make coding for the response in server-side
                ; how to compose the response to send by xml-file-type.

@..@  I wish you could answer the question (my problems) as soon as possible.
          
          Thank you !!  Good Luck!!                                           

                                                 
                                                                              

   @..@   - Peter (chihongkim) - in Korea.
#############################################################################
You can test the following file. 
    1. first, save the following by mailClient.java
    2. second, compile the mailClient.java (c:\javac mailClient.java)
    3. third, execute the mailClient class program (c:\java mailClient)
    4. You can receive some result...
#############################################################################
import java.io.*;
import java.util.*;
import java.net.*;
import org.w3c.dom.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.encoding.*;
import org.apache.soap.encoding.soapenc.*;
import org.apache.soap.rpc.*;
import org.apache.soap.transport.http.SOAPHTTPConnection;

public class MailClient 
{

  public static void main(String[] args) throws Exception 
  {

    URL url = new URL ("http://203.248.127.237/MailTest2.wsdl";);

    SOAPMappingRegistry smr = new SOAPMappingRegistry ();
    StringDeserializer sd = new StringDeserializer ();
  smr.mapTypes ("http://schemas.xmlsoap.org/soap/encoding/";,
                  new QName ("", "Result"), null, null, sd);

    // create the transport and set parameters
    SOAPHTTPConnection st = new SOAPHTTPConnection();

    // build the call.
    Call call = new Call ();
    call.setSOAPTransport(st);
    call.setSOAPMappingRegistry (smr);
    
    call.setTargetObjectURI ("http://tempuri.org/message/";);
    call.setMethodName("soapMailList");
  call.setEncodingStyleURI ("http://schemas.xmlsoap.org/soap/encoding/";);

    Vector params = new Vector();
  params.addElement(new Parameter("sSoapParams", String.class, "<Box>¹ÞÀº Æí

ÁöÇÔ</Box>", null));
                                                             //   <Box> Inbox 

</Box> 
  call.setParams(params);  
    
    Response resp = null;
    try 
    {
      resp = call.invoke (url, 

"http://tempuri.org/action/CMailWrappers.soapMailList";);      
    } 
    catch (SOAPException e) 
    {
      System.err.println("Caught SOAPException (" +
                         e.getFaultCode () + "): " +
                         e.getMessage ());
   return;
    }
    
    if (resp == null)
    {
   System.out.println("Response was null");
  }  

    // check response 
    if (resp != null && !resp.generatedFault()) 
    {
      Parameter ret = resp.getReturnValue();
      Object value = ret.getValue();

      System.out.println ("Answer--> " + value);
    }
    else {
      Fault fault = resp.getFault ();
      System.err.println ("Generated fault: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());  
      System.out.println ("  Fault String = " + fault.getFaultString());
    }
  }
}
#######################################################################





Don forget me!
email address : [EMAIL PROTECTED]

==================================================
¿ì¸® ÀÎÅͳÝ, Daum
Æò»ý ¾²´Â ¹«·á E-mail ÁÖ¼Ò ÇѸÞÀϳÝ
Áö±¸ÃÌ ÇÑ±Û °Ë»ö¼­ºñ½º Daum°Ë»ö
http://www.daum.net

Reply via email to