Hi Paul,
   
  -This mail contains attached WSDL file which I used to create the client by 
axis.
  -And About the way I am creating the XML that I am sending it's similar to 
the foolowing:
   
  class Main{
  String xml="<myElement><A><B>text</B></A></myElement>";
  Request req=new Request();
  req.setAttr(xml);
  Sender sender=new Sender();
  sender.send(req);
  }

  class Request{
  String attr=null;
  getAttr(){
  return attr;
  }
  setAttr(String s){
  attr=s;
  }
   
  class Sender{
  public Response send(Request req) {
  Response res=(Response) call.invoke(req);
  return res;
  }
  }

Paul Fremantle <[EMAIL PROTECTED]> wrote: 
  Mohamed

The server is expecting it in XML form not string form.

Can you please post the WSDL. Also please explain how you are creating the XML 
that you are sending.

Paul

  On Nov 21, 2007 10:41 AM, M.Khaled <[EMAIL PROTECTED]> wrote:
    First of all Thanks a lot for your quick response.Second I just want to 
tell you how the scenario going in here:
  (1)I am just working in the client side (meaning I just created the client by 
axis WSDL2JAVA command by passing the WSDL file to it). 
   
  (2)And I have to set ant attribute value which is of type String to  a 
specific object and this value is xml elements but in a string representation.
   
  (3)This specific object will be passed to the invoke method of the Call 
object.  
   
  (4)In the server side (which is out of my work scope, I am just using the URL 
for it and know nothing else about it) it is expecting that this value I passed 
is xml in a string representation.
   
  (5)So I tried your solution for base 64 encoding but the output was something 
like this:
  <myEement>HJvc3BlY3Q+ICBpZClJzs</myEemen> 
  and the server can't parse this form cause it is expecting that form:
  <myEement><A><B>text</B></A></myEement>
   
  (6)And axis is generating this output: 
  <myEement>&lt;A&gt; &lt;B&gt; text &lt;/B&gt; &lt;/A&gt; </myEement>
  and the server can't parse this form.
   
  That's the point I am still sticking in. 
  If you have any other solution please advice.
   
  Thanks,
  Mohamed.     
  
"Hoda, Nadeem [USA]" < [EMAIL PROTECTED]> wrote:


    
       
  If it is something very urgent, the easiest way is to base 64 encode the XML 
and pass the encoded string which is guaranteed to have no special characters. 
   
  For example (server-side): 
     
  import org.apache.xerces.impl.dv.util.Base64;
   
  ...
 //send this string 
 String encodedXML = Base64.encode(rawXMLString);
....
   
  Otherwise you can use attachments, but that is not an "urgent" scenario 
solution. 
   
  Thanks, 
   
  Nadeem
   
    
---------------------------------
  From: M.Khaled [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 21, 2007 1:41 PM
To: [email protected]
Subject: Urgent 


  
  Hi,
   
  I sent a question to the mailing list and got no answer till now.Could anyone 
help me?
  My question was about how to send xml as a string by axis client avoiding 
special character problem.
   
  Thanks,
  Mohamed.
    
---------------------------------
  Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it 
now. 



    
  
---------------------------------
  Never miss a thing. Make Yahoo your homepage. 




-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org 
[EMAIL PROTECTED]

"Oxygenating the Web Service Platform", www.wso2.com 

       
---------------------------------
Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now.
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://mycompany.com"; xmlns:apachesoap="http://xml.apache.org/xml-soap"; xmlns:impl="http://watchservice.trilogyads.com"; xmlns:intf="http://watchservice.trilogyads.com"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
 <wsdl:types>
  <schema targetNamespace="http://watchservice.trilogyads.com"; xmlns="http://www.w3.org/2001/XMLSchema";>
   <element name="ScoreLeadRequest">
    <complexType>
     <sequence>
      <element name="lead" type="xsd:string" />
     </sequence>
    </complexType>
   </element>
   <element name="ScoreLeadResponse">
    <complexType>
     <sequence>
      <element name="leadscore" type="xsd:float"/>
      <element maxOccurs="1" minOccurs="0" name="errorid" type="xsd:int"/>
      <element maxOccurs="1" minOccurs="0" name="errordesc" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
  </schema>
 </wsdl:types>

   <wsdl:message name="scoreLeadRequestResponse">

      <wsdl:part element="impl:ScoreLeadResponse" name="ScoreLeadResponse"/>

   </wsdl:message>

   <wsdl:message name="scoreLeadRequestRequest">

      <wsdl:part element="impl:ScoreLeadRequest" name="ScoreLeadRequest"/>

   </wsdl:message>

   <wsdl:portType name="ScoreLeadRequestPort">

      <wsdl:operation name="scoreLeadRequest" parameterOrder="ScoreLeadRequest">

         <wsdl:input message="impl:scoreLeadRequestRequest" name="scoreLeadRequestRequest"/>

         <wsdl:output message="impl:scoreLeadRequestResponse" name="scoreLeadRequestResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="LeadScoringSoapBinding" type="impl:ScoreLeadRequestPort">

      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="scoreLeadRequest">

         <wsdlsoap:operation soapAction="http://watchservice.trilogyads.com/scoring/LeadScoring"/>

         <wsdl:input name="scoreLeadRequestRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="scoreLeadRequestResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="ScoreLeadService">

      <wsdl:port binding="impl:LeadScoringSoapBinding" name="LeadScoring">

         <wsdlsoap:address location="https://watchservice.trilogyads.com/scoring/LeadScoring"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>

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

Reply via email to