XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Matthew FadoulSubject: XQuery, ddtek:wscall, and an empty payload
Author: Matthew Fadoul
Date: 22 Nov 2007 03:12 AM
Originally Posted: 22 Nov 2007 03:09 AM
I'm trying to use Axis2's included "Version" service as an example of the workflow of WSCC and XQuery within Stylus Studio.

When I'm working with the WSCC file, I can easily send a "getVersion" message to my server and get the correct response.

When I select "WebServiceCall-->Copy XQuery Call to Clipboard" in the pulldown menu, I am able to paste the following code into a new xquery file:

ddtek:wscall(
<ddtek:location
address="http://blackberry:8080/axis2/services/Version"
soapaction="urn:getVersion"/>
,
)

Unfortunately, StylusStudio gives me an syntax error, presumably because the body of the SOAP message (aka the payload) is empty. The text of the error is:

[DataDirect][XQuery][err:XPST0003]Error at line 8, column 1. Unexpected token ")" for step expression.


Any ideas and/or solutions?

Postnext
Minollo I.Subject: XQuery, ddtek:wscall, and an empty payload
Author: Minollo I.
Date: 22 Nov 2007 09:51 AM
The wscall() function is missing the SOAP request argument; which seems to be a symptom that something wrong happened in the Web Service Call Composer when you copied the XQuery call.

You can try creating the SOAP request argument (the second one) yourself; or you can email us the WSDL which describes the getVersion operation (stylus-field-report@progress.com) and we can try to understand what's going wrong.

Postnext
Matthew FadoulSubject: XQuery, ddtek:wscall, and an empty payload
Author: Matthew Fadoul
Date: 22 Nov 2007 10:32 PM
Originally Posted: 22 Nov 2007 10:27 PM
I'm going to attach the WSDL generated by Axis2. The "Version" service is a simple service with a single request-response operation named "getVersion".

I was able to create a GetVersion.wscc inside SS. Here are the messages:

Request:

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:getVersionResponse xmlns:ns="http://axisversion.sample">
<ns:return>Hello I am Axis2 version service , My version is 1.3</ns:return>
</ns:getVersionResponse>
</soapenv:Body>
</soapenv:Envelope>

You may notice that the getVersion has an empty SOAP body. I think that may be the problem.

Just to emphasize, the WSCC file is capable of successfully executing the request-response operation. The problem seems to start when I export to XQuery and the resultant "wscall" doesn't know how to deal with an empty soap body.

Both Axis and Axis2 servers come with this as a simple web service example.

Regards,

Matt


UnknownVersion.wsdl
WSDL of the Axis2 Version service

Postnext
Alberto MassariSubject: XQuery, ddtek:wscall, and an empty payload
Author: Alberto Massari
Date: 23 Nov 2007 03:19 AM
Hi Matthew,
the wscall() function requires a payload; what happens if you specify a dummy one (e.g. <dummy/>)? Does the web service still performs its operation?

Alberto

Postnext
Matthew FadoulSubject: XQuery, ddtek:wscall, and an empty payload
Author: Matthew Fadoul
Date: 23 Nov 2007 10:59 AM
As always, thank you for the timely responses. The support from you and your team here at the forum is invaluable.

Adding a <dummy/> payload as the last argument seems to work as a last parameter for the wscall function.

I would think that this is a pretty simple bug to fix, by either:
1) Overloading the wscall function to make the last parameter optional.
2) Fixing the code behind the "Copy XQuery Code to Clipboard" so that it inserts a dummy payload into the wscall.

Postnext
Minollo I.Subject: XQuery, ddtek:wscall, and an empty payload
Author: Minollo I.
Date: 23 Nov 2007 11:08 AM
It is a simple issue, and that will indeed be fixed in the coming version.

Postnext
Ivan PedruzziSubject: XQuery, ddtek:wscall, and an empty payload
Author: Ivan Pedruzzi
Date: 24 Nov 2007 11:43 PM
Matthew,

Could you tell us more about how you have generated the WSDL?

Which Apache Axis version was used?

Using which command line switches?

Thanks!
Ivan Pedruzzi
Stylus Studio Team
http://www.stylusstudio.com/xml_download.html

Postnext
Matthew FadoulSubject: XQuery, ddtek:wscall, and an empty payload
Author: Matthew Fadoul
Date: 25 Nov 2007 12:49 AM
Originally Posted: 25 Nov 2007 12:29 AM
Hello Ivan,

Here are the answers to your questions:

***** Which version of Axis? *****

For the purpose of this thread, I'm simply looking at the simple "Version" service that comes with Axis. It seems to ship with both Axis and Axis2, but I'm mainly concerned with Axis2 1.3 (distributed as the file "axis2-1.3-war.zip" by Apache), which is installed in my Tomcat server.

***** How did I generate the WSDL? *****

The WSDL that I attached to my previous post was generated by Axis, using the standard "?wsdl" option at the end of the URL. On my server named "blackberry" and using port 8080, the address is:

http://blackberry:8080/axis2/services/Version?wsdl

If you have an Axis or Axis2 server, you may have the "Version" service there. Its source code is also included in the Axis2 "samples" directory. Please let me know if you've got access to the "Version" service.

***** Using which command line switches? *****

Again, for this thread, we're just talking about the sample "Version" service that ships with Axis and Axis2, so I couldn't really answer that question.

If you'd like, I could address this question for the actual WSDLs that I'm building. I assume you're talking about command line switches for the wsdl2java command. Is that correct?

BTW, my web service development has included Stylus Studio for editing (e.g. Schemas and WSDL files) and Eclipse for server-side code generation and WAR packaging deployment, using the appropriate wizards.

Matt

PS: I am a bit new to web services with Java (I've still got the worldview of a C++ programmer), so I appreciate your patience with me and my questions.

Posttop
Ivan PedruzziSubject: XQuery, ddtek:wscall, and an empty payload
Author: Ivan Pedruzzi
Date: 26 Nov 2007 11:29 AM

Thanks for your help!

Ivan Pedruzzi
Stylus Studio Team

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.