I used wscompile to create the jaxrpc-mapping.xml using the following option to wscompile,
My wsdl was also a .NET document literal and had multiple parameters to the operations, so i also had to use the following wscompile option,
The final problem I had with this was the generated service endpoint interface was correct, but the JBoss geneated wsdd was not, this took my operation with a IN parameter and a return and produced one with just an INOUT parameter.
To solve this I created a ws4ee-deployment.xml which had to be put in the WEB-INF directory, this just included the operations with the correct return types and parameters etc.
Hope this helps,
Thanks for your reply. I got it! Now I can generate mapping file using wscompile. Thanks for your help! But I got stuck again :
I'm getting error as follows when want to view the service from the browser:
org.apache.axis.InternalException: java.lang.Exception: The OperationDesc for getQueryService was not synchronized to a method of QueryService.ws.QueryService_PortType.
Anyway I shall be posting this error in separate thread.
Thanks for the help.
In your deploy directory for the configuration, you should find the log4j.xml. Find the Axis logger and change it to DEBUG (from INFO). You will then see why it thinks there is a mismatch.
I had this twice, first as i didn't use wscompile with the -f:wsi switch, so my SEI methods had multiple parameters instead of the one allowed. After fixing that, the JBoss generated wsdd that was deployed didn't match the generated SEI. In my case, the return parameter was treated as an INOUT, it should have been a return parameter and an IN parameter.
I had to create a ws4ee-deployment.xml in wEB-INF with the correct mappings for the operations. When the wsdd is created by JBoss it merges this file in.
ps. Seems to me with the web services stuff, its just moving from one hurdle to the next.
Thanks for your suggestion. I have successfully deployed the webservice by describing the method names and parameters in ws4ee-deployment.xml.
Now I 'm facing another problem:
Writing a client that will successfully access the web-service:
(1) I have to written a stand-alone client using generated stubs from the WSDL file.
I'm using apache WSDL2Java tool for this. I ve compiled and run the program - only to get the following error:
11:06:26,564 ERROR [ServerEngine] Server error
java.lang.IllegalArgumentException: Namespace URI cannot be null
at org.apache.xerces.parsers.AbstractSAXParser.startNamespaceMapping(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
As I continue to browse the JBossWS forum posts I found the mention of the same thing in another post:
It suggests that developing a client using Axis and with jboss-4.0.1 as server hosting the service - this type error may occur.
Shall I revert back to Jboss 4.0? What do you suggest?
I don't know whether reverting to version 4.0.0 would help. I haven't had that particular problem. I generated a standalone client using wscompile -gen:client -import -f:wsi config.xml.
I successfully connect to by webservice and get a response, my problem is that the deserialization doesnt seem to work.
I was successfully able to run the Axis-client(It is so easy!) that I have writtten in JBoss 4.0.0(after discarding JBoss 4.0.1). However I would also like to try your approach.
So far I have done the following:
(1) Created a WSDL by hand. Kept the following following files in WEB-INF directory : webservices.xml, jaxrpc-mapping.xml(generated using wscompile), web.xml and ws4ee-deployment.xml. In WEB-INF/wsdl directory I have kept my wsdl file.
(2) executing wscompile with -import -keep (didn't use -gen:server) option and then Customising the implementation file. (Customised code does database query and populates ResponseType Object)
(3) Build with ant
(4) Deploy the war file in jboss4.0.1
(5) Connect to http://myMachineName:8080/wsee and click the view link - YES I can see the My service with WSDL link.
Now comes the question of writing the client.
From this phase onwards I'm confused.
AS this wiki says:
Do I need to deploy the client in the JBoss server also?
Can you bullet out the steps what I need to follow. Which files going to which directory. What shall I do after running wscompile with -gen:client option. Where my own webservice query code will reside? Did you write any DII client? If so - How?
Do you again have to do a jndi-lookup for the service endpoint from your testClient? I'm just trying to find other alternatives if I use jboss-4.0.1.
Thanks for all the help and advice.
Take a look at the Wikis', Tom has produced a series of step by step examples for both servers and clients.
Yeah! I've seen those! I will try to learn the stpes ASAP.
Thanks for your help.