You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by ERaj <il...@yahoo.com> on 2008/10/13 08:27:40 UTC

axis2 wsdl issue

Hi ,
  I need a help, I have created an .aar and deployed to axis2/services, if I
want to change the namespace in WSDL file (currently it has got the reverse
package name) whenever i change it and generate the soap stub it stops
working and gives and error 'Unexpected subelement return'. How to work with
this namespace?

cheers,
Raj
-- 
View this message in context: http://www.nabble.com/axis2-wsdl-issue-tp19949462p19949462.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: axis2 wsdl issue

Posted by charitha kankanamge <ch...@wso2.com>.
Hi Raj,
How did you change the namespace in wsdl? Did you add a custom WSDL in 
META-INF directory of your .aar? If so, did you add <parameter 
name="useOriginalwsdl">true</parameter>
parameter in your services.xml?

Regards
Charitha
http://charithaka.blogspot.com
ERaj wrote:

>Hi ,
>  I need a help, I have created an .aar and deployed to axis2/services, if I
>want to change the namespace in WSDL file (currently it has got the reverse
>package name) whenever i change it and generate the soap stub it stops
>working and gives and error 'Unexpected subelement return'. How to work with
>this namespace?
>
>cheers,
>Raj
>  
>


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


Re: axis2 wsdl issue

Posted by ERaj <il...@yahoo.com>.
If i'm returning a custom object in my webservice then I'm having the
following issue:
 
  1) Initially I haven't put any wsdl file in META-INF so through the
default wsdl from axis2 I managed to generate the client and the client
invokes all the webservice methods and get the results including custom
object

 2) if I copy the default wsdl and make/not -make modification and copy to
META-INF and deploy the aar.
Later generate the client and try to invoke webservice methods then it
returs all string objects etc., but problem in retrieving custom object it
results in 
org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
Unexpected subelement myproperty
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)

fyi I have included the following in the service.xml
&lt;parameter name="useOrignalWSDL"&gt;true&lt;/parameter&gt;

why this is happening and how to resolve it?
-- 
View this message in context: http://www.nabble.com/axis2-wsdl-issue-tp19949462p20027629.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: axis2 wsdl issue

Posted by ERaj <il...@yahoo.com>.
Most of my answers I have got from the following link
Very useful one :)-
Mainly setting the schema target namespace using service.xml
http://wso2.org/library/2060



-- 
View this message in context: http://www.nabble.com/axis2-wsdl-issue-tp19949462p19965391.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: axis2 wsdl issue

Posted by ERaj <il...@yahoo.com>.

Forgot to mention that the response through the TCP/IP monitor was correct
for both the approach, only thing was the client not working for the 2nd
option. 
-- 
View this message in context: http://www.nabble.com/axis2-wsdl-issue-tp19949462p19964411.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: axis2 wsdl issue

Posted by ERaj <il...@yahoo.com>.
Thanks Charitha , I have missed that on my service.xml . Now I'm getting
similar error but with the element on a property error

org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
Unexpected subelement badge

badge was one of the property in the object.

For just a brief of what I'm doing. I have a service which returns an custom
object array (custom object has few properties). 
Steps I have followed are
 1) Created a service class and the custom object (under a package structure
eg., com.xyz.abc). Withing the service method I'm returning the custom
object.
 2) generated the wsdl file using java2wsdl utility on axis2 (with options
tns, stns etc)
 3) copied this wsdl to META-INF directory along with the services.xml (with
the necessary params added)
 4) created a .aar file using the ant build
 5) deployed to tomcat

 using the wsdl I have generated axis stub and with a client I invoked the
service, now I'm getting that error.

The above service works if I'm doing the following steps:
 step 1
 step 3 - without any wsdl
 step 4
 step 5
using the default wsdl(the one axis2 automatically generated) I haven't
generated axis stub and with a client I invoked the service - it works fine.

The problem is the default wsdl doesn't have a proper target
namespace/schema namespace etc.,
 so I have decided to create custom wsdl and do the first option but it does
work for returning string objects but not for the custom object and result
in that unexpected subelement x...

Any suggestions from your side would be welcome :)-

thanks,
Raj



 
-- 
View this message in context: http://www.nabble.com/axis2-wsdl-issue-tp19949462p19964282.html
Sent from the Axis - User mailing list archive at Nabble.com.


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