Hi Daniel and All,
You mentioned:
"For one service I created, I wrote the service using POJOs with an
interface. Then I created a services.xml file for the service. Then I
used the XFire eclipse plugin to generate code from the generated WSDL
using the "http://myWebAppContext/services/MyService?wsdl" format to
generate the client. The web service is in one project and another
project houses the client. I had no trouble sending/receiving data with
this client/service as far as input/output."
You created the POJO's yourself or did you use XJC to generate them ?
You encouraged me to try this approach with the Schema First
Development. Mainly because I understand better all XMLBeans binding now
and I still prefer to make the JAXB2 bindings to work.
Problem comes when you say = generating the client = you said "The web
service is in one project and another project houses the client."
I did exactly the same too trying both with XFire eclipse plugin, or
with the XFire from within MyEclipse to generate the client code using
the URL for the wsdl location from the other project and deployed on
local JBoss AS. I can access that URL fine in the browser but using the
XFire plugin (or MyEclipse XFire) I run into this errror and times out
when accessing the URL in order to validate the wsdl:
----------------------
Server returned HHTP response code: 504 for URL :
http:?//correct_path/Service?wsdl
----------------------
Looking at HTTP error codes definitions:
504 Gateway Timeout
The server, while acting as a gateway or proxy, did not receive a timely
response from the upstream server specified by the URI (e.g. HTTP, FTP,
LDAP) or some other auxiliary server (e.g. DNS) it needed to access in
attempting to complete the request.
Note: Note to implementors: some deployed proxies are known to
return 400 or 500 when DNS lookups time out.
DNS is good in my case, I can access that URL fine in the firefox
browser or in the MyEclipse browser.
Further on my hostname is resolved correctly by DHCP.
BTW I checked the URL spelling etc ...
Normally the packets for http should never leave my computer because
they have to go to the loop back interface when running locally on same
computer. I don't understand why from MyEclipse I can't access that URL
but from the browser is fine.
If I implement this approach now I will have to create all the client
myself... cause I can't use the plugin + Eclipse or the MyEclipse (who
has XFire integrated).
Did you deployed the war on another computer then you generated code
from the generated WSDL using XFire eclipse plugin on your dev computer?
Aside: what I did before was creating first the wsdl which contained the
schema. Then using top-down scenario I used MyEclipse-XFire to generate
all artifacts from the original wsdl. Then introduced the logic for
service implementation and test client. Problem is that the dynamically
generated wsdl contains wrong schema. XFire & JAXB2 bindings are
responsible for creating the generated schema. So I tried to reset force
XFire to use my original schema, which is not easy to implement in
certain environment like mine.
Hope that using XJC to generate correct code and the wsdl in the end to
contain correct schema ...
Thanks,
Dragos
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email