You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Arnault BELLINA <ka...@yahoo.fr> on 2005/12/16 10:33:31 UTC

Use of DataHandler in a webservice

Hello all !
  
  I have a WSDL interface from a Web Service (AXIS-based).
  A web service accepts a file as an attachment and a string and return an int.
  I got the wsdl from this service (see at the end of the mail).
  
  As soon as I try to create the client stub for this WSDL I get a possible error of DataHandler use : 
  
  Possible error in class DataHandler: class with no attributes....................
  Possible error in class DataHandler: class with no attributes....................
  
  The webservice is in Doc mode, can I use dataHander with this mode ?
  the WSDL2Ws tool create me a DataHandler.cpp and a DataHandler.hpp.
  Does this is normal ? I thought DataHandler was a defined type like an int.
  
  Could somebody advise me if it's wrong and how to solve this
  problem. If it's for you it's correct, is there somebody who can tell me how to use  datahandler in c++
  
  Thanks a lot for your answer.
  
  Arnault
  
  This is my wsdl. 
  
  <wsdl:definitions targetNamespace="urn:Message"  xmlns:tns3="http://schemas.xmlsoap.org/soap/encoding/"  xmlns:impl="urn:Message" xmlns:intf="urn:Message"  xmlns:apachesoap="http://xml.apache.org/xml-soap"  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"  xmlns:xsd="http://www.w3.org/2001/XMLSchema"   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  
  
   <wsdl:types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Message" elementFormDefault="qualified">
     <import namespace="http://xml.apache.org/xml-soap"/>
     <element name="pushNewMessage">
      <complexType>
       <sequence>
        <element name="in0" type="xsd:string"/>
        <element name="in3" type="apachesoap:DataHandler"/>
       </sequence>
      </complexType>
  
  <element name="pushNewMessageResponse">
      <complexType>
       <sequence>
        <element name="pushNewMessageReturn" type="xsd:int"/>
       </sequence>
      </complexType>
     </element>
  

		
---------------------------------
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.Téléchargez la version beta.

Soap Attachment

Posted by Arnault BELLINA <ka...@yahoo.fr>.
Hi all, 
  
  I'm back with my problem of attachment. 
  My really question is : Is there any other solution that exist in axis cpp 1.5 to use the Soap attachment instead of using dataHandler ?
  
  Also, is it possible for example to send with axis cpp 1.5 a sound file  from a client to a server without datahandler? Or do I have to test it  with the axis 1.6a version ?
  
  Thank you very much for your help.
  
  Arnault
  
		
---------------------------------
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.Téléchargez la version beta.

Re: Use of DataHandler in a webservice

Posted by Arnault BELLINA <ka...@yahoo.fr>.
I join the wsdl file with the mail.
  Thanks for your help
  
  Arnault

John Hawkins <HA...@uk.ibm.com> a écrit :    
Can you send your complete wsdl please.  
  
thanks,  
John.  
  
  
  
  
      Arnault BELLINA <ka...@yahoo.fr>    16/12/2005 16:36        Please respond to
  "Apache AXIS C User List"
  
  
        To
  Apache AXIS C User List <ax...@ws.apache.org>      cc
                  
      Subject
  Re: Use of DataHandler in  a webservice  
                      
  
    
  
  
  
Hi again, 
  
  I download the axis-c-1.6a.n-Linux-trace-bin.tar.gz  from the nightly build. 
  I generate my client and I didn"t got any error  ! that was pretty  cool ;o)
  
  However, I have still the DataHandler.cpp and the DataHandler.hpp which  are generated. I didn't find the ISoapAttachment class too. Does it  should be  generated too ?
  
 I can't find the samples you  were both talking about... Maybe I don't look in the right place to  find it. Do they should be in the samples of the axis 1.6a build ?
  
  thank you for your help ! everytime it's help me a lot !
  
  Arnault  

    

  John Hawkins <HA...@uk.ibm.com> a écrit :  

  but you'll need the nightly build you pointed to to pick up the code that  will work for you :-) 
  
  
  
        Adrian Dick/UK/IBM@IBMGB    
16/12/2005 13:01    
        Please respond to
  "Apache AXIS C User List"
  
          To
  "Apache AXIS  C User List" <ax...@ws.apache.org>        cc
                  
      Subject
  Re: Use of DataHandler in  a webservice  
  
                      
  
    
  

  
  
  Sorry, for not making it clear.  I updated the example code sent by  John
  below.
  
  Adrian
  _______________________________________
  Adrian Dick (adrian.dick@uk.ibm.com)
  
  
  Arnault BELLINA <ka...@yahoo.fr> wrote on 16/12/2005 12:57:14:
  
  > Thanks John for your Answer. It will be very usefull !
  > Adrian : which code do you update ? The example code or the axis source
  code ?
  > Do I have to download another time the Axis cpp 1.6 a  on http:
  > //cvs.apache.org/dist/axis/nightly ?
  >
  > Thanks for your answer
  >
  > Arnault
  >
  > Adrian Dick <ad...@uk.ibm.com> a écrit :
  > The example originally attached won't work with some recent changes,  so
  > I've updated with the correct code.
  >
  > Adrian
  > _______________________________________
  > Adrian Dick (adrian.dick@uk.ibm.com)
  >
  >
  > John Hawkins/UK/IBM@IBMGB wrote on 16/12/2005 10:49:19:
  >
  > >
  > > Hi,
  > >
  > > OK, so Now that I've woken up !
  > >
  > > No, we shouldn't be creating the datahandler class (yo u are  correct
  > > :-) And in the latest build we don't. We have a number of
  > > datahandler tests and they appear to be working fine on the latest
  > > build. May I suggest you try out the latest build -> http://ws.
  > > apache.org/axis/interim.html.
  > >
  > > And see if you still get the same problem. Don't worry that this  is
  > > not a full release - we are due to ship the 1.6 release pretty  soon
  > > (end of month?). I didn't run through the 1.5 code however, it  might
  > > be possible to just throw out the extra Datahandler class if  you can
  > > see that the ISoapAttachment class is being used on the service?
  > >
  > > This is a sample from one of our tests ->
  > > (ISoapAttachment is the Datahandler object described in WSDL)
  > >
  >
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  
  >
  > > ISoapAttachment *att=ws.createSoapAttachment();
  > >
  > > char *text=stringToAscii("This is a
  > > test message for attachment");
  > >
  > > //Adding the content type as text/plain
  > >
  > att->addHeader(AXIS_CONTENT_TYPE,"text/plain"
  > > );
  > > xsd__base64Binary b64b1;
  > b64b1.set((xsd__unsignedByte*)text,
  > strlen(text));
  > > att->addBody(&b64b1);
  > > //Calling the dataHandlerService,
  > > service will return content
  > > Result=ws.echoContent(att);
  >
  > >
  >
  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  
  >
  > >
  > >
  > > cheers,
  > > John.
  > >
  > >
  > >
  > >
  >
  > >
  > > Arnault BELLINA
  > > 16/12/2005 09:59
  > >
  > > Please respond to
  > > "Apache AXIS C User List"
  > >
  > > To
  > >< br> > > Apache AXIS C User List
  > >
  > > cc
  > >
  > > Subject
  > >
  > > Re: Use of DataHandler in a webservice
  > >
  > >
  > >
  > >
  > > I'm using the current axis cpp version (I guess the 1.5)
  > > thanks for your help.
  > >
  > > this is the wsdl :
  > >
  > >
  > >
  > > xmlns:intf="urn:Message"
  xmlns:apachesoap="http://xml.apache.org/xml-soap
  > > " xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"  xmlns:xsd="
  > > http://www.w3.org/2001/XMLSchema"
  > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/
  > > ">
  > >
  > &g t;
  > >
  > > targetNamespace="urn:Message" elementFormDefault="qualified">
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > > ;
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > location="http://localhost:8080/services/Message"/>
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > > John Hawkins a écrit :
  > >
  > > Hi,
  > > please could you send the whole wsdl. Yes creation of the
  > > datahandler classes is normal
  > >
  > > What version of axis cpp are you using ?
  > >
  > >
  >
  > >
  > > Arnault BELLINA
  > > 16/12/2005 09:33
  > >
  > > Please respond to
  > > "Apache AXIS C User List"
  > >
  > > To
  > >
  > > axis-c-user@ws.apache.org
  > >
  > > cc
  > >
  > > Subject
  > >
  > > Use of DataHandler in a webservice
  > >
  > >
  >
  > >
  > >
  > >
  > >
  > >
  > > Hello all !
  > >
  > > I have a WSDL interface from a Web Service (AXIS-based).
  > > A web service accepts a file as an attachment and a string and  return
  an
  > int.
  > > I got the wsdl from this service (see at the end of the mail).
  > >
  > > As so on as I try to create the client stub for this WSDL I get  a
  > > possible error of DataHandler use :
  > >
  > > Possible error in class DataHandler: class with no
  > > attributes....................
  > > Possible error in class DataHandler: class with no
  > > attributes....................
  > >
  > > The webservice is in Doc mode, can I use dataHander with this  mode ?
  > > the WSDL2Ws tool create me a DataHandler.cpp and a DataHandler.hpp.
  > > Does this is normal ? I thought DataHandler was a defined type  like an
  > int.
  > >
  > > Could somebody advise me if it's wrong and how to solve this
  > > problem. If it's for you it's correct, is there somebody who  can
  > > tell me how to use datahandler in c++
  > >
  > > Thanks a lot f or your answer.
  > >
  > > Arnault
  > >
  > > T his i s my wsdl.
  > >
  > >
  > > xmlns:intf="urn:Message"
  xmlns:apachesoap="http://xml.apache.org/xml-soap
  > > " xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"  xmlns:xsd="
  > > http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.
  > > xmlsoap.org/wsdl/">
  > >
  > >
  > >
  > >
  > > targetNamespace="urn:Message" elementFormDefault="qualified">
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > > Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez  les
  > > tarifs exceptionnels pour appeler la France et l'international.
  > Téléchargez
  > > la version beta.
  > > Nouveau : téléphonez moins cher avec Yahoo! Me ssenger ! Découvez  les
  > > tarifs exceptionnels pour appeler la France et l'international.
  > Téléchargez
  > > la version beta.
  
  >
  > Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
  > tarifs exceptionnels pour appeler la France et l'international.
  Téléchargez
  > la version beta.
  
    
    

---------------------------------
Nouveau  : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs  exceptionnels pour appeler la France et l'international. Téléchargez  la version beta.  



		
---------------------------------
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.Téléchargez la version beta.

Re: Use of DataHandler in a webservice

Posted by John Hawkins <HA...@uk.ibm.com>.
Can you send your complete wsdl please.

thanks,
John.





Arnault BELLINA <ka...@yahoo.fr> 
16/12/2005 16:36
Please respond to
"Apache AXIS C User List"


To
Apache AXIS C User List <ax...@ws.apache.org>
cc

Subject
Re: Use of DataHandler in a webservice






Hi again, 

I download the axis-c-1.6a.n-Linux-trace-bin.tar.gz from the nightly 
build. 
I generate my client and I didn"t got any error  ! that was pretty cool 
;o)

