axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sampige, Srinivas" <SSamp...@DIRECTV.com>
Subject RE: WSDL URL for AXIS2 codegenerator
Date Thu, 22 Mar 2007 23:17:42 GMT
Hi Amila

 

I tried to generate a client for
http://soap.amazon.com/schemas2/AmazonWebServices.wsdl. This also
failed. I tried this since the other URL which I am actually using is
for a webservice available internal to our org. Since you requested for
the URL I tried the amazon URL. Please see the error below.

 

 

 

1) Snippet of ant file -

 

<property name="wsdl.location.scheduleRecevieService"
value="http://soap.amazon.com/schemas2/AmazonWebServices.wsdl" />

 

      <target name="clientFromWSDL" depends="clean,prepare">

            <echo message="Generating java client for
${wsdl.location.scheduleRecevieService}" />

            <delete dir="${generatedOutput}" />

            <java classname="org.apache.axis2.wsdl.WSDL2Java"
fork="true">

                  <classpath refid="axis.libraries.classpath"/>

      

                        <!-- location of the WSDL, currently this is a
local file URI -->

                        <!-- relative to the base dir of the ANT
project.                   -->    

                        <!-- Following up with Apache to see if we can
give a absolute-->

                        <!-- URL to a remote webservice
--> 

                        <arg value="-uri"/>

                        <arg
file="${wsdl.location.scheduleRecevieService}"/>

      

                        <!-- output location of the generated files -->

                        <arg value="-o"/>

                        <arg file="${generatedOutput}"/>

      

                        <!-- default package to be used  -->

                        <arg value="-p"/>

                        <arg value="com.directv.dtss.itx.client"/>

                  

                        <!-- generate code for synchronous calls only
-->

                        <arg value="-s"/>

                  

                        <!-- use xmlbeans databinding method -->

                        <arg value="-d"/>

                        <arg value="xmlbeans"/>

                  

                        <!-- namespace to package mapping -->


                        <arg value="-ns2p"/>

                        <arg
value="http://tempuri.org/=com.directv.dtss.itx.client"/>

                  

                        <!-- generate service -->

                        <arg value ="-ss"/>                             

                        <arg value ="-g"/>


            </java>

 

2) Error :

 

prepare:

    [mkdir] Created dir: C:\workspace\TestAXIS2\build\classes

    [mkdir] Created dir: C:\workspace\TestAXIS2\generatedOutput

clientFromWSDL:

     [echo] Generating java client for
http://soap.amazon.com/schemas2/AmazonWebServices.wsdl

   [delete] Deleting directory C:\workspace\TestAXIS2\generatedOutput

     [java] Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing
WSDL

     [java] at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGeneration
Engine.java:114)

     [java] at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)

     [java] at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)

     [java] Caused by: javax.wsdl.WSDLException: WSDLException:
faultCode=INVALID_WSDL: IO Error: java.io.FileNotFoundException:
C:\workspace\TestAXIS2\http:\soap.amazon.com\schemas2\AmazonWebServices.
wsdl (The filename, directory name, or volume label syntax is incorrect)

     [java] at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(Cod
eGenerationEngine.java:273)

     [java] at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGeneration
Engine.java:97)

     [java] ... 2 more

     [java] Caused by: java.io.FileNotFoundException:
C:\workspace\TestAXIS2\http:\soap.amazon.com\schemas2\AmazonWebServices.
wsdl (The filename, directory name, or volume label syntax is incorrect)

     [java] at java.io.FileInputStream.open(Native Method)

     [java] at java.io.FileInputStream.<init>(Unknown Source)

     [java] at java.io.FileInputStream.<init>(Unknown Source)

     [java] at
sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)

     [java] at
sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown
Source)

     [java] at
org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
Source)

     [java] at
org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown
Source)

     [java] at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

 

 

________________________________

From: Lahiru Sandakith [mailto:sandakith@gmail.com] 
Sent: Monday, March 19, 2007 8:15 PM
To: axis-user@ws.apache.org
Subject: Re: WSDL URL for AXIS2 codegenerator

 

Hi Srinivas, 
Eclipse plugin  does support the remote URL when do wsal2Java. 
What went wrong in your invocation? can you post which remote wsdl that
you tried. 
Thanks 
Lahiru

On 3/19/07, Amila Suriarachchi <amilasuriarachchi@gmail.com> wrote:

I have not tried with both. but it should be. I have tried with
wsdl2java tool and it works fine.

 

On 3/17/07, Sampige, Srinivas < SSampige@directv.com
<mailto:SSampige@directv.com> > wrote:

Is it possible to provide a WSDL URL to the AXIS2 code generator? I 
would like to generate a client (only) for a remote webservice. I have
tried it unsuccessfully both in the Eclipse plugin version as well as
the ANT version and I get "unexpected error occurred". Not sure if I 
missed some configuration step. It works from a local file though.

-Srinivas

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org 







-- 
Amila Suriarachchi, 
WSO2 Inc. 




-- 
Regards
Lahiru Sandakith 


Mime
View raw message