montag-users Mailing List for Montag
Status: Beta
Brought to you by:
sbtourist
You can subscribe to this list here.
| 2005 |
Jan
(11) |
Feb
(5) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(32) |
Aug
(6) |
Sep
|
Oct
|
Nov
(5) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(7) |
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Sergio B. <ser...@gm...> - 2006-02-25 15:09:21
|
On 2/24/06, Enric Jaen <en...@nm...> wrote:
> Hi Sergio, here it is:
> xmldb:exist://localhost:8080/exist/xmlrpc
Yes, if so you are right.
However, you should use:
xmldb:exist://localhost:8080/exist/xmlrpc/db/
If you make explicit use of the "db" parent directory, you couple your
client code with eXist.
If you embed the "db" root in the URI, like I suggest, your code will
work even if you switch to another database, because you can simply
use an empty string ("") as parent collection.
Let me know.
Regards,
Sergio B.
--
Sergio Bossa (http://sbtourist.blogspot.com)
Author and Lead Developer of:
- Montag (http://montag.sourceforge.net)
- QuickNote (http://quicknote.sourceforge.net)
|
|
From: Enric J. <en...@nm...> - 2006-02-25 11:42:32
|
Hi, I have created a new operation, addAttachDocument(), that adds the document as an attachment. This is useful in case to add large XML documents. I have tested it with eXist. I attach the two modified files for the local service, AddDocumentService.java, and XMLDBManager.java. Hope you find it useful, Regards, -Enric |
|
From: Enric J. <en...@nm...> - 2006-02-24 19:59:28
|
Hi Sergio, here it is:
xmldb:exist://localhost:8080/exist/xmlrpc
It is working doing: createCollection("db","test")
I have read in eXist that db is the root collection, so it makes sense..
Thanks,
-Enric
On Fri, 24 Feb 2006, Sergio Bossa wrote:
> On 2/24/06, Enric Jaen <en...@nm...> wrote:
>
> > I answer myself, it seems that the root parent is "db".
>
> Hi Enric,
>
> it sounds very strange, you sould not have to specify it ... how have
> you configured the eXist URI?
>
> Regards,
>
> Sergio B.
>
> --
> Sergio Bossa (http://sbtourist.blogspot.com)
> Author and Lead Developer of:
> - Montag (http://montag.sourceforge.net)
> - QuickNote (http://quicknote.sourceforge.net)
>
>
|
|
From: Sergio B. <ser...@gm...> - 2006-02-24 12:32:46
|
On 2/24/06, Enric Jaen <en...@nm...> wrote: > I answer myself, it seems that the root parent is "db". Hi Enric, it sounds very strange, you sould not have to specify it ... how have you configured the eXist URI? Regards, Sergio B. -- Sergio Bossa (http://sbtourist.blogspot.com) Author and Lead Developer of: - Montag (http://montag.sourceforge.net) - QuickNote (http://quicknote.sourceforge.net) |
|
From: Enric J. <en...@nm...> - 2006-02-24 11:53:32
|
I answer myself, it seems that the root parent is "db". -Enric On Thu, 23 Feb 2006, Enric Jaen wrote: > > Hello, > > I want to test the montag's addDocument() operation over eXist. > > addDocument expects a collection, but I have just installed eXist, so the database is empty. > > So I guess I have to call first createCollection(), but I have to pass a parent collection. > > If I put "" in the parent parameter then I receive an error: > java.lang.StringIndexOutOfBoundsException: String index out of range: 0 > > If I put null, I receive the error: > Error in 'parent' parameter > > So, I have two questions: > 1. what should I put in parent? > 2. do I have to create an entry in the local-config element of conf/local-config.xml with the name of the new collection? Does montag automaticaly create the collection in eXist? > > I'd appreciate any help on this. > Regards, > > -Enric > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Montag-users mailing list > Mon...@li... > https://lists.sourceforge.net/lists/listinfo/montag-users > > |
|
From: Enric J. <en...@nm...> - 2006-02-23 17:27:12
|
Hello,
I want to test the montag's addDocument() operation over eXist.
addDocument expects a collection, but I have just installed eXist, so the database is empty.
So I guess I have to call first createCollection(), but I have to pass a parent collection.
If I put "" in the parent parameter then I receive an error:
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
If I put null, I receive the error:
Error in 'parent' parameter
So, I have two questions:
1. what should I put in parent?
2. do I have to create an entry in the local-config element of conf/local-config.xml with the name of the new collection? Does montag automaticaly create the collection in eXist?
I'd appreciate any help on this.
Regards,
-Enric
|
|
From: Sergio B. <ser...@gm...> - 2006-02-06 14:58:33
|
Hi Alexandra,
sorry for my late reply, I hope you're still interested.
> I tried the snippet you sent me (very useful, BTW), and now
> I get a different error:
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Adding Collection 'test1' to '/myCol' ...
> log4j:WARN No appenders could be found for logger
> (org.apache.axis.i18n.ProjectResourceBundle).
> log4j:WARN Please initialize the log4j system properly.
> >>>> RemoteException
> AxisFault
> faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.10
> faultSubcode:
> faultString:
> faultActor:
> faultNode:
> faultDetail:
>
> {http://xml.apache.org/axis/}exceptionName:montag.core.MontagSOAPFault
Your client appears to be good and your error message seems related to
something regarding your XML database ... can you post some logs of
your db?
Regards,
Sergio B.
--
Sergio Bossa (http://sbtourist.blogspot.com)
Author and Lead Developer of:
- Montag (http://montag.sourceforge.net)
- QuickNote (http://quicknote.sourceforge.net)
|
|
From: Alexandra M. <al...@ya...> - 2006-01-19 09:59:25
|
Hello Sergio,
Thanks for your reply.
> What version of Axis APIs do you use?
I use Axis 1.3. (Actually I was using SOAP 2.3.1 when I
wrote my previous email, but then I realized I should use
Axis instead).
> However, you can try this snippet:
[CUT]
I tried the snippet you sent me (very useful, BTW), and now
I get a different error:
========================
Adding Collection 'test1' to '/myCol' ...
log4j:WARN No appenders could be found for logger
(org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
>>>> RemoteException
AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.10
faultSubcode:
faultString:
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}exceptionName:montag.core.MontagSOAPFault
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:10
87)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(
Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at
org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at
javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at
org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at
org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at
org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at
org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at
org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at
org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at
org.apache.axis.client.Call.invoke(Call.java:2767)
at
org.apache.axis.client.Call.invoke(Call.java:2443)
at
org.apache.axis.client.Call.invoke(Call.java:2366)
at
org.apache.axis.client.Call.invoke(Call.java:1812)
at
montagTest.CollectionAdder.add(CollectionAdder.java:32)
at
montagTest.CollectionAdder.main(CollectionAdder.java:65)
========================
I am attaching here my java client (CollectionAdder.java).
Thanks in advance,
Alexandra
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com |
|
From: Sergio B. <s....@pr...> - 2006-01-18 12:10:51
|
Alexandra Mart=EDnez wrote:
> I coded up a simple java client program to access one of
> the montag methods (e.g., createCollection), but I keep
> getting this error:
>=20
> Error encountered:
> montag.core.MontagSOAPFault
Hello Alexandra,
sorry for my late reply.
Can you post the whole error message?
> Here is the source code of the java program I wrote, in
> case it helps.=20
[CUT]
What version of Axis APIs do you use?
However, you can try this snippet:
String endpoint =3D =09
"http://localhost:8084/montag/services/CollectionManager";
Service service =3D new Service();
Call call =3D (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName(new QName("http://soapinterop.org/",=20
"createCollection"));
call.invoke(new Object[] {parent, child});
...
Let me know.
Regards,
Sergio B.
--=20
Sergio Bossa (http://sbtourist.blogspot.com/)
- Pro-Netics s.r.l. (http://www.pro-netics.com)
- Montag (http://montag.sourceforge.net)
- QuickNote (http://quicknote.sourceforge.net)
|
|
From: DL <dl....@nt...> - 2006-01-15 13:07:24
|
On 14 Jan 2006 at 3:45, Mart=EDnez wrote: > I am new to webservices and montag, and despite my efforts > reading soap and wsdl tutorials, I am not able to interact > successfully with Montag :( > I coded up a simple java client program to access one of > the montag methods (e.g., createCollection), but I keep > getting this error: > > Error encountered: > montag.core.MontagSOAPFault I can't help with reviewing your java client (I prefer to use PHP as the client) .. but when first trying to understand how to interact with montag and webservices in general, I found the evaluation version of SOAPscope at http://www.mindreef.com to be useful (you get about three weeks free evaluation). Another useful tool to add is Microsoft Fiddler http://www.fiddlertool.com/fiddler/ This is an HTTP proxy tool which allows the data flow between browser and webservices to be inspected. It can run on IE and Firefox 1.5 (proxy port= 8888). DL |
|
From: Alexandra M. <al...@ya...> - 2006-01-14 11:46:20
|
Hello,
I am new to webservices and montag, and despite my efforts
reading soap and wsdl tutorials, I am not able to interact
successfully with Montag :(
I coded up a simple java client program to access one of
the montag methods (e.g., createCollection), but I keep
getting this error:
Error encountered:
montag.core.MontagSOAPFault
Here is the source code of the java program I wrote, in
case it helps.
=================================================================
package montagTest;
import java.net.URL;
import java.util.Vector;
import java.util.Iterator;
import org.apache.soap.Constants;
import org.apache.soap.Fault;
import org.apache.soap.SOAPException;
import org.apache.soap.rpc.Call;
import org.apache.soap.rpc.Parameter;
import org.apache.soap.rpc.Response;
public class CollectionAdder {
static final String MONTAG_URL =
"http://localhost:8080/montag/services/CollectionManager/";
public void add(URL url, String parent, String newCol)
throws SOAPException {
System.out.println("Adding collection '" + newCol +
"' to '" +
parent + "'");
// Build the Call object
Call call = new Call( );
call.setTargetObjectURI("CollectionManager");
call.setMethodName("createCollection");
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
// Set up parameters
Vector params = new Vector( );
params.addElement(new Parameter("parent",
String.class, parent, null));
params.addElement(new Parameter("newCol",
String.class, newCol, null));
call.setParams(params);
// Invoke the call
Response response;
response = call.invoke(url, "");
if (!response.generatedFault( )) {
System.out.println("Successful collection
addition.");
} else {
Fault fault = response.getFault( );
System.out.println("Error encountered: " +
fault.getFaultString( ));
Vector entries = fault.getDetailEntries( );
for (Iterator i = entries.iterator(); i.hasNext( ); ) {
org.w3c.dom.Element entry =
(org.w3c.dom.Element)i.next( );
System.out.println(entry.getFirstChild().getNodeValue( ));
}
}
}
public static void main(String[] args) {
if (args.length != 2) {
System.out.println("Usage: java
javaxml2.CollectionAdder [Parent Collection] " +
"[New Collection]");
return;
}
try {
// URL for SOAP server to connect to
URL url = new URL(MONTAG_URL);
// Get values for new collection
String parent = args[0];
String newCol = args[1];
// Add the collection
CollectionAdder adder = new CollectionAdder(
);
adder.add(url, parent, newCol);
} catch (Exception e) {
e.printStackTrace( );
}
}
}
=================================================================
Any help or advice is greatly appreciated.
Thanks,
Alexandra
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|
|
From: Alexandra M. <al...@ya...> - 2006-01-08 23:41:46
|
Thanks a lot! Changing the XMLDB driver class solved the problem with Tomcat; now it loads without problem. Alexandra --- Sergio Bossa <ser...@gm...> wrote: > On 1/7/06, Alexandra Mart�nez <al...@ya...> wrote: > > > I am trying to run Montag on top of dbXML, but Tomcat > gives > > an error at startup when trying to load the montag > > application: > > > > java.lang.ClassCastException at > > > montag.servlets.InitServlet.configureXMLDB(InitServlet.java:138) > > ... > [CUT] > > > <db-driver>com.dbxml.db.client.xmlrpc.dbXMLClientImpl</db-driver> > > This is wrong. > You should use the following class as XMLDB driver: > > com.dbxml.db.client.xmldb.DatabaseImpl > > Let me know if this solves your problem. > > Regards, > > Sergio B. > > -- > Sergio Bossa (http://sbtourist.blogspot.com) > Author and Lead Developer of: > - Montag (http://montag.sourceforge.net) > - QuickNote (http://quicknote.sourceforge.net) > __________________________________________ Yahoo! DSL Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com |
|
From: Sergio B. <ser...@gm...> - 2006-01-07 16:30:50
|
On 1/7/06, Alexandra Mart=EDnez <al...@ya...> wrote: > I am trying to run Montag on top of dbXML, but Tomcat gives > an error at startup when trying to load the montag > application: > > java.lang.ClassCastException at > montag.servlets.InitServlet.configureXMLDB(InitServlet.java:138) > ... [CUT] > <db-driver>com.dbxml.db.client.xmlrpc.dbXMLClientImpl</db-driver> This is wrong. You should use the following class as XMLDB driver: com.dbxml.db.client.xmldb.DatabaseImpl Let me know if this solves your problem. Regards, Sergio B. -- Sergio Bossa (http://sbtourist.blogspot.com) Author and Lead Developer of: - Montag (http://montag.sourceforge.net) - QuickNote (http://quicknote.sourceforge.net) |
|
From: Alexandra M. <al...@ya...> - 2006-01-07 03:52:57
|
Hello all,
I am trying to run Montag on top of dbXML, but Tomcat gives
an error at startup when trying to load the montag
application:
java.lang.ClassCastException at
montag.servlets.InitServlet.configureXMLDB(InitServlet.java:138)
...
Still, I am able to get the page at
http://localhost:8080/montag/services
So, I wonder what is wrong. I am using Montag 0.7, dbXML
2.0, and tomcat 5.0 with jsdk 1.4.2_10.
I was thinking that perhaps I haven't set up the
<db-driver> and <dc-uri> properties correctly in the
montag-config.xml file. This is what I have:
<db-driver>com.dbxml.db.client.xmlrpc.dbXMLClientImpl</db-driver>
<db-uri>http://localhost:7280/rest/</db-uri>
I also tried with "local" and "remote" options in the
config file, but none seemed to have an effect in fixing
the problem.
Can you help me out and give some hint as to what can I
possibly be doing wrong?
Thanks in advance,
Alexandra
__________________________________________
Yahoo! DSL Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
|
|
From: Sergio B. <ser...@gm...> - 2005-11-21 13:58:16
|
On 11/19/05, Java Developer <ja...@wi...> wrote:
> I'm going nuts trying to get a dynamic example working, any suggestions?:
[CUT]
Try this, please:
String wsdl=3D"http://localhost:XXXX/montag/services/GetDocument?wsdl";
Service service =3D new Service(new java.net.URL(wsdl),new
QName("http://montag.sourceforge.net/ns/wsdl/local","GetDocumentService"));
call =3D (Call) service.createCall(new QName("GetDocument"));
call.setOperationName(new
QName("http://montag.sourceforge.net/ns/wsdl/local", "getDocument") );
call.setOperationUse(org.apache.axis.constants.Use.LITERAL);
call.setOperationStyle(org.apache.axis.constants.Style.WRAPPED);
...
Let me know.
Regards,
Sergio B.
--
Sergio Bossa (http://sbtourist.blogspot.com)
Author and Lead Developer of:
- Montag (http://montag.sourceforge.net)
- QuickNote (http://quicknote.sourceforge.net)
|
|
From: Sergio B. <ser...@gm...> - 2005-11-21 13:48:10
|
On 11/18/05, Java Developer <ja...@wi...> wrote: > JBoss wants to see an archive in order to deploy it (copying the > montag folder to the deploy directory produces some ugly results). > However, this gave me the clue that Axis was having a problem finding > the context root, So I made the following changes to get it working: [CUT] I agree with all your changes but this: > Changes to WEB-INF/conf/montag-config.xml (changed "QueryService" to > "XQueryService" in 0.8 distribution): [CUT] In the 0.8 beta distribution, QueryService is correctly called XQueryServic= e. > I then could create the WAR file in the context root, and it deployed > correctly in JBoss. > This fixed the WSDL problem, but I haven't yet tested the web > services themselves. Hope this helps. Yes, you've made a good work, because I've never tested Montag in JBoss. Regards, Sergio B. -- Sergio Bossa (http://sbtourist.blogspot.com) Author and Lead Developer of: - Montag (http://montag.sourceforge.net) - QuickNote (http://quicknote.sourceforge.net) |
|
From: Java D. <ja...@wi...> - 2005-11-19 02:14:24
|
I'm going nuts trying to get a dynamic example working, any
suggestions?:
<cite>
/* create a new service call */
javax.xml.rpc.ServiceFactory sf =
org.apache.axis.client.ServiceFactory.newInstance();
java.net.URL wsdlURL = new java.net.URL("http://localhost:8080/
montag/services/GetDocument?wsdl");
javax.xml.namespace.QName serviceQname = new
javax.xml.namespace.QName("http://montag.sourceforge.net/ns/wsdl/
local", "GetDocumentService");
javax.xml.rpc.Service service = sf.createService(wsdlURL,
serviceQname);
javax.xml.namespace.QName portQname = new javax.xml.namespace.QName
("http://localhost:8080/montag/services/GetDocument", "getDocument");
javax.xml.rpc.Call call = service.createCall(portQname);
/* set the endpoint address */
call.setTargetEndpointAddress("http://localhost:8080/montag/
services/GetDocument");
call.setProperty("javax.xml.rpc.encodingstyle.namespace.uri", "");
/* set parameters */
call.addParameter( "reports", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter( "402880e405f4591f0105f55cf0000007.xml",
XMLType.XSD_STRING, ParameterMode.IN);
/* set the return type */
call.setReturnType(org.apache.axis.Constants.XSD_STRING);
Object[] params = {"reports","402880e405f4591f0105f55cf0000007.xml"};
/* invoke the web service call */
try {
result = (String) call.invoke(params);
}
catch (org.apache.axis.AxisFault f) {
System.out.println("Axis Fault:"+f.toString());
}
catch (Exception e) {
System.out.println("Exception:"+e.toString());
}
</cite>
Exception at "javax.xml.rpc.Service service = sf.createService
(wsdlURL, serviceQname);":
<cite>
2005-11-18 17:03:40,972 INFO [TimeLogger] URL: http://localhost:8080/
montag/services/GetDocument - Elaboration Time: 7ms
2005-11-18 17:03:40,990 ERROR [org.apache.axis.client.Service] Error
processing WSDL document:
javax.xml.rpc.ServiceException: Cannot find service: {http://
montag.sourceforge.net/ns/wsdl/local}GetDocumentService
javax.xml.rpc.ServiceException: Error processing WSDL document:
javax.xml.rpc.ServiceException: Cannot find service: {http://
montag.sourceforge.net/ns/wsdl/local}GetDocumentService
at org.apache.axis.client.Service.initService(Service.java:357)
at org.apache.axis.client.Service.initService(Service.java:287)
at org.apache.axis.client.Service.<init>(Service.java:194)
at org.jboss.webservice.client.ServiceImpl.<init>
(ServiceImpl.java:104)
at
org.jboss.webservice.client.ServiceFactoryImpl.createService
(ServiceFactoryImpl.java:112)
</cite>
For various reasons I prefer not to use the WSDL2Java stubs at this
point.
--Paul
|
|
From: Sergio B. <ser...@gm...> - 2005-11-18 10:09:31
|
On 11/17/05, Java Developer <ja...@wi...> wrote: > I have been creating a WAR file for JBoss 4.01 Tomcat 5.0 by typing > the following in the "montag" subfolder of either the 0.7 or 0.8 > distribution: > > jar -cvf montag.war . [CUT] > java.lang.ClassNotFoundException: No ClassLoaders found for: > montag.services.local.QueryService [CUT] This sounds very strange, please try to deploy Montag without making a war, but rather directly using its directory. I'm sorry, but at the moment Montag deploy is a bit critical, I plan to enhance it in the next stable version. Let me know. Regards, Sergio B. -- Sergio Bossa (http://sbtourist.blogspot.com) Author and Lead Developer of: - Montag (http://montag.sourceforge.net) - QuickNote (http://quicknote.sourceforge.net) |
|
From: Java D. <ja...@wi...> - 2005-11-17 20:03:57
|
I have been creating a WAR file for JBoss 4.01 Tomcat 5.0 by typing
the following in the "montag" subfolder of either the 0.7 or 0.8
distribution:
jar -cvf montag.war .
After deploying this in Jboss, I can get the index page at "http://
localhost:8080/montag", but when I try to see the services at "/
services", I get:
<cite>
And now... Some Services
AXIS error
Sorry, something seems to have gone wrong... here are the details:
Fault - Could not find class for the service named:
montag.services.local.QueryService
Hint: you may need to copy your class files/tree into the right
location (which depends on the servlet system you are using).; nested
exception is:
java.lang.ClassNotFoundException: No ClassLoaders found for:
montag.services.local.QueryService
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}
Server.generalException
faultSubcode:
faultString: Could not find class for the service named:
montag.services.local.QueryService
Hint: you may need to copy your class files/tree into the right
location (which depends on the servlet system you are using).; nested
exception is:
java.lang.ClassNotFoundException: No ClassLoaders found for:
montag.services.local.QueryService
faultActor:
faultNode:
faultDetail:
</cite>
Is there something I need to do to get this working in JBoss?
Thanks!
--Paul
|
|
From: DL <dl....@nt...> - 2005-08-15 21:10:30
|
> You do not have to encode the "&" character in XQuery, except when you > are inserting it into an XML fragment. Thanks .. now XQuery working invoked via SOAPscope viewer. |
|
From: Sergio B. <ser...@gm...> - 2005-08-15 18:46:27
|
On 8/14/05, DL <dl....@nt...> wrote: > =20 > I am trying to invoke montag XQueryService from SOAPscope client ..=20 >=20 > the test query string is as follows ....=20 > =20 > for $speech in //SPEECH[SPEAKER &=3D 'witch' and near(., 'fenny snake= ')] > return $speech=20 > =20 > however I get this fault report ... even though "&" is expressed as "&= ;"=20 [CUT] You do not have to encode the "&" character in XQuery, except when you are inserting it into an XML fragment. So, your query must be: for $speech in //SPEECH[SPEAKER &=3D 'witch' and near(., 'fenny snake')] return $speech Regards, Sergio B. --=20 Sergio Bossa (http://sbtourist.blogspot.com) Author and Lead Developer of: - Montag, Web Services System for XML Database Interaction: http://montag.sourceforge.net - QuickNote: http://quicknote.sourceforge.net |
|
From: DL <dl....@nt...> - 2005-08-13 22:49:10
|
I am trying to invoke montag XQueryService from SOAPscope client ..
the test query string is as follows ....
for $speech in //SPEECH[SPEAKER &= 'witch' and near(., 'fenny snake')] return $speech
however I get this fault report ... even though "&" is expressed as "&"
Fault
{
faultcode = soapenv:Server.7,
faultstring = unexpected char: '&',
detail
{
exceptionName = montag.core.MontagSOAPFault,
hostname = mylocalhost
}
}
What is the correct query syntax to use including & ?
...
Here is the Request in XML
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:types="http://montag.sourceforge.net/ns/wsdl/local/types"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<types:username />
<types:password />
</soap:Header>
-<soap:Body>
<types:query>
<types:collection>shakespeare/plays</types:collection>
<types:query>for $speech in //SPEECH[SPEAKER &= 'witch' and near(.,
'fenny snake')] return $speech</types:query>
</types:query>
</soap:Body>
</soap:Envelope>
....
Here is the Response in XML
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.7</faultcode>
<faultstring>unexpected char: '&'</faultstring>
<detail>
<ns1:exceptionName
xmlns:ns1="http://xml.apache.org/axis/">montag.core.MontagSOAPFault</ns1:excepti
onName>
<ns2:hostname
xmlns:ns2="http://xml.apache.org/axis/">mylocalhost</ns2:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope
|
|
From: Sergio B. <ser...@gm...> - 2005-08-10 16:57:25
|
On 8/10/05, dl....@nt... <dl....@nt...> wrote: > I read that PHP5 SOAP is WS-I Basic Profile compliant .. so I intend to r= evert to using > PHP5 clients to access montag -> eXist. Good. > Are there any plans in the road map for montag to support Berkeley XML DB= ? Yes, I plan to support it for the next version. Regards, Sergio B. --=20 Sergio Bossa (http://sbtourist.blogspot.com) Author and Lead Developer of: - Montag, Web Services System for XML Database Interaction: http://montag.sourceforge.net - QuickNote: http://quicknote.sourceforge.net |
|
From: Sergio B. <ser...@gm...> - 2005-08-07 18:03:49
|
On 8/7/05, dl....@nt... <dl....@nt...> wrote: > The Laszlo SOAP WSDL parser expects the XML schema array pattern to look > like:=20 > <xsd:complexType name=3D"ARRAY_NAME">=20 > <xsd:complexContent>=20 > <xsd:restriction base=3D"soapenc:Array">=20 > <xsd:attribute ref=3D"soapenc:arrayType" > wsdl:arrayType=3D"ARRAY_TYPE[]"/>=20 > </xsd:restriction>=20 > </xsd:complexContent>=20 > </xsd:complexType>=20 >=20 [CUT] > =20 > Can you see any montag incompatibility in the openlaszlo SOAP message whi= ch > results in SOAP message not being processed by montag ..=20 Yes, if the Laszlo SOAP WSDL parser expects the XML schema array pattern you reported, this is the problem: it is not WS-I Basic Profile compliant, because uses SOAP Array Encoding. > not even being logged?=20 This is a Montag problem: SOAP faults seem to be not logged; I'll try to correct this for next releases. Regards, Sergio B. --=20 Sergio Bossa (http://sbtourist.blogspot.com) Author and Lead Developer of: - Montag, Web Services System for XML Database Interaction: http://montag.sourceforge.net - QuickNote: http://quicknote.sourceforge.net |
|
From: <dl....@nt...> - 2005-08-07 14:24:16
|
This experiment is an attempt to invoke montag XQueryService -> eXist DB from a SOAP client in openlaszlo platform running on tomcat server. Test Requirement: Install lps-3.0.2 servlet in %tomcat_home%\webapps\ http://www.openlaszlo.com/download/ http://www.laszlosystems.com/developers/download/ ..... servlet only 10 MB _________________________________________ openlaszlo SOAP documents here .. http://www.laszlosystems.com/lps-2.2/docs/guide/rpc-soap.html#d0e23146 Example 40.10 XML schema array pattern The Laszlo SOAP WSDL parser expects the XML schema array pattern to look like: <xsd:complexType name="ARRAY_NAME"> <xsd:complexContent> <xsd:restriction base="soapenc:Array"> <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="ARRAY_TYPE[]"/> </xsd:restriction> </xsd:complexContent> </xsd:complexType> _________________________________________ Extract of XML schema from montag XQueryService.wsdl <wsdl:types> <schema elementFormDefault="qualified" targetNamespace="http://montag.sourceforge.net/ns/wsdl/local/types" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:types="http://montag.sourceforge.net/ns/wsdl/local/types"> <element name="query"> <complexType> <sequence> <element name="collection" type="xsd:string"/> <element name="query" type="xsd:string"/> <element maxOccurs="unbounded" minOccurs="0" name="namespaces" type="xsd:string"/> <element maxOccurs="unbounded" minOccurs="0" name="vars" type="xsd:string"/> </sequence> </complexType> </element> <element name="queryResponse"> <complexType> <sequence> <element name="queryReturn" type="xsd:string"/> </sequence> </complexType> </element> <element name="username"> <simpleType> <restriction base="xsd:string"/> </simpleType> </element> <element name="password"> <simpleType> <restriction base="xsd:string"/> </simpleType> </element> <element name="MontagSOAPFault"> <complexType> <sequence/> </complexType> </element> </schema> </wsdl:types> _________________________________________ Invoking the webservice and monitoring POST session using Microsoft Fiddler HTTP Debugging Proxy this is the textview of the POST fpv=7%2E19&lzr=swf6&proxied=true&lzpostbody=%3Ce%3E%3Ch%3E%3Cusernam e%3Eadmin%3C%2Fusername%3E%3Cpassword%3E%3C%2Fpassword%3E%3C% 2Fh%3E%3Cb%3E%3Cparams%3E%3Cparam%3E%253Cquery%2520xmlns%253A xsi%253D%2522http%253A%252F%252Fwww%252Ew3%252Eorg%252F2001%252 FXMLSchema%252Dinstance%2522%253E%253Cusername%253E%253C%252Fus ername%253E%253Cpassword%253E%253C%252Fpassword%253E%253Ccollectio n%253Eshakespeare%252Fplays%253C%252Fcollection%253E%253Cquery%253Ef or%2520%2524speech%2520in%2520%252F%252FSPEECH%255BSPEAKER%252 0%2526amp%253B%253D%2520%2527witch%2527%2520and%2520near%2528%2 52E%252C%2520%2527fenny%2520snake%2527%2529%255D%2520return%2520 %2524speech%253C%252Fquery%253E%253Cnamespaces%253E0%253C%252Fn amespaces%253E%253Cvars%253E0%253C%252Fvars%253E%253C%252Fquery %253E%3C%2Fparam%3E%3C%2Fparams%3E%3C%2Fb%3E%3C%2Fe%3E&opst yle=document&operation=query&port=XQueryService&service=XQueryServiceService &wsdl=http%3A%2F%2Flocalhost%3A8080%2Fmontag%2Fservices%2FXQueryServi ce%3FWSDL&request=invoke&url=soap%3A%2F%2Fsoap&reqtype=POST&lzt=data &ccache=false&cache=false&sendheaders=false _________________________________________ This POST decodes as follows ..( note the openlaszlo arguments at top and tail) fpv=7.19 &lzr=swf6 &proxied=true &lzpostbody= <e> <h> <username>admin</username> <password></password> </h> <b> <params> <param> <query xmlns:xsi="http://www.w3.org/2001/XMLSchema%2Dinstance"> <username></username> <password></password> <collection>shakespeare/plays</collection> <query>for $speech in //SPEECH[SPEAKER &= 'witch' and near(., 'fenny snake')] return $speech</query> <namespaces>0</namespaces> <vars>0</vars> </query> </param> </params> </b> </e> &opstyle=document&operation=query &port=XQueryService&service=XQueryServiceService &wsdl=http://localhost:8080/montag/services/XQueryService?WSDL &request=invoke&url=soap://soap&reqtype=POST &lzt=data &ccache=false &cache=false &sendheaders=false _________________________________________ However .. I am getting an AxisFault report in the SOAPclient log (the SOAP message POST does not reach the montag log and there is no response message) "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Server.userException</faultcode> <faultstring>org.xml.sax.SAXException: operation description is missing parameter description!</faultstring> <detail> <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">mylocalhostname</ns1:hostname> </detail> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope>" _________________________________________ Can you see any montag incompatibility in the openlaszlo SOAP message which results in SOAP message not being processed by montag .. not even being logged? _________________________________________ To demonstrate that montag/exist is setup correctly, I can invoke the same web service using a PHP5 SOAP client .. which correctly returns this test response .. QUERY PARAMETERS ARRAY: username: password: collection: shakespeare/plays query: for $speech in //SPEECH[SPEAKER &= 'witch' and near(., 'fenny snake')] return $speech namespaces: 0 vars: 0 SOAP FUNCTIONS: array(1) { [0]=> string(38) "queryResponse query(query $parameters)" } SOAP TYPES: array(5) { [0]=> string(85) "struct query { string collection; string query; string namespaces; string vars; }" [1]=> string(45) "struct queryResponse { string queryReturn; }" [2]=> string(15) "string username" [3]=> string(15) "string password" [4]=> string(26) "struct MontagSOAPFault { }" } LAST REQUEST HEADERS: string(196) "POST /montag/services/XQueryService HTTP/1.1 Host: localhost:8080 Connection: Keep-Alive User-Agent: PHP SOAP 0.1 Content-Type: text/xml; charset=utf-8 SOAPAction: "" Content-Length: 472 " LAST REQUEST: string(472) " shakespeare/playsfor $speech in //SPEECH[SPEAKER &= 'witch' and near(., 'fenny snake')] return $speech00 " LAST RESPONSE HEADERS: string(147) "HTTP/1.1 200 OK Content-Type: text/xml;charset=utf-8 Transfer- Encoding: chunked Date: Sun, 07 Aug 2005 14:02:25 GMT Server: Apache- Coyote/1.1 " LAST RESPONSE: string(1788) "<?xml version="1.0" encoding="UTF-8"?> <montag:result-set xmlns:montag="http://montag.sourceforge.net/ns/result-set" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://montag.sourceforge.net/ns/result-set http://montag.sourceforge.net/schema/resultSet.xsd"> <montag:content> <SPEECH> <SPEAKER> Second <exist:match xmlns:exist="http://exist.sourceforge.net/NS/exist">Witch</exist:match> </SPEAKER> <LINE> Fillet of a <exist:match xmlns:exist="http://exist.sourceforge.net/NS/exist">fenny</exist:match> <exist:match xmlns:exist="http://exist.sourceforge.net/NS/exist">snake</exist:match> , </LINE> <LINE>In the cauldron boil and bake;</LINE> <LINE>Eye of newt and toe of frog,</LINE> <LINE>Wool of bat and tongue of dog,</LINE> <LINE>Adder's fork and blind-worm's sting,</LINE> <LINE>Lizard's leg and owlet's wing,</LINE> <LINE>For a charm of powerful trouble,</LINE> <LINE>Like a hell-broth boil and bubble.</LINE> </SPEECH> </montag:content> </montag:result-set> " |