Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Objects, web services and netbeans

 
Huw Morgan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to make a web service that returns an array of objects (where each object is a small number of strings). I shall list what I have done, if you just want to read the problem skip to <PROBLEM>.

1) Wrote .wsdl file [1]

In netbeans:
2) Generated web service from WSDL:
A) New web application, using the sun application server
B) New Web Service From WSDL (this gives an error, Illegal character in path at index 18: file:/<path of wsdl file>
C) Right click on web service, Refreash service. No error
D) Run project, test web service, seems to work, returns null.

3) Consumed service:
A) New general application,
B) In main method, right click / Web Service Client Resources / Call Web Service Operation
C) Select method (getparams(String))
D) Add import org.impress.PortType; as prompted
E) Run project, Result = null

Now I want to add some data to what I am passing. First I return a new namespace.webservice._new.Paramarrayel (what netbeans decided the method should return). The client now shows that something is returned (org.impress.Paramarrayel@1bb5c09).

<PROBLEM>
Now this is where I get stuck. I want to add the data, the client knows there should be a .getGetparamreturns() function in the returned org.impress.Paramarrayel object but I cannot figure out how to add it in the server. I have tryed extending the namespace.webservice._new.Paramarrayel and namespace.webservice._new.Paramreturns, and adding a Paramreturns as a member variable of Paramarrayel but .getGetparamreturns() returns null in the client.

Anyone able to help?

[1]
[ October 29, 2007: Message edited by: Huw Morgan ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic