axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James M Snell" <jasn...@us.ibm.com>
Subject Re: Java2Wsdl Issues
Date Fri, 30 Nov 2001 05:49:55 GMT
>Actually, I am returning "protocol://DefaultNamespace", so that all the 
classes with no package are in the same namespace

Is this a change you made today? Because the Namespaces makeNamespace 
method is throwing an exception everytime I use the tool on a class that 
is not in a package.  And that's with code from the cvs tree as of noon 
today.

Regarding the -m, perhaps you could provide me an example of how you 
called it and had it work?  What I did was:

java org.apache.axis.wsdlgen.Java2Wsdl -o wsdl -m getQuote 
StockQuotesService

And it returned the usage message and nuttin' else. 

- James M Snell/Fresno/IBM
    Web services architecture and strategy
    Internet Emerging Technologies, IBM
    544.9035 TIE line
    559.587.1233 Office
    919.486.0077 Voice Mail
    jasnell@us.ibm.com
=================================================================
Have I not commanded you?  Be strong and courageous.  Do not be terrified, 

do not be discouraged, for the Lord your God will be with you wherever you 
go.  
- Joshua 1:9

Please respond to axis-dev@xml.apache.org 
To:     axis-dev@xml.apache.org
cc: 
Subject:        Re: Java2Wsdl Issues



James M Snell wrote: Hey Ravi, 

Two issues with Java2Wsdl... 

First, there is a problem with the Namespaces makeNamespace method.  It 
assumes that the Java class is actually in a package ( com.foo.bar for 
instance ) and doesn't account for the fact that the class may not be in a 

package at all.  If you use the tool on a class that is not in a package, 
it throws an exception because it can't find any periods in the string. My 

simple workaround has been to catch the error and return the classname as 
the namespace.  I'd go ahead and commit the change, but I didn't know if 
you would have a better idea on how to handle this.  The Namespaces class 
with the fix is attached.fixed. Actually, I am returning 
"protocol://DefaultNamespace", so that all the classes with no package are 
in the same namespace   

The second issue is with the -m command line option.  It doesn't seem to 
work.  Got any idea on when it will start to work?just tried it. It' 
working as far as I can tell. 
May be you could provide some more detail   

- James M Snell/Fresno/IBM 
    Web services architecture and strategy 
    Internet Emerging Technologies, IBM 
    544.9035 TIE line 
    559.587.1233 Office 
    919.486.0077 Voice Mail 
    jasnell@us.ibm.com 
================================================================= 
Have I not commanded you?  Be strong and courageous.  Do not be terrified, 


do not be discouraged, for the Lord your God will be with you wherever you 

go. 
- Joshua 1:9 

Please respond to axis-dev@xml.apache.org 
To:     axis-dev <axis-dev@xml.apache.org> 
cc: 
Subject:        Wsdl importer and Overload 

Russell, Tom, 

May be this "yet to be implemented". But just in case: 

The attached WSDL uses operation overloading. 
The WSDL exporter generates erroneous code 

Rgds 
Ravi 

<?xml version="1.0" encoding="UTF-8" ?> 
<definitions name="fooDescription" 
     targetNamespace="http://tempuri.org/wsdl/" 
     xmlns:wsdlns="http://tempuri.org/wsdl/" 
     xmlns:typens="http://tempuri.org/xsd" 
     xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
     xmlns:stk="http://schemas.microsoft.com/soap-toolkit/wsdl- 
            extension" 
     xmlns="http://schemas.xmlsoap.org/wsdl/"> 
<types> 
     <schema targetNamespace="http://tempuri.org/xsd" 
              xmlns="http://www.w3.org/2001/XMLSchema" 
              xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 
                    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
           elementFormDefault="qualified" > 
</schema> 
</types> 

<message name="foo1"> 
     <part name="arg" type="xsd:int"/> 
</message> 

<message name="foo2"> 
     <part name="arg" type="xsd:string"/> 
</message> 

<portType name="fooSamplePortType"> 
     <operation name="foo"> 
          <input name="foo1" message="wsdlns:foo1"/> 
     </operation> 
     <operation name="foo"> 
          <input name="foo2" message="wsdlns:foo2"/> 
     </operation> 
</portType> 

<binding name="fooSampleBinding" type="wsdlns:fooSamplePortType"> 
<stk:binding preferredEncoding="UTF-8" /> 
     <soap:binding style="rpc" 
            transport="http://schemas.xmlsoap.org/soap/http"/ 
     <operation name="foo"> 
     <soap:operation soapAction="http://tempuri.org/action/foo1"/ 
          <input name="wsdlns:foo1"> 
     <soap:body use="encoded" namespace="http://tempuri.org/message/" 
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> 
     </input> 
</operation> 
<operation name="foo"> 
     <soap:operation soapAction="http://tempuri.org/action/foo2"/ 
          <input name="wsdlns:foo2"> 
               <soap:body use="encoded" 
               namespace="http://tempuri.org/message/" 
               encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
               /> 
          </input> 
</operation> 
</binding> 

     <service name="FOOService"> 
          <port name="fooSamplePort" binding="wsdlns:fooSampleBinding"> 
               <soap:address 
                  location="http://carlos:8080/fooService/foo.asp"/ 
          </port> 
     </service> 
</definitions> 

  ------------------------------------------------------------------------ 

                      Name: Namespaces.java 
   Namespaces.java    Type: JavaScript Program (application/x-javascript) 
                  Encoding: base64



Mime
View raw message