Hi guys,

This is my first app with Xfire and related technologies so apologies if
this question is dumb.

Our Windows developer has written a client application for a new
product. From the client specs he has generated a WSDL file as to the
XML it is expecting.

I then fed this WSDL file into the Xfire plugin for Eclipse to generate
server code.  This will be running with Spring and Hibernate on Apache
Tomcat.  I've implemented all the methods however there are two
problems:

1) Once the service is started, if I go to
http://localhost:8080/testapp/services/ the wsdl file generated there
does not match the one I used to generate the server code itself.
2) More importantly, the XML the client sends produces errors on the
server.

In more detail:
If I use SoapUI to generate a test request from the server-generated
WSDL, a sample login object looks like this:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:wsdl="http://www.eclinic.com.au/testapp/UserSession/wsdl/";
xmlns:wsdl1="http://wsdl.usersession.testapp.eclinic.com.au";>
   <soapenv:Body>
      <wsdl:login>
         <wsdl1:clientSoftware>?</wsdl1:clientSoftware>
         <wsdl1:clientVersion>?</wsdl1:clientVersion>
         <wsdl1:password>?</wsdl1:password>
         <wsdl1:username>?</wsdl1:username>
      </wsdl:login>
   </soapenv:Body>
</soapenv:Envelope>

This works fine, and logs in properly.

The XML being sent by the client, and which conforms to the WSDL file we
generated the server from looks like this:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:wsdl="http://www.eclinic.com.au/testapp/UserSession/wsdl/";>
   <soapenv:Body>
      <wsdl:login>
         <wsdl:username>?</wsdl:username>
         <wsdl:password>?</wsdl:password>
         <wsdl:clientSoftware>?</wsdl:clientSoftware>
         <wsdl:clientVersion>?</wsdl:clientVersion>
      </wsdl:login>
   </soapenv:Body>
</soapenv:Envelope>

Depending on how I screw around with the server annotations, I get one
of two errors.  Firstly,  and more commonly, the "username" attribute in
the login object is not populated from the XML at all and ends up being
null.

Secondly, if I've been playing around with the endpoints and
@SOAPBinding annotation, I receive this error:

MIT: 16014 [http-8080-Processor25] DEBUG
org.codehaus.xfire.handler.HandlerPipeline  - Invoking handler
org.codehaus.xfire.soap.handler.SoapBodyHandler in phase dispatch
MIT: 16022 [http-8080-Processor25] ERROR
org.codehaus.xfire.handler.DefaultFaultHandler  - Fault occurred!
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
        at java.util.LinkedList.entry(LinkedList.java:368)
        at java.util.LinkedList.get(LinkedList.java:313)
        at java.util.Collections
$UnmodifiableList.get(Collections.java:1155)
        at
org.codehaus.xfire.service.binding.AbstractBinding.read(AbstractBinding.java:193)
        at
org.codehaus.xfire.service.binding.WrappedBinding.readMessage(WrappedBinding.java:50)
        at
org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42)

We do not particularly want to modify the client to match the server. I
cannot find any reference to
"http://wsdl.usersession.testapp.eclinic.com.au"; in the server code.

Thanks,

Simon.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to