axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Franz Fehringer" <...@isogmbh.de>
Subject AW: AW: Bad C++ generated by WSDL2Ws
Date Tue, 06 Dec 2005 14:54:09 GMT
Thanks, this will be of real help for my current project!

Franz
  -----Urspr√ľngliche Nachricht-----
  Von: John Hawkins [mailto:HAWKINSJ@uk.ibm.com]
  Gesendet: Dienstag, 6. Dezember 2005 15:18
  An: Apache AXIS C Developers List
  Betreff: Re: AW: Bad C++ generated by WSDL2Ws



  hi,
  I've just resolved  631 as I believe it is fixed.
  And yes, 753 is due to be fixed in 1.6 I've just tried it and it still has
issues.





        "Franz Fehringer" <feh@isogmbh.de>
        06/12/2005 12:05 Please respond to
              "Apache AXIS C Developers List"


       To John Hawkins/UK/IBM@IBMGB, "Apache AXIS C Developers List"
<axis-c-dev@ws.apache.org>
              cc <cdinapala@Virtusa.com>
              Subject AW: Bad C++ generated by WSDL2Ws







  Hello John,

  Is there hope, that AXISCPP-631 and/or AXISCPP-753 will be solved in 1.6?

  Greetings

  Franz
  -----Urspr√ľngliche Nachricht-----
  Von: John Hawkins [mailto:HAWKINSJ@uk.ibm.com]
  Gesendet: Dienstag, 6. Dezember 2005 12:49
  An: Apache AXIS C Developers List
  Betreff: Re: Bad C++ generated by WSDL2Ws


  Hello Emanuel,
  Well, I'm amazed that you're still using 1.2 - How come? I would suggest
you upgrade to 1.5 and preferably 1.6 which is due out in the next week or
so. If you still see the same problem then I suggest you raise a JIRA and
attach the wsdl and http request and response. Is there any problem with
doing this?

  thanks,John.



        "Emanuel Norrbin" <Emanuel.Norrbin@edgewaystech.com>
        05/12/2005 22:04
              Please respond to
              "Apache AXIS C Developers List"



              To <axis-c-dev@ws.apache.org>
              cc
              Subject Bad C++ generated by WSDL2Ws









  Hi,

  I am generating C++ server stubs using Axis C++ 1.2, using the java class
  org.apache.axis.wsdl.wsdl2ws.WSDL2Ws. If a web service operation has a
  vector argument (e.g. vector of string or vector of ints) the generated
code
  is not correct. The generated code seems to be accepted by many compilers
  but gcc 4, correctoy, gives a compilation error (gcc 3 does not complain).

  To give an example, the code is from the *Wrapper.cpp file:

  int ActivityInfoProviderWrapper::deleteSourceFileHistory(void* pMsg)
  {
    IMessageData* mc = (IMessageData*)pMsg;
    int nStatus;
    IWrapperSoapSerializer* pIWSSZ = NULL;
    mc->getSoapSerializer(&pIWSSZ);
    if (!pIWSSZ) return AXIS_FAIL;
    IWrapperSoapDeSerializer* pIWSDZ = NULL;
    mc->getSoapDeSerializer(&pIWSDZ);
    if (!pIWSDZ) return AXIS_FAIL;
    /* check whether we have got correct message */
    if (AXIS_SUCCESS != pIWSDZ->checkMessageBody("deleteSourceFileHistory",

"urn:com.edgeways.integration.server.implementation.webservice.activity.Acti
vityInfoProvider")return
  AXIS_FAIL;

    pIWSSZ->createSoapMethod("deleteSourceFileHistoryResponse", \

"urn:com.edgeways.integration.server.implementation.webservice.activity.Acti
vityInfoProvider");

    xsd__string v0 = pIWSDZ->getElementAsString("user",0);
    xsd__string v1 = pIWSDZ->getElementAsString("passwrd",0);

    // This is the original code
    // xsd__long_Array v2 =
  (xsd__long_Array&)pIWSDZ->getBasicArray(XSD_LONG, "entryIDs",0);

    // This would work:
    const Axis_Array& v2ref= pIWSDZ->getBasicArray(XSD_LONG, "entryIDs",0);
    const xsd__long_Array& v2 = reinterpret_cast<const
  xsd__long_Array&>(v2ref);
    //

  (...)

  The line assigning to v2 does not compile on gcc 4, failing with the
  following error message:

  In member function
  int ActivityInfoProviderWrapper::deleteSourceFileHistory(void*):
  ./../ActivityInfoProviderWrapper.cpp:352: error:.
  invalid cast of an rvalue expression of type axiscpp::Axis_Array
  to type axiscpp::xsd__long_Array

  which is correct since what is assigned to the lhs is a reference to a
  temporary variable.
  My suggestion is to replace it with something like this:

    const Axis_Array& v2ref= pIWSDZ->getBasicArray(XSD_LONG, "entryIDs",0);
    const xsd__long_Array& v2 = reinterpret_cast<const
  xsd__long_Array&>(v2ref);

  which will work since the temporary is bound to the const reference v2ref.

  I have not seen this issue resolved in Jira or mentioned on this list.
  Should I submit it to Jira or is someone already aware of this?

  /Emanuel Norrbin
  emanuel.norrbin@edgewaystech.com



Mime
View raw message