Hi Nigel,

i added the namespace as follows

<?xml version="1.0" encoding="UTF-8"?>
<binding direction="input" trac-source="true" add-constructors="true"
xmlns:ns1="http://travis.com/webservices"; name="binding"
trim-whitespace="true">
<namespace uri="http://travis.com/webservices"; default="elements" />
<mapping name="wsGetCityResponse"
class="com.jibx.gwt.shared.GetCityResponse">
<structure name="wsGetCityRS">
<collection field="listOfCities"
factory="com.jibx.gwt.shared.GetCityResponse.getArrayList">
<structure name="city" type="com.jibx.gwt.shared.CityResponse">
<value name="cityId" field="cityId" usage="optional"></value>
<value name="cityName" field="cityName" usage="optional"></value>
<value name="stateId" field="stateId" usage="optional"></value>
<value name="stateName" field="stateName" usage="optional"></value>
<value name="countryId" field="countryId" usage="optional"></value>
<value name="countryName" field="countryName" usage="optional"></value>
</structure>
</collection>
</structure>
</mapping>
</binding>



But still the same error i am getting. I checked that in isolation,
unmarshalling is happening properly.

I could not sort out the problem. Kindly help on this. If you want i would
post the entire code again.

Thanks
Deepak

On Fri, Mar 25, 2011 at 4:03 AM,
<jibx-users-requ...@lists.sourceforge.net>wrote:

> Send jibx-users mailing list submissions to
>        jibx-users@lists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://lists.sourceforge.net/lists/listinfo/jibx-users
> or, via email, send a message with subject or body 'help' to
>        jibx-users-requ...@lists.sourceforge.net
>
> You can reach the person managing the list at
>        jibx-users-ow...@lists.sourceforge.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of jibx-users digest..."
>
>
> Today's Topics:
>
>   1. Re: No handlers could be found for unmarshalling the SOAP
>      body payload (Nigel Charman)
>   2. Too large code for enum (Philippe Jean)
>   3. bind mapping classes which are in jar (TomazM)
>   4. Collection of Primitive Types with size, load,    and add Method
>      (Thomas Weise)
>   5. How to create binding factory with precompiled binding    and
>      multiple extensions? (IvinS)
>   6. map a child that contains a reference to his parent? (Ed Bras)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 17 Mar 2011 16:17:52 +1300
> From: Nigel Charman <nigel.charman...@gmail.com>
> Subject: Re: [jibx-users] No handlers could be found for unmarshalling
>        the SOAP        body payload
> To: JiBX users <jibx-users@lists.sourceforge.net>
> Message-ID: <4d817d60.1080...@gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Deepak
>
> You'll need to add namespace definitions to the binding file for the
> SOAP response, as well as the SOAP request.
>
> Calling SoapClient.setInBodyBindingFactory(..) sets up a handler for the
> SOAP body using the supplied binding factory.  The message is indicating
> that the SOAP body can not be parsed using this binding - presumably
> since there is no namespace defined in your binding.  If you still have
> problems, please check that JiBX can unmarshall the payload of the SOAP
> body in isolation.
>
> This exercise would have been simpler using Dennis' initial
> recommendation to extract the schemas from the WSDL yourself, then to
> use codegen to create the data model code and bindings.  Having a tool
> to automate the generation directly from WSDL is on our backlog..
>
> cheers
> Nigel
>
> On 17/03/11 10:40, Deepak Singh wrote:
> > Hi,
> >
> > I am consuming a web service at client using the latest jibs-ws-0.9.1.
> >
> > code as follows,
> >
> > String m_location =
> > "http://webservices.ticketvala.com/axis2/services/WSTicketvala";;
> > SoapClient client = new SoapClient(m_location);
> >
> client.setOutBodyBindingFactory(BindingDirectory.getFactory(GetCityDetails.class));
> >
> client.setInBodyBindingFactory(BindingDirectory.getFactory(GetCityResponse.class));
> >                    //     client.addInHeaderHandler(new
> > UnmarshallingInHandler(QOS.class));
> >
> >                        GetCityResponse res  = (GetCityResponse)
> > client.call(city);
> >
> > My binding file is
> >
> > <binding>
> > <mapping name="wsGetCityResponse"
> > class="com.jibx.gwt.shared.GetCityResponse">
> > <structure name="wsGetCityRS">
> > <collection field="listOfCities"
> > factory="com.jibx.gwt.shared.GetCityResponse.getArrayList">
> > <structure name="city" type="com.jibx.gwt.shared.CityResponse">
> > <value name="cityId" field="cityId"></value>
> > <value name="cityName" field="cityName"></value>
> > <value name="stateId" field="stateId"></value>
> > <value name="stateName" field="stateName"></value>
> > </structure>
> > </collection>
> > </structure>
> > </mapping>
> >
> >
> > and i get the exception
> >
> > No handlers could be found for unmarshalling the SOAP body payload
> >
> > Request is processed succefully, response is correct but it is not
> > unmarshalled to GetCityResponse object.
> > SoapUI tool shows that there is no soap:header for the response, then
> > i dont thing i need to set the InHandler. Am i right?
> >
> > Also, I went through the examples and tutorial but could not figure
> > out how to set the InHandler. Could you pls provide some lines of code
> > to set this.
> >
> >
> > Thanks
> > Deepak
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Colocation vs. Managed Hosting
> > A question and answer guide to determining the best fit
> > for your organization - today and in the future.
> > http://p.sf.net/sfu/internap-sfd2d
> >
> >
> > _______________________________________________
> > jibx-users mailing list
> > jibx-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/jibx-users
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 2
> Date: Thu, 17 Mar 2011 11:32:02 +0100
> From: Philippe Jean <pjean.ge...@gmail.com>
> Subject: [jibx-users] Too large code for enum
> To: jibx-users@lists.sourceforge.net
> Message-ID:
>        <AANLkTimku+UMfMqhGExbNS+5CZ9Fho-D=f7asmhnt...@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi guys,
>
> I'm just starting to use jibx and I can't compile java source code
> generated
> from xsd file because of the code is too large for an enum.
> Is it possible to use something else than an enum ? And how ?
>
> --
> Philippe Jean
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 3
> Date: Thu, 17 Mar 2011 14:11:05 +0100
> From: TomazM <tomaz.majerh...@arnes.si>
> Subject: [jibx-users] bind mapping classes which are in jar
> To: JiBX users <jibx-users@lists.sourceforge.net>
> Message-ID: <4d820869.8080...@arnes.si>
> Content-Type: text/plain; charset="utf-8"
>
> Is it possible to bind mapping classes which are in jar with
> maven-jibx-plugin?
>
> Regards; Tomaz
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: tomaz_majerhold.vcf
> Type: text/x-vcard
> Size: 348 bytes
> Desc: not available
>
> ------------------------------
>
> Message: 4
> Date: Sun, 20 Mar 2011 19:18:29 +0800
> From: "Thomas Weise" <twe...@gmx.de>
> Subject: [jibx-users] Collection of Primitive Types with size, load,
>        and add Method
> To: <jibx-users@lists.sourceforge.net>
> Message-ID: <003101cbe6f0$8e031fa0$aa095ee0$@de>
> Content-Type: text/plain;       charset="utf-8"
>
> Dear JiBX community.
>
> I want to specify a JiBX binding for a class which is used
> to represent lists of integer (int) values, i.e., lists of
> primitive types. This class provides a size, a getter (loader),
> and a adder method.
>
> I am using the latest version of JiBX. I have searched my
> problem in the mailing list archive but was unable to find
> a solution for it there.
>
> Simplified, my class could look like:
>
> public class MyObject {
>  ...
>  public int  size()         {...}
>  public int  get(int index) {...}
>  public void add(int val)   {...}
> }
>
> The data is neither stored in an array nor in some sort
> of Collection class from the java.util package.
>
> I tried some binding similar to:
>
>  <mapping type-name="a:myObject" abstract="true" ordered="true"
>    class="org.something.myObject">
>
>    <collection name="myInts" ordered="true" size-method="size"
>      load-method="get" add-method="add" />
>  </mapping>
>
>
> This leads to the error in the Schema generator
> org.jibx.schema.generator.SchemaGen, which also occurs with
> 'item-type="java.lang.Integer"':
>
> Error: add-method add not found in class ...
> Error: load-method get not found in class ...
>
> To the collection specification, I can add a 'item-type="int"'.
> Then, I get in the Schema generator org.jibx.schema.generator.SchemaGen:
>
> Warning: Handling not implemented for unspecified mapping; on collection
> element at ..
> Warning: No type defined for element 'myInts' at (source unknown)
>
> Then, the binding compiler tells me:
>
> Error running binding compiler
> *** Error during code generation for file ...
>    this may be due to an error in your binding or classpath, or to an error
> in the JiBX code ***
> java.lang.RuntimeException: Can not cast java.lang.Object to int
>
> I would be very thankful for any suggestion on how this problem
> can be solved. OK, I could add a "get" and "add" method which
> accepts/provides boxed integers (in java.lang.Integer), but this
> would be rather ugly. The add method does some additional computations,
> so I really want to use it, so a solution like "use an int[] array"
> would also not really be nice.
>
> Is there any way to let JiBX use the collection access methods
> for primitive types?
>
> Many thanks,
>  Thomas.
>
>
>
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 22 Mar 2011 17:04:34 +0100
> From: IvinS <iv...@users.sourceforge.net>
> Subject: [jibx-users] How to create binding factory with precompiled
>        binding and multiple extensions?
> To: jibx-users@lists.sourceforge.net
> Message-ID:
>        <AANLkTik-GcDqHJ+=-zct0er39nq5yndupj_g3cd67...@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hello JiBX-Gurus,
>
> I have a problem creating the right binding factory with marshalling a
> document with precompiled bindings:
>
> The project consists of
> - a main project Base defining the basic bindings (a Document, an
> Action that can be put into document)
> - a first plugin SomeAction using Base (bindings&classes) extending Action
> - a second plugin OtherAction ...the same
> The main project does the (un)marshalling. The plugins/author(s) are
> independent. Base and set of plugins are 'assembled' by the user of
> the SW.
>
> Now suppose the program creates the following document with one
> 'SomeAction' object
>    Document
>    +---SomeAction
>    +---OtherAction
>
> How do I have to create a binding factory (in base!) to marshal
> (unmarshal) this object?
> 1) Using BindingDirectory.getFactory( Document.class ) fails because
> it does not know anything about either action
> 2) ...(SomeAction.class)  does not know how to deal with OtherAction
> (it works for a document without 'OtherAction', though)
> 3) The versions of this method using the binding and package names
> have the same problem:
>
> To me it looks like the binding factories form a tree with many leaves
> but in order to process a document, I would need a factory that knows
> *all* leaves.
>
> How do I solve this?
>
> Greetings, thanks for the nice package, and in advance for every
> answer you might have
> IvinS
>
>
>
> ------------------------------
>
> Message: 6
> Date: Thu, 24 Mar 2011 23:33:53 +0100
> From: "Ed Bras" <z...@debrasjes.com>
> Subject: [jibx-users] map a child that contains a reference to his
>        parent?
> To: <jibx-users@lists.sourceforge.net>
> Message-ID: <011301cbea73$8ec22d60$ac468820$@com>
> Content-Type: text/plain;       charset="us-ascii"
>
> I have a parent that contains a collection of child's.
>
> How can I map the child's such that in java code, the child will contain a
> reference to his parent?
>
> I found this solution in the list:
>
> http://www.opensubscriber.com/message/jibx-users@lists.sourceforge.net/13032
> 372.html
> But was wondering if there is a better one such that it's valid for both
> marshaling and unmarshaling.
>
> Example:
> <parent>
>  <child name="bla1">
>  </child>
>  <child name="bla2">
>  </child>
> </parent>
>
> Java code:
> class Parent {
>  List<Child> childs;
> }
>
> class Child {
>  Parent parent;
> }
>
> Thanks,
> - Ed
>
>
>
>
> ------------------------------
>
>
> ------------------------------------------------------------------------------
> Enable your software for Intel(R) Active Management Technology to meet the
> growing manageability and security demands of your customers. Businesses
> are taking advantage of Intel(R) vPro (TM) technology - will your software
> be a part of the solution? Download the Intel(R) Manageability Checker
> today! http://p.sf.net/sfu/intel-dev2devmar
>
> ------------------------------
>
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>
>
> End of jibx-users Digest, Vol 58, Issue 14
> ******************************************
>
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to