However, I have still the DataHandler.cpp and the DataHandler.hpp which 
are generated. I didn't find the ISoapAttachment class too. Does it should 
be  generated too ?

I can't find the samples you were both talking about... Maybe I don't look 
in the right place to find it. Do they should be in the samples of the 
axis 1.6a build ?

thank you for your help ! everytime it's help me a lot !

Arnault



John Hawkins <HA...@uk.ibm.com> a écrit :

but you'll need the nightly build you pointed to to pick up the code that 
will work for you :-) 




Adrian Dick/UK/IBM@IBMGB 
16/12/2005 13:01 

Please respond to
"Apache AXIS C User List"


To
"Apache AXIS C User List" <ax...@ws.apache.org> 
cc

Subject
Re: Use of DataHandler in a webservice








Sorry, for not making it clear.  I updated the example code sent by John
below.

Adrian
_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)


Arnault BELLINA <ka...@yahoo.fr> wrote on 16/12/2005 12:57:14:

> Thanks John for your Answer. It will be very usefull !
> Adrian : which code do you update ? The example code or the axis source
code ?
> Do I have to download another time the Axis cpp 1.6 a  on http:
> //cvs.apache.org/dist/axis/nightly ?
>
> Thanks for your answer
>
> Arnault
>
> Adrian Dick <ad...@uk.ibm.com> a écrit :
> The example originally attached won't work with some recent changes, so
> I've updated with the correct code.
>
> Adrian
> _______________________________________
> Adrian Dick (adrian.dick@uk.ibm.com)
>
>
> John Hawkins/UK/IBM@IBMGB wrote on 16/12/2005 10:49:19:
>
> >
> > Hi,
> >
> > OK, so Now that I've woken up !
> >
> > No, we shouldn't be creating the datahandler class (yo u are correct
> > :-) And in the latest build we don't. We have a number of
> > datahandler tests and they appear to be working fine on the latest
> > build. May I suggest you try out the latest build -> http://ws.
> > apache.org/axis/interim.html.
> >
> > And see if you still get the same problem. Don't worry that this is
> > not a full release - we are due to ship the 1.6 release pretty soon
> > (end of month?). I didn't run through the 1.5 code however, it might
> > be possible to just throw out the extra Datahandler class if you can
> > see that the ISoapAttachment class is being used on the service?
> >
> > This is a sample from one of our tests ->
> > (ISoapAttachment is the Datahandler object described in WSDL)
> >
>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

