[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WSDL2RPG - RC4 available with workaround for Axis bug AXIS-2095



   Thomas,

   I tried wsdl2java and hope that you can get this to work with
   WSDL2RPG.

   I also look forward to the WSDL2RPG and attachments implementation. As
   far as I've seen, the attachments are like mail attachments (mime
   types). Perhaps Scott has some ideas on how to implement attachments
   in WSDL2RPG?

   Here is the wsdl2java cmd I used:

   C:\Programfiler\IBM\SDP70A\runtimes\base_v61\profiles\AppSrv01\bin>wsd
   l2java -ro
   le client -o c:\wsdl2rpg\cm
   [1]http://80.203.170.170/marianne/CMBGenericWebService.
   wsdl

   Here is some java code implementation of 'ArrayOf_tns2_swaRef'. Hope
   this is helpfull info for you.

   private void initTypeMapping() {
           javax.xml.rpc.encoding.TypeMapping tm =
   super.getTypeMapping(com.ibm.ws.webservices.engine.Constants.URI_LITER
   AL_ENC);
           java.lang.Class javaType = null;
           javax.xml.namespace.QName xmlType = null;
           javax.xml.namespace.QName compQName = null;
           javax.xml.namespace.QName compTypeQName = null;
           com.ibm.ws.webservices.engine.encoding.SerializerFactory sf =
   null;
           com.ibm.ws.webservices.engine.encoding.DeserializerFactory df
   = null;
           javaType = com.ibm.mm.webservices.was60.CMBXMLResponse.class;
           xmlType =
   com.ibm.ws.webservices.engine.utils.QNameTable.createQName("[2]http://
   was60.webservices.mm.ibm.com", "CMBXMLResponse");
           sf =
   com.ibm.ws.webservices.engine.encoding.ser.BaseSerializerFactory.creat
   eFactory(com.ibm.ws.webservices.engine.encoding.ser.BeanSerializerFact
   ory.class, javaType, xmlType);
           df =
   com.ibm.ws.webservices.engine.encoding.ser.BaseDeserializerFactory.cre
   ateFactory(com.ibm.ws.webservices.engine.encoding.ser.BeanDeserializer
   Factory.class, javaType, xmlType);
           if (sf != null || df != null) {
               tm.register(javaType, xmlType, sf, df);
           }

           javaType = javax.activation.DataHandler[].class;
           xmlType =
   com.ibm.ws.webservices.engine.utils.QNameTable.createQName("[3]http://
   was60.webservices.mm.ibm.com", "ArrayOf_tns2_swaRef");
           compQName =
   com.ibm.ws.webservices.engine.utils.QNameTable.createQName("",
   "swaRef");
           compTypeQName =
   com.ibm.ws.webservices.engine.utils.QNameTable.createQName("[4]http://
   ws-i.org/profiles/basic/1.1/xsd", "swaRef");
           sf =
   com.ibm.ws.webservices.engine.encoding.ser.BaseSerializerFactory.creat
   eFactory(com.ibm.ws.webservices.engine.encoding.ser.ArraySerializerFac
   tory.class, javaType, xmlType, compQName, compTypeQName);
           df =
   com.ibm.ws.webservices.engine.encoding.ser.BaseDeserializerFactory.cre
   ateFactory(com.ibm.ws.webservices.engine.encoding.ser.ArrayDeserialize
   rFactory.class, javaType, xmlType, compQName, compTypeQName);
           if (sf != null || df != null) {
               tm.register(javaType, xmlType, sf, df);
           }

           javaType = java.lang.String[].class;
           xmlType =
   com.ibm.ws.webservices.engine.utils.QNameTable.createQName("[5]http://
   was60.webservices.mm.ibm.com", "ArrayOf_xsd_string");
           compQName =
   com.ibm.ws.webservices.engine.utils.QNameTable.createQName("",
   "string");
           compTypeQName =
   com.ibm.ws.webservices.engine.utils.QNameTable.createQName("[6]http://
   www.w3.org/2001/XMLSchema", "string");
           sf =
   com.ibm.ws.webservices.engine.encoding.ser.BaseSerializerFactory.creat
   eFactory(com.ibm.ws.webservices.engine.encoding.ser.ArraySerializerFac
   tory.class, javaType, xmlType, compQName, compTypeQName);
           df =
   com.ibm.ws.webservices.engine.encoding.ser.BaseDeserializerFactory.cre
   ateFactory(com.ibm.ws.webservices.engine.encoding.ser.ArrayDeserialize
   rFactory.class, javaType, xmlType, compQName, compTypeQName);
           if (sf != null || df != null) {
               tm.register(javaType, xmlType, sf, df);
           }

       }


   public class CMBXMLResponse_Helper {
       // Type metadata
       private static final
   com.ibm.ws.webservices.engine.description.TypeDesc typeDesc =
           new
   com.ibm.ws.webservices.engine.description.TypeDesc(CMBXMLResponse.clas
   s);

       static {
           typeDesc.setOption("buildNum","cf10631.06");
           com.ibm.ws.webservices.engine.description.FieldDesc field =
   new com.ibm.ws.webservices.engine.description.ElementDesc();
           field.setFieldName("xmlResponseText");

   field.setXmlName(com.ibm.ws.webservices.engine.utils.QNameTable.create
   QName("", "xmlResponseText"));

   field.setXmlType(com.ibm.ws.webservices.engine.utils.QNameTable.create
   QName("[7]http://www.w3.org/2001/XMLSchema";, "string"));
           typeDesc.addFieldDesc(field);
           field = new
   com.ibm.ws.webservices.engine.description.ElementDesc();
           field.setFieldName("contentID");

   field.setXmlName(com.ibm.ws.webservices.engine.utils.QNameTable.create
   QName("", "contentID"));

   field.setXmlType(com.ibm.ws.webservices.engine.utils.QNameTable.create
   QName("[8]http://was60.webservices.mm.ibm.com";,
   "ArrayOf_xsd_string"));
           typeDesc.addFieldDesc(field);
           field = new
   com.ibm.ws.webservices.engine.description.ElementDesc();
           field.setFieldName("attachments");

   field.setXmlName(com.ibm.ws.webservices.engine.utils.QNameTable.create
   QName("", "attachments"));

   field.setXmlType(com.ibm.ws.webservices.engine.utils.QNameTable.create
   QName("[9]http://was60.webservices.mm.ibm.com";,
   "ArrayOf_tns2_swaRef"));
           typeDesc.addFieldDesc(field);
           field = new
   com.ibm.ws.webservices.engine.description.ElementDesc();
           field.setFieldName("mimeTypes");

   field.setXmlName(com.ibm.ws.webservices.engine.utils.QNameTable.create
   QName("", "mimeTypes"));

   field.setXmlType(com.ibm.ws.webservices.engine.utils.QNameTable.create
   QName("[10]http://was60.webservices.mm.ibm.com";,
   "ArrayOf_xsd_string"));
           typeDesc.addFieldDesc(field);
       };


   Best regards,

   Magne



   >-----Original Message-----
   >From: Thomas Raddatz [mailto:thomas.raddatz@xxxxxxxxxxx]
   >Sent: Saturday, January 5, 2008 06:59 PM
   >To: 'HTTPAPI and FTPAPI Projects'
   >Subject: Re: WSDL2RPG - RC4 available with workaround for Axis bug
   AXIS-2095
   >
   >Magne,
   >
   >I will look at the Java implementation, but it may take a while.
   >
   >Regards,
   >
   >Thomas.
   >
   >magne@xxxxxxxxx schrieb:
   >> Hi Thomas,
   >>
   >> it seems like wsdl2java works on the CMBGenericWebService.wsdl.
   >>
   >> You might get an answere in the java implementation:
   >>
   >>
   [1]http://publib.boulder.ibm.com/infocenter/cmgmt/v8r4m0/index.jsp?to
   >>
   pic=/com.ibm.samples.doc/samples/webservices/GenericWebServiceSampleWA
   >> S6.readme.htm
   >>
   >> Best regards,
   >>
   >> Magne
   >>
   >>
   >> >-----Original Message-----
   >> >From: Thomas Raddatz [mailto:thomas.raddatz@xxxxxxxxxxx]
   >> >Sent: Saturday, January 5, 2008 04:55 PM
   >> >To: 'HTTPAPI and FTPAPI Projects'
   >> >Subject: Re: WSDL2RPG - RC4 available with workaround for Axis bug
   >> AXIS-2095
   >> >
   >> >Magne,
   >> >
   >> >First of all I want to let you know that I know how annoying these
   >> "Pointer not set ..." errors are.
   >> >Of course I could catch them and send a message but I decided to
   do
   >> that not. In most cases the reason
   >> >for this error is that WSDL2RPG could not find a type in its
   >> repository, which should not happen.
   >> >
   >> >The problem with 'CMBGenericWebService' is that the type
   'wsi:swaRef'
   >> is not defined in the WSDL file.
   >> >Hence WSDL2RPG does not know that type when it tries to find the
   >> referenced type of 'swaRef' of
   >> >'ArrayOf_tns2_swaRef'.
   >> >
   >> ><?xml version="1.0" encoding="UTF-8"?>
   >> ><wsdl:definitions
   >> targetNamespace="http://was60.webservices.mm.ibm.com";
   >> >xmlns:intf="http://was60.webservices.mm.ibm.com";
   >> xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd";
   >> >xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
   >> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
   >> >xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
   >> xmlns:impl="http://was60.webservices.mm.ibm.com";>
   >> > <wsdl:types>
   >> > <schema targetNamespace="http://was60.webservices.mm.ibm.com";
   >> >xmlns="http://www.w3.org/2001/XMLSchema";
   >> xmlns:impl="http://was60.webservices.mm.ibm.com";
   >> >xmlns:intf="http://was60.webservices.mm.ibm.com";
   >> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
   >> >xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd";
   >> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
   >> > <import namespace="http://ws-i.org/profiles/basic/1.1/xsd"/>
   >> >...
   >> > <complexType name="ArrayOf_tns2_swaRef">
   >> > <sequence>
   >> > <element maxOccurs="unbounded" minOccurs="0" name="swaRef"
   >> nillable="true" type="wsi:swaRef"/>
   >> > </sequence>
   >> > </complexType>
   >> >
   >> >WSDL2RPG knows that this type belongs to the 'wsi'
   >> (http://ws-i.org/profiles/basic/1.1/xsd) namespace
   >> >but it does not know the schema location. If it knew the schema
   >> location it could try to load the
   >> >types defined there.
   >> >
   >> >I am stuck with this problem because I have no idea how to solve
   it.
   >> By the way also the Eclipse XML
   >> >editor as well as XMLSpy complains about the unknown type. So they
   >> have the very same problem.
   >> >
   >> >I did a quick search for "http://ws-i.org/profiles/basic/1.1/xsd";
   and
   >> now I know that 'swaRef' is an
   >> >element of type 'xsd:anyURI'. But I still do not know how to tell
   >> WSDL2RPG about it.
   >> >
   >> >Any ideas?
   >> >
   >> >Last but not least attachments are not (yet) supported. Before I
   >> probably start with attachments I
   >> >want to have a stable release supporting the styles "rpc" /
   >> "document" and the uses "literal" / "encoded".
   >> >
   >> >Regards,
   >> >
   >> >Thomas.
   >> >
   >> >
   >> >magne@xxxxxxxxx schrieb:
   >> >> Hi Thomas,
   >> >>
   >> >> I tried wsdl2rpg on one of the IBM Content Management Web
   Service
   >> wsdl
   >> >> files and got this error:
   >> >>
   >> >> WSDL2RPG
   >> >> URL('http://80.203.170.170/marianne/CMBGenericWebService.wsdl')
   S
   >> >> RCFILE(CMSRC/QRPGLESRC)
   >> >> SRCMBR(CMBGENERIC)
   >> >> Pointer not set for location
   >> >> referenced.
   >> >> Funksjonsfeil. MCH3601 uoverv?ket av WSDL2RPG in stmt
   0000078400,
   >> >> instruksjonen
   >> >> X'0000'.
   >> >> The call to main ended in error (C G D
   >> >> F).
   >> >> The call to main ended in error (C G D
   >> >> F).
   >> >>
   >> >> Seems like the error is in WSDL2RPG WSDL2R50
   >> WSDL2R50_Type_isXmlArray
   >> >> stmt 0000078400.
   >> >>
   >> >> Any idea what's wrong?
   >> >>
   >> >> Best regards,
   >> >>
   >> >> Magne
   >> >>
   >> >> >-----Original Message-----
   >> >> >From: Thomas Raddatz [mailto:thomas.raddatz@xxxxxxxxxxx]
   >> >> >Sent: Friday, December 28, 2007 06:34 PM
   >> >> >To: 'HTTPAPI and FTPAPI Projects'
   >> >> >Subject: Re: WSDL2RPG - RC4 available with workaround for Axis
   bug
   >> >> AXIS-2095
   >> >> >
   >> >> >Magne,
   >> >> >
   >> >> >You have to use the latest HTTP API beta version in order to
   run
   >> the
   >> >> WSDL2RPG utility or the RPG Web
   >> >> >service client stubs.
   >> >> >
   >> >> >I added http_parser_switch_cb() to the HTTP API because of
   >> WSDL2RPG.
   >> >> >
   >> >> >Please download the latest HTTP API version from:
   >> >> >
   >> >> > http://www.scottklement.com/httpapi/beta/
   >> >> >
   >> >> >Thomas.
   >> >> >
   >> >> >
   >> >> >magne@xxxxxxxxx schrieb:
   >> >> >> Hi Thomas,
   >> >> >>
   >> >> >> thanks a lot!
   >> >> >>
   >> >> >> The wsdl2rpg cmd created the rpg code.
   >> >> >>
   >> >> >> But when i try to compile (crtrpgmod) i get this error:
   >> >> >>
   >> >> >> *RNF7030 HTTP_PARSER_SWITCH_CB...
   >> >> >> **UNDEF** 5025M 5097M
   >> >> >>
   >> >> >> 5024 namespace =
   >> >> >> 'http://schemas.xmlsoap.org/soap/envelope/');
   >> >> >> 5025
   >> >> >> http_parser_switch_cb(
   >> >> >> 5026
   >> >> >> %addr(g_soapFault)
   >> >> >> 5027 :
   >> >> >> %paddr('soapenv_soapFaultStart')
   >> >> >> 5028 :
   >> >> >> %paddr('soapenv_soapFaultEnd'));
   >> >> >> 5029
   >> >> >> endsl;
   >> >> >> 5030
   >> >> >>
   >> >> >> 5031
   >> >> >> /end-free
   >> >> >>
   >> >> >> Do you know where http_parser_switch_cb is defined?
   >> >> >>
   >> >> >> Best regards
   >> >> >>
   >> >> >> Magne
   >> >> >>
   >> >> >>
   >> >> >> >-----Original Message-----
   >> >> >> >From: Thomas Raddatz [mailto:thomas.raddatz@xxxxxxxxxxx]
   >> >> >> >Sent: Thursday, December 27, 2007 05:37 PM
   >> >> >> >To: 'HTTPAPI and FTPAPI Projects'
   >> >> >> >Subject: Re: WSDL2RPG - RC4 available with workaround for
   Axis
   >> bug
   >> >> >> AXIS-2095
   >> >> >> >
   >> >> >> >Magne,
   >> >> >> >
   >> >> >> >I fixed the problem and released RC5. I was able to
   >> successfully
   >> >> >> generate a stub for the 'getcustinf'
   >> >> >> >operation. But I could not call the Web service. I always
   >> received
   >> >> a
   >> >> >> "Error 404: No target servlet
   >> >> >> >configured for uri:
   >> >> >> /TennantWebServiceProject/services/GETCUSTINFServices" error
   >> >> messages.
   >> >> >> The URL
   >> >> >> >that I used to call the service was
   >> >> >>
   >> >>
   >>
   >"http://80.203.170.170:9080/TennantWebServiceProject/services/GETCUST
   >> >> >> INFServices".
   >> >> >> >
   >> >> >> >Please download and install RC5. It should work for you,
   now.
   >> >> >> >
   >> >> >> >Thomas.
   >> >> >> >
   >> >> >> >
   >> >> >> >magne@xxxxxxxxx schrieb:
   >> >> >> >> Hi Thomas,
   >> >> >> >>
   >> >> >> >> I still get an error when I try this cmd:
   >> >> >> >>
   >> >> >> >> WSDL2RPG
   >> >> >> URL('http://80.203.170.170/marianne/GETCUSTINFServices.wsdl')
   >> >> >> >> SRC
   >> >> >> >> FILE(QGPL/QRPGLESRC) SRCMBR(WSDLTEST)
   >> >> >> >>
   >> >> >> >>
   >> >> >> >> Pointer not set for location
   >> >> >> >> referenced.
   >> >> >> >> The call to main ended in error (C G D
   >> >> >> >> F).
   >> >> >> >> Message . . . . : The call to main ended in error (C G D
   >> >> >> >> F).
   >> >> >> >> Cause . . . . . : RPG procedure WSDL2R01 in program
   >> >> >> >> WSDL2RPG/WSDL2RPG at
   >> >> >> >> statement 088600 called program or procedure main, which
   >> ended
   >> >> in
   >> >> >> >> error. If
   >> >> >> >> the name is *N, the call was a bound call by procedure
   >> >> >> >> pointer.
   >> >> >> >>
   >> >> >> >> Can this be a parameter error? Seems like there is a
   >> parameter
   >> >> >> pointer
   >> >> >> >> error....
   >> >> >> >>
   >> >> >> >> Must the the wsdl point to a working web service? My wsdl
   >> does
   >> >> >> not....
   >> >> >> >>
   >> >> >> >> <wsdl:service name="GETCUSTINFServicesService">
   >> >> >> >>
   >> >> >> >> [1]- <wsdl:port
   binding="intf:GETCUSTINFServicesSoapBinding"
   >> >> >> >> name="GETCUSTINFServices">
   >> >> >> >> <wsdlsoap:address
   >> >> >> >>
   >> >> >>
   >> >>
   >>
   location="http://localhost:9080/TennantWebServiceProject/services/GETC
   >> >> >> >> USTINFServices" />
   >> >> >> >> </wsdl:port>
   >> >> >> >> </wsdl:service>
   >> >> >> >>
   >> >> >> >> Best regards
   >> >> >> >>
   >> >> >> >> Magne
   >> >> >> >
   >> >> >>
   >> >>
   >>
   >---------------------------------------------------------------------
   >> >> >> --
   >> >> >> >This is the FTPAPI mailing list. To unsubscribe, please go
   to:
   >> >> >> >http://www.scottklement.com/mailman/listinfo/ftpapi
   >> >> >>
   >> >>
   >>
   >---------------------------------------------------------------------
   >> >> >> --
   >> >> >> >
   >> >> >>
   >> >> >>
   >> >> >>
   >> >>
   >>
   ----------------------------------------------------------------------
   >> >> --
   >> >> >>
   >> >> >>
   >> >>
   >>
   ----------------------------------------------------------------------
   >> >> -
   >> >> >> This is the FTPAPI mailing list. To unsubscribe, please go
   to:
   >> >> >> http://www.scottklement.com/mailman/listinfo/ftpapi
   >> >> >>
   >> >>
   >>
   ----------------------------------------------------------------------
   >> >> -
   >> >>
   >>
   >---------------------------------------------------------------------
   >> >> --
   >> >> >This is the FTPAPI mailing list. To unsubscribe, please go to:
   >> >> >http://www.scottklement.com/mailman/listinfo/ftpapi
   >> >>
   >>
   >---------------------------------------------------------------------
   >> >> --
   >> >> >
   >> >>
   >> >>
   >> >>
   >>
   ----------------------------------------------------------------------
   >> --
   >> >>
   >> >>
   >>
   ----------------------------------------------------------------------
   >> -
   >> >> This is the FTPAPI mailing list. To unsubscribe, please go to:
   >> >> http://www.scottklement.com/mailman/listinfo/ftpapi
   >> >>
   >>
   ----------------------------------------------------------------------
   >> -
   >>
   >---------------------------------------------------------------------
   >> --
   >> >This is the FTPAPI mailing list. To unsubscribe, please go to:
   >> >http://www.scottklement.com/mailman/listinfo/ftpapi
   >>
   >---------------------------------------------------------------------
   >> --
   >> >
   >>
   >> References
   >>
   >> 1.
   http://publib.boulder.ibm.com/infocenter/cmgmt/v8r4m0/index.jsp?topic=
   /com.ibm.samples.doc/samples/webservices/GenericWebServiceSampleWAS6.r
   eadme.htm
   >>
   >>
   >>
   >>
   ----------------------------------------------------------------------
   --
   >>
   >>
   ----------------------------------------------------------------------
   -
   >> This is the FTPAPI mailing list. To unsubscribe, please go to:
   >> http://www.scottklement.com/mailman/listinfo/ftpapi
   >>
   ----------------------------------------------------------------------
   -
   >---------------------------------------------------------------------
   --
   >This is the FTPAPI mailing list. To unsubscribe, please go to:
   >http://www.scottklement.com/mailman/listinfo/ftpapi
   >---------------------------------------------------------------------
   --
   >

References

   1. http://80.203.170.170/marianne/CMBGenericWebService
   2. http://was60.webservices.mm.ibm.com/
   3. http://was60.webservices.mm.ibm.com/
   4. http://ws-i.org/profiles/basic/1.1/xsd
   5. http://was60.webservices.mm.ibm.com/
   6. http://www.w3.org/2001/XMLSchema
   7. http://www.w3.org/2001/XMLSchema
   8. http://was60.webservices.mm.ibm.com/
   9. http://was60.webservices.mm.ibm.com/
  10. http://was60.webservices.mm.ibm.com/
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------