I will try to make sense of this tonight. However, I am likelier to be much
more helpful much faster if you can either construct a test case you can
share or at least share the XML Schema fragments relevant to this problem.
This kind of problem boils down to having generated Javascript that is not
on the same page as the XML Schema (assuming that your service corresponds
to its schema correctly).

On Wed, Oct 21, 2009 at 3:49 AM, noosy
<[email protected]>wrote:

>
> Awesome, I got the latest snapshot and the missing code has been generated
> :)
>
> However... I tried to call a simple WS operation, I can see that I am
> getting the SOAP envelope back containing the result but my generated js
> function ns_getResult_op_onsuccess(client, responseXml)
> is letting me down. I will try and describe the problem as best I can.
>
> In FireBug, the POST Response looks like this:
>
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";>
>    <env:Header/>
>    <env:Body>
>        <java:getResultResponse xmlns:java="java:blah">
>            <java:result>myResult</java:result>
>        </java:getResultResponse>
>    </env:Body>
> </env:Envelope>
>
> Within the method below, I will show you what I see in Firebug as comments
> for each line..
>
> ns_getResult_op_onsuccess(client, responseXml)
> {
>    if(client.user_onsuccess)
>    {
>        var responseObject = null;
>        var element = responseXml.documentElement;  // element = envelope
>        this.jsutils.trace('responseXml: ' +
> this.jsutils.traceElementName(element));
>        element = this.jsutils.getFirstElementChild(element); // element =
> header
>        this.jsutils.trace('first element child: ' +
> this.jsutils.traceElementName(element));
>        element = this.jsutils.getFirstElementChild(element);  // element =
> null
>        this.jsutils.trace('part element: ' +
> this.jsutils.traceElementName(element)); // element = null
>        this.jsutils.trace('calling
> blah_getResultResponse_deserializeResponse');
>        responseObject =
> blah_getResultResponse_deserializeResponse(this.jsutils, element);
>        client.user_onsuccess(responseObject);
>    }
> }
>
> So the problem is arising where element = null.
>
> When I look at the documentElement in FireBug it looks like this:
>
> documentElement: envelope
>  childElementCount: 2
>  children: header, body
>    0: header
>      childElementCount: 0
>    1: body
>      childElementCount: 1
>      children: getresultresponse
>        0: getresultresponse
>          childElementCount: 1
>          children: result
>            0: result
>              textContent: myResult
>
> Is the problem my XML (I'm using a third party WSDL so I can't change it)
> or
> is this a problem with the generated wsdl2js code that parses the
> responseXML?
>
> BTW I greatly appreciate your help so far!
>
>
>
> bimargulies wrote:
> >
> > I've made a fix to the top-level problem to trunk. Try the next snapshot.
> >
>
> --
> View this message in context:
> http://www.nabble.com/WSD2JS-Not-Creating-Schema-Objects-tp25913919p25987975.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Reply via email to