>
> > ISoapAttachment *att=ws.createSoapAttachment();
> >
> > char *text=stringToAscii("This is a
> > test message for attachment");
> >
> > //Adding the content type as text/plain
> >
> att->addHeader(AXIS_CONTENT_TYPE,"text/plain"
> > );
> > xsd__base64Binary b64b1;
> b64b1.set((xsd__unsignedByte*)text,
> strlen(text));
> > att->addBody(&b64b1);
> > //Calling the dataHandlerService,
> > service will return content
> > Result=ws.echoContent(att);
>
> >
>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

>
> >
> >
> > cheers,
> > John.
> >
> >
> >
> >
>
> >
> > Arnault BELLINA
> > 16/12/2005 09:59
> >
> > Please respond to
> > "Apache AXIS C User List"
> >
> > To
> >< br> > > Apache AXIS C User List
> >
> > cc
> >
> > Subject
> >
> > Re: Use of DataHandler in a webservice
> >
> >
> >
> >
> > I'm using the current axis cpp version (I guess the 1.5)
> > thanks for your help.
> >
> > this is the wsdl :
> >
> >
> >
> > xmlns:intf="urn:Message"
xmlns:apachesoap="http://xml.apache.org/xml-soap
> > " xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
> > http://www.w3.org/2001/XMLSchema"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/
> > ">
> >
> &g t;
> >
> > targetNamespace="urn:Message" elementFormDefault="qualified">
> >
> >
> >
> >
> >
> >
> >
> > ;
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> location="http://localhost:8080/services/Message"/>
> >
> >
> >
> >
> >
> >
> >
> > John Hawkins a écrit :
> >
> > Hi,
> > please could you send the whole wsdl. Yes creation of the
> > datahandler classes is normal
> >
> > What version of axis cpp are you using ?
> >
> >
>
> >
> > Arnault BELLINA
> > 16/12/2005 09:33
> >
> > Please respond to
> > "Apache AXIS C User List"
> >
> > To
> >
> > axis-c-user@ws.apache.org
> >
> > cc
> >
> > Subject
> >
> > Use of DataHandler in a webservice
> >
> >
>
> >
> >
> >
> >
> >
> > Hello all !
> >
> > I have a WSDL interface from a Web Service (AXIS-based).
> > A web service accepts a file as an attachment and a string and return
an
> int.
> > I got the wsdl from this service (see at the end of the mail).
> >
> > As so on as I try to create the client stub for this WSDL I get a
> > possible error of DataHandler use :
> >
> > Possible error in class DataHandler: class with no
> > attributes....................
> > Possible error in class DataHandler: class with no
> > attributes....................
> >
> > The webservice is in Doc mode, can I use dataHander with this mode ?
> > the WSDL2Ws tool create me a DataHandler.cpp and a DataHandler.hpp.
> > Does this is normal ? I thought DataHandler was a defined type like an
> int.
> >
> > Could somebody advise me if it's wrong and how to solve this
> > problem. If it's for you it's correct, is there somebody who can
> > tell me how to use datahandler in c++
> >
> > Thanks a lot f or your answer.
> >
> > Arnault
> >
> > T his i s my wsdl.
> >
> >
> > xmlns:intf="urn:Message"
xmlns:apachesoap="http://xml.apache.org/xml-soap
> > " xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
> > http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.
> > xmlsoap.org/wsdl/">
> >
> >
> >
> >
> > targetNamespace="urn:Message" elementFormDefault="qualified">
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> > tarifs exceptionnels pour appeler la France et l'international.
> Téléchargez
> > la version beta.
> > Nouveau : téléphonez moins cher avec Yahoo! Me ssenger ! Découvez les
> > tarifs exceptionnels pour appeler la France et l'international.
> Téléchargez
> > la version beta.

>
> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> tarifs exceptionnels pour appeler la France et l'international.
Téléchargez
> la version beta.



Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les 
tarifs exceptionnels pour appeler la France et l'international. 
Téléchargez la version beta.

Re: Use of DataHandler in a webservice

Posted by Arnault BELLINA <ka...@yahoo.fr>.
Hi again, 
  
  I download the axis-c-1.6a.n-Linux-trace-bin.tar.gz from the nightly build. 
  I generate my client and I didn"t got any error  ! that was pretty cool ;o)
  
  However, I have still the DataHandler.cpp and the DataHandler.hpp which  are generated. I didn't find the ISoapAttachment class too. Does it  should be  generated too ?
  
  I can't find the samples you were both talking about... Maybe I don't  look in the right place to find it. Do they should be in the samples of  the axis 1.6a build ?
  
  thank you for your help ! everytime it's help me a lot !
  
  Arnault
  



  
John Hawkins <HA...@uk.ibm.com> a écrit :    
but you'll need the nightly build you  pointed to to pick up the code that will work for you :-)  
  
  
  
  
      Adrian Dick/UK/IBM@IBMGB    16/12/2005 13:01        Please respond to
  "Apache AXIS C User List"
  
  
        To
  "Apache AXIS C User  List" <ax...@ws.apache.org>      cc
                  
      Subject
  Re: Use of DataHandler in  a webservice  
                      
  
    
  
  
  
Sorry, for not making it clear.  I updated the  example code sent by John
  below.
  
  Adrian
  _______________________________________
  Adrian Dick (adrian.dick@uk.ibm.com)
  
  
  Arnault BELLINA <ka...@yahoo.fr> wrote on 16/12/2005 12:57:14:
  
  > Thanks John for your Answer. It will be very usefull !
  > Adrian : which code do you update ? The example code or the axis source
  code ?
  > Do I have to download another time the Axis cpp 1.6 a  on http:
  > //cvs.apache.org/dist/axis/nightly ?
  >
  > Thanks for your answer
  >
  > Arnault
  >
  > Adrian Dick <ad...@uk.ibm.com> a écrit :
  > The example originally attached won't work with some recent changes,  so
  > I've updated with the correct code.
  >
  > Adrian
  > _______________________________________
  > Adrian Dick (adrian.dick@uk.ibm.com)
  >
  >
  > John Hawkins/UK/IBM@IBMGB wrote on 16/12/2005 10:49:19:
  >
  > >
  > > Hi,
  > >
  > > OK, so Now that I've woken up !
  > >
  > > No, we shouldn't be creating the datahandler class (yo u are  correct
  > > :-) And in the latest build we don't. We have a number of
  > > datahandler tests and they appear to be working fine on the latest
  > > build. May I suggest you try out the latest build -> http://ws.
  > > apache.org/axis/interim.html.
  > >
  > > And see if you still get the same problem. Don't worry that this  is
  > > not a full release - we are due to ship the 1.6 release pretty  soon
  > > (end of month?). I didn't run through the 1.5 code however, it  might
  > > be possible to just throw out the extra Datahandler class if  you can
  > > see that the ISoapAttachment class is being used on the service?
  > >
  > > This is a sample from one of our tests ->
  > > (ISoapAttachment is the Datahandler object described in WSDL)
  > >
  >
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  
  >
  > > ISoapAttachment *att=ws.createSoapAttachment();
  > >
  > > char *text=stringToAscii("This is a
  > > test message for attachment");
  > >
  > > //Adding the content type as text/plain
  > >
  > att->addHeader(AXIS_CONTENT_TYPE,"text/plain"
  > > );
  > > xsd__base64Binary b64b1;
  > b64b1.set((xsd__unsignedByte*)text,
  > strlen(text));
  > > att->addBody(&b64b1);
  > > //Calling the dataHandlerService,
  > > service will return content
  > > Result=ws.echoContent(att);
  >
  > >
  >
  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  
  >
  > >
  > >
  > > cheers,
  > > John.
  > >
  > >
  > >
  > >
  >
  > >
  > > Arnault BELLINA
  > > 16/12/2005 09:59
  > >
  > > Please respond to
  > > "Apache AXIS C User List"
  > >
  > > To
  > >
  > > Apache AXIS C User List
  > >
  > > cc
  > >
  > > Subject
  > >
  > > Re: Use of DataHandler in a webservice
  > >
  > >
  > >
  > >
  > > I'm using the current axis cpp version (I guess the 1.5)
  > > thanks for your help.
  > >
  > > this is the wsdl :
  > >
  > >
  > >
  > > xmlns:intf="urn:Message"
  xmlns:apachesoap="http://xml.apache.org/xml-soap
  > > " xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"  xmlns:xsd="
  > > http://www.w3.org/2001/XMLSchema"
  > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/
  > > ">
  > >
  > &g t;
  > >
  > > targetNamespace="urn:Message" elementFormDefault="qualified">
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > location="http://localhost:8080/services/Message"/>
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > > John Hawkins a écrit :
  > >
  > > Hi,
  > > please could you send the whole wsdl. Yes creation of the
  > > datahandler classes is normal
  > >
  > > What version of axis cpp are you using ?
  > >
  > >
  >
  > >
  > > Arnault BELLINA
  > > 16/12/2005 09:33
  > >
  > > Please respond to
  > > "Apache AXIS C User List"
  > >
  > > To
  > >
  > > axis-c-user@ws.apache.org
  > >
  > > cc
  > >
  > > Subject
  > >
  > > Use of DataHandler in a webservice
  > >
  > >
  >
  > >
  > >
  > >
  > >
  > >
  > > Hello all !
  > >
  > > I have a WSDL interface from a Web Service (AXIS-based).
  > > A web service accepts a file as an attachment and a string and  return
  an
  > int.
  > > I got the wsdl from this service (see at the end of the mail).
  > >
  > > As soon as I try to create the client stub for this WSDL I get  a
  > > possible error of DataHandler use :
  > >
  > > Possible error in class DataHandler: class with no
  > > attributes....................
  > > Possible error in class DataHandler: class with no
  > > attributes....................
  > >
  > > The webservice is in Doc mode, can I use dataHander with this  mode ?
  > > the WSDL2Ws tool create me a DataHandler.cpp and a DataHandler.hpp.
  > > Does this is normal ? I thought DataHandler was a defined type  like an
  > int.
  > >
  > > Could somebody advise me if it's wrong and how to solve this
  > > problem. If it's for you it's correct, is there somebody who  can
  > > tell me how to use datahandler in c++
  > >
  > > Thanks a lot f or your answer.
  > >
  > > Arnault
  > >
  > > T his is my wsdl.
  > >
  > >
  > > xmlns:intf="urn:Message"
  xmlns:apachesoap="http://xml.apache.org/xml-soap
  > > " xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"  xmlns:xsd="
  > > http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.
  > > xmlsoap.org/wsdl/">
  > >
  > >
  > >
  > >
  > > targetNamespace="urn:Message" elementFormDefault="qualified">
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > > Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez  les
  > > tarifs exceptionnels pour appeler la France et l'international.
  > Téléchargez
  > > la version beta.
  > > Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez  les
  > > tarifs exceptionnels pour appeler la France et l'international.
  > Téléchargez
  > > la version beta.
  
  >
  > Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
  > tarifs exceptionnels pour appeler la France et l'international.
  Téléchargez
  > la version beta.
  
    



		
---------------------------------
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.Téléchargez la version beta.

Re: Use of DataHandler in a webservice

Posted by John Hawkins <HA...@uk.ibm.com>.
but you'll need the nightly build you pointed to to pick up the code that 
will work for you :-)





