ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lakshmi Chaparala" <lakshmi.chapar...@issinc.com>
Subject RE: [Sandesha] Run ontop of Jboss
Date Tue, 09 Aug 2005 17:23:00 GMT
Hi Saminda,

 

Thanks for your response. Yes all samples seem to work now. But when I port
the same into our services I get the following errors:

 

Request:

 

POST /gateway/services/DataMaintenanceSOAPPort HTTP/1.0

Content-Type: text/xml; charset=utf-8

Accept: application/soap+xml, application/dime, multipart/related, text/*

User-Agent: Axis/1.2

Host: 127.0.0.1:8070

Cache-Control: no-cache

Pragma: no-cache

SOAPAction: "http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence"

Content-Length: 1741

 

<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header>

<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
ty-secext-1.0.xsd" soapenv:mustUnderstand="1">

<wsse:UsernameToken><wsse:Username>wsuser</wsse:Username><wsse:Password
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token
-profile-1.0#PasswordDigest">QJNhS//cOGemiB4d6YEAEGSn3HI=</wsse:Password><ws
se:Nonce>KG4VTrkZ2w6363wJmshqzQ==</wsse:Nonce><wsu:Created
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
y-utility-1.0.xsd">2005-08-09T16:59:50Z</wsu:Created></wsse:UsernameToken></
wsse:Security><wsa:MessageID
soapenv:mustUnderstand="0">uuid:8a04d340-08f6-11da-9996-8fd8ef926dd2</wsa:Me
ssageID><wsa:To
soapenv:mustUnderstand="0">http://localhost:8070/gateway/services/DataMainte
nanceSOAPPort</wsa:To><wsa:Action
soapenv:mustUnderstand="0">http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSe
quence</wsa:Action><wsa:From
soapenv:mustUnderstand="0"><wsa:Address>http://localhost:9090/gateway/servic
es/RMService</wsa:Address></wsa:From><wsa:ReplyTo
soapenv:mustUnderstand="0"><wsa:Address>http://127.0.0.1:9070/gateway/servic
es/DataMaintenanceSOAPPort</wsa:Address></wsa:ReplyTo></soapenv:Header><soap
env:Body><wsrm:CreateSequence><wsrm:AcksTo><wsa:Address>http://schemas.xmlso
ap.org/ws/2004/08/addressing/role/anonymous</wsa:Address></wsrm:AcksTo></wsr
m:CreateSequence></soapenv:Body></soapenv:Envelope>


Response:

 

HTTP/1.1 200 OK

Server: Apache-Coyote/1.1

X-Powered-By: Servlet 2.4; JBoss-4.0.2 (build: CVSTag=JBoss_4_0_2
date=200505022023)/Tomcat-5.5

Content-Type: text/xml;charset=utf-8

Date: Tue, 09 Aug 2005 16:59:51 GMT

Connection: close

 

<?xml version="1.0" encoding="utf-8"?><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>Incorrect Message</faultcode><faultstring>No Addressing
Headers Available in this Message</faultstring><detail><ns1:stackTrace
xmlns:ns1="http://xml.apache.org/axis/">No Addressing Headers Available in
this Message

               at
org.apache.sandesha.server.MessageValidator.validate(MessageValidator.java:7
3)

               at
org.apache.sandesha.ws.rm.providers.RMProvider.processMessage(RMProvider.jav
a:86)

               at
org.apache.sandesha.ws.rm.providers.RMClientProvider.processMessage(RMClient
Provider.java:29)

               at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)

               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.handlers.soap.SOAPService.invoke(SOAPService.java:453)

               at
org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)

               at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)

               at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

               at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:
327)

               at
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

               at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)

               at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)

               at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
va:81)

               at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)

               at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)

               at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)

               at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)

               at
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalVal
ve.java:39)

               at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci
ationValve.java:153)

               at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:
59)

               at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)

               at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)

               at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)

               at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

               at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)

               at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:744)

               at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)

               at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThre
ad.java:112)

               at java.lang.Thread.run(Thread.java:595)

</ns1:stackTrace><ns2:hostname
xmlns:ns2="http://xml.apache.org/axis/">XXXXHOST</ns2:hostname></detail></so
apenv:Fault></soapenv:Body></soapenv:Envelope>

 

My Stub has the following code:

 

public ipt.tas.gateway.common.DataObjectSet
query(ipt.tas.gateway.common.Query query) 

                         throws java.rmi.RemoteException,
ipt.tas.gateway.common.GatewayServiceException {

 

        if (super.cachedEndpoint == null) {

            throw new org.apache.axis.NoEndPointException();

        }

 

        String defaultServerPort = "8070";

        String defaultClientPort = "9070";

        String targetURL = "http://localhost:" + defaultServerPort +
"/gateway/services/DataMaintenanceSOAPPort";

       SandeshaContext ctx = new SandeshaContext();

       ctx.setAcksToURL(Constants.WSA.NS_ADDRESSING_ANONYMOUS);

       ctx.setReplyToURL("http://127.0.0.1:" + defaultClientPort +
"/gateway/services/DataMaintenanceSOAPPort");

       //ctx.setSendOffer(true);

       org.apache.axis.client.Call _call = createCall();

       ctx.initCall(_call, targetURL, "urn:wsrm:query",
org.apache.sandesha.Constants.ClientProperties.IN_OUT);

       _call.setOperation(_operations[0]);

       _call.setUseSOAPAction(true);

       _call.setSOAPActionURI("query");

       _call.setEncodingStyle(null);

       _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR,
Boolean.FALSE);

       _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS,
Boolean.FALSE);

 
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);

       _call.setOperationName(new javax.xml.namespace.QName("", "query"));

       setRequestHeaders(_call);

       setAttachments(_call);

       try {

            java.lang.Object _resp = _call.invoke(new java.lang.Object[]
{query});

            ctx.setLastMessage(_call);

 

            if (_resp instanceof java.rmi.RemoteException) {

                throw (java.rmi.RemoteException)_resp;

            }

            else {

                extractAttachments(_call);

            try {

                return (ipt.tas.gateway.common.DataObjectSet) _resp;

            } catch (java.lang.Exception _exception) {

                return (ipt.tas.gateway.common.DataObjectSet)
org.apache.axis.utils.JavaUtils.convert(_resp,
ipt.tas.gateway.common.DataObjectSet.class);

            }

        }

  } catch (org.apache.axis.AxisFault axisFaultException) {

    if (axisFaultException.detail != null) {

        if (axisFaultException.detail instanceof java.rmi.RemoteException) {

              throw (java.rmi.RemoteException) axisFaultException.detail;

         }

        if (axisFaultException.detail instanceof
ipt.tas.gateway.common.GatewayServiceException) {

              throw (ipt.tas.gateway.common.GatewayServiceException)
axisFaultException.detail;

         }

   }

  throw axisFaultException;

}

 

Request has Addressing handlers so why do I get following error in JBOSS
server?

 

10:59:45,921 ERROR [MessageValidator] No Addressing Headers Available in
this Message

 

 

Do I need to define message header elements in my WSDL?

 

 

 

Thanks once again for looking into this.

 

 

Lakshmi Chaparala

Software Engineer

Intelligent Software Solutions

 

 

-----Original Message-----
From: Saminda Abeyruwan [mailto:saminda@opensource.lk] 
Sent: Monday, August 08, 2005 8:48 PM
To: lakshmi.chaparala@issinc.com; sandesha-dev@ws.apache.org;
jaliya@opensource.lk
Subject: [Sandesha] Run ontop of Jboss

 

Hi Lakshmi,

 

First of all, i must say, Sandesha1.0 work perfectly on top of jboss 

4.0.2. I ran all the samples through "ant" and "intele-j idea. Should 

you follow the following instructions precisely, to work this perfectly.

 

   1.

 

      Copy "axis.war" to ${jboss.home}/server/default/deploy folder.

      Make sure "axis.war" contains following jars,

 

activation.jar commons-discovery-0.2.jar

 

addressing-SNAPSHOT.jar commons-httpclient-3.0-rc2.jar Sandesha-1.0.jar

 

axis-1.2.jar commons-logging-1.0.4.jar Sandesha-samples.jar

 

axis-ant-1.2.jar wsdl4j-1.5.1.jar

 

axis-jaxrpc-1.2.jar junit-3.8.1.jar xercesImpl.jar

 

axis-saaj-1.2.jar log4j-1.2.8.jar xerces.jar

 

axis-wsdl4j-1.2.jar mailapi_1_3_1.jar xmlParserAPIs.jar

 

 

they should be in "axis.war"'s WEB-INF/lib.

 

   2.

 

      Copy the samples "server-config.wsdd" to WEB-INF folder.

 

   3.

 

      If the samples are run on IDE make sure Sandesha-1.0.jar and

      Sandeshaa-samples.jar on the classpath.

 

   4.

 

      Trush me, if things fine, sandesha works really fine ontop of Jboss.

 

5. Use "ant" tasks or your favourit IDE to run the samples.

 

"axis.war" structure,

 

axis

 

-- WEB-INF

 

-- lib

 

-- Sandesha-1.0 jar

 

-- etc ...jar

 

-- server-config.wsdd

 

-- web.xml

 

Saminda

 

 

 

 

---------------------------------------------------------------------

To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org

For additional commands, e-mail: sandesha-dev-help@ws.apache.org

 


Mime
View raw message