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
------------------------------------------------------------------------------
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

Reply via email to