Adrian Dick/UK/IBM@IBMGB 
16/12/2005 13:01
Please respond to
"Apache AXIS C User List"


To
"Apache AXIS C User List" <ax...@ws.apache.org>
cc

Subject
Re: Use of DataHandler in a webservice






Sorry, for not making it clear.  I updated the example code sent by John
below.

Adrian
_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)


Arnault BELLINA <ka...@yahoo.fr> wrote on 16/12/2005 12:57:14:

> Thanks John for your Answer. It will be very usefull !
> Adrian : which code do you update ? The example code or the axis source
code ?
> Do I have to download another time the Axis cpp 1.6 a  on http:
> //cvs.apache.org/dist/axis/nightly ?
>
> Thanks for your answer
>
> Arnault
>
> Adrian Dick <ad...@uk.ibm.com> a écrit :
> The example originally attached won't work with some recent changes, so
> I've updated with the correct code.
>
> Adrian
> _______________________________________
> Adrian Dick (adrian.dick@uk.ibm.com)
>
>
> John Hawkins/UK/IBM@IBMGB wrote on 16/12/2005 10:49:19:
>
> >
> > Hi,
> >
> > OK, so Now that I've woken up !
> >
> > No, we shouldn't be creating the datahandler class (yo u are correct
> > :-) And in the latest build we don't. We have a number of
> > datahandler tests and they appear to be working fine on the latest
> > build. May I suggest you try out the latest build -> http://ws.
> > apache.org/axis/interim.html.
> >
> > And see if you still get the same problem. Don't worry that this is
> > not a full release - we are due to ship the 1.6 release pretty soon
> > (end of month?). I didn't run through the 1.5 code however, it might
> > be possible to just throw out the extra Datahandler class if you can
> > see that the ISoapAttachment class is being used on the service?
> >
> > This is a sample from one of our tests ->
> > (ISoapAttachment is the Datahandler object described in WSDL)
> >
>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

>
> > ISoapAttachment *att=ws.createSoapAttachment();
> >
> > char *text=stringToAscii("This is a
> > test message for attachment");
> >
> > //Adding the content type as text/plain
> >
> att->addHeader(AXIS_CONTENT_TYPE,"text/plain"
> > );
> > xsd__base64Binary b64b1;
> b64b1.set((xsd__unsignedByte*)text,
> strlen(text));
> > att->addBody(&b64b1);
> > //Calling the dataHandlerService,
> > service will return content
> > Result=ws.echoContent(att);
>
> >
>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

>
> >
> >
> > cheers,
> > John.
> >
> >
> >
> >
>
> >
> > Arnault BELLINA
> > 16/12/2005 09:59
> >
> > Please respond to
> > "Apache AXIS C User List"
> >
> > To
> >
> > Apache AXIS C User List
> >
> > cc
> >
> > Subject
> >
> > Re: Use of DataHandler in a webservice
> >
> >
> >
> >
> > I'm using the current axis cpp version (I guess the 1.5)
> > thanks for your help.
> >
> > this is the wsdl :
> >
> >
> >
> > xmlns:intf="urn:Message"
xmlns:apachesoap="http://xml.apache.org/xml-soap
> > " xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
> > http://www.w3.org/2001/XMLSchema"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/
> > ">
> >
> &g t;
> >
> > targetNamespace="urn:Message" elementFormDefault="qualified">
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> location="http://localhost:8080/services/Message"/>
> >
> >
> >
> >
> >
> >
> >
> > John Hawkins a écrit :
> >
> > Hi,
> > please could you send the whole wsdl. Yes creation of the
> > datahandler classes is normal
> >
> > What version of axis cpp are you using ?
> >
> >
>
> >
> > Arnault BELLINA
> > 16/12/2005 09:33
> >
> > Please respond to
> > "Apache AXIS C User List"
> >
> > To
> >
> > axis-c-user@ws.apache.org
> >
> > cc
> >
> > Subject
> >
> > Use of DataHandler in a webservice
> >
> >
>
> >
> >
> >
> >
> >
> > Hello all !
> >
> > I have a WSDL interface from a Web Service (AXIS-based).
> > A web service accepts a file as an attachment and a string and return
an
> int.
> > I got the wsdl from this service (see at the end of the mail).
> >
> > As soon as I try to create the client stub for this WSDL I get a
> > possible error of DataHandler use :
> >
> > Possible error in class DataHandler: class with no
> > attributes....................
> > Possible error in class DataHandler: class with no
> > attributes....................
> >
> > The webservice is in Doc mode, can I use dataHander with this mode ?
> > the WSDL2Ws tool create me a DataHandler.cpp and a DataHandler.hpp.
> > Does this is normal ? I thought DataHandler was a defined type like an
> int.
> >
> > Could somebody advise me if it's wrong and how to solve this
> > problem. If it's for you it's correct, is there somebody who can
> > tell me how to use datahandler in c++
> >
> > Thanks a lot f or your answer.
> >
> > Arnault
> >
> > T his is my wsdl.
> >
> >
> > xmlns:intf="urn:Message"
xmlns:apachesoap="http://xml.apache.org/xml-soap
> > " xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
> > http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.
> > xmlsoap.org/wsdl/">
> >
> >
> >
> >
> > targetNamespace="urn:Message" elementFormDefault="qualified">
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> > tarifs exceptionnels pour appeler la France et l'international.
> Téléchargez
> > la version beta.
> > Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> > tarifs exceptionnels pour appeler la France et l'international.
> Téléchargez
> > la version beta.

>
> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> tarifs exceptionnels pour appeler la France et l'international.
Téléchargez
> la version beta.



Re: Use of DataHandler in a webservice

Posted by Adrian Dick <ad...@uk.ibm.com>.
Sorry, for not making it clear.  I updated the example code sent by John
below.

Adrian
_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)


Arnault BELLINA <ka...@yahoo.fr> wrote on 16/12/2005 12:57:14:

