aspose file tools*
The moose likes Web Services and the fly likes Please help...I can't solve this web services error (ConfigException) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Please help...I can Watch "Please help...I can New topic
Author

Please help...I can't solve this web services error (ConfigException)

Mata George
Greenhorn

Joined: Aug 06, 2006
Posts: 1
Hi

I've got the following error when I try to build document-oriented web services

[clientgen] Generating client jar for WLWSSEApp.ear(SimpleService) ...
[clientgen] weblogic.webservice.server.ConfigException: Could not add parameter
to operation. You must specify either its Java or XML type.
[clientgen] at weblogic.webservice.server.WebServiceFactory.addPart(WebServi
ceFactory.java:1258)
[clientgen] at weblogic.webservice.server.WebServiceFactory.addParamsToMetho
d(WebServiceFactory.java:1211)
[clientgen] at weblogic.webservice.server.WebServiceFactory.registerOperatio
n(WebServiceFactory.java:798)
[clientgen] at weblogic.webservice.server.WebServiceFactory.initOperations(W
ebServiceFactory.java:633)
[clientgen] at weblogic.webservice.server.WebServiceFactory.createFromMBean(
WebServiceFactory.java:220)
[clientgen] at weblogic.webservice.tools.build.internal.WSDLGenImpl.getWebSe
rviceRuntime(WSDLGenImpl.java:240)
[clientgen] at weblogic.webservice.tools.build.internal.WSDLGenImpl.run(WSDL
GenImpl.java:135)
[clientgen] at weblogic.webservice.tools.build.internal.ClientGenImpl.doClie
ntGenFromEAR(ClientGenImpl.java:438)
[clientgen] at weblogic.webservice.tools.build.internal.ClientGenImpl.run(Cl
ientGenImpl.java:345)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.doC
lientGen(ClientGenTask.java:351)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.exe
cute(ClientGenTask.java:208)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:341)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:309)
[clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:336)
[clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)

[clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:1255
)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:609)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:196)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:235)

BUILD FAILED
file:C:/bea/user_projects/domains/examples/build_ws/build.xml:54: weblogic.webservice.tools.build.WSBuildException: Could not add parameter to operation. You mu
st specify either its Java or XML type. - with nested exception:
[weblogic.webservice.server.ConfigException: Could not add parameter to operatio
n. You must specify either its Java or XML type.]

My environment:
- JBuilder X
- Weblogic Platform 8.1
- Windows XP SP2

Here are my steps of implementing web services:

1. Write the Java code for the back-end components that make up the Web Service. Here's the method that handle the operation
....
public String testName(InputParam test) {
String inputName = test.getName();
System.out.println("Input name:"+inputName);
return "Hello "+inputName;
}
....

Here's InputParam:
public class InputParam {

private String name;
public InputParam() {
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}

2. Since I use JBuilder X I configure everything including handlers chain through web services designers
3. Build project

If nothing goes wrong, I will get generated client jars and a war file with web-services.xml inside.

I have no problem when I implement RPC-style web services.
I got the above error when I implement Document-oriented web services, but
I have no problem when I use String as a parameter instead of InputParam class.

I tried to change some attributes that might be relevant but got no luck.
I've tried using clientgen command line as well but the result was the same.

Below are the guidelines for creating document-oriented web services from the BEA's document that I think I already followed

- The methods that implement each operation of the Web Service can have only one parameter. This single parameter can be of any supported data type. (The Weblogic web services toolkit support simple JavaBean, doesn't it?)

- The methods that implement each operation cannot use out and in-out parameters. (I'm not sure about this one since I got Holder classes after using clientgen. However, there's no <param> tag in web-services.xml.)

I found the old solution from support.bea.com (ID = S-25689), but I don't think my situation is the same. I got the error while building web services...not deploying a web service.

Any answers to this question will be very much appreciated.

George
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Please help...I can't solve this web services error (ConfigException)