Java (AXIS2) web service requests. (140 Views)
Reply
Occasional Visitor
Jacob4
Posts: 2
Registered: ‎03-11-2013
Message 1 of 2 (140 Views)

Java (AXIS2) web service requests.

[ Edited ]

Im trying to get some basic calls to the SOAP web service working. I am able to succesfully submit a request, but am having difficulty reading the result. There is no "items" array or anything like that in the Java TrimResponse object, ie:

 

TrimRequest request = new TrimRequest();

EngineStub.RecordTypeStringSelect r = new EngineStub.RecordTypeStringSelect();

r.setId("recordTypeId");

r.setArg("MyRecordType");

r.setBehaviorFilter(EngineStub.RecordBehaviours.Folder);

r.setTypeFilter(EngineStub.RecordTypeFilters.All);

 

EngineStub.Execute e = new EngineStub.Execute();

e.setReq(request);

TrimResponse response = stub.execute(e).getExecuteResult();

.... ?????

 

I am also trying to work out why when that last line is executed, the Java process hangs!!

Please use plain text.
Esteemed Contributor
Richard Kelly_7
Posts: 202
Registered: ‎02-15-2007
Message 2 of 2 (114 Views)

Re: Java (AXIS2) web service requests.

Well, it will depend (for the names) on how you generate your Java interface. I used NetBeans for this, so the function name will be dufferent, but similar (getExecuteResult replacing getTimingResultOrEndResponseOrSearchResult below)

 

                 TrimResponse result = port.execute(request);

                List<Result> trr = result.getTimingResultOrEndResponseOrSearchResult();

                for (Iterator it = trr.iterator(); it.hasNext();)
                {
                    Result tr = (Result)it.next();

 I would guess if you split the execute() and getExecuteResult() down it is less likely to hang (possibly a timing thing)

It is a long time since I wrote this so forgetting a great deal!

Note: Any posts I make on this forum are my own personal opinion and do not constitute a formal commitment on behalf of HP.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation