Hi,
   
  I believe you are not allowed to have more than 1 non-abstract mapping in a 
single binding. What I did was I created two binding files: one for request and 
one for response. Try breaking this up into 2 files.
   
  Andrey

Javier Diaz <[EMAIL PROTECTED]> wrote:
        v\:* {behavior:url(#default#VML);}  o\:* {behavior:url(#default#VML);}  
w\:* {behavior:url(#default#VML);}  .shape {behavior:url(#default#VML);}        
        Hi Andrey
   
  Thanks a lot for your answer. We are trying now to generate the xsd schema 
using the schema generator from jibx, but we’re getting some errors. I already 
post an email to the jibx list, to see someone can help us. Nevertheless below 
is the problem we are having; just in case you could know what could be 
happening.
   
  binding.xml
   
  <?xml version="1.0" encoding="UTF-8"?>
  <binding forwards="false" value-style="attribute">
    <mapping 
class="com.lastminute.sconnector.api.availability.AvailabilityRequest" 
name="AvailReq">
      <value style="element" name="dep" set-method="setDEP" get-method="getDEP" 
usage="optional"/>
      <value style="element" name="des" set-method="setDES" get-method="getDES" 
usage="optional"/>
    </mapping>
    <mapping 
class="com.lastminute.sconnector.api.availability.AvailabilityResponse" 
name="AvailResp">
      <value style="element" name="result" set-method="setResult" 
get-method="getResult" usage="optional"/>
      <value style="element" name="num-fares" set-method="setNumFares" 
get-method="getNumFares" usage="optional"/>
    </mapping>
  </binding>
   
   
  Error trying to generate the schema:
   
  java -jar 
/home/jdiaz/p4/project/cppLFE/main/SConnector/lib/jibx/jibx-genschema.jar 
binding.xml
   
  Running schema generator version 0.2
  Error: Non-abstract mapping must define an element name; on mapping element 
at (line 3, col 99, in binding_xml)
  Error: Class name is required; on mapping element at (line 3, col 99, in 
binding_xml)
  Error: Non-abstract mapping must define an element name; on mapping element 
at (line 7, col 101, in binding_xml)
  Error: Class name is required; on mapping element at (line 7, col 101, in 
binding_xml)
   
  It looks to us that we are clear defining a “name” for both mapping elements, 
so we are not sure where the problem lies. 
   
  Thx
  Javier
   
   
      
---------------------------------
  
  From: Andrey Utis [mailto:[EMAIL PROTECTED] 
Sent: 23 March 2007 18:28
To: [email protected]
Subject: Re: [xfire-user] Xfire - Jibx

   
    I've run into a similar problem when I was setting up my web services. I 
dont think xfire can generate a schema from JiBX mappings. Even JiBX 
distribution itself admits that the schema generator it comes with has a number 
of limitations. So what I did to get around this was very simple: I compiled my 
schema manually (using JiBX schema compiler) and then copy/pasted them into the 
WSDL and published that WSDL in XFire. It works without any problems.

     

    Andrey

Javier Diaz <[EMAIL PROTECTED]> wrote:

      Hi guys

     

    We are new to Xfire. We have are trying to use Xfire-Jibx with a very 
simple application but we are having problems generating the WSDL. Basically we 
have two simple classes, with just two fields each:

     

    public class AvailabilityRequest {

        public  String DEP;

        public String DES;

     

        // ….  Getter and Setters here ….. 

    }

     

     

    public class AvailabilityResponse {

        public String result;

        public int numFares;

     

        //… Getters and Setters here ……… 

    }

     

    This is our code to run the XFire server 

     ……….

    XFire xfire = XFireFactory.newInstance().getXFire();

    ServiceFactory factory = new 
JibxServiceFactory(xfire.getTransportManager());

            

    Service availabilityService = factory.create(Availability.class, 
"Availability", "http://localhost:8080/Availability";, null);

    xfire.getServiceRegistry().register(availabilityService);

    availabilityService.setProperty(ObjectInvoker.SERVICE_IMPL_CLASS, 
AvailabilityImpl.class);

     

     logger.debug("Starting Server");

     

    // Start the HTTP server

    server = new XFireHttpServer();

    server.setPort(8080);

    server.start();

    ………………

     

    Our binding.xml

    -------------------------------

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

    <binding forwards="false" value-style="attribute">

      <mapping name="AvailReq" 
class="com.lastminute.sconnector.api.availability.AvailabilityRequest">

        <value style="element" name="dep" field="DEP" usage="optional"/>

        <value style="element" name="des" field="DES" usage="optional"/>

      </mapping>

      <mapping name="AvailResp" 
class="com.lastminute.sconnector.api.availability.AvailabilityResponse">

        <value style="element" name="result" field="result" usage="optional"/>

        <value style="element" name="num-fares" field="numFares"/>

      </mapping>

    </binding>

     

     

    Everything is compiling correct and we manage to get the server running, 
however if we try to get the WSDL, only the root elements are being generated, 
we are missing the rest of the fields in our classes, see below:

     

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

    - <wsdl:definitions targetNamespace="http://localhost:8080/Availability"; 
xmlns:tns="http://localhost:8080/Availability"; 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"; 
xmlns:ns1="http://com.lastminute.sconnector.api.availability.AvailabilityRequest";
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding"; 
xmlns:ns2="http://com.lastminute.sconnector.api.availability.AvailabilityResponse";
 xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>

    - <wsdl:types>

    - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
attributeFormDefault="qualified" elementFormDefault="qualified" 
targetNamespace="http://localhost:8080/Availability";>

    - <xsd:element name="getAvailability">

    - <xsd:complexType>

    - <xsd:sequence>

      <xsd:element maxOccurs="1" minOccurs="1" ref="ns1:AvailReq" /> 

      </xsd:sequence>

      </xsd:complexType>

      </xsd:element>

    - <xsd:element name="getAvailabilityResponse">

    - <xsd:complexType>

    - <xsd:sequence>

      <xsd:element maxOccurs="1" minOccurs="1" ref="ns2:AvailResp" /> 

      </xsd:sequence>

      </xsd:complexType>

      </xsd:element>

      </xsd:schema>

      </wsdl:types>

       ……………

     

    We believe we are really missing something, but we don’t really don’t know. 

     

    Any help will be really appreciated.

     

    Thx

    Javier

     

     

   
    
    
---------------------------------
  
  We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.



 
---------------------------------
8:00? 8:25? 8:40?  Find a flick in no time
 with theYahoo! Search movie showtime shortcut.

Reply via email to