> Thanks John for your Answer. It will be very usefull !
> Adrian : which code do you update ? The example code or the axis source
code ?
> Do I have to download another time the Axis cpp 1.6 a  on http:
> //cvs.apache.org/dist/axis/nightly ?
>
> Thanks for your answer
>
> Arnault
>
> Adrian Dick <ad...@uk.ibm.com> a écrit :
> The example originally attached won't work with some recent changes, so
> I've updated with the correct code.
>
> Adrian
> _______________________________________
> Adrian Dick (adrian.dick@uk.ibm.com)
>
>
> John Hawkins/UK/IBM@IBMGB wrote on 16/12/2005 10:49:19:
>
> >
> > Hi,
> >
> > OK, so Now that I've woken up !
> >
> > No, we shouldn't be creating the datahandler class (yo u are correct
> > :-) And in the latest build we don't. We have a number of
> > datahandler tests and they appear to be working fine on the latest
> > build. May I suggest you try out the latest build -> http://ws.
> > apache.org/axis/interim.html.
> >
> > And see if you still get the same problem. Don't worry that this is
> > not a full release - we are due to ship the 1.6 release pretty soon
> > (end of month?). I didn't run through the 1.5 code however, it might
> > be possible to just throw out the extra Datahandler class if you can
> > see that the ISoapAttachment class is being used on the service?
> >
> > This is a sample from one of our tests ->
> > (ISoapAttachment is the Datahandler object described in WSDL)
> >
>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

>
> > ISoapAttachment *att=ws.createSoapAttachment();
> >
> > char *text=stringToAscii("This is a
> > test message for attachment");
> >
> > //Adding the content type as text/plain
> >
> att->addHeader(AXIS_CONTENT_TYPE,"text/plain"
> > );
> > xsd__base64Binary b64b1;
> b64b1.set((xsd__unsignedByte*)text,
> strlen(text));
> > att->addBody(&b64b1);
> > //Calling the dataHandlerService,
> > service will return content
> > Result=ws.echoContent(att);
>
> >
>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

>
> >
> >
> > cheers,
> > John.
> >
> >
> >
> >
>
> >
> > Arnault BELLINA
> > 16/12/2005 09:59
> >
> > Please respond to
> > "Apache AXIS C User List"
> >
> > To
> >
> > Apache AXIS C User List
> >
> > cc
> >
> > Subject
> >
> > Re: Use of DataHandler in a webservice
> >
> >
> >
> >
> > I'm using the current axis cpp version (I guess the 1.5)
> > thanks for your help.
> >
> > this is the wsdl :
> >
> >
> >
> > xmlns:intf="urn:Message"
xmlns:apachesoap="http://xml.apache.org/xml-soap
> > " xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
> > http://www.w3.org/2001/XMLSchema"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/
> > ">
> >
> &g t;
> >
> > targetNamespace="urn:Message" elementFormDefault="qualified">
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> location="http://localhost:8080/services/Message"/>
> >
> >
> >
> >
> >
> >
> >
> > John Hawkins a écrit :
> >
> > Hi,
> > please could you send the whole wsdl. Yes creation of the
> > datahandler classes is normal
> >
> > What version of axis cpp are you using ?
> >
> >
>
> >
> > Arnault BELLINA
> > 16/12/2005 09:33
> >
> > Please respond to
> > "Apache AXIS C User List"
> >
> > To
> >
> > axis-c-user@ws.apache.org
> >
> > cc
> >
> > Subject
> >
> > Use of DataHandler in a webservice
> >
> >
>
> >
> >
> >
> >
> >
> > Hello all !
> >
> > I have a WSDL interface from a Web Service (AXIS-based).
> > A web service accepts a file as an attachment and a string and return
an
> int.
> > I got the wsdl from this service (see at the end of the mail).
> >
> > As soon as I try to create the client stub for this WSDL I get a
> > possible error of DataHandler use :
> >
> > Possible error in class DataHandler: class with no
> > attributes....................
> > Possible error in class DataHandler: class with no
> > attributes....................
> >
> > The webservice is in Doc mode, can I use dataHander with this mode ?
> > the WSDL2Ws tool create me a DataHandler.cpp and a DataHandler.hpp.
> > Does this is normal ? I thought DataHandler was a defined type like an
> int.
> >
> > Could somebody advise me if it's wrong and how to solve this
> > problem. If it's for you it's correct, is there somebody who can
> > tell me how to use datahandler in c++
> >
> > Thanks a lot f or your answer.
> >
> > Arnault
> >
> > T his is my wsdl.
> >
> >
> > xmlns:intf="urn:Message"
xmlns:apachesoap="http://xml.apache.org/xml-soap
> > " xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
> > http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.
> > xmlsoap.org/wsdl/">
> >
> >
> >
> >
> > targetNamespace="urn:Message" elementFormDefault="qualified">
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> > tarifs exceptionnels pour appeler la France et l'international.
> Téléchargez
> > la version beta.
> > Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> > tarifs exceptionnels pour appeler la France et l'international.
> Téléchargez
> > la version beta.

>
> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> tarifs exceptionnels pour appeler la France et l'international.
Téléchargez
> la version beta.


Re: Use of DataHandler in a webservice

Posted by Arnault BELLINA <ka...@yahoo.fr>.
Thanks John for your Answer. It will be very usefull ! 
  Adrian : which code do you update ? The example code or the axis source code ?
  Do I have to download another time the Axis cpp 1.6 a  on http://cvs.apache.org/dist/axis/nightly ?
  
  Thanks for your answer
  
  Arnault 

Adrian Dick <ad...@uk.ibm.com> a écrit :  The example originally attached won't work with some recent changes, so
I've updated with the correct code.

Adrian
_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)


John Hawkins/UK/IBM@IBMGB wrote on 16/12/2005 10:49:19:

>
> Hi,
>
> OK, so Now that  I've woken up !
>
> No, we shouldn't be creating the datahandler class (you are correct
> :-) And in the latest build we don't. We have a number of
> datahandler tests and they appear to be working fine on the latest
> build. May I suggest you try out the latest build -> http://ws.
> apache.org/axis/interim.html.
>
> And see if you still get the same problem. Don't worry that this is
> not a full release - we are due to ship the 1.6 release pretty soon
> (end of month?). I didn't run through the 1.5 code however, it might
> be possible to just throw out the extra Datahandler class if you can
> see that the ISoapAttachment class is being used on the service?
>
> This is a sample from one of our tests ->
> (ISoapAttachment is  the Datahandler object described in WSDL)
>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

