[ 
http://issues.apache.org/jira/browse/AXIS2-647?page=comments#action_12378359 ] 

Thilo Frotscher commented on AXIS2-647:
---------------------------------------


Hello Ajith,

I tried this again with Axis2 1.0 final. The "Unbound namespace URI" exception 
is not thrown anymore, so this bug is fixed. Great!
However, I now get an exception on the client side, when the generated client 
code is trying to process the SOAP response:

java.lang.RuntimeException: java.lang.RuntimeException: Unexpected subelement 
menu
        at 
org.apache.axis2.RestaurantServiceStub.fromOM(RestaurantServiceStub.java:577)
        at 
org.apache.axis2.RestaurantServiceStub.GetMenuList(RestaurantServiceStub.java:118)
        at 
org.apache.axis2.MyADBServiceClient.testADB(MyADBServiceClient.java:52)
        at org.apache.axis2.MyADBServiceClient.main(MyADBServiceClient.java:79)
Caused by: java.lang.RuntimeException: Unexpected subelement menu
        at 
org.apache.axis2.RestaurantServiceStub$MenuList$Factory.parse(RestaurantServiceStub.java:1732)
        at 
org.apache.axis2.RestaurantServiceStub$GetMenuListResponse$Factory.parse(RestaurantServiceStub.java:796)
        at 
org.apache.axis2.RestaurantServiceStub.fromOM(RestaurantServiceStub.java:559)
        ... 3 more

I compared the SOAP responses that are sent by the service code generated from 
1 XSD with the SOAP responses sent from service code generated from 2 XSDs (see 
above). The SOAP responses are exactly the same.  Therefore the issue must be 
somewhere in the generated client code (when using 2 XSDs).



> "Unbound namespace URI" when generating code for ADB and using chained schema 
> imports
> -------------------------------------------------------------------------------------
>
>          Key: AXIS2-647
>          URL: http://issues.apache.org/jira/browse/AXIS2-647
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>  Environment: Axis2 1.0 RC4
>     Reporter: Thilo Frotscher
>  Attachments: Restaurant.xsd, RestaurantMessages.xsd, RestaurantService.aar, 
> RestaurantService.wsdl, restaurant-client-src.zip, restaurant-src.zip
>
> My scenario is as follows:
> - I defined the datatypes for my sample application in file Restaurant.xsd 
> and namespace R1
> - I defined the messages for communication with the RestaurantService in file 
> RestaurantMessages.xsd and namespace R2
> - RestaurantMessages.xsd imports Restaurant.xsd, since the messages make use 
> of the basic datatypes.
> - My WSDL imports RestaurantMessages.xsd
> - WS-I test tools show that this WSDL complies to BP
> - This scenario worked nicely with Axis 1.3
> I generated service and client code for this WSDL with WSDL2Java and ADB 
> option. When I send a message to the service using the generated proxy, I get 
> an "Unbound namespace URI" error for namespace R1( ! ) on the server side. 
> That is interesting, because the messages that are sent back and forth are 
> all in namespace R2 and my request message does not contain any reference to 
> R1 whatsoever. However, the response message (R2) is supposed to contain 
> types defined in Restaurant.xsd.
>  
> If I move all the datatype definitions from file Restaurant.xsd into 
> RestaurantMessages.xsd and thus from R1 to R2, everything works fine.
> Apparently Axis2 / ADB has issues with chained imports, perhaps only if not 
> all of the imports belong to the same namespace.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to