Return-Path: Mailing-List: contact soap-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list soap-dev@xml.apache.org Received: (qmail 3806 invoked from network); 5 Mar 2002 10:49:38 -0000 Received: from boston.lionbridge.com (HELO ?4.22.195.16?) (4.22.195.16) by daedalus.apache.org with SMTP; 5 Mar 2002 10:49:38 -0000 To: soap-dev@xml.apache.org Received: from val1ln01.lionbridge.com by [4.22.195.16] via smtpd (for daedalus.apache.org [63.251.56.142]) with SMTP; 5 Mar 2002 10:46:13 UT Subject: Re: java client for .NET : need SOAPMapping sample code X-Mailer: Lotus Notes Release 5.0.5 September 22, 2000 Message-ID: From: Elise_Dupont@lionbridge.com Date: Tue, 5 Mar 2002 11:46:22 +0100 X-MIMETrack: Serialize by Router on VAL1LN01/VAL/LionBridge(Release 5.0.5 |September 22, 2000) at 03/05/2002 11:46:29 AM, Serialize complete at 03/05/2002 11:46:29 AM MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_alternative 003B603DC1256B73_=" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This is a multipart message in MIME format. --=_alternative 003B603DC1256B73_= Content-Type: text/plain; charset="us-ascii" no, i'm still looking for a solution... i saw many other interop exemples, for simple types, but it's only code sample, i think that i may need an overall overview to see what's wrong... for the moment, i make a hard coded SOAP message, into a string buffer, and send it to .NET and just parse the xml returned. but it would be really cleaner and better if i could generate this SOAP with Mapping, marshall and so on... Elise "Scott Nichol" 03/05/2002 05:23 AM Please respond to soap-dev To: cc: Subject: Re: java client for .NET : need SOAPMapping sample code Elise, I have not seen anything posted from you in a while. Have you resolved everything? Scott Nichol ----- Original Message ----- From: Elise_Dupont@lionbridge.com To: soap-dev@xml.apache.org Sent: Thursday, February 21, 2002 6:43 PM Subject: java client for .NET : need SOAPMapping sample code hi, i had a code, in the past, to marshall a java object into SOAP before to send it to a java webservice. Now, my java client calls a .NET webservice. and the way i connect to the .NET webservice is different (i don't use Call() class, i do use URL() class, just because taht's the only code i know to connectto a .NET webservice) the problem is that my SOAP code doesn't fit any more could you post me a sample code, with a connection to a .NETwebservice and a SOAPMapping ? regards, Elise ======================================================= Old java code Call call = new Call (); call.setTargetObjectURI ("urn:liox:Project"); call.setMethodName ("getProject"); call.setEncodingStyleURI(encodingStyleURI); SOAPMappingRegistry smr = new SOAPMappingRegistry(); ProjectSerializer beanSer = new ProjectSerializer(); StringDeserializer sd = new StringDeserializer (); smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("urn:Projects", "Project"), Project.class, beanSer, beanSer); smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "return"), Project.class, null, beanSer); smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "ProjectCode"), null, null, sd); smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "CompanyName"), null, null, sd); call.setSOAPMappingRegistry(smr); Response resp = call.invoke (url, "" ); ===================================================== New java code byte[] request = marshall(); URL endpoint = new URL("http://val1nt10/PCS_Integration/SynchronizeProfiles.asmx"); URLConnection con = endpoint.openConnection (); con.setDoInput (true); con.setDoOutput (true); con.setUseCaches (false); con.setAllowUserInteraction(false); con.setRequestProperty ("Content-Length", Integer.toString (request.length)); con.setRequestProperty ("Content-Type", "text/xml; charset=utf-8"); con.setRequestProperty ("SOAPAction", "\"http://tempuri.org/WS_UpdateProfileAgency\""); OutputStream out = con.getOutputStream (); //HERE SOAPMAPPING ???? HOW ??? it's not urn anymore true ??? out.write (request); out.flush (); out.close(); -------------------------------------------- Elise Dupont Software developer Technology Development Group Europe Lionbridge Technologies - France Buropolis 1 - 1240 route des Dolines 06560 Sophia-Antipolis www.lionbridge.com _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com --=_alternative 003B603DC1256B73_= Content-Type: text/html; charset="us-ascii"
no, i'm still looking for a solution... i saw many other interop exemples, for simple types, but it's only code sample, i think that i may need an overall overview to see what's wrong...
for the moment, i make a hard coded SOAP message, into a string buffer, and send it to .NET and just parse the xml returned.
but it would be really cleaner and better if i could generate this SOAP with Mapping, marshall and so on...


Elise






"Scott Nichol" <scottnicholnews@yahoo.com>

03/05/2002 05:23 AM
Please respond to soap-dev

       
        To:        <soap-dev@xml.apache.org>
        cc:        
        Subject:        Re: java client for .NET : need SOAPMapping sample code



Elise,

I have not seen anything posted from you in a while.  Have you resolved
everything?

Scott Nichol

 ----- Original Message -----
 From: Elise_Dupont@lionbridge.com
 To: soap-dev@xml.apache.org
 Sent: Thursday, February 21, 2002 6:43 PM
 Subject: java client for .NET : need SOAPMapping sample code



 hi,
 i had a code, in the past, to marshall a java object into SOAP before to
send it to a java webservice.
 Now, my java client calls a .NET webservice.
 and the way i connect to the .NET webservice is different (i don't use
Call() class, i do use URL() class, just because taht's the only code i know
to connectto a .NET webservice)
 the problem is that my SOAP code doesn't fit any more

 could you post me a sample code, with a connection to a .NETwebservice and
a SOAPMapping ?
 regards,


 Elise

 =======================================================
 Old java code

         Call call = new Call ();
         call.setTargetObjectURI ("urn:liox:Project");
         call.setMethodName ("getProject");
         call.setEncodingStyleURI(encodingStyleURI);
         SOAPMappingRegistry smr = new SOAPMappingRegistry();
         ProjectSerializer beanSer = new ProjectSerializer();
         StringDeserializer sd = new StringDeserializer ();


         smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("urn:Projects",
"Project"), Project.class, beanSer, beanSer);
         smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "return"),
Project.class, null, beanSer);
         smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("",
"ProjectCode"), null, null, sd);
         smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("",
"CompanyName"), null, null, sd);

         call.setSOAPMappingRegistry(smr);

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

 =====================================================
 New java code


                 byte[] request = marshall();
                 URL endpoint = new
URL("http://val1nt10/PCS_Integration/SynchronizeProfiles.asmx");
                     URLConnection con = endpoint.openConnection ();
                     con.setDoInput (true);
                     con.setDoOutput (true);
                     con.setUseCaches (false);
                     con.setAllowUserInteraction(false);
                     con.setRequestProperty ("Content-Length",
Integer.toString (request.length));
                     con.setRequestProperty ("Content-Type", "text/xml;
charset=utf-8");
                     con.setRequestProperty ("SOAPAction",
"\"http://tempuri.org/WS_UpdateProfileAgency\"");
                     OutputStream out = con.getOutputStream ();
                 //HERE SOAPMAPPING ???? HOW ??? it's not urn anymore true
???
                 out.write (request);
                     out.flush ();
                     out.close();

 --------------------------------------------
 Elise Dupont
 Software developer
 Technology Development Group Europe
 Lionbridge Technologies - France
 Buropolis 1 - 1240 route des Dolines
 06560 Sophia-Antipolis
 www.lionbridge.com



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



--=_alternative 003B603DC1256B73_=--