woolfel     2004/11/06 18:07:42

  Modified:    src/protocol/http/org/apache/jmeter/protocol/http/util
                        WSDLHelper.java
  Log:
  now WSDLHelper should work with WSDL generated by gluecode. just

  goes to show just because there's a specification, not everyone

  implements support the same way. this fixes a bug reported by john

  ferron.

  

  I've also started working on a new soap sampler that uses wsdl and

  Axis' wsdl2java. it would be a totally different approach, since it

  generates client code from wsdl descriptors.

  

  peter
  
  Revision  Changes    Path
  1.8       +15 -4     
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java
  
  Index: WSDLHelper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WSDLHelper.java   9 Jun 2004 16:20:47 -0000       1.7
  +++ WSDLHelper.java   7 Nov 2004 02:07:42 -0000       1.8
  @@ -127,6 +127,7 @@
                   {
                       NodeList servlist =
                           pnode.getElementsByTagName("soap:address");
  +                    // check wsdlsoap
                       if (servlist.getLength() == 0){
                                                servlist =
                                                
pnode.getElementsByTagName("wsdlsoap:address");
  @@ -253,6 +254,11 @@
                opers =
                        ((Element) 
act).getElementsByTagName("wsdlsoap:operation");
               }
  +                     if (opers.getLength() == 0){
  +                             opers =
  +                                     ((Element) 
act).getElementsByTagName("wsdl:operation");
  +                     }
  +            
               // there should only be one soap:operation node per operation
               Element op = (Element) opers.item(0);
               String value = op.getAttribute("soapAction");
  @@ -294,6 +300,8 @@
           String soapBind = "soap:binding";
           if (bindings.getLength() == 0){
                bindings = WSDLDOC.getElementsByTagName("wsdl:binding");
  +        }
  +        if (WSDLDOC.getElementsByTagName(soapBind).getLength() == 0){
                        soapBind = "wsdlsoap:binding";
           }
           for (int idx = 0; idx < bindings.getLength(); idx++)
  @@ -345,7 +353,9 @@
               String soapOp = "soap:operation";
               if (opnodes.getLength() == 0){
                opnodes = one.getElementsByTagName("wsdl:operation");
  -             soapOp = "wsdlsoap:operation";
  +            }
  +            if (one.getElementsByTagName(soapOp).getLength() == 0){
  +                             soapOp = "wsdlsoap:operation";
               }
               // now we iterate through the operations
               for (int idz = 0; idz < opnodes.getLength(); idz++)
  @@ -375,7 +385,8 @@
           {
                        WSDLHelper help =
                        //      new 
WSDLHelper("http://localhost/WSTest/WSTest.asmx?WSDL";);
  -                             new WSDLHelper("http://localhost/AxisWSDL.xml";);
  +                     //      new WSDLHelper("http://localhost/AxisWSDL.xml";);
  +                             new 
WSDLHelper("http://localhost/test-setup.xml";);
               long start = System.currentTimeMillis();
               help.parse();
               String[] methods = help.getWebMethods();
  
  
  

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

Reply via email to