> ISoapAttachment *att=ws.createSoapAttachment();
>
>                                 char *text=stringToAscii("This is a
> test message for attachment");
>
>                                 //Adding the content type as text/plain
>
att->addHeader(AXIS_CONTENT_TYPE,"text/plain"
> );
>                                 xsd__base64Binary b64b1;
                                  b64b1.set((xsd__unsignedByte*)text,
strlen(text));
>                                 att->addBody(&b64b1);
>                                 //Calling the dataHandlerService,
> service will return content
>                                 Result=ws.echoContent(att);

>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

>
>
> cheers,
> John.
>
>
>
>

>
> Arnault BELLINA 
> 16/12/2005 09:59
>
> Please respond to
> "Apache AXIS C User List"
>
> To
>
> Apache AXIS C User List 
>
> cc
>
> Subject
>
> Re: Use of DataHandler in a webservice
>
>
>
>
> I'm using the current axis cpp version (I guess the 1.5)
> thanks for your help.
>
> this is the wsdl  :
>
> 
> 
> xmlns:intf="urn:Message" xmlns:apachesoap="http://xml.apache.org/xml-soap
> " xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/
> ">
>
> 
>  
> targetNamespace="urn:Message" elementFormDefault="qualified">
>   
>   
>    
>     
>      
>      
>     
>    
>   
>   
>    
>     
>      
>     
>    
>   
>  
> 
>
>   
>      
>   
>
>   
>     
>   
>
>   
>      
>         
>         
>      
>   
>
>
>
>   
>      
>      
>         
>         
>            
>         
>         
>            
>         
>      
>   
>
>
>   
>      
>         
location="http://localhost:8080/services/Message"/>
>      
>   
>
> 
>
>
>
> John Hawkins  a écrit :
>
> Hi,
> please could you send the whole wsdl. Yes creation of the
> datahandler classes is normal
>
> What version of axis cpp are you using ?
>
>

>
> Arnault BELLINA 
> 16/12/2005 09:33
>
> Please respond to
> "Apache AXIS C User List"
>
> To
>
> axis-c-user@ws.apache.org
>
> cc
>
> Subject
>
> Use of DataHandler in a webservice
>
>

>
>
>
>
>
> Hello all !
>
> I have a WSDL interface from a Web Service (AXIS-based).
> A web service accepts a file as an attachment and a string and return an
int.
> I got the wsdl from this service (see at the end of the mail).
>
> As soon as I try to create the client stub for this WSDL I get a
> possible error of DataHandler use :
>
> Possible error in class DataHandler: class with no
> attributes....................
> Possible error in class DataHandler: class with no
> attributes....................
>
> The webservice is in Doc mode, can I use dataHander with this mode ?
> the WSDL2Ws tool create me a DataHandler.cpp and a DataHandler.hpp.
> Does this is normal ? I thought DataHandler was a defined type like an
int.
>
> Could somebody advise me if it's wrong and how to solve this
> problem. If it's for you it's correct, is there somebody who can
> tell me how to use  datahandler in c++
>
> Thanks a lot f or your answer.
>
> Arnault
>
> T his is my wsdl.
>
> 
> xmlns:intf="urn:Message" xmlns:apachesoap="http://xml.apache.org/xml-soap
> " xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema"  xmlns:wsdl="http://schemas.
> xmlsoap.org/wsdl/">
>
>
> 
> 
> targetNamespace="urn:Message" elementFormDefault="qualified">
>  
>  
>   
>    
>     
>     
>    
>   
>
> 
>   
>    
>     
>    
>   
>  
> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> tarifs exceptionnels pour appeler la France et l'international.
Téléchargez
> la version beta.
> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> tarifs exceptionnels pour appeler la France et l'international.
Téléchargez
> la version beta.




		
---------------------------------
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.Téléchargez la version beta.

Re: Use of DataHandler in a webservice

Posted by Adrian Dick <ad...@uk.ibm.com>.
The example originally attached won't work with some recent changes, so
I've updated with the correct code.

Adrian
_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)


John Hawkins/UK/IBM@IBMGB wrote on 16/12/2005 10:49:19:

>
> Hi,
>
> OK, so Now that  I've woken up !
>
> No, we shouldn't be creating the datahandler class (you are correct
> :-) And in the latest build we don't. We have a number of
> datahandler tests and they appear to be working fine on the latest
> build. May I suggest you try out the latest build -> http://ws.
> apache.org/axis/interim.html.
>
> And see if you still get the same problem. Don't worry that this is
> not a full release - we are due to ship the 1.6 release pretty soon
> (end of month?). I didn't run through the 1.5 code however, it might
> be possible to just throw out the extra Datahandler class if you can
> see that the ISoapAttachment class is being used on the service?
>
> This is a sample from one of our tests ->
> (ISoapAttachment is  the Datahandler object described in WSDL)
>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

