• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to generate stubs for a WSDL created by Apache Axis  RSS feed

 
sairam ballekari
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Team,

Greetings for the day!!!

In my project for creating server I have used JAX-WS framework and everything is done perfectly and I have created WSDL for that server, but my client gave me a WSDL which is generated using apache axis 1.2, but while I am creating stubs for that WSDL, some validation errors came.

JAX-WS framework is it compatible with Apache axis WSDL ???

and tell me how to generate stubs for that WSDL, so that I will use them in my project to create OUT BOUND .

The validation errors are which I have got are attached to this.
Please give me soution.

Thanks in advance.
Apacheaxis.png
[Thumbnail for Apacheaxis.png]
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you intend to use Axis (by which I assume you mean Axis2) both as the client and the server? While there's no principal problem using different implementations (like the JAX-WS RI) on one of the sides, it would help to know how you're planning to tackle this.

JAX-WS framework is it compatible with Apache axis WSDL?

JAX-WS is an API which Axis2 (but not Axis 1!) implements. Or do you mean the JAX-WS RI (which is an implementation)? If so, yes - see the previous paragraph.

But first of all, are you really using Axis2 version 1.2 (which was released in 2007)? If so, start by migrating to the current version 1.6.2.
 
sairam ballekari
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Ulf Dittmer for this detailed explanation,

Yes I am using JAX-WS RI 2.1.3 for creating WSDL files (that I have done successfully) and I gave that WSDL files to some 3rd party they are using Apache axis 1.2 version for web services.

Recently they gave me a WSDL (WSDL created by Apache Axis version: 1.2.1) which I am attaching to this,

I tried to generate stubs for that WSDL but I failed due to validation errors(MyEclipse IDE), even I tried to generate the stubs in soap UI by downloading and setting preferences of the apache axis 1.2 still I failed what might be the reason for that???


 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Yes I am using JAX-WS RI 2.1.3 for creating WSDL files (that I have done successfully) and I gave that WSDL files to some 3rd party they are using Apache axis 1.2 version for web services.

Recently they gave me a WSDL (WSDL created by Apache Axis version: 1.2.1) which I am attaching to this,

I tried to generate stubs for that WSDL but I failed due to validation errors(MyEclipse IDE), even I tried to generate the stubs in soap UI by downloading and setting preferences of the apache axis 1.2 still I failed what might be the reason for that?

I'm confused. This is what I understand: a) The WSDL is under your control (since you created it and then gave it a some other party for implementation of the WS). b) You are using JAX-WS RI 2.1.7 for creating the WSDL and also for creating the client side code (which is a questionable choice, as there are newer compatible version available). c) The other party is using Axis2 1.2.1 (which is a highly questionably choice given its age, but presumably beyond your influence).

What I don't understand is why the other party would give you a WSDL - you already have it, since you created it- or why you would use that to create client code. You should be creating the client code from the WSDL you originally created - that is the interface that specifies the WS after all, no?
 
sairam ballekari
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Sorry for misleading you,

There are 2 process of data exchanging in my project

1) I am sending some data to 3rd party (here I gave him WSDL which was generated using JAX-WS RI 2.1.3)

2) 3rd party sending some information(they gave me a WSDL which was generated using Apache Axis version: 1.2.1) and I am the receiver for that, both are in a single web service project(Which I am developing).

In order to generate client code from the WSDL which 3rd party is sending to me, I am getting validation errors!!!

How to generate the client stubs with out errors ???

 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see. In that case, anything to do with step 1 seems irrelevant to the problem at hand.

Step 2 has several problems: it uses document encoding instead of literal encoding, as one of the error messages says - that's been a no-no for many years. I supposed it goes with the other party using an obsolete SOAP implementation. I have no idea if your IDE can or can not deal with that. It does not comply with WS-I, though, and that's bad. See http://www.coderanch.com/t/148679/java-Web-Services-SCDJWS/certification/WSDL-encoded-alowed for more information.

The other errors seems to stem from the fact that some referenced namespaces could not be imported; are you supplying those somehow? I have no idea how you might go about doing that in your IDE, though.
 
Niiraj Patel
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sairam, please post your wsdl if possible..
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!