I figured how the other namespace has crept. I am generating a single
client for 2 WSDLS.   The 2 WSDLs expose different functionalities but
have most of the types the same. The types are inlined (as you saw in
the attached WSDL). So, when the stub against the 2nd WSDL gets
generated the same TimeCode element gets generated with the the new
namespace. 

 

Do I have a workaround without modifying the WSDLs and without altering
the way the clients are being generated presently? 

 

Thanks

Srinivas

________________________________

From: Amila Suriarachchi [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 17, 2007 9:49 PM
To: axis-user@ws.apache.org
Subject: Re: axis2 - ADB , XMLBeans : service difference. Error while
invoking different implementations of the same service

 

This is a problem with the request.

In your schema target namespace is
http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServices/ 
 <s:schema elementFormDefault="qualified" 
 
targetNamespace="http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServ
ices/">

and TimeCode element is like this 
<s:complexType name="TimeCode">
                <s:sequence>
                    <s:element minOccurs="0" maxOccurs="1" name="Time"
type="s:string"/> 
                </s:sequence>
            </s:complexType>

So that the Time element should be in the
http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServices/ namespace.

But your request is 
<StartTime>
                        <Time
xmlns="http://www.example.org/AsRun";>11:10:09:00</Time>
                    </StartTime>

So the Time elemnet is in http://www.example.org/AsRun. 
this is the problem which creates the problem with the ADB service.

Any way how this namespace name have come here? I can not see this in
the wsdl. But I feel this is a valid jira since xmlbeans client does not
generates the request correctly. please log a jira.

Does this work properly with the adb client? 

Amila.



On 4/18/07, Ajith Ranabahu <[EMAIL PROTECTED]> wrote:

Hi,
The failure you are seeing is probably not due to the client but
thrown from the server and reported by the client as an exception. The
general cause of this error message is the presence of an incompatible
element in the XML.
However in your case the XMLBeans service works which means there is
no probs with the client and hence this could well be a bug in ADB
(may restriction handling which was a recent addition)
In any case see whether you can use tcpmon to capture a few message.

Ajith

On 4/17/07, Sampige, Srinivas <[EMAIL PROTECTED]> wrote:
> I have implemented 2 versions of the same webservice; one using ADB
and 
> the other using XMLBeans binding. Both services have the same exact
> WSDL. I generated a client using xmlbeans binding which works fine
> against the service using xmlbeans. But, the same client when pointed 
> against the service using ADB binding the, client fails with "
> Unexpected subelement"
>
> -------------------------------
> org.apache.axis2.AxisFault: java.lang.RuntimeException : Unexpected
> subelement Time
>         at
>
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
> ation.java:271)
>         at
> org.apache.axis2.description.OutInAxisOperationClient.execute
(OutInAxisO
> peration.java:202)
>         at
>
com.directv.dtss.itx.client.ScheduleServiceStub.ScheduleReceiveService(S
> cheduleServiceStub.java:152)
>         at
>
com.directv.dtss.itx.client.helper.ScheduleReceiveServiceClientHelper.po

> stSchedule(ScheduleReceiveServiceClientHelper.java:112)
>         at
>
com.directv.dtss.itx.client.sample.ScheduleServiceClientSample.main(Sche
> duleServiceClientSample.java:157)
> ---------------------------------- 
>
> From my understanding, given a WSDL, when we generate a client it
should
> work regardless of how the service is implemented correct?(transparent
> to the client hence the very purpose of the WSDL right?). 
>
> I am running Axis2-1.1.1 on Tomcat 5.5.23
>
> I have attached 2 files=
>    1) the wsdl itself  (scheduleService.wsdl)
>    2) the request/response output from tcpmon in the 2 cases 
> (adbxmlbeans.txt)
>
> I followed steps outlined in
>
http://www.nabble.com/-Axix2--java.lang.RuntimeException:-Unexpected-sub

> element-value-t3489089.html but I cannot get to the stage where I can
> see the response in the scenario when it fails.
>
>
> Thanks in advance
> Srinivas
>
> --------------------------------------------------------------------- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED] 
>
>


--
Ajith Ranabahu

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Amila Suriarachchi,
WSO2 Inc. 

Reply via email to