> ISoapAttachment *att=ws.createSoapAttachment();
>
>                                 char *text=stringToAscii("This is a
> test message for attachment");
>
>                                 //Adding the content type as text/plain
>
att->addHeader(AXIS_CONTENT_TYPE,"text/plain"
> );
>                                 xsd__base64Binary b64b1;
                                  b64b1.set((xsd__unsignedByte*)text,
strlen(text));
>                                 att->addBody(&b64b1);
>                                 //Calling the dataHandlerService,
> service will return content
>                                 Result=ws.echoContent(att);

>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

>
>
> cheers,
> John.
>
>
>
>

>
> Arnault BELLINA <ka...@yahoo.fr>
> 16/12/2005 09:59
>
> Please respond to
> "Apache AXIS C User List"
>
> To
>
> Apache AXIS C User List <ax...@ws.apache.org>
>
> cc
>
> Subject
>
> Re: Use of DataHandler in a webservice
>
>
>
>
> I'm using the current axis cpp version (I guess the 1.5)
> thanks for your help.
>
> this is the wsdl  :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="urn:Message" xmlns:tns3="http:
> //schemas.xmlsoap.org/soap/encoding/" xmlns:impl="urn:Message"
> xmlns:intf="urn:Message" xmlns:apachesoap="http://xml.apache.org/xml-soap
> " xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/
> ">
>
> <wsdl:types>
>  <schema xmlns="http://www.w3.org/2001/XMLSchema"
> targetNamespace="urn:Message" elementFormDefault="qualified">
>   <import namespace="http://xml.apache.org/xml-soap"/>
>   <element name="pushNewMessage">
>    <complexType>
>     <sequence>
>      <element name="in0" type="xsd:string"/>
>      <element name="in3" type="apachesoap:DataHandler"/>
>     </sequence>
>    </complexType>
>   </element>
>   <element name="pushNewMessageResponse">
>    <complexType>
>     <sequence>
>      <element name="pushNewMessageReturn" type="xsd:int"/>
>     </sequence>
>    </complexType>
>   </element>
>  </schema>
> </wsdl:types>
>
>   <wsdl:message name="pushNewMessageRequest">
>      <wsdl:part name="parameters" element="impl:pushNewMessage"/>
>   </wsdl:message>
>
>   <wsdl:message name="pushNewMessageResponse">
>     <wsdl:part name="parameters" element="impl:pushNewMessageResponse"/>
>   </wsdl:message>
>
>   <wsdl:portType name="Message">
>      <wsdl:operation name="pushNewMessage">
>         <wsdl:input name="pushNewMessageRequest" message="impl:
> pushNewMessageRequest"/>
>         <wsdl:output name="pushNewMessageResponse" message="impl:
> pushNewMessageResponse"/>
>      </wsdl:operation>
>   </wsdl:portType>
>
>
>
>   <wsdl:binding name="MessageSoapBinding" type="impl:Message">
>      <wsdlsoap:binding style="document" transport="http://schemas.
> xmlsoap.org/soap/http"/>
>      <wsdl:operat ion name="pushNewMessage">
>         <wsdlsoap:operation soapAction=""/>
>         <wsdl:input name="pushNewMessageRequest">
>            <wsdlsoap:body use="literal"/>
>         </wsdl:input>
>         <wsdl:output name="pushNewMessageResponse">
>            <wsdlsoap:body use="literal"/>
>         </wsdl:output>
>      </wsdl:operation>
>   </wsdl:binding>
>
>
>   <wsdl:service name="MessageService">
>      <wsdl:port name="Message" binding="impl:MessageSoapBinding">
>         <wsdlsoap:address
location="http://localhost:8080/services/Message"/>
>      </wsdl:port>
>   </wsdl:service>
>
> </wsdl:definitions>
>
>
>
> John Hawkins <HA...@uk.ibm.com> a écrit :
>
> Hi,
> please could you send the whole wsdl. Yes creation of the
> datahandler classes is normal
>
> What version of axis cpp are you using ?
>
>

>
> Arnault BELLINA <ka...@yahoo.fr>
> 16/12/2005 09:33
>
> Please respond to
> "Apache AXIS C User List"
>
> To
>
> axis-c-user@ws.apache.org
>
> cc
>
> Subject
>
> Use of DataHandler in a webservice
>
>

>
>
>
>
>
> Hello all !
>
> I have a WSDL interface from a Web Service (AXIS-based).
> A web service accepts a file as an attachment and a string and return an
int.
> I got the wsdl from this service (see at the end of the mail).
>
> As soon as I try to create the client stub for this WSDL I get a
> possible error of DataHandler use :
>
> Possible error in class DataHandler: class with no
> attributes....................
> Possible error in class DataHandler: class with no
> attributes....................
>
> The webservice is in Doc mode, can I use dataHander with this mode ?
> the WSDL2Ws tool create me a DataHandler.cpp and a DataHandler.hpp.
> Does this is normal ? I thought DataHandler was a defined type like an
int.
>
> Could somebody advise me if it's wrong and how to solve this
> problem. If it's for you it's correct, is there somebody who can
> tell me how to use  datahandler in c++
>
> Thanks a lot f or your answer.
>
> Arnault
>
> T his is my wsdl.
>
> <wsdl:definitions targetNamespace="urn:Message" xmlns:tns3="http:
> //schemas.xmlsoap.org/soap/encoding/" xmlns:impl="urn:Message"
> xmlns:intf="urn:Message" xmlns:apachesoap="http://xml.apache.org/xml-soap
> " xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema"  xmlns:wsdl="http://schemas.
> xmlsoap.org/wsdl/">
>
>
> <wsdl:types>
> <schema xmlns="http://www.w3.org/2001/XMLSchema"
> targetNamespace="urn:Message" elementFormDefault="qualified">
>  <import namespace="http://xml.apache.org/xml-soap"/>
>  <element name="pushNewMessage">
>   <complexType>
>    <sequence>
>     <element name="in0" type="xsd:string"/>
>     <element name="in3" type="apachesoap:DataHandler"/>
>    </sequence>
>   </complexType>
>
> <element name="pushNewMessageResponse">
>   <complexType>
>    <sequence>
>     <element name="pushNewMessageReturn" type="xsd:int"/>
>    </sequence>
>   </complexType>
>  </element>
> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> tarifs exceptionnels pour appeler la France et l'international.
Téléchargez
> la version beta.
> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> tarifs exceptionnels pour appeler la France et l'international.
Téléchargez
> la version beta.


Re: Use of DataHandler in a webservice

Posted by John Hawkins <HA...@uk.ibm.com>.
Hi,

OK, so Now that  I've woken up !

No, we shouldn't be creating the datahandler class (you are correct :-) 
And in the latest build we don't. We have a number of  datahandler tests 
and they appear to be working fine on the latest build. May I suggest you 
try out the latest build -> http://ws.apache.org/axis/interim.html. 

And see if you still get the same problem. Don't worry that this is not a 
full release - we are due to ship the 1.6 release pretty soon (end of 
month?). I didn't run through the 1.5 code however, it might be possible 
to just throw out the extra Datahandler class if you can see that the 
ISoapAttachment class is being used on the service?

This is a sample from one of our tests ->
(ISoapAttachment is  the Datahandler object described in WSDL)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ISoapAttachment *att=ws.createSoapAttachment(); 
 
                                char *text=stringToAscii("This is a test 
message for attachment");

                                //Adding the content type as text/plain
                                att->addHeader(AXIS_CONTENT_TYPE,
"text/plain");
                                xsd__base64Binary b64b1;
                                b64b1.__ptr = (xsd__unsignedByte*)text;
                                b64b1.__size = strlen(text);  
                                att->addBody(&b64b1);
                                //Calling the dataHandlerService, service 
will return content 
                                Result=ws.echoContent(att);  
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


cheers,
John.






Arnault BELLINA <ka...@yahoo.fr> 
16/12/2005 09:59
Please respond to
"Apache AXIS C User List"


To
Apache AXIS C User List <ax...@ws.apache.org>
cc

Subject
Re: Use of DataHandler in a webservice






I'm using the current axis cpp version (I guess the 1.5)
thanks for your help.

this is the wsdl  : 

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:Message" xmlns:tns3="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:impl="urn:Message" 
xmlns:intf="urn:Message" xmlns:apachesoap="http://xml.apache.org/xml-soap" 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">

 <wsdl:types>
  <schema xmlns="http://www.w3.org/2001/XMLSchema" 
targetNamespace="urn:Message" elementFormDefault="qualified">
   <import namespace="http://xml.apache.org/xml-soap"/>
   <element name="pushNewMessage">
    <complexType>
     <sequence>
      <element name="in0" type="xsd:string"/>
      <element name="in3" type="apachesoap:DataHandler"/>
     </sequence>
    </complexType>
   </element>
   <element name="pushNewMessageResponse">
    <complexType>
     <sequence>
      <element name="pushNewMessageReturn" type="xsd:int"/>
     </sequence>
    </complexType>
   </element>
  </schema>
 </wsdl:types>

   <wsdl:message name="pushNewMessageRequest">
      <wsdl:part name="parameters" element="impl:pushNewMessage"/>
   </wsdl:message>

   <wsdl:message name="pushNewMessageResponse">
     <wsdl:part name="parameters" element="impl:pushNewMessageResponse"/>
   </wsdl:message>

   <wsdl:portType name="Message">
      <wsdl:operation name="pushNewMessage">
         <wsdl:input name="pushNewMessageRequest" 
message="impl:pushNewMessageRequest"/>
         <wsdl:output name="pushNewMessageResponse" 
message="impl:pushNewMessageResponse"/>
      </wsdl:operation>
   </wsdl:portType>



   <wsdl:binding name="MessageSoapBinding" type="impl:Message">
      <wsdlsoap:binding style="document" transport="
http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operat ion name="pushNewMessage">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="pushNewMessageRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="pushNewMessageResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
 

   <wsdl:service name="MessageService">
      <wsdl:port name="Message" binding="impl:MessageSoapBinding">
         <wsdlsoap:address location="
http://localhost:8080/services/Message"/>
      </wsdl:port>
   </wsdl:service>

</wsdl:definitions>



John Hawkins <HA...@uk.ibm.com> a écrit :

Hi, 
please could you send the whole wsdl. Yes creation of the datahandler 
classes is normal 

What version of axis cpp are you using ? 




Arnault BELLINA <ka...@yahoo.fr> 
16/12/2005 09:33 

Please respond to
"Apache AXIS C User List"


To
axis-c-user@ws.apache.org 
cc

Subject
Use of DataHandler in a webservice








Hello all !

I have a WSDL interface from a Web Service (AXIS-based).
A web service accepts a file as an attachment and a string and return an 
int.
I got the wsdl from this service (see at the end of the mail).

As soon as I try to create the client stub for this WSDL I get a possible 
error of DataHandler use : 

Possible error in class DataHandler: class with no 
attributes....................
Possible error in class DataHandler: class with no 
attributes....................

The webservice is in Doc mode, can I use dataHander with this mode ?
the WSDL2Ws tool create me a DataHandler.cpp and a DataHandler.hpp.
Does this is normal ? I thought DataHandler was a defined type like an 
int.

Could somebody advise me if it's wrong and how to solve this
problem. If it's for you it's correct, is there somebody who can tell me 
how to use  datahandler in c++

Thanks a lot f or your answer.

Arnault

T his is my wsdl. 

<wsdl:definitions targetNamespace="urn:Message" xmlns:tns3="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:impl="urn:Message" 
xmlns:intf="urn:Message" xmlns:apachesoap="http://xml.apache.org/xml-soap" 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema"  xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">


<wsdl:types>
 <schema xmlns="http://www.w3.org/2001/XMLSchema" 
targetNamespace="urn:Message" elementFormDefault="qualified">
  <import namespace="http://xml.apache.org/xml-soap"/>
  <element name="pushNewMessage">
   <complexType>
    <sequence>
     <element name="in0" type="xsd:string"/>
     <element name="in3" type="apachesoap:DataHandler"/>
    </sequence>
   </complexType>

<element name="pushNewMessageResponse">
   <complexType>
    <sequence>
     <element name="pushNewMessageReturn" type="xsd:int"/>
    </sequence>
   </complexType>
  </element> 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les 
tarifs exceptionnels pour appeler la France et l'international. 
Téléchargez la version beta. 

Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les 
tarifs exceptionnels pour appeler la France et l'international. 
Téléchargez la version beta.

Re: Use of DataHandler in a webservice

Posted by Arnault BELLINA <ka...@yahoo.fr>.
I'm using the current axis cpp version (I guess the 1.5)
  thanks for your help.
  
  this is the wsdl  : 
  
  <?xml version="1.0" encoding="UTF-8"?>
  <wsdl:definitions targetNamespace="urn:Message"  xmlns:tns3="http://schemas.xmlsoap.org/soap/encoding/"  xmlns:impl="urn:Message" xmlns:intf="urn:Message"  xmlns:apachesoap="http://xml.apache.org/xml-soap"  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"  xmlns:xsd="http://www.w3.org/2001/XMLSchema"  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  
   <wsdl:types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Message" elementFormDefault="qualified">
     <import namespace="http://xml.apache.org/xml-soap"/>
     <element name="pushNewMessage">
      <complexType>
       <sequence>
        <element name="in0" type="xsd:string"/>
        <element name="in3" type="apachesoap:DataHandler"/>
       </sequence>
      </complexType>
     </element>
     <element name="pushNewMessageResponse">
      <complexType>
       <sequence>
        <element name="pushNewMessageReturn" type="xsd:int"/>
       </sequence>
      </complexType>
     </element>
    </schema>
   </wsdl:types>
  
     <wsdl:message name="pushNewMessageRequest">
        <wsdl:part name="parameters" element="impl:pushNewMessage"/>
     </wsdl:message>
  
     <wsdl:message name="pushNewMessageResponse">
       <wsdl:part name="parameters" element="impl:pushNewMessageResponse"/>
     </wsdl:message>
  
     <wsdl:portType name="Message">
        <wsdl:operation name="pushNewMessage">
           <wsdl:input  name="pushNewMessageRequest" message="impl:pushNewMessageRequest"/>
           <wsdl:output  name="pushNewMessageResponse" message="impl:pushNewMessageResponse"/>
        </wsdl:operation>
     </wsdl:portType>
  
  
  
     <wsdl:binding name="MessageSoapBinding" type="impl:Message">
        <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="pushNewMessage">
           <wsdlsoap:operation soapAction=""/>
           <wsdl:input name="pushNewMessageRequest">
              <wsdlsoap:body use="literal"/>
           </wsdl:input>
           <wsdl:output name="pushNewMessageResponse">
              <wsdlsoap:body use="literal"/>
           </wsdl:output>
        </wsdl:operation>
     </wsdl:binding>
     
  
     <wsdl:service name="MessageService">
        <wsdl:port name="Message" binding="impl:MessageSoapBinding">
           <wsdlsoap:address location="http://localhost:8080/services/Message"/>
        </wsdl:port>
     </wsdl:service>
  
  </wsdl:definitions>
  
  

John Hawkins <HA...@uk.ibm.com> a écrit :    
Hi,   
please could you send the whole wsdl.  Yes creation of the datahandler classes is normal  
  
What version of axis cpp are you using  ?  
  
  
  
  
      Arnault BELLINA <ka...@yahoo.fr>    16/12/2005 09:33        Please respond to
  "Apache AXIS C User List"
  
  
        To
  axis-c-user@ws.apache.org      cc
                  
      Subject
  Use of DataHandler in a webservice  
                      
  
    
  
  
  
Hello all !
  
  I have a WSDL interface from a Web Service (AXIS-based).
  A web service accepts a file as an attachment and a string and return an  int.
  I got the wsdl from this service (see at the end of the mail).
  
  As soon as I try to create the client stub for this WSDL I get a possible  error of DataHandler use : 
  
  Possible error in class DataHandler: class with no attributes....................
  Possible error in class DataHandler: class with no attributes....................
  
  The webservice is in Doc mode, can I use dataHander with this mode ?
  the WSDL2Ws tool create me a DataHandler.cpp and a DataHandler.hpp.
  Does this is normal ? I thought DataHandler was a defined type like an  int.
  
  Could somebody advise me if it's wrong and how to solve this
  problem. If it's for you it's correct, is there somebody who can tell me  how to use  datahandler in c++
  
  Thanks a lot f or your answer.
  
  Arnault
  
  This is my wsdl. 
  
  <wsdl:definitions targetNamespace="urn:Message" xmlns:tns3="http://schemas.xmlsoap.org/soap/encoding/"  xmlns:impl="urn:Message" xmlns:intf="urn:Message" xmlns:apachesoap="http://xml.apache.org/xml-soap"  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  
  
   <wsdl:types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Message"  elementFormDefault="qualified">
     <import namespace="http://xml.apache.org/xml-soap"/>
     <element name="pushNewMessage">
      <complexType>
       <sequence>
        <element name="in0" type="xsd:string"/>
        <element name="in3" type="apachesoap:DataHandler"/>
       </sequence>
      </complexType>
  
  <element name="pushNewMessageResponse">
      <complexType>
       <sequence>
        <element name="pushNewMessageReturn"  type="xsd:int"/>
       </sequence>
      </complexType>
     </element>    

---------------------------------
Nouveau : téléphonez moins cher avec Yahoo! Messenger  ! Découvez les tarifs exceptionnels pour appeler la France et l'international.  Téléchargez  la version beta.  



		
---------------------------------
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.Téléchargez la version beta.

Re: Use of DataHandler in a webservice

Posted by John Hawkins <HA...@uk.ibm.com>.
Hi, 
please could you send the whole wsdl. Yes creation of the datahandler 
classes is normal

What version of axis cpp are you using ?





Arnault BELLINA <ka...@yahoo.fr> 
16/12/2005 09:33
Please respond to
"Apache AXIS C User List"


To
axis-c-user@ws.apache.org
cc

Subject
Use of DataHandler in a webservice






Hello all !

I have a WSDL interface from a Web Service (AXIS-based).
A web service accepts a file as an attachment and a string and return an 
int.
I got the wsdl from this service (see at the end of the mail).

As soon as I try to create the client stub for this WSDL I get a possible 
error of DataHandler use : 

Possible error in class DataHandler: class with no 
attributes....................
Possible error in class DataHandler: class with no 
attributes....................

The webservice is in Doc mode, can I use dataHander with this mode ?
the WSDL2Ws tool create me a DataHandler.cpp and a DataHandler.hpp.
Does this is normal ? I thought DataHandler was a defined type like an 
int.

Could somebody advise me if it's wrong and how to solve this
problem. If it's for you it's correct, is there somebody who can tell me 
how to use  datahandler in c++

Thanks a lot f or your answer.

Arnault

This is my wsdl. 

<wsdl:definitions targetNamespace="urn:Message" xmlns:tns3="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:impl="urn:Message" 
xmlns:intf="urn:Message" xmlns:apachesoap="http://xml.apache.org/xml-soap" 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema"  xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">


 <wsdl:types>
  <schema xmlns="http://www.w3.org/2001/XMLSchema" 
targetNamespace="urn:Message" elementFormDefault="qualified">
   <import namespace="http://xml.apache.org/xml-soap"/>
   <element name="pushNewMessage">
    <complexType>
     <sequence>
      <element name="in0" type="xsd:string"/>
      <element name="in3" type="apachesoap:DataHandler"/>
     </sequence>
    </complexType>

<element name="pushNewMessageResponse">
    <complexType>
     <sequence>
      <element name="pushNewMessageReturn" type="xsd:int"/>
     </sequence>
    </complexType>
   </element>
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les 
tarifs exceptionnels pour appeler la France et l'international. 
Téléchargez la version beta.