Hi Dennis,

I downloaded the latest jibx-ws-0.9.1 and tried my webservices with this
one. Details is as follows,

I have a wsdl file at
http://webservices.ticketvala.com/axis2/services/WSTicketvala?wsdl
Pls hit the url above to see the wsdl file. here there are different methods
to invoke. I try with single method wsGetCity.

I need to invoke this method to get the response. Xml for request and
response is as follows,

request.xml

<wsGetCity>

* *

<wsGetCityRQ>



 <wsAuthenticate>



          <userId>xyz</userId>



          <groupId>1</groupId>



          <password>xyz</password>



  </wsAuthenticate>



          </wsGetCityRQ>



</wsGetCity>


similarly response.xml has its own format.


I created datamodel and binding file for request.xml as follows,

public class GetCityDetails {

 public GetCityDetails() {

 }

 private Authenticate auth;


public Authenticate getAuth() {

return auth;

}


public void setAuth(Authenticate auth) {

this.auth = auth;

}

}


public class Authenticate {


public Authenticate() {


}


private String uid;

private String gid;

private String pwd;

public String getUid() {

return uid;

}

public void setUid(String uid) {

this.uid = uid;

}

public String getGid() {

return gid;

}

public void setGid(String gid) {

this.gid = gid;

}

public String getPwd() {

return pwd;

}

public void setPwd(String pwd) {

this.pwd = pwd;

}

}

binding.xml

<?xml version="1.0" encoding="UTF-8"?>

<binding>

<mapping name="wsGetCity" class="com.jibx.gwt.shared.GetCityDetails"
ordered="false">

<structure name="wsGetCityRQ" usage="optional">

<structure name="wsAuthenticate" field="auth" usage="optional">

<value name="userId" field="uid" usage="optional"></value>

<value name="groupId" field="gid" usage="optional"></value>

<value name="password" field="pwd" usage="optional"></value>

</structure>

</structure>

</mapping>

</binding>


I run the jibx compiler jibx 1.2.2 as eclipse plugin and compilation
successful.


Now i create the client to invoke the method wsGetCity


IBindingFactory fac = BindingDirectory.getFactory(GetCityDetails.class);

Client client = new PoxClient("
http://webservices.ticketvala.com/axis2/services/WSTicketvala";, fac);

GetCityDetails city = new GetCityDetails();

Authenticate aut = new Authenticate();

aut.setGid("1");

aut.setPwd("faregugly@mmyt");

aut.setUid("faregugly");

city.setAuth(aut);

client.call(city);

Now at the last line, client.call(city), i get the exception as
org.jibx.ws.transport.WsTransportException: 500 Internal Server Error

I tried with SoapClient also but got SoapFault exception.

Kindly request you to find out my mistake. Am i passing correct url to
PoxClient ?

Also, is this the correct way to consume webservice methods at client side?

Kindly explain the concept a bit.

Thanks
Deepak

On Sat, Mar 12, 2011 at 11:57 AM, Dennis Sosnoski <d...@sosnoski.com> wrote:

>  Hi Deepak,
>
> If you have existing schemas for your documents you'll probably want to
> start with code generation from schema:
> http://jibx.sourceforge.net/fromschema/index.html
>
> JiBX does not currently support direct code generation from WSDL - you'd
> instead need to first extract the schemas from the WSDL yourself, then use
> JiBX to generated the data model code from the schemas. Once you have the
> data model you can use it with Axis2 or JiBX/WS for the actual web services
> handling. CXF support is also possible, though that needs to be documented.
> I'll try to do a new release of JiBX/OTA sometime soon which includes a CXF
> implementation.
>
>   - Dennis
>
> Dennis M. Sosnoski
> Java SOA and Web Services Consulting<http://www.sosnoski.com/consult.html>
> Axis2/CXF/Metro SOA and Web Services 
> Training<http://www.sosnoski.com/training.html>
> Web Services Jump-Start <http://www.sosnoski.com/jumpstart.html>
>
> On 03/10/2011 07:38 PM, Deepak Singh wrote:
>
> Hi,
>
> I am new to this group and this is my first post.
>
> I have two web services , one is RestFull and another is SOAP based wsdl.
> Currently i am using xmlBeans for Restful and Jaxb for wsdl data binding.
> Now i plan to use Jibx.
> After going through the tutorial, i am bit confused which approach should i
> take as it provides many ways to use jibx.
>
> Kindly suggest the easiest way to do this binding.
>
> I am using Spring.
>
> Thanks
>
>
> ------------------------------------------------------------------------------
> 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 
> listjibx-users@lists.sourceforge.nethttps://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