cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graaf, Edgar de (fin)" <Edgar.de.Gr...@ordina.nl>
Subject SOAP
Date Mon, 10 Jun 2002 13:10:33 GMT
Hi,

I have add a xsp. The problem is that when the SOAP method is called, then
it is called 8 times. I have tried to solve it with a boolean, but
appearantly the XSP is not called 8 times (but the SOAP part is). To me it
looks like it is http://apache.org/xsp/soap/3.0. Is this a known issue? Or
can somebody tell me what I do wrong.

Thanks,

Edgar
---------------------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
	Author: Edgar de Graaf, edegraaf@ematic.com
	Date: October 9, 2001
-->
<xsp:page
  language="java"
  xmlns:xsp="http://apache.org/xsp"
  xmlns:xsp-request="http://apache.org/xsp/request/2.0"
  xmlns:soap="http://apache.org/xsp/soap/3.0"
  >
  <xsp:structure>
		<xsp:include>javax.ejb.*</xsp:include>
		<xsp:include>javax.naming.*</xsp:include>
		<xsp:include>java.util.*</xsp:include>
		<xsp:include>javax.rmi.PortableRemoteObject</xsp:include>
		<xsp:include>javax.servlet.http.*</xsp:include>
		<xsp:include>org.jnp.interfaces.*</xsp:include>

	
<xsp:include>com.ordina.bugtrack.usersEjb.UsersHome</xsp:include>
	
<xsp:include>com.ordina.bugtrack.usersEjb.Users</xsp:include>
	
<xsp:include>org.apache.cocoon.environment.Session</xsp:include>
	</xsp:structure>
	<xsp:logic>static boolean switch1 = false;</xsp:logic>
  <page>
  <xsp:logic>
  try{
		java.util.Properties env = new java.util.Properties();
		env.put(
"java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory" );
		env.put( "java.naming.provider.url","jnp://localhost:1099"
);
		env.put(
"java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
		
		Object ref;
		javax.naming.Context jndiContext = null;
		jndiContext = new InitialContext(env);
		
		ref = jndiContext.lookup("jaws/UsersEJB");
		UsersHome usersHome = (UsersHome)
PortableRemoteObject.narrow (ref, UsersHome.class);
		Session session = request.getSession();

		String username = (String)session.getAttribute("username");
		Users users = usersHome.findByUsername(username);
		Integer userno = users.getUserno();
		if(users.getType().toLowerCase().equals("developer")){
  </xsp:logic>
  <xsp:expr>userno</xsp:expr>
  <xsp-request:get-parameter name="component"/>
  <xsp-request:get-parameter name="project"/>
		if(!switch1){
		switch1 = true;
	 <soap:call
url="http://localhost:8080/apache-soap/servlet/rpcrouter">
		<ns1:addComponent
xmlns:ns1="urn:com/ordina/bugdb/Component">
				<Parameter1 xsi:type="xsd:string"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"><xsp-request:get-parameter
name="component"/></Parameter1>
			 	<Parameter2 xsi:type="xsd:int"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"><xsp-request:get-parameter
name="project"/></Parameter2>
			 	<Parameter3 xsi:type="xsd:int"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"><xsp:expr>userno</xsp:expr></Pa
rameter3>
			 	<soap:enc/>
		</ns1:addComponent>
	 </soap:call>
	 }
	<xsp:logic>}
	}catch(Exception e){System.err.println(e);}</xsp:logic>
	<content>
		<textoutput>The component <xsp-request:get-parameter
name="component"/> was created.</textoutput>
	</content>
	</page>
</xsp:page>

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message